From f8e18083c44d0a751c0943564eb4b3a43f73f20e Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 10 Jan 2023 10:19:02 -0500 Subject: [PATCH 01/12] chore: removed migrated grpc- and proto- modules The proto- and grpc- modules have been migrated to https://github.com/googleapis/gapic-generator-java/tree/main/java-iam --- .github/.OwlBot.yaml | 16 +- google-iam-policy/pom.xml | 6 +- grpc-google-iam-v1/LICENSE | 201 - grpc-google-iam-v1/build.gradle | 49 - grpc-google-iam-v1/pom.xml | 65 - .../java/com/google/iam/v1/IAMPolicyGrpc.java | 689 ---- grpc-google-iam-v2/pom.xml | 69 - .../java/com/google/iam/v2/PoliciesGrpc.java | 813 ---- grpc-google-iam-v2beta/pom.xml | 69 - .../com/google/iam/v2beta/PoliciesGrpc.java | 815 ---- pom.xml | 36 +- proto-google-iam-v1/LICENSE | 201 - proto-google-iam-v1/build.gradle | 52 - .../clirr-ignored-differences.xml | 33 - proto-google-iam-v1/pom.xml | 32 - .../java/com/google/iam/v1/AuditConfig.java | 1204 ------ .../com/google/iam/v1/AuditConfigDelta.java | 1330 ------- .../iam/v1/AuditConfigDeltaOrBuilder.java | 141 - .../google/iam/v1/AuditConfigOrBuilder.java | 106 - .../com/google/iam/v1/AuditLogConfig.java | 1089 ------ .../iam/v1/AuditLogConfigOrBuilder.java | 109 - .../main/java/com/google/iam/v1/Binding.java | 1622 -------- .../java/com/google/iam/v1/BindingDelta.java | 1379 ------- .../google/iam/v1/BindingDeltaOrBuilder.java | 145 - .../com/google/iam/v1/BindingOrBuilder.java | 282 -- .../google/iam/v1/GetIamPolicyRequest.java | 910 ----- .../iam/v1/GetIamPolicyRequestOrBuilder.java | 94 - .../com/google/iam/v1/GetPolicyOptions.java | 574 --- .../iam/v1/GetPolicyOptionsOrBuilder.java | 51 - .../com/google/iam/v1/IamPolicyProto.java | 149 - .../java/com/google/iam/v1/OptionsProto.java | 65 - .../main/java/com/google/iam/v1/Policy.java | 1984 ---------- .../java/com/google/iam/v1/PolicyDelta.java | 1410 ------- .../google/iam/v1/PolicyDeltaOrBuilder.java | 128 - .../com/google/iam/v1/PolicyOrBuilder.java | 220 -- .../java/com/google/iam/v1/PolicyProto.java | 161 - .../google/iam/v1/SetIamPolicyRequest.java | 1225 ------ .../iam/v1/SetIamPolicyRequestOrBuilder.java | 144 - .../iam/v1/TestIamPermissionsRequest.java | 947 ----- .../TestIamPermissionsRequestOrBuilder.java | 119 - .../iam/v1/TestIamPermissionsResponse.java | 722 ---- .../TestIamPermissionsResponseOrBuilder.java | 80 - .../com/google/iam/v1/logging/AuditData.java | 729 ---- .../iam/v1/logging/AuditDataOrBuilder.java | 60 - .../google/iam/v1/logging/AuditDataProto.java | 73 - .../main/proto/google/iam/v1/iam_policy.proto | 137 - .../google/iam/v1/logging/audit_data.proto | 34 - .../main/proto/google/iam/v1/options.proto | 41 - .../src/main/proto/google/iam/v1/policy.proto | 239 -- .../clirr-ignored-differences.xml | 19 - proto-google-iam-v2/pom.xml | 34 - .../google/iam/v2/CreatePolicyRequest.java | 1117 ------ .../iam/v2/CreatePolicyRequestOrBuilder.java | 130 - .../google/iam/v2/DeletePolicyRequest.java | 860 ----- .../iam/v2/DeletePolicyRequestOrBuilder.java | 95 - .../main/java/com/google/iam/v2/DenyRule.java | 2449 ------------ .../com/google/iam/v2/DenyRuleOrBuilder.java | 468 --- .../java/com/google/iam/v2/DenyRuleProto.java | 75 - .../com/google/iam/v2/GetPolicyRequest.java | 652 ---- .../iam/v2/GetPolicyRequestOrBuilder.java | 62 - .../google/iam/v2/ListPoliciesRequest.java | 948 ----- .../iam/v2/ListPoliciesRequestOrBuilder.java | 107 - .../google/iam/v2/ListPoliciesResponse.java | 1100 ------ .../iam/v2/ListPoliciesResponseOrBuilder.java | 103 - .../main/java/com/google/iam/v2/Policy.java | 3289 ----------------- .../iam/v2/PolicyOperationMetadata.java | 698 ---- .../v2/PolicyOperationMetadataOrBuilder.java | 60 - .../com/google/iam/v2/PolicyOrBuilder.java | 439 --- .../java/com/google/iam/v2/PolicyProto.java | 256 -- .../java/com/google/iam/v2/PolicyRule.java | 980 ----- .../google/iam/v2/PolicyRuleOrBuilder.java | 89 - .../google/iam/v2/UpdatePolicyRequest.java | 726 ---- .../iam/v2/UpdatePolicyRequestOrBuilder.java | 69 - .../src/main/proto/google/iam/v2/deny.proto | 109 - .../src/main/proto/google/iam/v2/policy.proto | 287 -- .../clirr-ignored-differences.xml | 19 - proto-google-iam-v2beta/pom.xml | 34 - .../iam/v2beta/CreatePolicyRequest.java | 1121 ------ .../v2beta/CreatePolicyRequestOrBuilder.java | 130 - .../iam/v2beta/DeletePolicyRequest.java | 862 ----- .../v2beta/DeletePolicyRequestOrBuilder.java | 95 - .../java/com/google/iam/v2beta/DenyRule.java | 2453 ------------ .../google/iam/v2beta/DenyRuleOrBuilder.java | 468 --- .../com/google/iam/v2beta/DenyRuleProto.java | 77 - .../google/iam/v2beta/GetPolicyRequest.java | 655 ---- .../iam/v2beta/GetPolicyRequestOrBuilder.java | 62 - .../iam/v2beta/ListPoliciesRequest.java | 950 ----- .../v2beta/ListPoliciesRequestOrBuilder.java | 107 - .../iam/v2beta/ListPoliciesResponse.java | 1106 ------ .../v2beta/ListPoliciesResponseOrBuilder.java | 103 - .../java/com/google/iam/v2beta/Policy.java | 3111 ---------------- .../iam/v2beta/PolicyOperationMetadata.java | 698 ---- .../PolicyOperationMetadataOrBuilder.java | 60 - .../google/iam/v2beta/PolicyOrBuilder.java | 412 --- .../com/google/iam/v2beta/PolicyProto.java | 257 -- .../com/google/iam/v2beta/PolicyRule.java | 985 ----- .../iam/v2beta/PolicyRuleOrBuilder.java | 89 - .../iam/v2beta/UpdatePolicyRequest.java | 730 ---- .../v2beta/UpdatePolicyRequestOrBuilder.java | 69 - .../main/proto/google/iam/v2beta/deny.proto | 109 - .../main/proto/google/iam/v2beta/policy.proto | 283 -- 101 files changed, 14 insertions(+), 51101 deletions(-) delete mode 100644 grpc-google-iam-v1/LICENSE delete mode 100644 grpc-google-iam-v1/build.gradle delete mode 100644 grpc-google-iam-v1/pom.xml delete mode 100644 grpc-google-iam-v1/src/main/java/com/google/iam/v1/IAMPolicyGrpc.java delete mode 100644 grpc-google-iam-v2/pom.xml delete mode 100644 grpc-google-iam-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java delete mode 100644 grpc-google-iam-v2beta/pom.xml delete mode 100644 grpc-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PoliciesGrpc.java delete mode 100644 proto-google-iam-v1/LICENSE delete mode 100644 proto-google-iam-v1/build.gradle delete mode 100644 proto-google-iam-v1/clirr-ignored-differences.xml delete mode 100644 proto-google-iam-v1/pom.xml delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfig.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDeltaOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfigOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/Binding.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDelta.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDeltaOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptionsOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/IamPolicyProto.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/OptionsProto.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/Policy.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDelta.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDeltaOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyProto.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequestOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponseOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditData.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditDataOrBuilder.java delete mode 100644 proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditDataProto.java delete mode 100644 proto-google-iam-v1/src/main/proto/google/iam/v1/iam_policy.proto delete mode 100644 proto-google-iam-v1/src/main/proto/google/iam/v1/logging/audit_data.proto delete mode 100644 proto-google-iam-v1/src/main/proto/google/iam/v1/options.proto delete mode 100644 proto-google-iam-v1/src/main/proto/google/iam/v1/policy.proto delete mode 100644 proto-google-iam-v2/clirr-ignored-differences.xml delete mode 100644 proto-google-iam-v2/pom.xml delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRuleOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRuleProto.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadataOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRuleOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java delete mode 100644 proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v2/src/main/proto/google/iam/v2/deny.proto delete mode 100644 proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto delete mode 100644 proto-google-iam-v2beta/clirr-ignored-differences.xml delete mode 100644 proto-google-iam-v2beta/pom.xml delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleProto.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequestOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponseOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadataOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyProto.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRuleOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java delete mode 100644 proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequestOrBuilder.java delete mode 100644 proto-google-iam-v2beta/src/main/proto/google/iam/v2beta/deny.proto delete mode 100644 proto-google-iam-v2beta/src/main/proto/google/iam/v2beta/policy.proto diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 5df4166a..7aa46a21 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -21,23 +21,9 @@ deep-remove-regex: deep-preserve-regex: - "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" - - "/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging" - - "/proto-google-iam-v1/src/main/proto/google/iam/v1" deep-copy-regex: - - source: "/google/iam/v1/google-iam-v1-java/grpc-google-iam-v1-java/src" - dest: "/owl-bot-staging/v1/grpc-google-iam-v1/src" - - source: "/google/iam/v1/google-iam-v1-java/proto-google-iam-v1-java/src" - dest: "/owl-bot-staging/v1/proto-google-iam-v1/src" - - source: "/google/iam/v2beta/google-cloud-iam-v2beta-java/grpc-google-cloud-iam-v2beta-java/src" - dest: "/owl-bot-staging/v2beta/grpc-google-iam-v2beta/src" - - source: "/google/iam/v2beta/google-cloud-iam-v2beta-java/proto-google-cloud-iam-v2beta-java/src" - dest: "/owl-bot-staging/v2beta/proto-google-iam-v2beta/src" - source: "/google/iam/v2beta/google-cloud-iam-v2beta-java/gapic-google-cloud-iam-v2beta-java/src" dest: "/owl-bot-staging/v2beta/google-iam-policy/src" - - source: "/google/iam/v2/google-cloud-iam-v2-java/grpc-google-cloud-iam-v2-java/src" - dest: "/owl-bot-staging/v2/grpc-google-iam-v2/src" - - source: "/google/iam/v2/google-cloud-iam-v2-java/proto-google-cloud-iam-v2-java/src" - dest: "/owl-bot-staging/v2/proto-google-iam-v2/src" - source: "/google/iam/v2/google-cloud-iam-v2-java/gapic-google-cloud-iam-v2-java/src" - dest: "/owl-bot-staging/v2/google-iam-policy/src" \ No newline at end of file + dest: "/owl-bot-staging/v2/google-iam-policy/src" diff --git a/google-iam-policy/pom.xml b/google-iam-policy/pom.xml index b7738970..88885cfa 100644 --- a/google-iam-policy/pom.xml +++ b/google-iam-policy/pom.xml @@ -10,8 +10,8 @@ Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. com.google.cloud - google-iam-parent - 1.6.24-SNAPSHOT + google-iam-policy-parent + 1.6.24-SNAPSHOT google-iam-policy @@ -133,4 +133,4 @@ - \ No newline at end of file + diff --git a/grpc-google-iam-v1/LICENSE b/grpc-google-iam-v1/LICENSE deleted file mode 100644 index a8ee855d..00000000 --- a/grpc-google-iam-v1/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - https://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 - - 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. diff --git a/grpc-google-iam-v1/build.gradle b/grpc-google-iam-v1/build.gradle deleted file mode 100644 index a346388d..00000000 --- a/grpc-google-iam-v1/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -buildscript { - repositories { - mavenCentral() - } -} - -apply plugin: 'java' - -description = 'GRPC library for grpc-google-iam-v1' -group = 'com.google.api.grpc' -version = "0.13.0" -sourceCompatibility = 1.7 -targetCompatibility = 1.7 - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - compile 'io.grpc:grpc-stub:1.51.1' - compile 'io.grpc:grpc-protobuf:1.51.1' - compile project(':proto-google-iam-v1') -} - -sourceSets { - main { - java { - srcDir 'src/main/java' - } - } -} - -task javadocJar(type: Jar) { - classifier = 'javadoc' - from javadoc -} - -task sourcesJar(type: Jar) { - classifier = 'sources' - from sourceSets.main.allSource -} - -artifacts { - archives javadocJar, sourcesJar -} - -compileJava.options.encoding = 'UTF-8' -javadoc.options.encoding = 'UTF-8' \ No newline at end of file diff --git a/grpc-google-iam-v1/pom.xml b/grpc-google-iam-v1/pom.xml deleted file mode 100644 index 61d120e0..00000000 --- a/grpc-google-iam-v1/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-iam-v1 - 1.6.24-SNAPSHOT - grpc-google-iam-v1 - GRPC library for grpc-google-iam-v1 - - com.google.cloud - google-iam-parent - 1.6.24-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.protobuf - protobuf-java - - - com.google.guava - guava - - - com.google.api.grpc - proto-google-iam-v1 - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - \ No newline at end of file diff --git a/grpc-google-iam-v1/src/main/java/com/google/iam/v1/IAMPolicyGrpc.java b/grpc-google-iam-v1/src/main/java/com/google/iam/v1/IAMPolicyGrpc.java deleted file mode 100644 index dc9f5653..00000000 --- a/grpc-google-iam-v1/src/main/java/com/google/iam/v1/IAMPolicyGrpc.java +++ /dev/null @@ -1,689 +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 - * - * 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. - */ -package com.google.iam.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * API Overview
- * Manages Identity and Access Management (IAM) policies.
- * Any implementation of an API that offers access control features
- * implements the google.iam.v1.IAMPolicy interface.
- * ## Data model
- * Access control is applied when a principal (user or service account), takes
- * some action on a resource exposed by a service. Resources, identified by
- * URI-like names, are the unit of access control specification. Service
- * implementations can choose the granularity of access control and the
- * supported permissions for their resources.
- * For example one database service may allow access control to be
- * specified only at the Table level, whereas another might allow access control
- * to also be specified at the Column level.
- * ## Policy Structure
- * See google.iam.v1.Policy
- * This is intentionally not a CRUD style API because access control policies
- * are created and deleted implicitly with the resources to which they are
- * attached.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/iam/v1/iam_policy.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class IAMPolicyGrpc { - - private IAMPolicyGrpc() {} - - public static final String SERVICE_NAME = "google.iam.v1.IAMPolicy"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> - getSetIamPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", - requestType = com.google.iam.v1.SetIamPolicyRequest.class, - responseType = com.google.iam.v1.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> - getSetIamPolicyMethod() { - io.grpc.MethodDescriptor - getSetIamPolicyMethod; - if ((getSetIamPolicyMethod = IAMPolicyGrpc.getSetIamPolicyMethod) == null) { - synchronized (IAMPolicyGrpc.class) { - if ((getSetIamPolicyMethod = IAMPolicyGrpc.getSetIamPolicyMethod) == null) { - IAMPolicyGrpc.getSetIamPolicyMethod = - getSetIamPolicyMethod = - io.grpc.MethodDescriptor - .newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.Policy.getDefaultInstance())) - .setSchemaDescriptor(new IAMPolicyMethodDescriptorSupplier("SetIamPolicy")) - .build(); - } - } - } - return getSetIamPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> - getGetIamPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", - requestType = com.google.iam.v1.GetIamPolicyRequest.class, - responseType = com.google.iam.v1.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> - getGetIamPolicyMethod() { - io.grpc.MethodDescriptor - getGetIamPolicyMethod; - if ((getGetIamPolicyMethod = IAMPolicyGrpc.getGetIamPolicyMethod) == null) { - synchronized (IAMPolicyGrpc.class) { - if ((getGetIamPolicyMethod = IAMPolicyGrpc.getGetIamPolicyMethod) == null) { - IAMPolicyGrpc.getGetIamPolicyMethod = - getGetIamPolicyMethod = - io.grpc.MethodDescriptor - .newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.Policy.getDefaultInstance())) - .setSchemaDescriptor(new IAMPolicyMethodDescriptorSupplier("GetIamPolicy")) - .build(); - } - } - } - return getGetIamPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> - getTestIamPermissionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "TestIamPermissions", - requestType = com.google.iam.v1.TestIamPermissionsRequest.class, - responseType = com.google.iam.v1.TestIamPermissionsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> - getTestIamPermissionsMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v1.TestIamPermissionsRequest, - com.google.iam.v1.TestIamPermissionsResponse> - getTestIamPermissionsMethod; - if ((getTestIamPermissionsMethod = IAMPolicyGrpc.getTestIamPermissionsMethod) == null) { - synchronized (IAMPolicyGrpc.class) { - if ((getTestIamPermissionsMethod = IAMPolicyGrpc.getTestIamPermissionsMethod) == null) { - IAMPolicyGrpc.getTestIamPermissionsMethod = - getTestIamPermissionsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TestIamPermissions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance())) - .setSchemaDescriptor( - new IAMPolicyMethodDescriptorSupplier("TestIamPermissions")) - .build(); - } - } - } - return getTestIamPermissionsMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static IAMPolicyStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public IAMPolicyStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new IAMPolicyStub(channel, callOptions); - } - }; - return IAMPolicyStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static IAMPolicyBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public IAMPolicyBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new IAMPolicyBlockingStub(channel, callOptions); - } - }; - return IAMPolicyBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static IAMPolicyFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public IAMPolicyFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new IAMPolicyFutureStub(channel, callOptions); - } - }; - return IAMPolicyFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * API Overview
-   * Manages Identity and Access Management (IAM) policies.
-   * Any implementation of an API that offers access control features
-   * implements the google.iam.v1.IAMPolicy interface.
-   * ## Data model
-   * Access control is applied when a principal (user or service account), takes
-   * some action on a resource exposed by a service. Resources, identified by
-   * URI-like names, are the unit of access control specification. Service
-   * implementations can choose the granularity of access control and the
-   * supported permissions for their resources.
-   * For example one database service may allow access control to be
-   * specified only at the Table level, whereas another might allow access control
-   * to also be specified at the Column level.
-   * ## Policy Structure
-   * See google.iam.v1.Policy
-   * This is intentionally not a CRUD style API because access control policies
-   * are created and deleted implicitly with the resources to which they are
-   * attached.
-   * 
- */ - public abstract static class IAMPolicyImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Sets the access control policy on the specified resource. Replaces any
-     * existing policy.
-     * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
-     * 
- */ - public void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getSetIamPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the access control policy for a resource.
-     * Returns an empty policy if the resource exists and does not have a policy
-     * set.
-     * 
- */ - public void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetIamPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Returns permissions that a caller has on the specified resource.
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a `NOT_FOUND` error.
-     * Note: This operation is designed to be used for building permission-aware
-     * UIs and command-line tools, not for authorization checking. This operation
-     * may "fail open" without warning.
-     * 
- */ - public void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getTestIamPermissionsMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSetIamPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy>( - this, METHODID_SET_IAM_POLICY))) - .addMethod( - getGetIamPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy>( - this, METHODID_GET_IAM_POLICY))) - .addMethod( - getTestIamPermissionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v1.TestIamPermissionsRequest, - com.google.iam.v1.TestIamPermissionsResponse>( - this, METHODID_TEST_IAM_PERMISSIONS))) - .build(); - } - } - - /** - * - * - *
-   * API Overview
-   * Manages Identity and Access Management (IAM) policies.
-   * Any implementation of an API that offers access control features
-   * implements the google.iam.v1.IAMPolicy interface.
-   * ## Data model
-   * Access control is applied when a principal (user or service account), takes
-   * some action on a resource exposed by a service. Resources, identified by
-   * URI-like names, are the unit of access control specification. Service
-   * implementations can choose the granularity of access control and the
-   * supported permissions for their resources.
-   * For example one database service may allow access control to be
-   * specified only at the Table level, whereas another might allow access control
-   * to also be specified at the Column level.
-   * ## Policy Structure
-   * See google.iam.v1.Policy
-   * This is intentionally not a CRUD style API because access control policies
-   * are created and deleted implicitly with the resources to which they are
-   * attached.
-   * 
- */ - public static final class IAMPolicyStub extends io.grpc.stub.AbstractAsyncStub { - private IAMPolicyStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected IAMPolicyStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new IAMPolicyStub(channel, callOptions); - } - - /** - * - * - *
-     * Sets the access control policy on the specified resource. Replaces any
-     * existing policy.
-     * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
-     * 
- */ - public void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the access control policy for a resource.
-     * Returns an empty policy if the resource exists and does not have a policy
-     * set.
-     * 
- */ - public void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Returns permissions that a caller has on the specified resource.
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a `NOT_FOUND` error.
-     * Note: This operation is designed to be used for building permission-aware
-     * UIs and command-line tools, not for authorization checking. This operation
-     * may "fail open" without warning.
-     * 
- */ - public void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * API Overview
-   * Manages Identity and Access Management (IAM) policies.
-   * Any implementation of an API that offers access control features
-   * implements the google.iam.v1.IAMPolicy interface.
-   * ## Data model
-   * Access control is applied when a principal (user or service account), takes
-   * some action on a resource exposed by a service. Resources, identified by
-   * URI-like names, are the unit of access control specification. Service
-   * implementations can choose the granularity of access control and the
-   * supported permissions for their resources.
-   * For example one database service may allow access control to be
-   * specified only at the Table level, whereas another might allow access control
-   * to also be specified at the Column level.
-   * ## Policy Structure
-   * See google.iam.v1.Policy
-   * This is intentionally not a CRUD style API because access control policies
-   * are created and deleted implicitly with the resources to which they are
-   * attached.
-   * 
- */ - public static final class IAMPolicyBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private IAMPolicyBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected IAMPolicyBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new IAMPolicyBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Sets the access control policy on the specified resource. Replaces any
-     * existing policy.
-     * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
-     * 
- */ - public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the access control policy for a resource.
-     * Returns an empty policy if the resource exists and does not have a policy
-     * set.
-     * 
- */ - public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Returns permissions that a caller has on the specified resource.
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a `NOT_FOUND` error.
-     * Note: This operation is designed to be used for building permission-aware
-     * UIs and command-line tools, not for authorization checking. This operation
-     * may "fail open" without warning.
-     * 
- */ - public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * API Overview
-   * Manages Identity and Access Management (IAM) policies.
-   * Any implementation of an API that offers access control features
-   * implements the google.iam.v1.IAMPolicy interface.
-   * ## Data model
-   * Access control is applied when a principal (user or service account), takes
-   * some action on a resource exposed by a service. Resources, identified by
-   * URI-like names, are the unit of access control specification. Service
-   * implementations can choose the granularity of access control and the
-   * supported permissions for their resources.
-   * For example one database service may allow access control to be
-   * specified only at the Table level, whereas another might allow access control
-   * to also be specified at the Column level.
-   * ## Policy Structure
-   * See google.iam.v1.Policy
-   * This is intentionally not a CRUD style API because access control policies
-   * are created and deleted implicitly with the resources to which they are
-   * attached.
-   * 
- */ - public static final class IAMPolicyFutureStub - extends io.grpc.stub.AbstractFutureStub { - private IAMPolicyFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected IAMPolicyFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new IAMPolicyFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Sets the access control policy on the specified resource. Replaces any
-     * existing policy.
-     * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the access control policy for a resource.
-     * Returns an empty policy if the resource exists and does not have a policy
-     * set.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Returns permissions that a caller has on the specified resource.
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a `NOT_FOUND` error.
-     * Note: This operation is designed to be used for building permission-aware
-     * UIs and command-line tools, not for authorization checking. This operation
-     * may "fail open" without warning.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.iam.v1.TestIamPermissionsResponse> - testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_SET_IAM_POLICY = 0; - private static final int METHODID_GET_IAM_POLICY = 1; - private static final int METHODID_TEST_IAM_PERMISSIONS = 2; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final IAMPolicyImplBase serviceImpl; - private final int methodId; - - MethodHandlers(IAMPolicyImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_SET_IAM_POLICY: - serviceImpl.setIamPolicy( - (com.google.iam.v1.SetIamPolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_IAM_POLICY: - serviceImpl.getIamPolicy( - (com.google.iam.v1.GetIamPolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_TEST_IAM_PERMISSIONS: - serviceImpl.testIamPermissions( - (com.google.iam.v1.TestIamPermissionsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class IAMPolicyBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - IAMPolicyBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.iam.v1.IamPolicyProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("IAMPolicy"); - } - } - - private static final class IAMPolicyFileDescriptorSupplier - extends IAMPolicyBaseDescriptorSupplier { - IAMPolicyFileDescriptorSupplier() {} - } - - private static final class IAMPolicyMethodDescriptorSupplier - extends IAMPolicyBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - IAMPolicyMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (IAMPolicyGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new IAMPolicyFileDescriptorSupplier()) - .addMethod(getSetIamPolicyMethod()) - .addMethod(getGetIamPolicyMethod()) - .addMethod(getTestIamPermissionsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-iam-v2/pom.xml b/grpc-google-iam-v2/pom.xml deleted file mode 100644 index 4165b973..00000000 --- a/grpc-google-iam-v2/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-iam-v2 - 1.6.24-SNAPSHOT - grpc-google-iam-v2 - GRPC library for proto-google-iam-v2 - - com.google.cloud - google-iam-parent - 1.6.24-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api.grpc - proto-google-iam-v2 - - - com.google.guava - guava - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/grpc-google-iam-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java b/grpc-google-iam-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java deleted file mode 100644 index bfd3857e..00000000 --- a/grpc-google-iam-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java +++ /dev/null @@ -1,813 +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 - * - * 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. - */ -package com.google.iam.v2; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * An interface for managing Identity and Access Management (IAM) policies.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/iam/v2/policy.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class PoliciesGrpc { - - private PoliciesGrpc() {} - - public static final String SERVICE_NAME = "google.iam.v2.Policies"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2.ListPoliciesRequest, com.google.iam.v2.ListPoliciesResponse> - getListPoliciesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListPolicies", - requestType = com.google.iam.v2.ListPoliciesRequest.class, - responseType = com.google.iam.v2.ListPoliciesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2.ListPoliciesRequest, com.google.iam.v2.ListPoliciesResponse> - getListPoliciesMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v2.ListPoliciesRequest, com.google.iam.v2.ListPoliciesResponse> - getListPoliciesMethod; - if ((getListPoliciesMethod = PoliciesGrpc.getListPoliciesMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getListPoliciesMethod = PoliciesGrpc.getListPoliciesMethod) == null) { - PoliciesGrpc.getListPoliciesMethod = - getListPoliciesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2.ListPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2.ListPoliciesResponse.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("ListPolicies")) - .build(); - } - } - } - return getListPoliciesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2.GetPolicyRequest, com.google.iam.v2.Policy> - getGetPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicy", - requestType = com.google.iam.v2.GetPolicyRequest.class, - responseType = com.google.iam.v2.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2.GetPolicyRequest, com.google.iam.v2.Policy> - getGetPolicyMethod() { - io.grpc.MethodDescriptor - getGetPolicyMethod; - if ((getGetPolicyMethod = PoliciesGrpc.getGetPolicyMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getGetPolicyMethod = PoliciesGrpc.getGetPolicyMethod) == null) { - PoliciesGrpc.getGetPolicyMethod = - getGetPolicyMethod = - io.grpc.MethodDescriptor - .newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2.GetPolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2.Policy.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("GetPolicy")) - .build(); - } - } - } - return getGetPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2.CreatePolicyRequest, com.google.longrunning.Operation> - getCreatePolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreatePolicy", - requestType = com.google.iam.v2.CreatePolicyRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2.CreatePolicyRequest, com.google.longrunning.Operation> - getCreatePolicyMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v2.CreatePolicyRequest, com.google.longrunning.Operation> - getCreatePolicyMethod; - if ((getCreatePolicyMethod = PoliciesGrpc.getCreatePolicyMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getCreatePolicyMethod = PoliciesGrpc.getCreatePolicyMethod) == null) { - PoliciesGrpc.getCreatePolicyMethod = - getCreatePolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreatePolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2.CreatePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("CreatePolicy")) - .build(); - } - } - } - return getCreatePolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2.UpdatePolicyRequest, com.google.longrunning.Operation> - getUpdatePolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdatePolicy", - requestType = com.google.iam.v2.UpdatePolicyRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2.UpdatePolicyRequest, com.google.longrunning.Operation> - getUpdatePolicyMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v2.UpdatePolicyRequest, com.google.longrunning.Operation> - getUpdatePolicyMethod; - if ((getUpdatePolicyMethod = PoliciesGrpc.getUpdatePolicyMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getUpdatePolicyMethod = PoliciesGrpc.getUpdatePolicyMethod) == null) { - PoliciesGrpc.getUpdatePolicyMethod = - getUpdatePolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2.UpdatePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("UpdatePolicy")) - .build(); - } - } - } - return getUpdatePolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2.DeletePolicyRequest, com.google.longrunning.Operation> - getDeletePolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeletePolicy", - requestType = com.google.iam.v2.DeletePolicyRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2.DeletePolicyRequest, com.google.longrunning.Operation> - getDeletePolicyMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v2.DeletePolicyRequest, com.google.longrunning.Operation> - getDeletePolicyMethod; - if ((getDeletePolicyMethod = PoliciesGrpc.getDeletePolicyMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getDeletePolicyMethod = PoliciesGrpc.getDeletePolicyMethod) == null) { - PoliciesGrpc.getDeletePolicyMethod = - getDeletePolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeletePolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2.DeletePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("DeletePolicy")) - .build(); - } - } - } - return getDeletePolicyMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static PoliciesStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PoliciesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesStub(channel, callOptions); - } - }; - return PoliciesStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static PoliciesBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PoliciesBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesBlockingStub(channel, callOptions); - } - }; - return PoliciesBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static PoliciesFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PoliciesFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesFutureStub(channel, callOptions); - } - }; - return PoliciesFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * An interface for managing Identity and Access Management (IAM) policies.
-   * 
- */ - public abstract static class PoliciesImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Retrieves the policies of the specified kind that are attached to a
-     * resource.
-     * The response lists only policy metadata. In particular, policy rules are
-     * omitted.
-     * 
- */ - public void listPolicies( - com.google.iam.v2.ListPoliciesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListPoliciesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets a policy.
-     * 
- */ - public void getPolicy( - com.google.iam.v2.GetPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a policy.
-     * 
- */ - public void createPolicy( - com.google.iam.v2.CreatePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreatePolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the specified policy.
-     * You can update only the rules and the display name for the policy.
-     * To update a policy, you should use a read-modify-write loop:
-     * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
-     * 2. Modify the policy as needed.
-     * 3. Use `UpdatePolicy` to write the updated policy.
-     * This pattern helps prevent conflicts between concurrent updates.
-     * 
- */ - public void updatePolicy( - com.google.iam.v2.UpdatePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdatePolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a policy. This action is permanent.
-     * 
- */ - public void deletePolicy( - com.google.iam.v2.DeletePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeletePolicyMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListPoliciesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2.ListPoliciesRequest, - com.google.iam.v2.ListPoliciesResponse>(this, METHODID_LIST_POLICIES))) - .addMethod( - getGetPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers( - this, METHODID_GET_POLICY))) - .addMethod( - getCreatePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2.CreatePolicyRequest, com.google.longrunning.Operation>( - this, METHODID_CREATE_POLICY))) - .addMethod( - getUpdatePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2.UpdatePolicyRequest, com.google.longrunning.Operation>( - this, METHODID_UPDATE_POLICY))) - .addMethod( - getDeletePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2.DeletePolicyRequest, com.google.longrunning.Operation>( - this, METHODID_DELETE_POLICY))) - .build(); - } - } - - /** - * - * - *
-   * An interface for managing Identity and Access Management (IAM) policies.
-   * 
- */ - public static final class PoliciesStub extends io.grpc.stub.AbstractAsyncStub { - private PoliciesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PoliciesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesStub(channel, callOptions); - } - - /** - * - * - *
-     * Retrieves the policies of the specified kind that are attached to a
-     * resource.
-     * The response lists only policy metadata. In particular, policy rules are
-     * omitted.
-     * 
- */ - public void listPolicies( - com.google.iam.v2.ListPoliciesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListPoliciesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets a policy.
-     * 
- */ - public void getPolicy( - com.google.iam.v2.GetPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a policy.
-     * 
- */ - public void createPolicy( - com.google.iam.v2.CreatePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreatePolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the specified policy.
-     * You can update only the rules and the display name for the policy.
-     * To update a policy, you should use a read-modify-write loop:
-     * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
-     * 2. Modify the policy as needed.
-     * 3. Use `UpdatePolicy` to write the updated policy.
-     * This pattern helps prevent conflicts between concurrent updates.
-     * 
- */ - public void updatePolicy( - com.google.iam.v2.UpdatePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a policy. This action is permanent.
-     * 
- */ - public void deletePolicy( - com.google.iam.v2.DeletePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeletePolicyMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * An interface for managing Identity and Access Management (IAM) policies.
-   * 
- */ - public static final class PoliciesBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private PoliciesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PoliciesBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Retrieves the policies of the specified kind that are attached to a
-     * resource.
-     * The response lists only policy metadata. In particular, policy rules are
-     * omitted.
-     * 
- */ - public com.google.iam.v2.ListPoliciesResponse listPolicies( - com.google.iam.v2.ListPoliciesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListPoliciesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets a policy.
-     * 
- */ - public com.google.iam.v2.Policy getPolicy(com.google.iam.v2.GetPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a policy.
-     * 
- */ - public com.google.longrunning.Operation createPolicy( - com.google.iam.v2.CreatePolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreatePolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the specified policy.
-     * You can update only the rules and the display name for the policy.
-     * To update a policy, you should use a read-modify-write loop:
-     * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
-     * 2. Modify the policy as needed.
-     * 3. Use `UpdatePolicy` to write the updated policy.
-     * This pattern helps prevent conflicts between concurrent updates.
-     * 
- */ - public com.google.longrunning.Operation updatePolicy( - com.google.iam.v2.UpdatePolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdatePolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a policy. This action is permanent.
-     * 
- */ - public com.google.longrunning.Operation deletePolicy( - com.google.iam.v2.DeletePolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeletePolicyMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * An interface for managing Identity and Access Management (IAM) policies.
-   * 
- */ - public static final class PoliciesFutureStub - extends io.grpc.stub.AbstractFutureStub { - private PoliciesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PoliciesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Retrieves the policies of the specified kind that are attached to a
-     * resource.
-     * The response lists only policy metadata. In particular, policy rules are
-     * omitted.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.iam.v2.ListPoliciesResponse> - listPolicies(com.google.iam.v2.ListPoliciesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListPoliciesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets a policy.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getPolicy( - com.google.iam.v2.GetPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a policy.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createPolicy(com.google.iam.v2.CreatePolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreatePolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the specified policy.
-     * You can update only the rules and the display name for the policy.
-     * To update a policy, you should use a read-modify-write loop:
-     * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
-     * 2. Modify the policy as needed.
-     * 3. Use `UpdatePolicy` to write the updated policy.
-     * This pattern helps prevent conflicts between concurrent updates.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updatePolicy(com.google.iam.v2.UpdatePolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a policy. This action is permanent.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deletePolicy(com.google.iam.v2.DeletePolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeletePolicyMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_POLICIES = 0; - private static final int METHODID_GET_POLICY = 1; - private static final int METHODID_CREATE_POLICY = 2; - private static final int METHODID_UPDATE_POLICY = 3; - private static final int METHODID_DELETE_POLICY = 4; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final PoliciesImplBase serviceImpl; - private final int methodId; - - MethodHandlers(PoliciesImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_POLICIES: - serviceImpl.listPolicies( - (com.google.iam.v2.ListPoliciesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_POLICY: - serviceImpl.getPolicy( - (com.google.iam.v2.GetPolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_POLICY: - serviceImpl.createPolicy( - (com.google.iam.v2.CreatePolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_POLICY: - serviceImpl.updatePolicy( - (com.google.iam.v2.UpdatePolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_POLICY: - serviceImpl.deletePolicy( - (com.google.iam.v2.DeletePolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class PoliciesBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - PoliciesBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.iam.v2.PolicyProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Policies"); - } - } - - private static final class PoliciesFileDescriptorSupplier extends PoliciesBaseDescriptorSupplier { - PoliciesFileDescriptorSupplier() {} - } - - private static final class PoliciesMethodDescriptorSupplier extends PoliciesBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - PoliciesMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (PoliciesGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new PoliciesFileDescriptorSupplier()) - .addMethod(getListPoliciesMethod()) - .addMethod(getGetPolicyMethod()) - .addMethod(getCreatePolicyMethod()) - .addMethod(getUpdatePolicyMethod()) - .addMethod(getDeletePolicyMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-iam-v2beta/pom.xml b/grpc-google-iam-v2beta/pom.xml deleted file mode 100644 index 588d748d..00000000 --- a/grpc-google-iam-v2beta/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-iam-v2beta - 1.6.24-SNAPSHOT - grpc-google-iam-v2beta - GRPC library for proto-google-iam-v1 - - com.google.cloud - google-iam-parent - 1.6.24-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api.grpc - proto-google-iam-v2beta - - - com.google.guava - guava - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/grpc-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PoliciesGrpc.java b/grpc-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PoliciesGrpc.java deleted file mode 100644 index 57458d9e..00000000 --- a/grpc-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PoliciesGrpc.java +++ /dev/null @@ -1,815 +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 - * - * 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. - */ -package com.google.iam.v2beta; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * An interface for managing Identity and Access Management (IAM) policies.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/iam/v2beta/policy.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class PoliciesGrpc { - - private PoliciesGrpc() {} - - public static final String SERVICE_NAME = "google.iam.v2beta.Policies"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2beta.ListPoliciesRequest, com.google.iam.v2beta.ListPoliciesResponse> - getListPoliciesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListPolicies", - requestType = com.google.iam.v2beta.ListPoliciesRequest.class, - responseType = com.google.iam.v2beta.ListPoliciesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2beta.ListPoliciesRequest, com.google.iam.v2beta.ListPoliciesResponse> - getListPoliciesMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v2beta.ListPoliciesRequest, com.google.iam.v2beta.ListPoliciesResponse> - getListPoliciesMethod; - if ((getListPoliciesMethod = PoliciesGrpc.getListPoliciesMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getListPoliciesMethod = PoliciesGrpc.getListPoliciesMethod) == null) { - PoliciesGrpc.getListPoliciesMethod = - getListPoliciesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2beta.ListPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2beta.ListPoliciesResponse.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("ListPolicies")) - .build(); - } - } - } - return getListPoliciesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2beta.GetPolicyRequest, com.google.iam.v2beta.Policy> - getGetPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicy", - requestType = com.google.iam.v2beta.GetPolicyRequest.class, - responseType = com.google.iam.v2beta.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2beta.GetPolicyRequest, com.google.iam.v2beta.Policy> - getGetPolicyMethod() { - io.grpc.MethodDescriptor - getGetPolicyMethod; - if ((getGetPolicyMethod = PoliciesGrpc.getGetPolicyMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getGetPolicyMethod = PoliciesGrpc.getGetPolicyMethod) == null) { - PoliciesGrpc.getGetPolicyMethod = - getGetPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2beta.GetPolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2beta.Policy.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("GetPolicy")) - .build(); - } - } - } - return getGetPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2beta.CreatePolicyRequest, com.google.longrunning.Operation> - getCreatePolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreatePolicy", - requestType = com.google.iam.v2beta.CreatePolicyRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2beta.CreatePolicyRequest, com.google.longrunning.Operation> - getCreatePolicyMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v2beta.CreatePolicyRequest, com.google.longrunning.Operation> - getCreatePolicyMethod; - if ((getCreatePolicyMethod = PoliciesGrpc.getCreatePolicyMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getCreatePolicyMethod = PoliciesGrpc.getCreatePolicyMethod) == null) { - PoliciesGrpc.getCreatePolicyMethod = - getCreatePolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreatePolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2beta.CreatePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("CreatePolicy")) - .build(); - } - } - } - return getCreatePolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2beta.UpdatePolicyRequest, com.google.longrunning.Operation> - getUpdatePolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdatePolicy", - requestType = com.google.iam.v2beta.UpdatePolicyRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2beta.UpdatePolicyRequest, com.google.longrunning.Operation> - getUpdatePolicyMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v2beta.UpdatePolicyRequest, com.google.longrunning.Operation> - getUpdatePolicyMethod; - if ((getUpdatePolicyMethod = PoliciesGrpc.getUpdatePolicyMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getUpdatePolicyMethod = PoliciesGrpc.getUpdatePolicyMethod) == null) { - PoliciesGrpc.getUpdatePolicyMethod = - getUpdatePolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2beta.UpdatePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("UpdatePolicy")) - .build(); - } - } - } - return getUpdatePolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2beta.DeletePolicyRequest, com.google.longrunning.Operation> - getDeletePolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeletePolicy", - requestType = com.google.iam.v2beta.DeletePolicyRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2beta.DeletePolicyRequest, com.google.longrunning.Operation> - getDeletePolicyMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v2beta.DeletePolicyRequest, com.google.longrunning.Operation> - getDeletePolicyMethod; - if ((getDeletePolicyMethod = PoliciesGrpc.getDeletePolicyMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getDeletePolicyMethod = PoliciesGrpc.getDeletePolicyMethod) == null) { - PoliciesGrpc.getDeletePolicyMethod = - getDeletePolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeletePolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2beta.DeletePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new PoliciesMethodDescriptorSupplier("DeletePolicy")) - .build(); - } - } - } - return getDeletePolicyMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static PoliciesStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PoliciesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesStub(channel, callOptions); - } - }; - return PoliciesStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static PoliciesBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PoliciesBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesBlockingStub(channel, callOptions); - } - }; - return PoliciesBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static PoliciesFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PoliciesFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesFutureStub(channel, callOptions); - } - }; - return PoliciesFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * An interface for managing Identity and Access Management (IAM) policies.
-   * 
- */ - public abstract static class PoliciesImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Retrieves the policies of the specified kind that are attached to a
-     * resource.
-     * The response lists only policy metadata. In particular, policy rules are
-     * omitted.
-     * 
- */ - public void listPolicies( - com.google.iam.v2beta.ListPoliciesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListPoliciesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets a policy.
-     * 
- */ - public void getPolicy( - com.google.iam.v2beta.GetPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a policy.
-     * 
- */ - public void createPolicy( - com.google.iam.v2beta.CreatePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreatePolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the specified policy.
-     * You can update only the rules and the display name for the policy.
-     * To update a policy, you should use a read-modify-write loop:
-     * 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy.
-     * 2. Modify the policy as needed.
-     * 3. Use `UpdatePolicy` to write the updated policy.
-     * This pattern helps prevent conflicts between concurrent updates.
-     * 
- */ - public void updatePolicy( - com.google.iam.v2beta.UpdatePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdatePolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a policy. This action is permanent.
-     * 
- */ - public void deletePolicy( - com.google.iam.v2beta.DeletePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeletePolicyMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListPoliciesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2beta.ListPoliciesRequest, - com.google.iam.v2beta.ListPoliciesResponse>(this, METHODID_LIST_POLICIES))) - .addMethod( - getGetPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2beta.GetPolicyRequest, com.google.iam.v2beta.Policy>( - this, METHODID_GET_POLICY))) - .addMethod( - getCreatePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2beta.CreatePolicyRequest, com.google.longrunning.Operation>( - this, METHODID_CREATE_POLICY))) - .addMethod( - getUpdatePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2beta.UpdatePolicyRequest, com.google.longrunning.Operation>( - this, METHODID_UPDATE_POLICY))) - .addMethod( - getDeletePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2beta.DeletePolicyRequest, com.google.longrunning.Operation>( - this, METHODID_DELETE_POLICY))) - .build(); - } - } - - /** - * - * - *
-   * An interface for managing Identity and Access Management (IAM) policies.
-   * 
- */ - public static final class PoliciesStub extends io.grpc.stub.AbstractAsyncStub { - private PoliciesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PoliciesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesStub(channel, callOptions); - } - - /** - * - * - *
-     * Retrieves the policies of the specified kind that are attached to a
-     * resource.
-     * The response lists only policy metadata. In particular, policy rules are
-     * omitted.
-     * 
- */ - public void listPolicies( - com.google.iam.v2beta.ListPoliciesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListPoliciesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets a policy.
-     * 
- */ - public void getPolicy( - com.google.iam.v2beta.GetPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a policy.
-     * 
- */ - public void createPolicy( - com.google.iam.v2beta.CreatePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreatePolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the specified policy.
-     * You can update only the rules and the display name for the policy.
-     * To update a policy, you should use a read-modify-write loop:
-     * 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy.
-     * 2. Modify the policy as needed.
-     * 3. Use `UpdatePolicy` to write the updated policy.
-     * This pattern helps prevent conflicts between concurrent updates.
-     * 
- */ - public void updatePolicy( - com.google.iam.v2beta.UpdatePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a policy. This action is permanent.
-     * 
- */ - public void deletePolicy( - com.google.iam.v2beta.DeletePolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeletePolicyMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * An interface for managing Identity and Access Management (IAM) policies.
-   * 
- */ - public static final class PoliciesBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private PoliciesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PoliciesBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Retrieves the policies of the specified kind that are attached to a
-     * resource.
-     * The response lists only policy metadata. In particular, policy rules are
-     * omitted.
-     * 
- */ - public com.google.iam.v2beta.ListPoliciesResponse listPolicies( - com.google.iam.v2beta.ListPoliciesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListPoliciesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets a policy.
-     * 
- */ - public com.google.iam.v2beta.Policy getPolicy(com.google.iam.v2beta.GetPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a policy.
-     * 
- */ - public com.google.longrunning.Operation createPolicy( - com.google.iam.v2beta.CreatePolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreatePolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the specified policy.
-     * You can update only the rules and the display name for the policy.
-     * To update a policy, you should use a read-modify-write loop:
-     * 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy.
-     * 2. Modify the policy as needed.
-     * 3. Use `UpdatePolicy` to write the updated policy.
-     * This pattern helps prevent conflicts between concurrent updates.
-     * 
- */ - public com.google.longrunning.Operation updatePolicy( - com.google.iam.v2beta.UpdatePolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdatePolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a policy. This action is permanent.
-     * 
- */ - public com.google.longrunning.Operation deletePolicy( - com.google.iam.v2beta.DeletePolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeletePolicyMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * An interface for managing Identity and Access Management (IAM) policies.
-   * 
- */ - public static final class PoliciesFutureStub - extends io.grpc.stub.AbstractFutureStub { - private PoliciesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PoliciesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PoliciesFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Retrieves the policies of the specified kind that are attached to a
-     * resource.
-     * The response lists only policy metadata. In particular, policy rules are
-     * omitted.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.iam.v2beta.ListPoliciesResponse> - listPolicies(com.google.iam.v2beta.ListPoliciesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListPoliciesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets a policy.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getPolicy(com.google.iam.v2beta.GetPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a policy.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createPolicy(com.google.iam.v2beta.CreatePolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreatePolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the specified policy.
-     * You can update only the rules and the display name for the policy.
-     * To update a policy, you should use a read-modify-write loop:
-     * 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy.
-     * 2. Modify the policy as needed.
-     * 3. Use `UpdatePolicy` to write the updated policy.
-     * This pattern helps prevent conflicts between concurrent updates.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updatePolicy(com.google.iam.v2beta.UpdatePolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a policy. This action is permanent.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deletePolicy(com.google.iam.v2beta.DeletePolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeletePolicyMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_POLICIES = 0; - private static final int METHODID_GET_POLICY = 1; - private static final int METHODID_CREATE_POLICY = 2; - private static final int METHODID_UPDATE_POLICY = 3; - private static final int METHODID_DELETE_POLICY = 4; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final PoliciesImplBase serviceImpl; - private final int methodId; - - MethodHandlers(PoliciesImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_POLICIES: - serviceImpl.listPolicies( - (com.google.iam.v2beta.ListPoliciesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_POLICY: - serviceImpl.getPolicy( - (com.google.iam.v2beta.GetPolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_POLICY: - serviceImpl.createPolicy( - (com.google.iam.v2beta.CreatePolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_POLICY: - serviceImpl.updatePolicy( - (com.google.iam.v2beta.UpdatePolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_POLICY: - serviceImpl.deletePolicy( - (com.google.iam.v2beta.DeletePolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class PoliciesBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - PoliciesBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.iam.v2beta.PolicyProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Policies"); - } - } - - private static final class PoliciesFileDescriptorSupplier extends PoliciesBaseDescriptorSupplier { - PoliciesFileDescriptorSupplier() {} - } - - private static final class PoliciesMethodDescriptorSupplier extends PoliciesBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - PoliciesMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (PoliciesGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new PoliciesFileDescriptorSupplier()) - .addMethod(getListPoliciesMethod()) - .addMethod(getGetPolicyMethod()) - .addMethod(getCreatePolicyMethod()) - .addMethod(getUpdatePolicyMethod()) - .addMethod(getDeletePolicyMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/pom.xml b/pom.xml index 5736ae2e..176628d7 100644 --- a/pom.xml +++ b/pom.xml @@ -2,10 +2,10 @@ 4.0.0 com.google.cloud - google-iam-parent + google-iam-policy-parent pom 1.6.24-SNAPSHOT - Google IAM Parent + Google IAM Policy Parent https://github.com/googleapis/java-iam Java idiomatic client for Google Cloud Platform services. @@ -68,56 +68,46 @@ - com.google.protobuf - protobuf-bom - 3.21.12 - pom - import - - - com.google.cloud google-cloud-shared-dependencies - 3.1.0 + 3.1.1 pom import com.google.api.grpc proto-google-iam-v2 - 1.6.24-SNAPSHOT + 1.7.0 com.google.api.grpc grpc-google-iam-v2 - 1.6.24-SNAPSHOT + 1.7.0 com.google.cloud google-iam-policy - 1.6.24-SNAPSHOT + 1.7.0 com.google.api.grpc proto-google-iam-v2beta - 1.6.24-SNAPSHOT + 1.7.0 com.google.api.grpc grpc-google-iam-v1 - 1.6.24-SNAPSHOT + 1.7.0 com.google.api.grpc grpc-google-iam-v2beta - 1.6.24-SNAPSHOT + 1.7.0 com.google.api.grpc proto-google-iam-v1 - 1.6.24-SNAPSHOT + 1.7.0 @@ -130,12 +120,6 @@ - proto-google-iam-v1 - grpc-google-iam-v2beta - grpc-google-iam-v2 - proto-google-iam-v2beta - proto-google-iam-v2 - grpc-google-iam-v1 google-iam-policy diff --git a/proto-google-iam-v1/LICENSE b/proto-google-iam-v1/LICENSE deleted file mode 100644 index a8ee855d..00000000 --- a/proto-google-iam-v1/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - https://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 - - 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. diff --git a/proto-google-iam-v1/build.gradle b/proto-google-iam-v1/build.gradle deleted file mode 100644 index e0640cd5..00000000 --- a/proto-google-iam-v1/build.gradle +++ /dev/null @@ -1,52 +0,0 @@ -buildscript { - repositories { - mavenCentral() - } -} - -apply plugin: 'java' - -description = 'PROTO library for proto-google-iam-v1' -group = 'com.google.api.grpc' -version = "0.13.0" -sourceCompatibility = 1.7 -targetCompatibility = 1.7 - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - compile 'com.google.protobuf:protobuf-java:3.21.12' - compile 'com.google.api:api-common:2.3.1' - compile project(':proto-google-common-protos') -} - -sourceSets { - main { - resources { - srcDir 'src/main/proto' - } - java { - srcDir 'src/main/java' - } - } -} - -task javadocJar(type: Jar) { - classifier = 'javadoc' - from javadoc -} - -task sourcesJar(type: Jar) { - classifier = 'sources' - from sourceSets.main.allSource -} - -artifacts { - archives javadocJar, sourcesJar -} - -compileJava.options.encoding = 'UTF-8' -javadoc.options.encoding = 'UTF-8' \ No newline at end of file diff --git a/proto-google-iam-v1/clirr-ignored-differences.xml b/proto-google-iam-v1/clirr-ignored-differences.xml deleted file mode 100644 index ca6f8c19..00000000 --- a/proto-google-iam-v1/clirr-ignored-differences.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - 7012 - com/google/iam/v1/*OrBuilder - * get*(*) - - - 7012 - com/google/iam/v1/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/iam/v1/*OrBuilder - boolean has*(*) - - 7012 - com/google/iam/v1/logging/*OrBuilder - * get*(*) - - - 7012 - com/google/iam/v1/logging/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/iam/v1/logging/*OrBuilder - boolean has*(*) - - diff --git a/proto-google-iam-v1/pom.xml b/proto-google-iam-v1/pom.xml deleted file mode 100644 index cb149091..00000000 --- a/proto-google-iam-v1/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - 4.0.0 - com.google.api.grpc - proto-google-iam-v1 - 1.6.24-SNAPSHOT - proto-google-iam-v1 - PROTO library for proto-google-iam-v1 - - com.google.cloud - google-iam-parent - 1.6.24-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfig.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfig.java deleted file mode 100644 index 7d07f324..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfig.java +++ /dev/null @@ -1,1204 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * 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.
- * 
- * - * Protobuf type {@code google.iam.v1.AuditConfig} - */ -public final class AuditConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.AuditConfig) - AuditConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuditConfig.newBuilder() to construct. - private AuditConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AuditConfig() { - service_ = ""; - auditLogConfigs_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuditConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_AuditConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.AuditConfig.class, com.google.iam.v1.AuditConfig.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - private volatile java.lang.Object 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.
-   * 
- * - * string service = 1; - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string service = 1; - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AUDIT_LOG_CONFIGS_FIELD_NUMBER = 3; - private java.util.List auditLogConfigs_; - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - @java.lang.Override - public java.util.List getAuditLogConfigsList() { - return auditLogConfigs_; - } - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - @java.lang.Override - public java.util.List - getAuditLogConfigsOrBuilderList() { - return auditLogConfigs_; - } - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - @java.lang.Override - public int getAuditLogConfigsCount() { - return auditLogConfigs_.size(); - } - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - @java.lang.Override - public com.google.iam.v1.AuditLogConfig getAuditLogConfigs(int index) { - return auditLogConfigs_.get(index); - } - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - @java.lang.Override - public com.google.iam.v1.AuditLogConfigOrBuilder getAuditLogConfigsOrBuilder(int index) { - return auditLogConfigs_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - for (int i = 0; i < auditLogConfigs_.size(); i++) { - output.writeMessage(3, auditLogConfigs_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - for (int i = 0; i < auditLogConfigs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, auditLogConfigs_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.AuditConfig)) { - return super.equals(obj); - } - com.google.iam.v1.AuditConfig other = (com.google.iam.v1.AuditConfig) obj; - - if (!getService().equals(other.getService())) return false; - if (!getAuditLogConfigsList().equals(other.getAuditLogConfigsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - if (getAuditLogConfigsCount() > 0) { - hash = (37 * hash) + AUDIT_LOG_CONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getAuditLogConfigsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.AuditConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.AuditConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfig parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.AuditConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.AuditConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.AuditConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.AuditConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfig parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.AuditConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.AuditConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * 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.
-   * 
- * - * Protobuf type {@code google.iam.v1.AuditConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.AuditConfig) - com.google.iam.v1.AuditConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_AuditConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.AuditConfig.class, com.google.iam.v1.AuditConfig.Builder.class); - } - - // Construct using com.google.iam.v1.AuditConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - service_ = ""; - - if (auditLogConfigsBuilder_ == null) { - auditLogConfigs_ = java.util.Collections.emptyList(); - } else { - auditLogConfigs_ = null; - auditLogConfigsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfig_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.AuditConfig getDefaultInstanceForType() { - return com.google.iam.v1.AuditConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.AuditConfig build() { - com.google.iam.v1.AuditConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.AuditConfig buildPartial() { - com.google.iam.v1.AuditConfig result = new com.google.iam.v1.AuditConfig(this); - int from_bitField0_ = bitField0_; - result.service_ = service_; - if (auditLogConfigsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - auditLogConfigs_ = java.util.Collections.unmodifiableList(auditLogConfigs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.auditLogConfigs_ = auditLogConfigs_; - } else { - result.auditLogConfigs_ = auditLogConfigsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.AuditConfig) { - return mergeFrom((com.google.iam.v1.AuditConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.AuditConfig other) { - if (other == com.google.iam.v1.AuditConfig.getDefaultInstance()) return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - onChanged(); - } - if (auditLogConfigsBuilder_ == null) { - if (!other.auditLogConfigs_.isEmpty()) { - if (auditLogConfigs_.isEmpty()) { - auditLogConfigs_ = other.auditLogConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAuditLogConfigsIsMutable(); - auditLogConfigs_.addAll(other.auditLogConfigs_); - } - onChanged(); - } - } else { - if (!other.auditLogConfigs_.isEmpty()) { - if (auditLogConfigsBuilder_.isEmpty()) { - auditLogConfigsBuilder_.dispose(); - auditLogConfigsBuilder_ = null; - auditLogConfigs_ = other.auditLogConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - auditLogConfigsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAuditLogConfigsFieldBuilder() - : null; - } else { - auditLogConfigsBuilder_.addAllMessages(other.auditLogConfigs_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 26: - { - com.google.iam.v1.AuditLogConfig m = - input.readMessage(com.google.iam.v1.AuditLogConfig.parser(), extensionRegistry); - if (auditLogConfigsBuilder_ == null) { - ensureAuditLogConfigsIsMutable(); - auditLogConfigs_.add(m); - } else { - auditLogConfigsBuilder_.addMessage(m); - } - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object 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.
-     * 
- * - * string service = 1; - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service = 1; - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service = 1; - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - service_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service = 1; - * - * @return This builder for chaining. - */ - public Builder clearService() { - - service_ = getDefaultInstance().getService(); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service = 1; - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - service_ = value; - onChanged(); - return this; - } - - private java.util.List auditLogConfigs_ = - java.util.Collections.emptyList(); - - private void ensureAuditLogConfigsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - auditLogConfigs_ = - new java.util.ArrayList(auditLogConfigs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.AuditLogConfig, - com.google.iam.v1.AuditLogConfig.Builder, - com.google.iam.v1.AuditLogConfigOrBuilder> - auditLogConfigsBuilder_; - - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public java.util.List getAuditLogConfigsList() { - if (auditLogConfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(auditLogConfigs_); - } else { - return auditLogConfigsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public int getAuditLogConfigsCount() { - if (auditLogConfigsBuilder_ == null) { - return auditLogConfigs_.size(); - } else { - return auditLogConfigsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public com.google.iam.v1.AuditLogConfig getAuditLogConfigs(int index) { - if (auditLogConfigsBuilder_ == null) { - return auditLogConfigs_.get(index); - } else { - return auditLogConfigsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public Builder setAuditLogConfigs(int index, com.google.iam.v1.AuditLogConfig value) { - if (auditLogConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuditLogConfigsIsMutable(); - auditLogConfigs_.set(index, value); - onChanged(); - } else { - auditLogConfigsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public Builder setAuditLogConfigs( - int index, com.google.iam.v1.AuditLogConfig.Builder builderForValue) { - if (auditLogConfigsBuilder_ == null) { - ensureAuditLogConfigsIsMutable(); - auditLogConfigs_.set(index, builderForValue.build()); - onChanged(); - } else { - auditLogConfigsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public Builder addAuditLogConfigs(com.google.iam.v1.AuditLogConfig value) { - if (auditLogConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuditLogConfigsIsMutable(); - auditLogConfigs_.add(value); - onChanged(); - } else { - auditLogConfigsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public Builder addAuditLogConfigs(int index, com.google.iam.v1.AuditLogConfig value) { - if (auditLogConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuditLogConfigsIsMutable(); - auditLogConfigs_.add(index, value); - onChanged(); - } else { - auditLogConfigsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public Builder addAuditLogConfigs(com.google.iam.v1.AuditLogConfig.Builder builderForValue) { - if (auditLogConfigsBuilder_ == null) { - ensureAuditLogConfigsIsMutable(); - auditLogConfigs_.add(builderForValue.build()); - onChanged(); - } else { - auditLogConfigsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public Builder addAuditLogConfigs( - int index, com.google.iam.v1.AuditLogConfig.Builder builderForValue) { - if (auditLogConfigsBuilder_ == null) { - ensureAuditLogConfigsIsMutable(); - auditLogConfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - auditLogConfigsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public Builder addAllAuditLogConfigs( - java.lang.Iterable values) { - if (auditLogConfigsBuilder_ == null) { - ensureAuditLogConfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, auditLogConfigs_); - onChanged(); - } else { - auditLogConfigsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public Builder clearAuditLogConfigs() { - if (auditLogConfigsBuilder_ == null) { - auditLogConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - auditLogConfigsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public Builder removeAuditLogConfigs(int index) { - if (auditLogConfigsBuilder_ == null) { - ensureAuditLogConfigsIsMutable(); - auditLogConfigs_.remove(index); - onChanged(); - } else { - auditLogConfigsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public com.google.iam.v1.AuditLogConfig.Builder getAuditLogConfigsBuilder(int index) { - return getAuditLogConfigsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public com.google.iam.v1.AuditLogConfigOrBuilder getAuditLogConfigsOrBuilder(int index) { - if (auditLogConfigsBuilder_ == null) { - return auditLogConfigs_.get(index); - } else { - return auditLogConfigsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public java.util.List - getAuditLogConfigsOrBuilderList() { - if (auditLogConfigsBuilder_ != null) { - return auditLogConfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(auditLogConfigs_); - } - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public com.google.iam.v1.AuditLogConfig.Builder addAuditLogConfigsBuilder() { - return getAuditLogConfigsFieldBuilder() - .addBuilder(com.google.iam.v1.AuditLogConfig.getDefaultInstance()); - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public com.google.iam.v1.AuditLogConfig.Builder addAuditLogConfigsBuilder(int index) { - return getAuditLogConfigsFieldBuilder() - .addBuilder(index, com.google.iam.v1.AuditLogConfig.getDefaultInstance()); - } - /** - * - * - *
-     * The configuration for logging of each type of permission.
-     * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - public java.util.List - getAuditLogConfigsBuilderList() { - return getAuditLogConfigsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.AuditLogConfig, - com.google.iam.v1.AuditLogConfig.Builder, - com.google.iam.v1.AuditLogConfigOrBuilder> - getAuditLogConfigsFieldBuilder() { - if (auditLogConfigsBuilder_ == null) { - auditLogConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.AuditLogConfig, - com.google.iam.v1.AuditLogConfig.Builder, - com.google.iam.v1.AuditLogConfigOrBuilder>( - auditLogConfigs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - auditLogConfigs_ = null; - } - return auditLogConfigsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.AuditConfig) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.AuditConfig) - private static final com.google.iam.v1.AuditConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.AuditConfig(); - } - - public static com.google.iam.v1.AuditConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuditConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.AuditConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java deleted file mode 100644 index 622b6414..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java +++ /dev/null @@ -1,1330 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * One delta entry for AuditConfig. Each individual change (only one
- * exempted_member in each entry) to a AuditConfig will be a separate entry.
- * 
- * - * Protobuf type {@code google.iam.v1.AuditConfigDelta} - */ -public final class AuditConfigDelta extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.AuditConfigDelta) - AuditConfigDeltaOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuditConfigDelta.newBuilder() to construct. - private AuditConfigDelta(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AuditConfigDelta() { - action_ = 0; - service_ = ""; - exemptedMember_ = ""; - logType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuditConfigDelta(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfigDelta_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.AuditConfigDelta.class, - com.google.iam.v1.AuditConfigDelta.Builder.class); - } - - /** - * - * - *
-   * The type of action performed on an audit configuration in a policy.
-   * 
- * - * Protobuf enum {@code google.iam.v1.AuditConfigDelta.Action} - */ - public enum Action implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unspecified.
-     * 
- * - * ACTION_UNSPECIFIED = 0; - */ - ACTION_UNSPECIFIED(0), - /** - * - * - *
-     * Addition of an audit configuration.
-     * 
- * - * ADD = 1; - */ - ADD(1), - /** - * - * - *
-     * Removal of an audit configuration.
-     * 
- * - * REMOVE = 2; - */ - REMOVE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Unspecified.
-     * 
- * - * ACTION_UNSPECIFIED = 0; - */ - public static final int ACTION_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Addition of an audit configuration.
-     * 
- * - * ADD = 1; - */ - public static final int ADD_VALUE = 1; - /** - * - * - *
-     * Removal of an audit configuration.
-     * 
- * - * REMOVE = 2; - */ - public static final int REMOVE_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Action valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Action forNumber(int value) { - switch (value) { - case 0: - return ACTION_UNSPECIFIED; - case 1: - return ADD; - case 2: - return REMOVE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Action findValueByNumber(int number) { - return Action.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.iam.v1.AuditConfigDelta.getDescriptor().getEnumTypes().get(0); - } - - private static final Action[] VALUES = values(); - - public static Action valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Action(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.iam.v1.AuditConfigDelta.Action) - } - - public static final int ACTION_FIELD_NUMBER = 1; - private int action_; - /** - * - * - *
-   * The action that was performed on an audit configuration in a policy.
-   * Required
-   * 
- * - * .google.iam.v1.AuditConfigDelta.Action action = 1; - * - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override - public int getActionValue() { - return action_; - } - /** - * - * - *
-   * The action that was performed on an audit configuration in a policy.
-   * Required
-   * 
- * - * .google.iam.v1.AuditConfigDelta.Action action = 1; - * - * @return The action. - */ - @java.lang.Override - public com.google.iam.v1.AuditConfigDelta.Action getAction() { - @SuppressWarnings("deprecation") - com.google.iam.v1.AuditConfigDelta.Action result = - com.google.iam.v1.AuditConfigDelta.Action.valueOf(action_); - return result == null ? com.google.iam.v1.AuditConfigDelta.Action.UNRECOGNIZED : result; - } - - public static final int SERVICE_FIELD_NUMBER = 2; - private volatile java.lang.Object service_; - /** - * - * - *
-   * Specifies a service that was configured for Cloud Audit Logging.
-   * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
-   * `allServices` is a special value that covers all services.
-   * Required
-   * 
- * - * string service = 2; - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Specifies a service that was configured for Cloud Audit Logging.
-   * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
-   * `allServices` is a special value that covers all services.
-   * Required
-   * 
- * - * string service = 2; - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXEMPTED_MEMBER_FIELD_NUMBER = 3; - private volatile java.lang.Object exemptedMember_; - /** - * - * - *
-   * A single identity that is exempted from "data access" audit
-   * logging for the `service` specified above.
-   * Follows the same format of Binding.members.
-   * 
- * - * string exempted_member = 3; - * - * @return The exemptedMember. - */ - @java.lang.Override - public java.lang.String getExemptedMember() { - java.lang.Object ref = exemptedMember_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - exemptedMember_ = s; - return s; - } - } - /** - * - * - *
-   * A single identity that is exempted from "data access" audit
-   * logging for the `service` specified above.
-   * Follows the same format of Binding.members.
-   * 
- * - * string exempted_member = 3; - * - * @return The bytes for exemptedMember. - */ - @java.lang.Override - public com.google.protobuf.ByteString getExemptedMemberBytes() { - java.lang.Object ref = exemptedMember_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - exemptedMember_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOG_TYPE_FIELD_NUMBER = 4; - private volatile java.lang.Object logType_; - /** - * - * - *
-   * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
-   * enabled, and cannot be configured.
-   * Required
-   * 
- * - * string log_type = 4; - * - * @return The logType. - */ - @java.lang.Override - public java.lang.String getLogType() { - java.lang.Object ref = logType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - logType_ = s; - return s; - } - } - /** - * - * - *
-   * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
-   * enabled, and cannot be configured.
-   * Required
-   * 
- * - * string log_type = 4; - * - * @return The bytes for logType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLogTypeBytes() { - java.lang.Object ref = logType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - logType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (action_ != com.google.iam.v1.AuditConfigDelta.Action.ACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(1, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exemptedMember_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, exemptedMember_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, logType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (action_ != com.google.iam.v1.AuditConfigDelta.Action.ACTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exemptedMember_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, exemptedMember_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, logType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.AuditConfigDelta)) { - return super.equals(obj); - } - com.google.iam.v1.AuditConfigDelta other = (com.google.iam.v1.AuditConfigDelta) obj; - - if (action_ != other.action_) return false; - if (!getService().equals(other.getService())) return false; - if (!getExemptedMember().equals(other.getExemptedMember())) return false; - if (!getLogType().equals(other.getLogType())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + action_; - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + EXEMPTED_MEMBER_FIELD_NUMBER; - hash = (53 * hash) + getExemptedMember().hashCode(); - hash = (37 * hash) + LOG_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getLogType().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfigDelta parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.AuditConfigDelta parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.AuditConfigDelta parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.AuditConfigDelta prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * One delta entry for AuditConfig. Each individual change (only one
-   * exempted_member in each entry) to a AuditConfig will be a separate entry.
-   * 
- * - * Protobuf type {@code google.iam.v1.AuditConfigDelta} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.AuditConfigDelta) - com.google.iam.v1.AuditConfigDeltaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_AuditConfigDelta_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.AuditConfigDelta.class, - com.google.iam.v1.AuditConfigDelta.Builder.class); - } - - // Construct using com.google.iam.v1.AuditConfigDelta.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - action_ = 0; - - service_ = ""; - - exemptedMember_ = ""; - - logType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_AuditConfigDelta_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.AuditConfigDelta getDefaultInstanceForType() { - return com.google.iam.v1.AuditConfigDelta.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.AuditConfigDelta build() { - com.google.iam.v1.AuditConfigDelta result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.AuditConfigDelta buildPartial() { - com.google.iam.v1.AuditConfigDelta result = new com.google.iam.v1.AuditConfigDelta(this); - result.action_ = action_; - result.service_ = service_; - result.exemptedMember_ = exemptedMember_; - result.logType_ = logType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.AuditConfigDelta) { - return mergeFrom((com.google.iam.v1.AuditConfigDelta) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.AuditConfigDelta other) { - if (other == com.google.iam.v1.AuditConfigDelta.getDefaultInstance()) return this; - if (other.action_ != 0) { - setActionValue(other.getActionValue()); - } - if (!other.getService().isEmpty()) { - service_ = other.service_; - onChanged(); - } - if (!other.getExemptedMember().isEmpty()) { - exemptedMember_ = other.exemptedMember_; - onChanged(); - } - if (!other.getLogType().isEmpty()) { - logType_ = other.logType_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - action_ = input.readEnum(); - - break; - } // case 8 - case 18: - { - service_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - exemptedMember_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - logType_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int action_ = 0; - /** - * - * - *
-     * The action that was performed on an audit configuration in a policy.
-     * Required
-     * 
- * - * .google.iam.v1.AuditConfigDelta.Action action = 1; - * - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override - public int getActionValue() { - return action_; - } - /** - * - * - *
-     * The action that was performed on an audit configuration in a policy.
-     * Required
-     * 
- * - * .google.iam.v1.AuditConfigDelta.Action action = 1; - * - * @param value The enum numeric value on the wire for action to set. - * @return This builder for chaining. - */ - public Builder setActionValue(int value) { - - action_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The action that was performed on an audit configuration in a policy.
-     * Required
-     * 
- * - * .google.iam.v1.AuditConfigDelta.Action action = 1; - * - * @return The action. - */ - @java.lang.Override - public com.google.iam.v1.AuditConfigDelta.Action getAction() { - @SuppressWarnings("deprecation") - com.google.iam.v1.AuditConfigDelta.Action result = - com.google.iam.v1.AuditConfigDelta.Action.valueOf(action_); - return result == null ? com.google.iam.v1.AuditConfigDelta.Action.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The action that was performed on an audit configuration in a policy.
-     * Required
-     * 
- * - * .google.iam.v1.AuditConfigDelta.Action action = 1; - * - * @param value The action to set. - * @return This builder for chaining. - */ - public Builder setAction(com.google.iam.v1.AuditConfigDelta.Action value) { - if (value == null) { - throw new NullPointerException(); - } - - action_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The action that was performed on an audit configuration in a policy.
-     * Required
-     * 
- * - * .google.iam.v1.AuditConfigDelta.Action action = 1; - * - * @return This builder for chaining. - */ - public Builder clearAction() { - - action_ = 0; - onChanged(); - return this; - } - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Specifies a service that was configured for Cloud Audit Logging.
-     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
-     * `allServices` is a special value that covers all services.
-     * Required
-     * 
- * - * string service = 2; - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Specifies a service that was configured for Cloud Audit Logging.
-     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
-     * `allServices` is a special value that covers all services.
-     * Required
-     * 
- * - * string service = 2; - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Specifies a service that was configured for Cloud Audit Logging.
-     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
-     * `allServices` is a special value that covers all services.
-     * Required
-     * 
- * - * string service = 2; - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - service_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies a service that was configured for Cloud Audit Logging.
-     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
-     * `allServices` is a special value that covers all services.
-     * Required
-     * 
- * - * string service = 2; - * - * @return This builder for chaining. - */ - public Builder clearService() { - - service_ = getDefaultInstance().getService(); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies a service that was configured for Cloud Audit Logging.
-     * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
-     * `allServices` is a special value that covers all services.
-     * Required
-     * 
- * - * string service = 2; - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - service_ = value; - onChanged(); - return this; - } - - private java.lang.Object exemptedMember_ = ""; - /** - * - * - *
-     * A single identity that is exempted from "data access" audit
-     * logging for the `service` specified above.
-     * Follows the same format of Binding.members.
-     * 
- * - * string exempted_member = 3; - * - * @return The exemptedMember. - */ - public java.lang.String getExemptedMember() { - java.lang.Object ref = exemptedMember_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - exemptedMember_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A single identity that is exempted from "data access" audit
-     * logging for the `service` specified above.
-     * Follows the same format of Binding.members.
-     * 
- * - * string exempted_member = 3; - * - * @return The bytes for exemptedMember. - */ - public com.google.protobuf.ByteString getExemptedMemberBytes() { - java.lang.Object ref = exemptedMember_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - exemptedMember_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A single identity that is exempted from "data access" audit
-     * logging for the `service` specified above.
-     * Follows the same format of Binding.members.
-     * 
- * - * string exempted_member = 3; - * - * @param value The exemptedMember to set. - * @return This builder for chaining. - */ - public Builder setExemptedMember(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - exemptedMember_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A single identity that is exempted from "data access" audit
-     * logging for the `service` specified above.
-     * Follows the same format of Binding.members.
-     * 
- * - * string exempted_member = 3; - * - * @return This builder for chaining. - */ - public Builder clearExemptedMember() { - - exemptedMember_ = getDefaultInstance().getExemptedMember(); - onChanged(); - return this; - } - /** - * - * - *
-     * A single identity that is exempted from "data access" audit
-     * logging for the `service` specified above.
-     * Follows the same format of Binding.members.
-     * 
- * - * string exempted_member = 3; - * - * @param value The bytes for exemptedMember to set. - * @return This builder for chaining. - */ - public Builder setExemptedMemberBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - exemptedMember_ = value; - onChanged(); - return this; - } - - private java.lang.Object logType_ = ""; - /** - * - * - *
-     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
-     * enabled, and cannot be configured.
-     * Required
-     * 
- * - * string log_type = 4; - * - * @return The logType. - */ - public java.lang.String getLogType() { - java.lang.Object ref = logType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - logType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
-     * enabled, and cannot be configured.
-     * Required
-     * 
- * - * string log_type = 4; - * - * @return The bytes for logType. - */ - public com.google.protobuf.ByteString getLogTypeBytes() { - java.lang.Object ref = logType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - logType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
-     * enabled, and cannot be configured.
-     * Required
-     * 
- * - * string log_type = 4; - * - * @param value The logType to set. - * @return This builder for chaining. - */ - public Builder setLogType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - logType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
-     * enabled, and cannot be configured.
-     * Required
-     * 
- * - * string log_type = 4; - * - * @return This builder for chaining. - */ - public Builder clearLogType() { - - logType_ = getDefaultInstance().getLogType(); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
-     * enabled, and cannot be configured.
-     * Required
-     * 
- * - * string log_type = 4; - * - * @param value The bytes for logType to set. - * @return This builder for chaining. - */ - public Builder setLogTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - logType_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.AuditConfigDelta) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.AuditConfigDelta) - private static final com.google.iam.v1.AuditConfigDelta DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.AuditConfigDelta(); - } - - public static com.google.iam.v1.AuditConfigDelta getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuditConfigDelta parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.AuditConfigDelta getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDeltaOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDeltaOrBuilder.java deleted file mode 100644 index e1bea6c2..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDeltaOrBuilder.java +++ /dev/null @@ -1,141 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -public interface AuditConfigDeltaOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.AuditConfigDelta) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The action that was performed on an audit configuration in a policy.
-   * Required
-   * 
- * - * .google.iam.v1.AuditConfigDelta.Action action = 1; - * - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - /** - * - * - *
-   * The action that was performed on an audit configuration in a policy.
-   * Required
-   * 
- * - * .google.iam.v1.AuditConfigDelta.Action action = 1; - * - * @return The action. - */ - com.google.iam.v1.AuditConfigDelta.Action getAction(); - - /** - * - * - *
-   * Specifies a service that was configured for Cloud Audit Logging.
-   * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
-   * `allServices` is a special value that covers all services.
-   * Required
-   * 
- * - * string service = 2; - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Specifies a service that was configured for Cloud Audit Logging.
-   * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
-   * `allServices` is a special value that covers all services.
-   * Required
-   * 
- * - * string service = 2; - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * A single identity that is exempted from "data access" audit
-   * logging for the `service` specified above.
-   * Follows the same format of Binding.members.
-   * 
- * - * string exempted_member = 3; - * - * @return The exemptedMember. - */ - java.lang.String getExemptedMember(); - /** - * - * - *
-   * A single identity that is exempted from "data access" audit
-   * logging for the `service` specified above.
-   * Follows the same format of Binding.members.
-   * 
- * - * string exempted_member = 3; - * - * @return The bytes for exemptedMember. - */ - com.google.protobuf.ByteString getExemptedMemberBytes(); - - /** - * - * - *
-   * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
-   * enabled, and cannot be configured.
-   * Required
-   * 
- * - * string log_type = 4; - * - * @return The logType. - */ - java.lang.String getLogType(); - /** - * - * - *
-   * Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
-   * enabled, and cannot be configured.
-   * Required
-   * 
- * - * string log_type = 4; - * - * @return The bytes for logType. - */ - com.google.protobuf.ByteString getLogTypeBytes(); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigOrBuilder.java deleted file mode 100644 index 06911aaf..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigOrBuilder.java +++ /dev/null @@ -1,106 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -public interface AuditConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.AuditConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * string service = 1; - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * 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.
-   * 
- * - * string service = 1; - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - java.util.List getAuditLogConfigsList(); - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - com.google.iam.v1.AuditLogConfig getAuditLogConfigs(int index); - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - int getAuditLogConfigsCount(); - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - java.util.List - getAuditLogConfigsOrBuilderList(); - /** - * - * - *
-   * The configuration for logging of each type of permission.
-   * 
- * - * repeated .google.iam.v1.AuditLogConfig audit_log_configs = 3; - */ - com.google.iam.v1.AuditLogConfigOrBuilder getAuditLogConfigsOrBuilder(int index); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java deleted file mode 100644 index 645f2c04..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java +++ /dev/null @@ -1,1089 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * 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.
- * 
- * - * Protobuf type {@code google.iam.v1.AuditLogConfig} - */ -public final class AuditLogConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.AuditLogConfig) - AuditLogConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuditLogConfig.newBuilder() to construct. - private AuditLogConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AuditLogConfig() { - logType_ = 0; - exemptedMembers_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuditLogConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditLogConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_AuditLogConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.AuditLogConfig.class, com.google.iam.v1.AuditLogConfig.Builder.class); - } - - /** - * - * - *
-   * The list of valid permission types for which logging can be configured.
-   * Admin writes are always logged, and are not configurable.
-   * 
- * - * Protobuf enum {@code google.iam.v1.AuditLogConfig.LogType} - */ - public enum LogType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Default case. Should never be this.
-     * 
- * - * LOG_TYPE_UNSPECIFIED = 0; - */ - LOG_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Admin reads. Example: CloudIAM getIamPolicy
-     * 
- * - * ADMIN_READ = 1; - */ - ADMIN_READ(1), - /** - * - * - *
-     * Data writes. Example: CloudSQL Users create
-     * 
- * - * DATA_WRITE = 2; - */ - DATA_WRITE(2), - /** - * - * - *
-     * Data reads. Example: CloudSQL Users list
-     * 
- * - * DATA_READ = 3; - */ - DATA_READ(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Default case. Should never be this.
-     * 
- * - * LOG_TYPE_UNSPECIFIED = 0; - */ - public static final int LOG_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Admin reads. Example: CloudIAM getIamPolicy
-     * 
- * - * ADMIN_READ = 1; - */ - public static final int ADMIN_READ_VALUE = 1; - /** - * - * - *
-     * Data writes. Example: CloudSQL Users create
-     * 
- * - * DATA_WRITE = 2; - */ - public static final int DATA_WRITE_VALUE = 2; - /** - * - * - *
-     * Data reads. Example: CloudSQL Users list
-     * 
- * - * DATA_READ = 3; - */ - public static final int DATA_READ_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LogType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static LogType forNumber(int value) { - switch (value) { - case 0: - return LOG_TYPE_UNSPECIFIED; - case 1: - return ADMIN_READ; - case 2: - return DATA_WRITE; - case 3: - return DATA_READ; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LogType findValueByNumber(int number) { - return LogType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.iam.v1.AuditLogConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final LogType[] VALUES = values(); - - public static LogType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private LogType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.iam.v1.AuditLogConfig.LogType) - } - - public static final int LOG_TYPE_FIELD_NUMBER = 1; - private int logType_; - /** - * - * - *
-   * The log type that this config enables.
-   * 
- * - * .google.iam.v1.AuditLogConfig.LogType log_type = 1; - * - * @return The enum numeric value on the wire for logType. - */ - @java.lang.Override - public int getLogTypeValue() { - return logType_; - } - /** - * - * - *
-   * The log type that this config enables.
-   * 
- * - * .google.iam.v1.AuditLogConfig.LogType log_type = 1; - * - * @return The logType. - */ - @java.lang.Override - public com.google.iam.v1.AuditLogConfig.LogType getLogType() { - @SuppressWarnings("deprecation") - com.google.iam.v1.AuditLogConfig.LogType result = - com.google.iam.v1.AuditLogConfig.LogType.valueOf(logType_); - return result == null ? com.google.iam.v1.AuditLogConfig.LogType.UNRECOGNIZED : result; - } - - public static final int EXEMPTED_MEMBERS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList exemptedMembers_; - /** - * - * - *
-   * Specifies the identities that do not cause logging for this type of
-   * permission.
-   * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-   * 
- * - * repeated string exempted_members = 2; - * - * @return A list containing the exemptedMembers. - */ - public com.google.protobuf.ProtocolStringList getExemptedMembersList() { - return exemptedMembers_; - } - /** - * - * - *
-   * Specifies the identities that do not cause logging for this type of
-   * permission.
-   * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-   * 
- * - * repeated string exempted_members = 2; - * - * @return The count of exemptedMembers. - */ - public int getExemptedMembersCount() { - return exemptedMembers_.size(); - } - /** - * - * - *
-   * Specifies the identities that do not cause logging for this type of
-   * permission.
-   * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-   * 
- * - * repeated string exempted_members = 2; - * - * @param index The index of the element to return. - * @return The exemptedMembers at the given index. - */ - public java.lang.String getExemptedMembers(int index) { - return exemptedMembers_.get(index); - } - /** - * - * - *
-   * Specifies the identities that do not cause logging for this type of
-   * permission.
-   * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-   * 
- * - * repeated string exempted_members = 2; - * - * @param index The index of the value to return. - * @return The bytes of the exemptedMembers at the given index. - */ - public com.google.protobuf.ByteString getExemptedMembersBytes(int index) { - return exemptedMembers_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (logType_ != com.google.iam.v1.AuditLogConfig.LogType.LOG_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, logType_); - } - for (int i = 0; i < exemptedMembers_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, exemptedMembers_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (logType_ != com.google.iam.v1.AuditLogConfig.LogType.LOG_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, logType_); - } - { - int dataSize = 0; - for (int i = 0; i < exemptedMembers_.size(); i++) { - dataSize += computeStringSizeNoTag(exemptedMembers_.getRaw(i)); - } - size += dataSize; - size += 1 * getExemptedMembersList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.AuditLogConfig)) { - return super.equals(obj); - } - com.google.iam.v1.AuditLogConfig other = (com.google.iam.v1.AuditLogConfig) obj; - - if (logType_ != other.logType_) return false; - if (!getExemptedMembersList().equals(other.getExemptedMembersList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOG_TYPE_FIELD_NUMBER; - hash = (53 * hash) + logType_; - if (getExemptedMembersCount() > 0) { - hash = (37 * hash) + EXEMPTED_MEMBERS_FIELD_NUMBER; - hash = (53 * hash) + getExemptedMembersList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.AuditLogConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.AuditLogConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.AuditLogConfig parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.AuditLogConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.AuditLogConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.AuditLogConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.AuditLogConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.AuditLogConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.AuditLogConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.AuditLogConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.AuditLogConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.AuditLogConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.AuditLogConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * 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.
-   * 
- * - * Protobuf type {@code google.iam.v1.AuditLogConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.AuditLogConfig) - com.google.iam.v1.AuditLogConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditLogConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_AuditLogConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.AuditLogConfig.class, - com.google.iam.v1.AuditLogConfig.Builder.class); - } - - // Construct using com.google.iam.v1.AuditLogConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - logType_ = 0; - - exemptedMembers_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditLogConfig_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.AuditLogConfig getDefaultInstanceForType() { - return com.google.iam.v1.AuditLogConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.AuditLogConfig build() { - com.google.iam.v1.AuditLogConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.AuditLogConfig buildPartial() { - com.google.iam.v1.AuditLogConfig result = new com.google.iam.v1.AuditLogConfig(this); - int from_bitField0_ = bitField0_; - result.logType_ = logType_; - if (((bitField0_ & 0x00000001) != 0)) { - exemptedMembers_ = exemptedMembers_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.exemptedMembers_ = exemptedMembers_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.AuditLogConfig) { - return mergeFrom((com.google.iam.v1.AuditLogConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.AuditLogConfig other) { - if (other == com.google.iam.v1.AuditLogConfig.getDefaultInstance()) return this; - if (other.logType_ != 0) { - setLogTypeValue(other.getLogTypeValue()); - } - if (!other.exemptedMembers_.isEmpty()) { - if (exemptedMembers_.isEmpty()) { - exemptedMembers_ = other.exemptedMembers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureExemptedMembersIsMutable(); - exemptedMembers_.addAll(other.exemptedMembers_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - logType_ = input.readEnum(); - - break; - } // case 8 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureExemptedMembersIsMutable(); - exemptedMembers_.add(s); - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int logType_ = 0; - /** - * - * - *
-     * The log type that this config enables.
-     * 
- * - * .google.iam.v1.AuditLogConfig.LogType log_type = 1; - * - * @return The enum numeric value on the wire for logType. - */ - @java.lang.Override - public int getLogTypeValue() { - return logType_; - } - /** - * - * - *
-     * The log type that this config enables.
-     * 
- * - * .google.iam.v1.AuditLogConfig.LogType log_type = 1; - * - * @param value The enum numeric value on the wire for logType to set. - * @return This builder for chaining. - */ - public Builder setLogTypeValue(int value) { - - logType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The log type that this config enables.
-     * 
- * - * .google.iam.v1.AuditLogConfig.LogType log_type = 1; - * - * @return The logType. - */ - @java.lang.Override - public com.google.iam.v1.AuditLogConfig.LogType getLogType() { - @SuppressWarnings("deprecation") - com.google.iam.v1.AuditLogConfig.LogType result = - com.google.iam.v1.AuditLogConfig.LogType.valueOf(logType_); - return result == null ? com.google.iam.v1.AuditLogConfig.LogType.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The log type that this config enables.
-     * 
- * - * .google.iam.v1.AuditLogConfig.LogType log_type = 1; - * - * @param value The logType to set. - * @return This builder for chaining. - */ - public Builder setLogType(com.google.iam.v1.AuditLogConfig.LogType value) { - if (value == null) { - throw new NullPointerException(); - } - - logType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The log type that this config enables.
-     * 
- * - * .google.iam.v1.AuditLogConfig.LogType log_type = 1; - * - * @return This builder for chaining. - */ - public Builder clearLogType() { - - logType_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList exemptedMembers_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureExemptedMembersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - exemptedMembers_ = new com.google.protobuf.LazyStringArrayList(exemptedMembers_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Specifies the identities that do not cause logging for this type of
-     * permission.
-     * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-     * 
- * - * repeated string exempted_members = 2; - * - * @return A list containing the exemptedMembers. - */ - public com.google.protobuf.ProtocolStringList getExemptedMembersList() { - return exemptedMembers_.getUnmodifiableView(); - } - /** - * - * - *
-     * Specifies the identities that do not cause logging for this type of
-     * permission.
-     * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-     * 
- * - * repeated string exempted_members = 2; - * - * @return The count of exemptedMembers. - */ - public int getExemptedMembersCount() { - return exemptedMembers_.size(); - } - /** - * - * - *
-     * Specifies the identities that do not cause logging for this type of
-     * permission.
-     * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-     * 
- * - * repeated string exempted_members = 2; - * - * @param index The index of the element to return. - * @return The exemptedMembers at the given index. - */ - public java.lang.String getExemptedMembers(int index) { - return exemptedMembers_.get(index); - } - /** - * - * - *
-     * Specifies the identities that do not cause logging for this type of
-     * permission.
-     * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-     * 
- * - * repeated string exempted_members = 2; - * - * @param index The index of the value to return. - * @return The bytes of the exemptedMembers at the given index. - */ - public com.google.protobuf.ByteString getExemptedMembersBytes(int index) { - return exemptedMembers_.getByteString(index); - } - /** - * - * - *
-     * Specifies the identities that do not cause logging for this type of
-     * permission.
-     * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-     * 
- * - * repeated string exempted_members = 2; - * - * @param index The index to set the value at. - * @param value The exemptedMembers to set. - * @return This builder for chaining. - */ - public Builder setExemptedMembers(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExemptedMembersIsMutable(); - exemptedMembers_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the identities that do not cause logging for this type of
-     * permission.
-     * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-     * 
- * - * repeated string exempted_members = 2; - * - * @param value The exemptedMembers to add. - * @return This builder for chaining. - */ - public Builder addExemptedMembers(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExemptedMembersIsMutable(); - exemptedMembers_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the identities that do not cause logging for this type of
-     * permission.
-     * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-     * 
- * - * repeated string exempted_members = 2; - * - * @param values The exemptedMembers to add. - * @return This builder for chaining. - */ - public Builder addAllExemptedMembers(java.lang.Iterable values) { - ensureExemptedMembersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exemptedMembers_); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the identities that do not cause logging for this type of
-     * permission.
-     * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-     * 
- * - * repeated string exempted_members = 2; - * - * @return This builder for chaining. - */ - public Builder clearExemptedMembers() { - exemptedMembers_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the identities that do not cause logging for this type of
-     * permission.
-     * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-     * 
- * - * repeated string exempted_members = 2; - * - * @param value The bytes of the exemptedMembers to add. - * @return This builder for chaining. - */ - public Builder addExemptedMembersBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureExemptedMembersIsMutable(); - exemptedMembers_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.AuditLogConfig) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.AuditLogConfig) - private static final com.google.iam.v1.AuditLogConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.AuditLogConfig(); - } - - public static com.google.iam.v1.AuditLogConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuditLogConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.AuditLogConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfigOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfigOrBuilder.java deleted file mode 100644 index c6371c5c..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfigOrBuilder.java +++ /dev/null @@ -1,109 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -public interface AuditLogConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.AuditLogConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The log type that this config enables.
-   * 
- * - * .google.iam.v1.AuditLogConfig.LogType log_type = 1; - * - * @return The enum numeric value on the wire for logType. - */ - int getLogTypeValue(); - /** - * - * - *
-   * The log type that this config enables.
-   * 
- * - * .google.iam.v1.AuditLogConfig.LogType log_type = 1; - * - * @return The logType. - */ - com.google.iam.v1.AuditLogConfig.LogType getLogType(); - - /** - * - * - *
-   * Specifies the identities that do not cause logging for this type of
-   * permission.
-   * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-   * 
- * - * repeated string exempted_members = 2; - * - * @return A list containing the exemptedMembers. - */ - java.util.List getExemptedMembersList(); - /** - * - * - *
-   * Specifies the identities that do not cause logging for this type of
-   * permission.
-   * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-   * 
- * - * repeated string exempted_members = 2; - * - * @return The count of exemptedMembers. - */ - int getExemptedMembersCount(); - /** - * - * - *
-   * Specifies the identities that do not cause logging for this type of
-   * permission.
-   * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-   * 
- * - * repeated string exempted_members = 2; - * - * @param index The index of the element to return. - * @return The exemptedMembers at the given index. - */ - java.lang.String getExemptedMembers(int index); - /** - * - * - *
-   * Specifies the identities that do not cause logging for this type of
-   * permission.
-   * Follows the same format of [Binding.members][google.iam.v1.Binding.members].
-   * 
- * - * repeated string exempted_members = 2; - * - * @param index The index of the value to return. - * @return The bytes of the exemptedMembers at the given index. - */ - com.google.protobuf.ByteString getExemptedMembersBytes(int index); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/Binding.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/Binding.java deleted file mode 100644 index d4cb1d80..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/Binding.java +++ /dev/null @@ -1,1622 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * Associates `members`, or principals, with a `role`.
- * 
- * - * Protobuf type {@code google.iam.v1.Binding} - */ -public final class Binding extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.Binding) - BindingOrBuilder { - private static final long serialVersionUID = 0L; - // Use Binding.newBuilder() to construct. - private Binding(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Binding() { - role_ = ""; - members_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Binding(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.Binding.class, com.google.iam.v1.Binding.Builder.class); - } - - public static final int ROLE_FIELD_NUMBER = 1; - private volatile java.lang.Object role_; - /** - * - * - *
-   * Role that is assigned to the list of `members`, or principals.
-   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-   * 
- * - * string role = 1; - * - * @return The role. - */ - @java.lang.Override - public java.lang.String getRole() { - java.lang.Object ref = role_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - role_ = s; - return s; - } - } - /** - * - * - *
-   * Role that is assigned to the list of `members`, or principals.
-   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-   * 
- * - * string role = 1; - * - * @return The bytes for role. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - role_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEMBERS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList members_; - /** - * - * - *
-   * Specifies the principals requesting access for a Cloud Platform 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.
-   * * `user:{emailid}`: An email address that represents a specific Google
-   *    account. For example, `alice@example.com` .
-   * * `serviceAccount:{emailid}`: An email address that represents a service
-   *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-   * * `group:{emailid}`: An email address that represents a Google group.
-   *    For example, `admins@example.com`.
-   * * `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.
-   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-   *    users of that domain. For example, `google.com` or `example.com`.
-   * 
- * - * repeated string members = 2; - * - * @return A list containing the members. - */ - public com.google.protobuf.ProtocolStringList getMembersList() { - return members_; - } - /** - * - * - *
-   * Specifies the principals requesting access for a Cloud Platform 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.
-   * * `user:{emailid}`: An email address that represents a specific Google
-   *    account. For example, `alice@example.com` .
-   * * `serviceAccount:{emailid}`: An email address that represents a service
-   *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-   * * `group:{emailid}`: An email address that represents a Google group.
-   *    For example, `admins@example.com`.
-   * * `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.
-   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-   *    users of that domain. For example, `google.com` or `example.com`.
-   * 
- * - * repeated string members = 2; - * - * @return The count of members. - */ - public int getMembersCount() { - return members_.size(); - } - /** - * - * - *
-   * Specifies the principals requesting access for a Cloud Platform 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.
-   * * `user:{emailid}`: An email address that represents a specific Google
-   *    account. For example, `alice@example.com` .
-   * * `serviceAccount:{emailid}`: An email address that represents a service
-   *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-   * * `group:{emailid}`: An email address that represents a Google group.
-   *    For example, `admins@example.com`.
-   * * `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.
-   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-   *    users of that domain. For example, `google.com` or `example.com`.
-   * 
- * - * repeated string members = 2; - * - * @param index The index of the element to return. - * @return The members at the given index. - */ - public java.lang.String getMembers(int index) { - return members_.get(index); - } - /** - * - * - *
-   * Specifies the principals requesting access for a Cloud Platform 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.
-   * * `user:{emailid}`: An email address that represents a specific Google
-   *    account. For example, `alice@example.com` .
-   * * `serviceAccount:{emailid}`: An email address that represents a service
-   *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-   * * `group:{emailid}`: An email address that represents a Google group.
-   *    For example, `admins@example.com`.
-   * * `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.
-   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-   *    users of that domain. For example, `google.com` or `example.com`.
-   * 
- * - * repeated string members = 2; - * - * @param index The index of the value to return. - * @return The bytes of the members at the given index. - */ - public com.google.protobuf.ByteString getMembersBytes(int index) { - return members_.getByteString(index); - } - - public static final int CONDITION_FIELD_NUMBER = 3; - private com.google.type.Expr 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).
-   * 
- * - * .google.type.Expr condition = 3; - * - * @return Whether the condition field is set. - */ - @java.lang.Override - public boolean hasCondition() { - return condition_ != null; - } - /** - * - * - *
-   * 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).
-   * 
- * - * .google.type.Expr condition = 3; - * - * @return The condition. - */ - @java.lang.Override - public com.google.type.Expr getCondition() { - return condition_ == null ? com.google.type.Expr.getDefaultInstance() : 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).
-   * 
- * - * .google.type.Expr condition = 3; - */ - @java.lang.Override - public com.google.type.ExprOrBuilder getConditionOrBuilder() { - return getCondition(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(role_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, role_); - } - for (int i = 0; i < members_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, members_.getRaw(i)); - } - if (condition_ != null) { - output.writeMessage(3, getCondition()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(role_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, role_); - } - { - int dataSize = 0; - for (int i = 0; i < members_.size(); i++) { - dataSize += computeStringSizeNoTag(members_.getRaw(i)); - } - size += dataSize; - size += 1 * getMembersList().size(); - } - if (condition_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCondition()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.Binding)) { - return super.equals(obj); - } - com.google.iam.v1.Binding other = (com.google.iam.v1.Binding) obj; - - if (!getRole().equals(other.getRole())) return false; - if (!getMembersList().equals(other.getMembersList())) return false; - if (hasCondition() != other.hasCondition()) return false; - if (hasCondition()) { - if (!getCondition().equals(other.getCondition())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ROLE_FIELD_NUMBER; - hash = (53 * hash) + getRole().hashCode(); - if (getMembersCount() > 0) { - hash = (37 * hash) + MEMBERS_FIELD_NUMBER; - hash = (53 * hash) + getMembersList().hashCode(); - } - if (hasCondition()) { - hash = (37 * hash) + CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getCondition().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.Binding parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.Binding parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.Binding parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.Binding parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.Binding parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.Binding parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.Binding parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.Binding parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.Binding parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.Binding parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.Binding parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.Binding parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.Binding prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Associates `members`, or principals, with a `role`.
-   * 
- * - * Protobuf type {@code google.iam.v1.Binding} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.Binding) - com.google.iam.v1.BindingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.Binding.class, com.google.iam.v1.Binding.Builder.class); - } - - // Construct using com.google.iam.v1.Binding.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - role_ = ""; - - members_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (conditionBuilder_ == null) { - condition_ = null; - } else { - condition_ = null; - conditionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.Binding getDefaultInstanceForType() { - return com.google.iam.v1.Binding.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.Binding build() { - com.google.iam.v1.Binding result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.Binding buildPartial() { - com.google.iam.v1.Binding result = new com.google.iam.v1.Binding(this); - int from_bitField0_ = bitField0_; - result.role_ = role_; - if (((bitField0_ & 0x00000001) != 0)) { - members_ = members_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.members_ = members_; - if (conditionBuilder_ == null) { - result.condition_ = condition_; - } else { - result.condition_ = conditionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.Binding) { - return mergeFrom((com.google.iam.v1.Binding) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.Binding other) { - if (other == com.google.iam.v1.Binding.getDefaultInstance()) return this; - if (!other.getRole().isEmpty()) { - role_ = other.role_; - onChanged(); - } - if (!other.members_.isEmpty()) { - if (members_.isEmpty()) { - members_ = other.members_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMembersIsMutable(); - members_.addAll(other.members_); - } - onChanged(); - } - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - role_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureMembersIsMutable(); - members_.add(s); - break; - } // case 18 - case 26: - { - input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object role_ = ""; - /** - * - * - *
-     * Role that is assigned to the list of `members`, or principals.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * 
- * - * string role = 1; - * - * @return The role. - */ - public java.lang.String getRole() { - java.lang.Object ref = role_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - role_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Role that is assigned to the list of `members`, or principals.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * 
- * - * string role = 1; - * - * @return The bytes for role. - */ - public com.google.protobuf.ByteString getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - role_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Role that is assigned to the list of `members`, or principals.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * 
- * - * string role = 1; - * - * @param value The role to set. - * @return This builder for chaining. - */ - public Builder setRole(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - role_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Role that is assigned to the list of `members`, or principals.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * 
- * - * string role = 1; - * - * @return This builder for chaining. - */ - public Builder clearRole() { - - role_ = getDefaultInstance().getRole(); - onChanged(); - return this; - } - /** - * - * - *
-     * Role that is assigned to the list of `members`, or principals.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * 
- * - * string role = 1; - * - * @param value The bytes for role to set. - * @return This builder for chaining. - */ - public Builder setRoleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - role_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList members_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureMembersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - members_ = new com.google.protobuf.LazyStringArrayList(members_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Specifies the principals requesting access for a Cloud Platform 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.
-     * * `user:{emailid}`: An email address that represents a specific Google
-     *    account. For example, `alice@example.com` .
-     * * `serviceAccount:{emailid}`: An email address that represents a service
-     *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-     * * `group:{emailid}`: An email address that represents a Google group.
-     *    For example, `admins@example.com`.
-     * * `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.
-     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-     *    users of that domain. For example, `google.com` or `example.com`.
-     * 
- * - * repeated string members = 2; - * - * @return A list containing the members. - */ - public com.google.protobuf.ProtocolStringList getMembersList() { - return members_.getUnmodifiableView(); - } - /** - * - * - *
-     * Specifies the principals requesting access for a Cloud Platform 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.
-     * * `user:{emailid}`: An email address that represents a specific Google
-     *    account. For example, `alice@example.com` .
-     * * `serviceAccount:{emailid}`: An email address that represents a service
-     *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-     * * `group:{emailid}`: An email address that represents a Google group.
-     *    For example, `admins@example.com`.
-     * * `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.
-     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-     *    users of that domain. For example, `google.com` or `example.com`.
-     * 
- * - * repeated string members = 2; - * - * @return The count of members. - */ - public int getMembersCount() { - return members_.size(); - } - /** - * - * - *
-     * Specifies the principals requesting access for a Cloud Platform 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.
-     * * `user:{emailid}`: An email address that represents a specific Google
-     *    account. For example, `alice@example.com` .
-     * * `serviceAccount:{emailid}`: An email address that represents a service
-     *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-     * * `group:{emailid}`: An email address that represents a Google group.
-     *    For example, `admins@example.com`.
-     * * `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.
-     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-     *    users of that domain. For example, `google.com` or `example.com`.
-     * 
- * - * repeated string members = 2; - * - * @param index The index of the element to return. - * @return The members at the given index. - */ - public java.lang.String getMembers(int index) { - return members_.get(index); - } - /** - * - * - *
-     * Specifies the principals requesting access for a Cloud Platform 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.
-     * * `user:{emailid}`: An email address that represents a specific Google
-     *    account. For example, `alice@example.com` .
-     * * `serviceAccount:{emailid}`: An email address that represents a service
-     *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-     * * `group:{emailid}`: An email address that represents a Google group.
-     *    For example, `admins@example.com`.
-     * * `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.
-     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-     *    users of that domain. For example, `google.com` or `example.com`.
-     * 
- * - * repeated string members = 2; - * - * @param index The index of the value to return. - * @return The bytes of the members at the given index. - */ - public com.google.protobuf.ByteString getMembersBytes(int index) { - return members_.getByteString(index); - } - /** - * - * - *
-     * Specifies the principals requesting access for a Cloud Platform 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.
-     * * `user:{emailid}`: An email address that represents a specific Google
-     *    account. For example, `alice@example.com` .
-     * * `serviceAccount:{emailid}`: An email address that represents a service
-     *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-     * * `group:{emailid}`: An email address that represents a Google group.
-     *    For example, `admins@example.com`.
-     * * `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.
-     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-     *    users of that domain. For example, `google.com` or `example.com`.
-     * 
- * - * repeated string members = 2; - * - * @param index The index to set the value at. - * @param value The members to set. - * @return This builder for chaining. - */ - public Builder setMembers(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMembersIsMutable(); - members_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the principals requesting access for a Cloud Platform 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.
-     * * `user:{emailid}`: An email address that represents a specific Google
-     *    account. For example, `alice@example.com` .
-     * * `serviceAccount:{emailid}`: An email address that represents a service
-     *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-     * * `group:{emailid}`: An email address that represents a Google group.
-     *    For example, `admins@example.com`.
-     * * `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.
-     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-     *    users of that domain. For example, `google.com` or `example.com`.
-     * 
- * - * repeated string members = 2; - * - * @param value The members to add. - * @return This builder for chaining. - */ - public Builder addMembers(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMembersIsMutable(); - members_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the principals requesting access for a Cloud Platform 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.
-     * * `user:{emailid}`: An email address that represents a specific Google
-     *    account. For example, `alice@example.com` .
-     * * `serviceAccount:{emailid}`: An email address that represents a service
-     *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-     * * `group:{emailid}`: An email address that represents a Google group.
-     *    For example, `admins@example.com`.
-     * * `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.
-     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-     *    users of that domain. For example, `google.com` or `example.com`.
-     * 
- * - * repeated string members = 2; - * - * @param values The members to add. - * @return This builder for chaining. - */ - public Builder addAllMembers(java.lang.Iterable values) { - ensureMembersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, members_); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the principals requesting access for a Cloud Platform 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.
-     * * `user:{emailid}`: An email address that represents a specific Google
-     *    account. For example, `alice@example.com` .
-     * * `serviceAccount:{emailid}`: An email address that represents a service
-     *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-     * * `group:{emailid}`: An email address that represents a Google group.
-     *    For example, `admins@example.com`.
-     * * `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.
-     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-     *    users of that domain. For example, `google.com` or `example.com`.
-     * 
- * - * repeated string members = 2; - * - * @return This builder for chaining. - */ - public Builder clearMembers() { - members_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the principals requesting access for a Cloud Platform 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.
-     * * `user:{emailid}`: An email address that represents a specific Google
-     *    account. For example, `alice@example.com` .
-     * * `serviceAccount:{emailid}`: An email address that represents a service
-     *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-     * * `group:{emailid}`: An email address that represents a Google group.
-     *    For example, `admins@example.com`.
-     * * `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.
-     * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-     *    users of that domain. For example, `google.com` or `example.com`.
-     * 
- * - * repeated string members = 2; - * - * @param value The bytes of the members to add. - * @return This builder for chaining. - */ - public Builder addMembersBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureMembersIsMutable(); - members_.add(value); - onChanged(); - return this; - } - - private com.google.type.Expr condition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> - conditionBuilder_; - /** - * - * - *
-     * 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).
-     * 
- * - * .google.type.Expr condition = 3; - * - * @return Whether the condition field is set. - */ - public boolean hasCondition() { - return conditionBuilder_ != null || condition_ != null; - } - /** - * - * - *
-     * 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).
-     * 
- * - * .google.type.Expr condition = 3; - * - * @return The condition. - */ - public com.google.type.Expr getCondition() { - if (conditionBuilder_ == null) { - return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; - } else { - return conditionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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).
-     * 
- * - * .google.type.Expr condition = 3; - */ - public Builder setCondition(com.google.type.Expr value) { - if (conditionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - condition_ = value; - onChanged(); - } else { - conditionBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * .google.type.Expr condition = 3; - */ - public Builder setCondition(com.google.type.Expr.Builder builderForValue) { - if (conditionBuilder_ == null) { - condition_ = builderForValue.build(); - onChanged(); - } else { - conditionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * .google.type.Expr condition = 3; - */ - public Builder mergeCondition(com.google.type.Expr value) { - if (conditionBuilder_ == null) { - if (condition_ != null) { - condition_ = com.google.type.Expr.newBuilder(condition_).mergeFrom(value).buildPartial(); - } else { - condition_ = value; - } - onChanged(); - } else { - conditionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * .google.type.Expr condition = 3; - */ - public Builder clearCondition() { - if (conditionBuilder_ == null) { - condition_ = null; - onChanged(); - } else { - condition_ = null; - conditionBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * .google.type.Expr condition = 3; - */ - public com.google.type.Expr.Builder getConditionBuilder() { - - onChanged(); - return getConditionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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).
-     * 
- * - * .google.type.Expr condition = 3; - */ - public com.google.type.ExprOrBuilder getConditionOrBuilder() { - if (conditionBuilder_ != null) { - return conditionBuilder_.getMessageOrBuilder(); - } else { - return condition_ == null ? com.google.type.Expr.getDefaultInstance() : 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).
-     * 
- * - * .google.type.Expr condition = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> - getConditionFieldBuilder() { - if (conditionBuilder_ == null) { - conditionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( - getCondition(), getParentForChildren(), isClean()); - condition_ = null; - } - return conditionBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.Binding) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.Binding) - private static final com.google.iam.v1.Binding DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.Binding(); - } - - public static com.google.iam.v1.Binding getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Binding parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.Binding getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDelta.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDelta.java deleted file mode 100644 index f6d46a10..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDelta.java +++ /dev/null @@ -1,1379 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * One delta entry for Binding. Each individual change (only one member in each
- * entry) to a binding will be a separate entry.
- * 
- * - * Protobuf type {@code google.iam.v1.BindingDelta} - */ -public final class BindingDelta extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.BindingDelta) - BindingDeltaOrBuilder { - private static final long serialVersionUID = 0L; - // Use BindingDelta.newBuilder() to construct. - private BindingDelta(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BindingDelta() { - action_ = 0; - role_ = ""; - member_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BindingDelta(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_BindingDelta_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_BindingDelta_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.BindingDelta.class, com.google.iam.v1.BindingDelta.Builder.class); - } - - /** - * - * - *
-   * The type of action performed on a Binding in a policy.
-   * 
- * - * Protobuf enum {@code google.iam.v1.BindingDelta.Action} - */ - public enum Action implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unspecified.
-     * 
- * - * ACTION_UNSPECIFIED = 0; - */ - ACTION_UNSPECIFIED(0), - /** - * - * - *
-     * Addition of a Binding.
-     * 
- * - * ADD = 1; - */ - ADD(1), - /** - * - * - *
-     * Removal of a Binding.
-     * 
- * - * REMOVE = 2; - */ - REMOVE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Unspecified.
-     * 
- * - * ACTION_UNSPECIFIED = 0; - */ - public static final int ACTION_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Addition of a Binding.
-     * 
- * - * ADD = 1; - */ - public static final int ADD_VALUE = 1; - /** - * - * - *
-     * Removal of a Binding.
-     * 
- * - * REMOVE = 2; - */ - public static final int REMOVE_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Action valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Action forNumber(int value) { - switch (value) { - case 0: - return ACTION_UNSPECIFIED; - case 1: - return ADD; - case 2: - return REMOVE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Action findValueByNumber(int number) { - return Action.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.iam.v1.BindingDelta.getDescriptor().getEnumTypes().get(0); - } - - private static final Action[] VALUES = values(); - - public static Action valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Action(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.iam.v1.BindingDelta.Action) - } - - public static final int ACTION_FIELD_NUMBER = 1; - private int action_; - /** - * - * - *
-   * The action that was performed on a Binding.
-   * Required
-   * 
- * - * .google.iam.v1.BindingDelta.Action action = 1; - * - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override - public int getActionValue() { - return action_; - } - /** - * - * - *
-   * The action that was performed on a Binding.
-   * Required
-   * 
- * - * .google.iam.v1.BindingDelta.Action action = 1; - * - * @return The action. - */ - @java.lang.Override - public com.google.iam.v1.BindingDelta.Action getAction() { - @SuppressWarnings("deprecation") - com.google.iam.v1.BindingDelta.Action result = - com.google.iam.v1.BindingDelta.Action.valueOf(action_); - return result == null ? com.google.iam.v1.BindingDelta.Action.UNRECOGNIZED : result; - } - - public static final int ROLE_FIELD_NUMBER = 2; - private volatile java.lang.Object role_; - /** - * - * - *
-   * Role that is assigned to `members`.
-   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-   * Required
-   * 
- * - * string role = 2; - * - * @return The role. - */ - @java.lang.Override - public java.lang.String getRole() { - java.lang.Object ref = role_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - role_ = s; - return s; - } - } - /** - * - * - *
-   * Role that is assigned to `members`.
-   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-   * Required
-   * 
- * - * string role = 2; - * - * @return The bytes for role. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - role_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEMBER_FIELD_NUMBER = 3; - private volatile java.lang.Object member_; - /** - * - * - *
-   * A single identity requesting access for a Cloud Platform resource.
-   * Follows the same format of Binding.members.
-   * Required
-   * 
- * - * string member = 3; - * - * @return The member. - */ - @java.lang.Override - public java.lang.String getMember() { - java.lang.Object ref = member_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - member_ = s; - return s; - } - } - /** - * - * - *
-   * A single identity requesting access for a Cloud Platform resource.
-   * Follows the same format of Binding.members.
-   * Required
-   * 
- * - * string member = 3; - * - * @return The bytes for member. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMemberBytes() { - java.lang.Object ref = member_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - member_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONDITION_FIELD_NUMBER = 4; - private com.google.type.Expr condition_; - /** - * - * - *
-   * The condition that is associated with this binding.
-   * 
- * - * .google.type.Expr condition = 4; - * - * @return Whether the condition field is set. - */ - @java.lang.Override - public boolean hasCondition() { - return condition_ != null; - } - /** - * - * - *
-   * The condition that is associated with this binding.
-   * 
- * - * .google.type.Expr condition = 4; - * - * @return The condition. - */ - @java.lang.Override - public com.google.type.Expr getCondition() { - return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; - } - /** - * - * - *
-   * The condition that is associated with this binding.
-   * 
- * - * .google.type.Expr condition = 4; - */ - @java.lang.Override - public com.google.type.ExprOrBuilder getConditionOrBuilder() { - return getCondition(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (action_ != com.google.iam.v1.BindingDelta.Action.ACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(1, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(role_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, role_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(member_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, member_); - } - if (condition_ != null) { - output.writeMessage(4, getCondition()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (action_ != com.google.iam.v1.BindingDelta.Action.ACTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(role_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, role_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(member_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, member_); - } - if (condition_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCondition()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.BindingDelta)) { - return super.equals(obj); - } - com.google.iam.v1.BindingDelta other = (com.google.iam.v1.BindingDelta) obj; - - if (action_ != other.action_) return false; - if (!getRole().equals(other.getRole())) return false; - if (!getMember().equals(other.getMember())) return false; - if (hasCondition() != other.hasCondition()) return false; - if (hasCondition()) { - if (!getCondition().equals(other.getCondition())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + action_; - hash = (37 * hash) + ROLE_FIELD_NUMBER; - hash = (53 * hash) + getRole().hashCode(); - hash = (37 * hash) + MEMBER_FIELD_NUMBER; - hash = (53 * hash) + getMember().hashCode(); - if (hasCondition()) { - hash = (37 * hash) + CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getCondition().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.BindingDelta parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.BindingDelta parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.BindingDelta parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.BindingDelta parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.BindingDelta parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.BindingDelta parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.BindingDelta parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.BindingDelta parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.BindingDelta parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.BindingDelta parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.BindingDelta parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.BindingDelta parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.BindingDelta prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * One delta entry for Binding. Each individual change (only one member in each
-   * entry) to a binding will be a separate entry.
-   * 
- * - * Protobuf type {@code google.iam.v1.BindingDelta} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.BindingDelta) - com.google.iam.v1.BindingDeltaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_BindingDelta_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_BindingDelta_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.BindingDelta.class, com.google.iam.v1.BindingDelta.Builder.class); - } - - // Construct using com.google.iam.v1.BindingDelta.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - action_ = 0; - - role_ = ""; - - member_ = ""; - - if (conditionBuilder_ == null) { - condition_ = null; - } else { - condition_ = null; - conditionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_BindingDelta_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.BindingDelta getDefaultInstanceForType() { - return com.google.iam.v1.BindingDelta.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.BindingDelta build() { - com.google.iam.v1.BindingDelta result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.BindingDelta buildPartial() { - com.google.iam.v1.BindingDelta result = new com.google.iam.v1.BindingDelta(this); - result.action_ = action_; - result.role_ = role_; - result.member_ = member_; - if (conditionBuilder_ == null) { - result.condition_ = condition_; - } else { - result.condition_ = conditionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.BindingDelta) { - return mergeFrom((com.google.iam.v1.BindingDelta) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.BindingDelta other) { - if (other == com.google.iam.v1.BindingDelta.getDefaultInstance()) return this; - if (other.action_ != 0) { - setActionValue(other.getActionValue()); - } - if (!other.getRole().isEmpty()) { - role_ = other.role_; - onChanged(); - } - if (!other.getMember().isEmpty()) { - member_ = other.member_; - onChanged(); - } - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - action_ = input.readEnum(); - - break; - } // case 8 - case 18: - { - role_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - member_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int action_ = 0; - /** - * - * - *
-     * The action that was performed on a Binding.
-     * Required
-     * 
- * - * .google.iam.v1.BindingDelta.Action action = 1; - * - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override - public int getActionValue() { - return action_; - } - /** - * - * - *
-     * The action that was performed on a Binding.
-     * Required
-     * 
- * - * .google.iam.v1.BindingDelta.Action action = 1; - * - * @param value The enum numeric value on the wire for action to set. - * @return This builder for chaining. - */ - public Builder setActionValue(int value) { - - action_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The action that was performed on a Binding.
-     * Required
-     * 
- * - * .google.iam.v1.BindingDelta.Action action = 1; - * - * @return The action. - */ - @java.lang.Override - public com.google.iam.v1.BindingDelta.Action getAction() { - @SuppressWarnings("deprecation") - com.google.iam.v1.BindingDelta.Action result = - com.google.iam.v1.BindingDelta.Action.valueOf(action_); - return result == null ? com.google.iam.v1.BindingDelta.Action.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The action that was performed on a Binding.
-     * Required
-     * 
- * - * .google.iam.v1.BindingDelta.Action action = 1; - * - * @param value The action to set. - * @return This builder for chaining. - */ - public Builder setAction(com.google.iam.v1.BindingDelta.Action value) { - if (value == null) { - throw new NullPointerException(); - } - - action_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The action that was performed on a Binding.
-     * Required
-     * 
- * - * .google.iam.v1.BindingDelta.Action action = 1; - * - * @return This builder for chaining. - */ - public Builder clearAction() { - - action_ = 0; - onChanged(); - return this; - } - - private java.lang.Object role_ = ""; - /** - * - * - *
-     * Role that is assigned to `members`.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * Required
-     * 
- * - * string role = 2; - * - * @return The role. - */ - public java.lang.String getRole() { - java.lang.Object ref = role_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - role_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Role that is assigned to `members`.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * Required
-     * 
- * - * string role = 2; - * - * @return The bytes for role. - */ - public com.google.protobuf.ByteString getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - role_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Role that is assigned to `members`.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * Required
-     * 
- * - * string role = 2; - * - * @param value The role to set. - * @return This builder for chaining. - */ - public Builder setRole(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - role_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Role that is assigned to `members`.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * Required
-     * 
- * - * string role = 2; - * - * @return This builder for chaining. - */ - public Builder clearRole() { - - role_ = getDefaultInstance().getRole(); - onChanged(); - return this; - } - /** - * - * - *
-     * Role that is assigned to `members`.
-     * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-     * Required
-     * 
- * - * string role = 2; - * - * @param value The bytes for role to set. - * @return This builder for chaining. - */ - public Builder setRoleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - role_ = value; - onChanged(); - return this; - } - - private java.lang.Object member_ = ""; - /** - * - * - *
-     * A single identity requesting access for a Cloud Platform resource.
-     * Follows the same format of Binding.members.
-     * Required
-     * 
- * - * string member = 3; - * - * @return The member. - */ - public java.lang.String getMember() { - java.lang.Object ref = member_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - member_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A single identity requesting access for a Cloud Platform resource.
-     * Follows the same format of Binding.members.
-     * Required
-     * 
- * - * string member = 3; - * - * @return The bytes for member. - */ - public com.google.protobuf.ByteString getMemberBytes() { - java.lang.Object ref = member_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - member_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A single identity requesting access for a Cloud Platform resource.
-     * Follows the same format of Binding.members.
-     * Required
-     * 
- * - * string member = 3; - * - * @param value The member to set. - * @return This builder for chaining. - */ - public Builder setMember(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - member_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A single identity requesting access for a Cloud Platform resource.
-     * Follows the same format of Binding.members.
-     * Required
-     * 
- * - * string member = 3; - * - * @return This builder for chaining. - */ - public Builder clearMember() { - - member_ = getDefaultInstance().getMember(); - onChanged(); - return this; - } - /** - * - * - *
-     * A single identity requesting access for a Cloud Platform resource.
-     * Follows the same format of Binding.members.
-     * Required
-     * 
- * - * string member = 3; - * - * @param value The bytes for member to set. - * @return This builder for chaining. - */ - public Builder setMemberBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - member_ = value; - onChanged(); - return this; - } - - private com.google.type.Expr condition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> - conditionBuilder_; - /** - * - * - *
-     * The condition that is associated with this binding.
-     * 
- * - * .google.type.Expr condition = 4; - * - * @return Whether the condition field is set. - */ - public boolean hasCondition() { - return conditionBuilder_ != null || condition_ != null; - } - /** - * - * - *
-     * The condition that is associated with this binding.
-     * 
- * - * .google.type.Expr condition = 4; - * - * @return The condition. - */ - public com.google.type.Expr getCondition() { - if (conditionBuilder_ == null) { - return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; - } else { - return conditionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The condition that is associated with this binding.
-     * 
- * - * .google.type.Expr condition = 4; - */ - public Builder setCondition(com.google.type.Expr value) { - if (conditionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - condition_ = value; - onChanged(); - } else { - conditionBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The condition that is associated with this binding.
-     * 
- * - * .google.type.Expr condition = 4; - */ - public Builder setCondition(com.google.type.Expr.Builder builderForValue) { - if (conditionBuilder_ == null) { - condition_ = builderForValue.build(); - onChanged(); - } else { - conditionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The condition that is associated with this binding.
-     * 
- * - * .google.type.Expr condition = 4; - */ - public Builder mergeCondition(com.google.type.Expr value) { - if (conditionBuilder_ == null) { - if (condition_ != null) { - condition_ = com.google.type.Expr.newBuilder(condition_).mergeFrom(value).buildPartial(); - } else { - condition_ = value; - } - onChanged(); - } else { - conditionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The condition that is associated with this binding.
-     * 
- * - * .google.type.Expr condition = 4; - */ - public Builder clearCondition() { - if (conditionBuilder_ == null) { - condition_ = null; - onChanged(); - } else { - condition_ = null; - conditionBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The condition that is associated with this binding.
-     * 
- * - * .google.type.Expr condition = 4; - */ - public com.google.type.Expr.Builder getConditionBuilder() { - - onChanged(); - return getConditionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The condition that is associated with this binding.
-     * 
- * - * .google.type.Expr condition = 4; - */ - public com.google.type.ExprOrBuilder getConditionOrBuilder() { - if (conditionBuilder_ != null) { - return conditionBuilder_.getMessageOrBuilder(); - } else { - return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; - } - } - /** - * - * - *
-     * The condition that is associated with this binding.
-     * 
- * - * .google.type.Expr condition = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> - getConditionFieldBuilder() { - if (conditionBuilder_ == null) { - conditionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( - getCondition(), getParentForChildren(), isClean()); - condition_ = null; - } - return conditionBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.BindingDelta) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.BindingDelta) - private static final com.google.iam.v1.BindingDelta DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.BindingDelta(); - } - - public static com.google.iam.v1.BindingDelta getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BindingDelta parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.BindingDelta getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDeltaOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDeltaOrBuilder.java deleted file mode 100644 index a2959294..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDeltaOrBuilder.java +++ /dev/null @@ -1,145 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -public interface BindingDeltaOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.BindingDelta) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The action that was performed on a Binding.
-   * Required
-   * 
- * - * .google.iam.v1.BindingDelta.Action action = 1; - * - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - /** - * - * - *
-   * The action that was performed on a Binding.
-   * Required
-   * 
- * - * .google.iam.v1.BindingDelta.Action action = 1; - * - * @return The action. - */ - com.google.iam.v1.BindingDelta.Action getAction(); - - /** - * - * - *
-   * Role that is assigned to `members`.
-   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-   * Required
-   * 
- * - * string role = 2; - * - * @return The role. - */ - java.lang.String getRole(); - /** - * - * - *
-   * Role that is assigned to `members`.
-   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-   * Required
-   * 
- * - * string role = 2; - * - * @return The bytes for role. - */ - com.google.protobuf.ByteString getRoleBytes(); - - /** - * - * - *
-   * A single identity requesting access for a Cloud Platform resource.
-   * Follows the same format of Binding.members.
-   * Required
-   * 
- * - * string member = 3; - * - * @return The member. - */ - java.lang.String getMember(); - /** - * - * - *
-   * A single identity requesting access for a Cloud Platform resource.
-   * Follows the same format of Binding.members.
-   * Required
-   * 
- * - * string member = 3; - * - * @return The bytes for member. - */ - com.google.protobuf.ByteString getMemberBytes(); - - /** - * - * - *
-   * The condition that is associated with this binding.
-   * 
- * - * .google.type.Expr condition = 4; - * - * @return Whether the condition field is set. - */ - boolean hasCondition(); - /** - * - * - *
-   * The condition that is associated with this binding.
-   * 
- * - * .google.type.Expr condition = 4; - * - * @return The condition. - */ - com.google.type.Expr getCondition(); - /** - * - * - *
-   * The condition that is associated with this binding.
-   * 
- * - * .google.type.Expr condition = 4; - */ - com.google.type.ExprOrBuilder getConditionOrBuilder(); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingOrBuilder.java deleted file mode 100644 index b5e660fa..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingOrBuilder.java +++ /dev/null @@ -1,282 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -public interface BindingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.Binding) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Role that is assigned to the list of `members`, or principals.
-   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-   * 
- * - * string role = 1; - * - * @return The role. - */ - java.lang.String getRole(); - /** - * - * - *
-   * Role that is assigned to the list of `members`, or principals.
-   * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
-   * 
- * - * string role = 1; - * - * @return The bytes for role. - */ - com.google.protobuf.ByteString getRoleBytes(); - - /** - * - * - *
-   * Specifies the principals requesting access for a Cloud Platform 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.
-   * * `user:{emailid}`: An email address that represents a specific Google
-   *    account. For example, `alice@example.com` .
-   * * `serviceAccount:{emailid}`: An email address that represents a service
-   *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-   * * `group:{emailid}`: An email address that represents a Google group.
-   *    For example, `admins@example.com`.
-   * * `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.
-   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-   *    users of that domain. For example, `google.com` or `example.com`.
-   * 
- * - * repeated string members = 2; - * - * @return A list containing the members. - */ - java.util.List getMembersList(); - /** - * - * - *
-   * Specifies the principals requesting access for a Cloud Platform 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.
-   * * `user:{emailid}`: An email address that represents a specific Google
-   *    account. For example, `alice@example.com` .
-   * * `serviceAccount:{emailid}`: An email address that represents a service
-   *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-   * * `group:{emailid}`: An email address that represents a Google group.
-   *    For example, `admins@example.com`.
-   * * `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.
-   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-   *    users of that domain. For example, `google.com` or `example.com`.
-   * 
- * - * repeated string members = 2; - * - * @return The count of members. - */ - int getMembersCount(); - /** - * - * - *
-   * Specifies the principals requesting access for a Cloud Platform 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.
-   * * `user:{emailid}`: An email address that represents a specific Google
-   *    account. For example, `alice@example.com` .
-   * * `serviceAccount:{emailid}`: An email address that represents a service
-   *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-   * * `group:{emailid}`: An email address that represents a Google group.
-   *    For example, `admins@example.com`.
-   * * `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.
-   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-   *    users of that domain. For example, `google.com` or `example.com`.
-   * 
- * - * repeated string members = 2; - * - * @param index The index of the element to return. - * @return The members at the given index. - */ - java.lang.String getMembers(int index); - /** - * - * - *
-   * Specifies the principals requesting access for a Cloud Platform 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.
-   * * `user:{emailid}`: An email address that represents a specific Google
-   *    account. For example, `alice@example.com` .
-   * * `serviceAccount:{emailid}`: An email address that represents a service
-   *    account. For example, `my-other-app@appspot.gserviceaccount.com`.
-   * * `group:{emailid}`: An email address that represents a Google group.
-   *    For example, `admins@example.com`.
-   * * `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.
-   * * `domain:{domain}`: The G Suite domain (primary) that represents all the
-   *    users of that domain. For example, `google.com` or `example.com`.
-   * 
- * - * repeated string members = 2; - * - * @param index The index of the value to return. - * @return The bytes of the members at the given index. - */ - com.google.protobuf.ByteString getMembersBytes(int index); - - /** - * - * - *
-   * 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).
-   * 
- * - * .google.type.Expr condition = 3; - * - * @return Whether the condition field is set. - */ - boolean hasCondition(); - /** - * - * - *
-   * 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).
-   * 
- * - * .google.type.Expr condition = 3; - * - * @return The condition. - */ - com.google.type.Expr getCondition(); - /** - * - * - *
-   * 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).
-   * 
- * - * .google.type.Expr condition = 3; - */ - com.google.type.ExprOrBuilder getConditionOrBuilder(); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java deleted file mode 100644 index 883feeaa..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java +++ /dev/null @@ -1,910 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/iam_policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * Request message for `GetIamPolicy` method.
- * 
- * - * Protobuf type {@code google.iam.v1.GetIamPolicyRequest} - */ -public final class GetIamPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.GetIamPolicyRequest) - GetIamPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetIamPolicyRequest.newBuilder() to construct. - private GetIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetIamPolicyRequest() { - resource_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetIamPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_GetIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_GetIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.GetIamPolicyRequest.class, - com.google.iam.v1.GetIamPolicyRequest.Builder.class); - } - - public static final int RESOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object resource_; - /** - * - * - *
-   * REQUIRED: The resource for which the policy is being requested.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } - /** - * - * - *
-   * REQUIRED: The resource for which the policy is being requested.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OPTIONS_FIELD_NUMBER = 2; - private com.google.iam.v1.GetPolicyOptions options_; - /** - * - * - *
-   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-   * `GetIamPolicy`.
-   * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - * - * @return Whether the options field is set. - */ - @java.lang.Override - public boolean hasOptions() { - return options_ != null; - } - /** - * - * - *
-   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-   * `GetIamPolicy`.
-   * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - * - * @return The options. - */ - @java.lang.Override - public com.google.iam.v1.GetPolicyOptions getOptions() { - return options_ == null ? com.google.iam.v1.GetPolicyOptions.getDefaultInstance() : options_; - } - /** - * - * - *
-   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-   * `GetIamPolicy`.
-   * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - */ - @java.lang.Override - public com.google.iam.v1.GetPolicyOptionsOrBuilder getOptionsOrBuilder() { - return getOptions(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); - } - if (options_ != null) { - output.writeMessage(2, getOptions()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); - } - if (options_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOptions()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.GetIamPolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v1.GetIamPolicyRequest other = (com.google.iam.v1.GetIamPolicyRequest) obj; - - if (!getResource().equals(other.getResource())) return false; - if (hasOptions() != other.hasOptions()) return false; - if (hasOptions()) { - if (!getOptions().equals(other.getOptions())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - if (hasOptions()) { - hash = (37 * hash) + OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getOptions().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.GetIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.GetIamPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `GetIamPolicy` method.
-   * 
- * - * Protobuf type {@code google.iam.v1.GetIamPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.GetIamPolicyRequest) - com.google.iam.v1.GetIamPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_GetIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_GetIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.GetIamPolicyRequest.class, - com.google.iam.v1.GetIamPolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v1.GetIamPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - resource_ = ""; - - if (optionsBuilder_ == null) { - options_ = null; - } else { - options_ = null; - optionsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_GetIamPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.GetIamPolicyRequest getDefaultInstanceForType() { - return com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.GetIamPolicyRequest build() { - com.google.iam.v1.GetIamPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.GetIamPolicyRequest buildPartial() { - com.google.iam.v1.GetIamPolicyRequest result = - new com.google.iam.v1.GetIamPolicyRequest(this); - result.resource_ = resource_; - if (optionsBuilder_ == null) { - result.options_ = options_; - } else { - result.options_ = optionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.GetIamPolicyRequest) { - return mergeFrom((com.google.iam.v1.GetIamPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.GetIamPolicyRequest other) { - if (other == com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance()) return this; - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - onChanged(); - } - if (other.hasOptions()) { - mergeOptions(other.getOptions()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - resource_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getOptionsFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object resource_ = ""; - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The resource to set. - * @return This builder for chaining. - */ - public Builder setResource(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resource_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearResource() { - - resource_ = getDefaultInstance().getResource(); - onChanged(); - return this; - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for resource to set. - * @return This builder for chaining. - */ - public Builder setResourceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resource_ = value; - onChanged(); - return this; - } - - private com.google.iam.v1.GetPolicyOptions options_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.GetPolicyOptions, - com.google.iam.v1.GetPolicyOptions.Builder, - com.google.iam.v1.GetPolicyOptionsOrBuilder> - optionsBuilder_; - /** - * - * - *
-     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-     * `GetIamPolicy`.
-     * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - * - * @return Whether the options field is set. - */ - public boolean hasOptions() { - return optionsBuilder_ != null || options_ != null; - } - /** - * - * - *
-     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-     * `GetIamPolicy`.
-     * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - * - * @return The options. - */ - public com.google.iam.v1.GetPolicyOptions getOptions() { - if (optionsBuilder_ == null) { - return options_ == null - ? com.google.iam.v1.GetPolicyOptions.getDefaultInstance() - : options_; - } else { - return optionsBuilder_.getMessage(); - } - } - /** - * - * - *
-     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-     * `GetIamPolicy`.
-     * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - */ - public Builder setOptions(com.google.iam.v1.GetPolicyOptions value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - options_ = value; - onChanged(); - } else { - optionsBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-     * `GetIamPolicy`.
-     * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - */ - public Builder setOptions(com.google.iam.v1.GetPolicyOptions.Builder builderForValue) { - if (optionsBuilder_ == null) { - options_ = builderForValue.build(); - onChanged(); - } else { - optionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-     * `GetIamPolicy`.
-     * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - */ - public Builder mergeOptions(com.google.iam.v1.GetPolicyOptions value) { - if (optionsBuilder_ == null) { - if (options_ != null) { - options_ = - com.google.iam.v1.GetPolicyOptions.newBuilder(options_) - .mergeFrom(value) - .buildPartial(); - } else { - options_ = value; - } - onChanged(); - } else { - optionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-     * `GetIamPolicy`.
-     * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - */ - public Builder clearOptions() { - if (optionsBuilder_ == null) { - options_ = null; - onChanged(); - } else { - options_ = null; - optionsBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-     * `GetIamPolicy`.
-     * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - */ - public com.google.iam.v1.GetPolicyOptions.Builder getOptionsBuilder() { - - onChanged(); - return getOptionsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-     * `GetIamPolicy`.
-     * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - */ - public com.google.iam.v1.GetPolicyOptionsOrBuilder getOptionsOrBuilder() { - if (optionsBuilder_ != null) { - return optionsBuilder_.getMessageOrBuilder(); - } else { - return options_ == null - ? com.google.iam.v1.GetPolicyOptions.getDefaultInstance() - : options_; - } - } - /** - * - * - *
-     * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-     * `GetIamPolicy`.
-     * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.GetPolicyOptions, - com.google.iam.v1.GetPolicyOptions.Builder, - com.google.iam.v1.GetPolicyOptionsOrBuilder> - getOptionsFieldBuilder() { - if (optionsBuilder_ == null) { - optionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.GetPolicyOptions, - com.google.iam.v1.GetPolicyOptions.Builder, - com.google.iam.v1.GetPolicyOptionsOrBuilder>( - getOptions(), getParentForChildren(), isClean()); - options_ = null; - } - return optionsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.GetIamPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.GetIamPolicyRequest) - private static final com.google.iam.v1.GetIamPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.GetIamPolicyRequest(); - } - - public static com.google.iam.v1.GetIamPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetIamPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.GetIamPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequestOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequestOrBuilder.java deleted file mode 100644 index 5f90592d..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequestOrBuilder.java +++ /dev/null @@ -1,94 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/iam_policy.proto - -package com.google.iam.v1; - -public interface GetIamPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.GetIamPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * REQUIRED: The resource for which the policy is being requested.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - java.lang.String getResource(); - /** - * - * - *
-   * REQUIRED: The resource for which the policy is being requested.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - com.google.protobuf.ByteString getResourceBytes(); - - /** - * - * - *
-   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-   * `GetIamPolicy`.
-   * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - * - * @return Whether the options field is set. - */ - boolean hasOptions(); - /** - * - * - *
-   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-   * `GetIamPolicy`.
-   * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - * - * @return The options. - */ - com.google.iam.v1.GetPolicyOptions getOptions(); - /** - * - * - *
-   * OPTIONAL: A `GetPolicyOptions` object for specifying options to
-   * `GetIamPolicy`.
-   * 
- * - * .google.iam.v1.GetPolicyOptions options = 2; - */ - com.google.iam.v1.GetPolicyOptionsOrBuilder getOptionsOrBuilder(); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java deleted file mode 100644 index 1c427ecb..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java +++ /dev/null @@ -1,574 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/options.proto - -package com.google.iam.v1; - -/** - * - * - *
- * Encapsulates settings provided to GetIamPolicy.
- * 
- * - * Protobuf type {@code google.iam.v1.GetPolicyOptions} - */ -public final class GetPolicyOptions extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.GetPolicyOptions) - GetPolicyOptionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetPolicyOptions.newBuilder() to construct. - private GetPolicyOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetPolicyOptions() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetPolicyOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.OptionsProto.internal_static_google_iam_v1_GetPolicyOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.OptionsProto - .internal_static_google_iam_v1_GetPolicyOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.GetPolicyOptions.class, - com.google.iam.v1.GetPolicyOptions.Builder.class); - } - - public static final int REQUESTED_POLICY_VERSION_FIELD_NUMBER = 1; - private int 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).
-   * 
- * - * int32 requested_policy_version = 1; - * - * @return The requestedPolicyVersion. - */ - @java.lang.Override - public int getRequestedPolicyVersion() { - return requestedPolicyVersion_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (requestedPolicyVersion_ != 0) { - output.writeInt32(1, requestedPolicyVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (requestedPolicyVersion_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, requestedPolicyVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.GetPolicyOptions)) { - return super.equals(obj); - } - com.google.iam.v1.GetPolicyOptions other = (com.google.iam.v1.GetPolicyOptions) obj; - - if (getRequestedPolicyVersion() != other.getRequestedPolicyVersion()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + REQUESTED_POLICY_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getRequestedPolicyVersion(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.GetPolicyOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.GetPolicyOptions parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.GetPolicyOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.GetPolicyOptions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Encapsulates settings provided to GetIamPolicy.
-   * 
- * - * Protobuf type {@code google.iam.v1.GetPolicyOptions} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.GetPolicyOptions) - com.google.iam.v1.GetPolicyOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.OptionsProto - .internal_static_google_iam_v1_GetPolicyOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.OptionsProto - .internal_static_google_iam_v1_GetPolicyOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.GetPolicyOptions.class, - com.google.iam.v1.GetPolicyOptions.Builder.class); - } - - // Construct using com.google.iam.v1.GetPolicyOptions.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - requestedPolicyVersion_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.OptionsProto - .internal_static_google_iam_v1_GetPolicyOptions_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.GetPolicyOptions getDefaultInstanceForType() { - return com.google.iam.v1.GetPolicyOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.GetPolicyOptions build() { - com.google.iam.v1.GetPolicyOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.GetPolicyOptions buildPartial() { - com.google.iam.v1.GetPolicyOptions result = new com.google.iam.v1.GetPolicyOptions(this); - result.requestedPolicyVersion_ = requestedPolicyVersion_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.GetPolicyOptions) { - return mergeFrom((com.google.iam.v1.GetPolicyOptions) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.GetPolicyOptions other) { - if (other == com.google.iam.v1.GetPolicyOptions.getDefaultInstance()) return this; - if (other.getRequestedPolicyVersion() != 0) { - setRequestedPolicyVersion(other.getRequestedPolicyVersion()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - requestedPolicyVersion_ = input.readInt32(); - - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int 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).
-     * 
- * - * int32 requested_policy_version = 1; - * - * @return The requestedPolicyVersion. - */ - @java.lang.Override - public int getRequestedPolicyVersion() { - return 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).
-     * 
- * - * int32 requested_policy_version = 1; - * - * @param value The requestedPolicyVersion to set. - * @return This builder for chaining. - */ - public Builder setRequestedPolicyVersion(int value) { - - requestedPolicyVersion_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * int32 requested_policy_version = 1; - * - * @return This builder for chaining. - */ - public Builder clearRequestedPolicyVersion() { - - requestedPolicyVersion_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.GetPolicyOptions) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.GetPolicyOptions) - private static final com.google.iam.v1.GetPolicyOptions DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.GetPolicyOptions(); - } - - public static com.google.iam.v1.GetPolicyOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetPolicyOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.GetPolicyOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptionsOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptionsOrBuilder.java deleted file mode 100644 index 1cd51a99..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptionsOrBuilder.java +++ /dev/null @@ -1,51 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/options.proto - -package com.google.iam.v1; - -public interface GetPolicyOptionsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.GetPolicyOptions) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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).
-   * 
- * - * int32 requested_policy_version = 1; - * - * @return The requestedPolicyVersion. - */ - int getRequestedPolicyVersion(); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/IamPolicyProto.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/IamPolicyProto.java deleted file mode 100644 index 57652c10..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/IamPolicyProto.java +++ /dev/null @@ -1,149 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/iam_policy.proto - -package com.google.iam.v1; - -public final class IamPolicyProto { - private IamPolicyProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_SetIamPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_SetIamPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_GetIamPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_GetIamPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_TestIamPermissionsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_TestIamPermissionsResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\036google/iam/v1/iam_policy.proto\022\rgoogle" - + ".iam.v1\032\034google/api/annotations.proto\032\027g" - + "oogle/api/client.proto\032\037google/api/field" - + "_behavior.proto\032\031google/api/resource.pro" - + "to\032\033google/iam/v1/options.proto\032\032google/" - + "iam/v1/policy.proto\032 google/protobuf/fie" - + "ld_mask.proto\"\217\001\n\023SetIamPolicyRequest\022\033\n" - + "\010resource\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022*\n\006policy\030\002 \001" - + "(\0132\025.google.iam.v1.PolicyB\003\340A\002\022/\n\013update" - + "_mask\030\003 \001(\0132\032.google.protobuf.FieldMask\"" - + "d\n\023GetIamPolicyRequest\022\033\n\010resource\030\001 \001(\t" - + "B\t\340A\002\372A\003\n\001*\0220\n\007options\030\002 \001(\0132\037.google.ia" - + "m.v1.GetPolicyOptions\"R\n\031TestIamPermissi" - + "onsRequest\022\033\n\010resource\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022" - + "\030\n\013permissions\030\002 \003(\tB\003\340A\002\"1\n\032TestIamPerm" - + "issionsResponse\022\023\n\013permissions\030\001 \003(\t2\264\003\n" - + "\tIAMPolicy\022t\n\014SetIamPolicy\022\".google.iam." - + "v1.SetIamPolicyRequest\032\025.google.iam.v1.P" - + "olicy\")\202\323\344\223\002#\"\036/v1/{resource=**}:setIamP" - + "olicy:\001*\022t\n\014GetIamPolicy\022\".google.iam.v1" - + ".GetIamPolicyRequest\032\025.google.iam.v1.Pol" - + "icy\")\202\323\344\223\002#\"\036/v1/{resource=**}:getIamPol" - + "icy:\001*\022\232\001\n\022TestIamPermissions\022(.google.i" - + "am.v1.TestIamPermissionsRequest\032).google" - + ".iam.v1.TestIamPermissionsResponse\"/\202\323\344\223" - + "\002)\"$/v1/{resource=**}:testIamPermissions" - + ":\001*\032\036\312A\033iam-meta-api.googleapis.comB\206\001\n\021" - + "com.google.iam.v1B\016IamPolicyProtoP\001Z0goo" - + "gle.golang.org/genproto/googleapis/iam/v" - + "1;iam\370\001\001\252\002\023Google.Cloud.Iam.V1\312\002\023Google\\" - + "Cloud\\Iam\\V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.iam.v1.OptionsProto.getDescriptor(), - com.google.iam.v1.PolicyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - }); - internal_static_google_iam_v1_SetIamPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_iam_v1_SetIamPolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_SetIamPolicyRequest_descriptor, - new java.lang.String[] { - "Resource", "Policy", "UpdateMask", - }); - internal_static_google_iam_v1_GetIamPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_iam_v1_GetIamPolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_GetIamPolicyRequest_descriptor, - new java.lang.String[] { - "Resource", "Options", - }); - internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_iam_v1_TestIamPermissionsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor, - new java.lang.String[] { - "Resource", "Permissions", - }); - internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_iam_v1_TestIamPermissionsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor, - new java.lang.String[] { - "Permissions", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.iam.v1.OptionsProto.getDescriptor(); - com.google.iam.v1.PolicyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/OptionsProto.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/OptionsProto.java deleted file mode 100644 index 9c13280b..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/OptionsProto.java +++ /dev/null @@ -1,65 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/options.proto - -package com.google.iam.v1; - -public final class OptionsProto { - private OptionsProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_GetPolicyOptions_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_GetPolicyOptions_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\033google/iam/v1/options.proto\022\rgoogle.ia" - + "m.v1\"4\n\020GetPolicyOptions\022 \n\030requested_po" - + "licy_version\030\001 \001(\005B\204\001\n\021com.google.iam.v1" - + "B\014OptionsProtoP\001Z0google.golang.org/genp" - + "roto/googleapis/iam/v1;iam\370\001\001\252\002\023Google.C" - + "loud.Iam.V1\312\002\023Google\\Cloud\\Iam\\V1b\006proto" - + "3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); - internal_static_google_iam_v1_GetPolicyOptions_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_iam_v1_GetPolicyOptions_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_GetPolicyOptions_descriptor, - new java.lang.String[] { - "RequestedPolicyVersion", - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/Policy.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/Policy.java deleted file mode 100644 index b03aa80d..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/Policy.java +++ /dev/null @@ -1,1984 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * 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/).
- * 
- * - * Protobuf type {@code google.iam.v1.Policy} - */ -public final class Policy extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.Policy) - PolicyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Policy.newBuilder() to construct. - private Policy(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Policy() { - bindings_ = java.util.Collections.emptyList(); - auditConfigs_ = java.util.Collections.emptyList(); - etag_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Policy(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.Policy.class, com.google.iam.v1.Policy.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private int 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).
-   * 
- * - * int32 version = 1; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - - public static final int BINDINGS_FIELD_NUMBER = 4; - private java.util.List 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - @java.lang.Override - public java.util.List getBindingsList() { - return 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - @java.lang.Override - public java.util.List getBindingsOrBuilderList() { - return 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - @java.lang.Override - public int getBindingsCount() { - return bindings_.size(); - } - /** - * - * - *
-   * 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - @java.lang.Override - public com.google.iam.v1.Binding getBindings(int index) { - return bindings_.get(index); - } - /** - * - * - *
-   * 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - @java.lang.Override - public com.google.iam.v1.BindingOrBuilder getBindingsOrBuilder(int index) { - return bindings_.get(index); - } - - public static final int AUDIT_CONFIGS_FIELD_NUMBER = 6; - private java.util.List auditConfigs_; - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - @java.lang.Override - public java.util.List getAuditConfigsList() { - return auditConfigs_; - } - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - @java.lang.Override - public java.util.List - getAuditConfigsOrBuilderList() { - return auditConfigs_; - } - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - @java.lang.Override - public int getAuditConfigsCount() { - return auditConfigs_.size(); - } - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - @java.lang.Override - public com.google.iam.v1.AuditConfig getAuditConfigs(int index) { - return auditConfigs_.get(index); - } - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - @java.lang.Override - public com.google.iam.v1.AuditConfigOrBuilder getAuditConfigsOrBuilder(int index) { - return auditConfigs_.get(index); - } - - public static final int ETAG_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString 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.
-   * 
- * - * bytes etag = 3; - * - * @return The etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEtag() { - return etag_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (version_ != 0) { - output.writeInt32(1, version_); - } - if (!etag_.isEmpty()) { - output.writeBytes(3, etag_); - } - for (int i = 0; i < bindings_.size(); i++) { - output.writeMessage(4, bindings_.get(i)); - } - for (int i = 0; i < auditConfigs_.size(); i++) { - output.writeMessage(6, auditConfigs_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, version_); - } - if (!etag_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, etag_); - } - for (int i = 0; i < bindings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, bindings_.get(i)); - } - for (int i = 0; i < auditConfigs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, auditConfigs_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.Policy)) { - return super.equals(obj); - } - com.google.iam.v1.Policy other = (com.google.iam.v1.Policy) obj; - - if (getVersion() != other.getVersion()) return false; - if (!getBindingsList().equals(other.getBindingsList())) return false; - if (!getAuditConfigsList().equals(other.getAuditConfigsList())) return false; - if (!getEtag().equals(other.getEtag())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); - if (getBindingsCount() > 0) { - hash = (37 * hash) + BINDINGS_FIELD_NUMBER; - hash = (53 * hash) + getBindingsList().hashCode(); - } - if (getAuditConfigsCount() > 0) { - hash = (37 * hash) + AUDIT_CONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getAuditConfigsList().hashCode(); - } - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.Policy parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.Policy parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.Policy parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.Policy parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.Policy parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.Policy parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.Policy parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.Policy parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.Policy parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.Policy parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.Policy parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.Policy parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.Policy prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * 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/).
-   * 
- * - * Protobuf type {@code google.iam.v1.Policy} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.Policy) - com.google.iam.v1.PolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.Policy.class, com.google.iam.v1.Policy.Builder.class); - } - - // Construct using com.google.iam.v1.Policy.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = 0; - - if (bindingsBuilder_ == null) { - bindings_ = java.util.Collections.emptyList(); - } else { - bindings_ = null; - bindingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (auditConfigsBuilder_ == null) { - auditConfigs_ = java.util.Collections.emptyList(); - } else { - auditConfigs_ = null; - auditConfigsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - etag_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.Policy getDefaultInstanceForType() { - return com.google.iam.v1.Policy.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.Policy build() { - com.google.iam.v1.Policy result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.Policy buildPartial() { - com.google.iam.v1.Policy result = new com.google.iam.v1.Policy(this); - int from_bitField0_ = bitField0_; - result.version_ = version_; - if (bindingsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - bindings_ = java.util.Collections.unmodifiableList(bindings_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bindings_ = bindings_; - } else { - result.bindings_ = bindingsBuilder_.build(); - } - if (auditConfigsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - auditConfigs_ = java.util.Collections.unmodifiableList(auditConfigs_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.auditConfigs_ = auditConfigs_; - } else { - result.auditConfigs_ = auditConfigsBuilder_.build(); - } - result.etag_ = etag_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.Policy) { - return mergeFrom((com.google.iam.v1.Policy) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.Policy other) { - if (other == com.google.iam.v1.Policy.getDefaultInstance()) return this; - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - if (bindingsBuilder_ == null) { - if (!other.bindings_.isEmpty()) { - if (bindings_.isEmpty()) { - bindings_ = other.bindings_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBindingsIsMutable(); - bindings_.addAll(other.bindings_); - } - onChanged(); - } - } else { - if (!other.bindings_.isEmpty()) { - if (bindingsBuilder_.isEmpty()) { - bindingsBuilder_.dispose(); - bindingsBuilder_ = null; - bindings_ = other.bindings_; - bitField0_ = (bitField0_ & ~0x00000001); - bindingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBindingsFieldBuilder() - : null; - } else { - bindingsBuilder_.addAllMessages(other.bindings_); - } - } - } - if (auditConfigsBuilder_ == null) { - if (!other.auditConfigs_.isEmpty()) { - if (auditConfigs_.isEmpty()) { - auditConfigs_ = other.auditConfigs_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAuditConfigsIsMutable(); - auditConfigs_.addAll(other.auditConfigs_); - } - onChanged(); - } - } else { - if (!other.auditConfigs_.isEmpty()) { - if (auditConfigsBuilder_.isEmpty()) { - auditConfigsBuilder_.dispose(); - auditConfigsBuilder_ = null; - auditConfigs_ = other.auditConfigs_; - bitField0_ = (bitField0_ & ~0x00000002); - auditConfigsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAuditConfigsFieldBuilder() - : null; - } else { - auditConfigsBuilder_.addAllMessages(other.auditConfigs_); - } - } - } - if (other.getEtag() != com.google.protobuf.ByteString.EMPTY) { - setEtag(other.getEtag()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - version_ = input.readInt32(); - - break; - } // case 8 - case 26: - { - etag_ = input.readBytes(); - - break; - } // case 26 - case 34: - { - com.google.iam.v1.Binding m = - input.readMessage(com.google.iam.v1.Binding.parser(), extensionRegistry); - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - bindings_.add(m); - } else { - bindingsBuilder_.addMessage(m); - } - break; - } // case 34 - case 50: - { - com.google.iam.v1.AuditConfig m = - input.readMessage(com.google.iam.v1.AuditConfig.parser(), extensionRegistry); - if (auditConfigsBuilder_ == null) { - ensureAuditConfigsIsMutable(); - auditConfigs_.add(m); - } else { - auditConfigsBuilder_.addMessage(m); - } - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int 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).
-     * 
- * - * int32 version = 1; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return 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).
-     * 
- * - * int32 version = 1; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(int value) { - - version_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * int32 version = 1; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = 0; - onChanged(); - return this; - } - - private java.util.List bindings_ = java.util.Collections.emptyList(); - - private void ensureBindingsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - bindings_ = new java.util.ArrayList(bindings_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.Binding, - com.google.iam.v1.Binding.Builder, - com.google.iam.v1.BindingOrBuilder> - bindingsBuilder_; - - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public java.util.List getBindingsList() { - if (bindingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(bindings_); - } else { - return bindingsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public int getBindingsCount() { - if (bindingsBuilder_ == null) { - return bindings_.size(); - } else { - return bindingsBuilder_.getCount(); - } - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public com.google.iam.v1.Binding getBindings(int index) { - if (bindingsBuilder_ == null) { - return bindings_.get(index); - } else { - return bindingsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public Builder setBindings(int index, com.google.iam.v1.Binding value) { - if (bindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBindingsIsMutable(); - bindings_.set(index, value); - onChanged(); - } else { - bindingsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public Builder setBindings(int index, com.google.iam.v1.Binding.Builder builderForValue) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - bindings_.set(index, builderForValue.build()); - onChanged(); - } else { - bindingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public Builder addBindings(com.google.iam.v1.Binding value) { - if (bindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBindingsIsMutable(); - bindings_.add(value); - onChanged(); - } else { - bindingsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public Builder addBindings(int index, com.google.iam.v1.Binding value) { - if (bindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBindingsIsMutable(); - bindings_.add(index, value); - onChanged(); - } else { - bindingsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public Builder addBindings(com.google.iam.v1.Binding.Builder builderForValue) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - bindings_.add(builderForValue.build()); - onChanged(); - } else { - bindingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public Builder addBindings(int index, com.google.iam.v1.Binding.Builder builderForValue) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - bindings_.add(index, builderForValue.build()); - onChanged(); - } else { - bindingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public Builder addAllBindings(java.lang.Iterable values) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bindings_); - onChanged(); - } else { - bindingsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public Builder clearBindings() { - if (bindingsBuilder_ == null) { - bindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - bindingsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public Builder removeBindings(int index) { - if (bindingsBuilder_ == null) { - ensureBindingsIsMutable(); - bindings_.remove(index); - onChanged(); - } else { - bindingsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public com.google.iam.v1.Binding.Builder getBindingsBuilder(int index) { - return getBindingsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public com.google.iam.v1.BindingOrBuilder getBindingsOrBuilder(int index) { - if (bindingsBuilder_ == null) { - return bindings_.get(index); - } else { - return bindingsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public java.util.List getBindingsOrBuilderList() { - if (bindingsBuilder_ != null) { - return bindingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public com.google.iam.v1.Binding.Builder addBindingsBuilder() { - return getBindingsFieldBuilder().addBuilder(com.google.iam.v1.Binding.getDefaultInstance()); - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public com.google.iam.v1.Binding.Builder addBindingsBuilder(int index) { - return getBindingsFieldBuilder() - .addBuilder(index, com.google.iam.v1.Binding.getDefaultInstance()); - } - /** - * - * - *
-     * 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`.
-     * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - public java.util.List getBindingsBuilderList() { - return getBindingsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.Binding, - com.google.iam.v1.Binding.Builder, - com.google.iam.v1.BindingOrBuilder> - getBindingsFieldBuilder() { - if (bindingsBuilder_ == null) { - bindingsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.Binding, - com.google.iam.v1.Binding.Builder, - com.google.iam.v1.BindingOrBuilder>( - bindings_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - bindings_ = null; - } - return bindingsBuilder_; - } - - private java.util.List auditConfigs_ = - java.util.Collections.emptyList(); - - private void ensureAuditConfigsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - auditConfigs_ = new java.util.ArrayList(auditConfigs_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.AuditConfig, - com.google.iam.v1.AuditConfig.Builder, - com.google.iam.v1.AuditConfigOrBuilder> - auditConfigsBuilder_; - - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public java.util.List getAuditConfigsList() { - if (auditConfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(auditConfigs_); - } else { - return auditConfigsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public int getAuditConfigsCount() { - if (auditConfigsBuilder_ == null) { - return auditConfigs_.size(); - } else { - return auditConfigsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public com.google.iam.v1.AuditConfig getAuditConfigs(int index) { - if (auditConfigsBuilder_ == null) { - return auditConfigs_.get(index); - } else { - return auditConfigsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public Builder setAuditConfigs(int index, com.google.iam.v1.AuditConfig value) { - if (auditConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuditConfigsIsMutable(); - auditConfigs_.set(index, value); - onChanged(); - } else { - auditConfigsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public Builder setAuditConfigs( - int index, com.google.iam.v1.AuditConfig.Builder builderForValue) { - if (auditConfigsBuilder_ == null) { - ensureAuditConfigsIsMutable(); - auditConfigs_.set(index, builderForValue.build()); - onChanged(); - } else { - auditConfigsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public Builder addAuditConfigs(com.google.iam.v1.AuditConfig value) { - if (auditConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuditConfigsIsMutable(); - auditConfigs_.add(value); - onChanged(); - } else { - auditConfigsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public Builder addAuditConfigs(int index, com.google.iam.v1.AuditConfig value) { - if (auditConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuditConfigsIsMutable(); - auditConfigs_.add(index, value); - onChanged(); - } else { - auditConfigsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public Builder addAuditConfigs(com.google.iam.v1.AuditConfig.Builder builderForValue) { - if (auditConfigsBuilder_ == null) { - ensureAuditConfigsIsMutable(); - auditConfigs_.add(builderForValue.build()); - onChanged(); - } else { - auditConfigsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public Builder addAuditConfigs( - int index, com.google.iam.v1.AuditConfig.Builder builderForValue) { - if (auditConfigsBuilder_ == null) { - ensureAuditConfigsIsMutable(); - auditConfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - auditConfigsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public Builder addAllAuditConfigs( - java.lang.Iterable values) { - if (auditConfigsBuilder_ == null) { - ensureAuditConfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, auditConfigs_); - onChanged(); - } else { - auditConfigsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public Builder clearAuditConfigs() { - if (auditConfigsBuilder_ == null) { - auditConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - auditConfigsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public Builder removeAuditConfigs(int index) { - if (auditConfigsBuilder_ == null) { - ensureAuditConfigsIsMutable(); - auditConfigs_.remove(index); - onChanged(); - } else { - auditConfigsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public com.google.iam.v1.AuditConfig.Builder getAuditConfigsBuilder(int index) { - return getAuditConfigsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public com.google.iam.v1.AuditConfigOrBuilder getAuditConfigsOrBuilder(int index) { - if (auditConfigsBuilder_ == null) { - return auditConfigs_.get(index); - } else { - return auditConfigsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public java.util.List - getAuditConfigsOrBuilderList() { - if (auditConfigsBuilder_ != null) { - return auditConfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(auditConfigs_); - } - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public com.google.iam.v1.AuditConfig.Builder addAuditConfigsBuilder() { - return getAuditConfigsFieldBuilder() - .addBuilder(com.google.iam.v1.AuditConfig.getDefaultInstance()); - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public com.google.iam.v1.AuditConfig.Builder addAuditConfigsBuilder(int index) { - return getAuditConfigsFieldBuilder() - .addBuilder(index, com.google.iam.v1.AuditConfig.getDefaultInstance()); - } - /** - * - * - *
-     * Specifies cloud audit logging configuration for this policy.
-     * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - public java.util.List getAuditConfigsBuilderList() { - return getAuditConfigsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.AuditConfig, - com.google.iam.v1.AuditConfig.Builder, - com.google.iam.v1.AuditConfigOrBuilder> - getAuditConfigsFieldBuilder() { - if (auditConfigsBuilder_ == null) { - auditConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.AuditConfig, - com.google.iam.v1.AuditConfig.Builder, - com.google.iam.v1.AuditConfigOrBuilder>( - auditConfigs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - auditConfigs_ = null; - } - return auditConfigsBuilder_; - } - - private com.google.protobuf.ByteString etag_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-     * `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.
-     * 
- * - * bytes etag = 3; - * - * @return The etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEtag() { - return 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.
-     * 
- * - * bytes etag = 3; - * - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - etag_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * `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.
-     * 
- * - * bytes etag = 3; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - - etag_ = getDefaultInstance().getEtag(); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.Policy) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.Policy) - private static final com.google.iam.v1.Policy DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.Policy(); - } - - public static com.google.iam.v1.Policy getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Policy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.Policy getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDelta.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDelta.java deleted file mode 100644 index 536ede1a..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDelta.java +++ /dev/null @@ -1,1410 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * The difference delta between two policies.
- * 
- * - * Protobuf type {@code google.iam.v1.PolicyDelta} - */ -public final class PolicyDelta extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.PolicyDelta) - PolicyDeltaOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyDelta.newBuilder() to construct. - private PolicyDelta(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PolicyDelta() { - bindingDeltas_ = java.util.Collections.emptyList(); - auditConfigDeltas_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PolicyDelta(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_PolicyDelta_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_PolicyDelta_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.PolicyDelta.class, com.google.iam.v1.PolicyDelta.Builder.class); - } - - public static final int BINDING_DELTAS_FIELD_NUMBER = 1; - private java.util.List bindingDeltas_; - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - @java.lang.Override - public java.util.List getBindingDeltasList() { - return bindingDeltas_; - } - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - @java.lang.Override - public java.util.List - getBindingDeltasOrBuilderList() { - return bindingDeltas_; - } - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - @java.lang.Override - public int getBindingDeltasCount() { - return bindingDeltas_.size(); - } - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - @java.lang.Override - public com.google.iam.v1.BindingDelta getBindingDeltas(int index) { - return bindingDeltas_.get(index); - } - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - @java.lang.Override - public com.google.iam.v1.BindingDeltaOrBuilder getBindingDeltasOrBuilder(int index) { - return bindingDeltas_.get(index); - } - - public static final int AUDIT_CONFIG_DELTAS_FIELD_NUMBER = 2; - private java.util.List auditConfigDeltas_; - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - @java.lang.Override - public java.util.List getAuditConfigDeltasList() { - return auditConfigDeltas_; - } - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - @java.lang.Override - public java.util.List - getAuditConfigDeltasOrBuilderList() { - return auditConfigDeltas_; - } - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - @java.lang.Override - public int getAuditConfigDeltasCount() { - return auditConfigDeltas_.size(); - } - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - @java.lang.Override - public com.google.iam.v1.AuditConfigDelta getAuditConfigDeltas(int index) { - return auditConfigDeltas_.get(index); - } - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - @java.lang.Override - public com.google.iam.v1.AuditConfigDeltaOrBuilder getAuditConfigDeltasOrBuilder(int index) { - return auditConfigDeltas_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < bindingDeltas_.size(); i++) { - output.writeMessage(1, bindingDeltas_.get(i)); - } - for (int i = 0; i < auditConfigDeltas_.size(); i++) { - output.writeMessage(2, auditConfigDeltas_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < bindingDeltas_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bindingDeltas_.get(i)); - } - for (int i = 0; i < auditConfigDeltas_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, auditConfigDeltas_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.PolicyDelta)) { - return super.equals(obj); - } - com.google.iam.v1.PolicyDelta other = (com.google.iam.v1.PolicyDelta) obj; - - if (!getBindingDeltasList().equals(other.getBindingDeltasList())) return false; - if (!getAuditConfigDeltasList().equals(other.getAuditConfigDeltasList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getBindingDeltasCount() > 0) { - hash = (37 * hash) + BINDING_DELTAS_FIELD_NUMBER; - hash = (53 * hash) + getBindingDeltasList().hashCode(); - } - if (getAuditConfigDeltasCount() > 0) { - hash = (37 * hash) + AUDIT_CONFIG_DELTAS_FIELD_NUMBER; - hash = (53 * hash) + getAuditConfigDeltasList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.PolicyDelta parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.PolicyDelta parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.PolicyDelta parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.PolicyDelta parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.PolicyDelta parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.PolicyDelta parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.PolicyDelta parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.PolicyDelta parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.PolicyDelta parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.PolicyDelta parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.PolicyDelta parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.PolicyDelta parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.PolicyDelta prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The difference delta between two policies.
-   * 
- * - * Protobuf type {@code google.iam.v1.PolicyDelta} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.PolicyDelta) - com.google.iam.v1.PolicyDeltaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_PolicyDelta_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.PolicyProto - .internal_static_google_iam_v1_PolicyDelta_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.PolicyDelta.class, com.google.iam.v1.PolicyDelta.Builder.class); - } - - // Construct using com.google.iam.v1.PolicyDelta.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (bindingDeltasBuilder_ == null) { - bindingDeltas_ = java.util.Collections.emptyList(); - } else { - bindingDeltas_ = null; - bindingDeltasBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (auditConfigDeltasBuilder_ == null) { - auditConfigDeltas_ = java.util.Collections.emptyList(); - } else { - auditConfigDeltas_ = null; - auditConfigDeltasBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_PolicyDelta_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.PolicyDelta getDefaultInstanceForType() { - return com.google.iam.v1.PolicyDelta.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.PolicyDelta build() { - com.google.iam.v1.PolicyDelta result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.PolicyDelta buildPartial() { - com.google.iam.v1.PolicyDelta result = new com.google.iam.v1.PolicyDelta(this); - int from_bitField0_ = bitField0_; - if (bindingDeltasBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - bindingDeltas_ = java.util.Collections.unmodifiableList(bindingDeltas_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bindingDeltas_ = bindingDeltas_; - } else { - result.bindingDeltas_ = bindingDeltasBuilder_.build(); - } - if (auditConfigDeltasBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - auditConfigDeltas_ = java.util.Collections.unmodifiableList(auditConfigDeltas_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.auditConfigDeltas_ = auditConfigDeltas_; - } else { - result.auditConfigDeltas_ = auditConfigDeltasBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.PolicyDelta) { - return mergeFrom((com.google.iam.v1.PolicyDelta) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.PolicyDelta other) { - if (other == com.google.iam.v1.PolicyDelta.getDefaultInstance()) return this; - if (bindingDeltasBuilder_ == null) { - if (!other.bindingDeltas_.isEmpty()) { - if (bindingDeltas_.isEmpty()) { - bindingDeltas_ = other.bindingDeltas_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBindingDeltasIsMutable(); - bindingDeltas_.addAll(other.bindingDeltas_); - } - onChanged(); - } - } else { - if (!other.bindingDeltas_.isEmpty()) { - if (bindingDeltasBuilder_.isEmpty()) { - bindingDeltasBuilder_.dispose(); - bindingDeltasBuilder_ = null; - bindingDeltas_ = other.bindingDeltas_; - bitField0_ = (bitField0_ & ~0x00000001); - bindingDeltasBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBindingDeltasFieldBuilder() - : null; - } else { - bindingDeltasBuilder_.addAllMessages(other.bindingDeltas_); - } - } - } - if (auditConfigDeltasBuilder_ == null) { - if (!other.auditConfigDeltas_.isEmpty()) { - if (auditConfigDeltas_.isEmpty()) { - auditConfigDeltas_ = other.auditConfigDeltas_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAuditConfigDeltasIsMutable(); - auditConfigDeltas_.addAll(other.auditConfigDeltas_); - } - onChanged(); - } - } else { - if (!other.auditConfigDeltas_.isEmpty()) { - if (auditConfigDeltasBuilder_.isEmpty()) { - auditConfigDeltasBuilder_.dispose(); - auditConfigDeltasBuilder_ = null; - auditConfigDeltas_ = other.auditConfigDeltas_; - bitField0_ = (bitField0_ & ~0x00000002); - auditConfigDeltasBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAuditConfigDeltasFieldBuilder() - : null; - } else { - auditConfigDeltasBuilder_.addAllMessages(other.auditConfigDeltas_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.iam.v1.BindingDelta m = - input.readMessage(com.google.iam.v1.BindingDelta.parser(), extensionRegistry); - if (bindingDeltasBuilder_ == null) { - ensureBindingDeltasIsMutable(); - bindingDeltas_.add(m); - } else { - bindingDeltasBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - com.google.iam.v1.AuditConfigDelta m = - input.readMessage( - com.google.iam.v1.AuditConfigDelta.parser(), extensionRegistry); - if (auditConfigDeltasBuilder_ == null) { - ensureAuditConfigDeltasIsMutable(); - auditConfigDeltas_.add(m); - } else { - auditConfigDeltasBuilder_.addMessage(m); - } - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List bindingDeltas_ = - java.util.Collections.emptyList(); - - private void ensureBindingDeltasIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - bindingDeltas_ = new java.util.ArrayList(bindingDeltas_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.BindingDelta, - com.google.iam.v1.BindingDelta.Builder, - com.google.iam.v1.BindingDeltaOrBuilder> - bindingDeltasBuilder_; - - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public java.util.List getBindingDeltasList() { - if (bindingDeltasBuilder_ == null) { - return java.util.Collections.unmodifiableList(bindingDeltas_); - } else { - return bindingDeltasBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public int getBindingDeltasCount() { - if (bindingDeltasBuilder_ == null) { - return bindingDeltas_.size(); - } else { - return bindingDeltasBuilder_.getCount(); - } - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public com.google.iam.v1.BindingDelta getBindingDeltas(int index) { - if (bindingDeltasBuilder_ == null) { - return bindingDeltas_.get(index); - } else { - return bindingDeltasBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public Builder setBindingDeltas(int index, com.google.iam.v1.BindingDelta value) { - if (bindingDeltasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBindingDeltasIsMutable(); - bindingDeltas_.set(index, value); - onChanged(); - } else { - bindingDeltasBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public Builder setBindingDeltas( - int index, com.google.iam.v1.BindingDelta.Builder builderForValue) { - if (bindingDeltasBuilder_ == null) { - ensureBindingDeltasIsMutable(); - bindingDeltas_.set(index, builderForValue.build()); - onChanged(); - } else { - bindingDeltasBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public Builder addBindingDeltas(com.google.iam.v1.BindingDelta value) { - if (bindingDeltasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBindingDeltasIsMutable(); - bindingDeltas_.add(value); - onChanged(); - } else { - bindingDeltasBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public Builder addBindingDeltas(int index, com.google.iam.v1.BindingDelta value) { - if (bindingDeltasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBindingDeltasIsMutable(); - bindingDeltas_.add(index, value); - onChanged(); - } else { - bindingDeltasBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public Builder addBindingDeltas(com.google.iam.v1.BindingDelta.Builder builderForValue) { - if (bindingDeltasBuilder_ == null) { - ensureBindingDeltasIsMutable(); - bindingDeltas_.add(builderForValue.build()); - onChanged(); - } else { - bindingDeltasBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public Builder addBindingDeltas( - int index, com.google.iam.v1.BindingDelta.Builder builderForValue) { - if (bindingDeltasBuilder_ == null) { - ensureBindingDeltasIsMutable(); - bindingDeltas_.add(index, builderForValue.build()); - onChanged(); - } else { - bindingDeltasBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public Builder addAllBindingDeltas( - java.lang.Iterable values) { - if (bindingDeltasBuilder_ == null) { - ensureBindingDeltasIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bindingDeltas_); - onChanged(); - } else { - bindingDeltasBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public Builder clearBindingDeltas() { - if (bindingDeltasBuilder_ == null) { - bindingDeltas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - bindingDeltasBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public Builder removeBindingDeltas(int index) { - if (bindingDeltasBuilder_ == null) { - ensureBindingDeltasIsMutable(); - bindingDeltas_.remove(index); - onChanged(); - } else { - bindingDeltasBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public com.google.iam.v1.BindingDelta.Builder getBindingDeltasBuilder(int index) { - return getBindingDeltasFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public com.google.iam.v1.BindingDeltaOrBuilder getBindingDeltasOrBuilder(int index) { - if (bindingDeltasBuilder_ == null) { - return bindingDeltas_.get(index); - } else { - return bindingDeltasBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public java.util.List - getBindingDeltasOrBuilderList() { - if (bindingDeltasBuilder_ != null) { - return bindingDeltasBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bindingDeltas_); - } - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public com.google.iam.v1.BindingDelta.Builder addBindingDeltasBuilder() { - return getBindingDeltasFieldBuilder() - .addBuilder(com.google.iam.v1.BindingDelta.getDefaultInstance()); - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public com.google.iam.v1.BindingDelta.Builder addBindingDeltasBuilder(int index) { - return getBindingDeltasFieldBuilder() - .addBuilder(index, com.google.iam.v1.BindingDelta.getDefaultInstance()); - } - /** - * - * - *
-     * The delta for Bindings between two policies.
-     * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - public java.util.List getBindingDeltasBuilderList() { - return getBindingDeltasFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.BindingDelta, - com.google.iam.v1.BindingDelta.Builder, - com.google.iam.v1.BindingDeltaOrBuilder> - getBindingDeltasFieldBuilder() { - if (bindingDeltasBuilder_ == null) { - bindingDeltasBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.BindingDelta, - com.google.iam.v1.BindingDelta.Builder, - com.google.iam.v1.BindingDeltaOrBuilder>( - bindingDeltas_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - bindingDeltas_ = null; - } - return bindingDeltasBuilder_; - } - - private java.util.List auditConfigDeltas_ = - java.util.Collections.emptyList(); - - private void ensureAuditConfigDeltasIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - auditConfigDeltas_ = - new java.util.ArrayList(auditConfigDeltas_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.AuditConfigDelta, - com.google.iam.v1.AuditConfigDelta.Builder, - com.google.iam.v1.AuditConfigDeltaOrBuilder> - auditConfigDeltasBuilder_; - - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public java.util.List getAuditConfigDeltasList() { - if (auditConfigDeltasBuilder_ == null) { - return java.util.Collections.unmodifiableList(auditConfigDeltas_); - } else { - return auditConfigDeltasBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public int getAuditConfigDeltasCount() { - if (auditConfigDeltasBuilder_ == null) { - return auditConfigDeltas_.size(); - } else { - return auditConfigDeltasBuilder_.getCount(); - } - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public com.google.iam.v1.AuditConfigDelta getAuditConfigDeltas(int index) { - if (auditConfigDeltasBuilder_ == null) { - return auditConfigDeltas_.get(index); - } else { - return auditConfigDeltasBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public Builder setAuditConfigDeltas(int index, com.google.iam.v1.AuditConfigDelta value) { - if (auditConfigDeltasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuditConfigDeltasIsMutable(); - auditConfigDeltas_.set(index, value); - onChanged(); - } else { - auditConfigDeltasBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public Builder setAuditConfigDeltas( - int index, com.google.iam.v1.AuditConfigDelta.Builder builderForValue) { - if (auditConfigDeltasBuilder_ == null) { - ensureAuditConfigDeltasIsMutable(); - auditConfigDeltas_.set(index, builderForValue.build()); - onChanged(); - } else { - auditConfigDeltasBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public Builder addAuditConfigDeltas(com.google.iam.v1.AuditConfigDelta value) { - if (auditConfigDeltasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuditConfigDeltasIsMutable(); - auditConfigDeltas_.add(value); - onChanged(); - } else { - auditConfigDeltasBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public Builder addAuditConfigDeltas(int index, com.google.iam.v1.AuditConfigDelta value) { - if (auditConfigDeltasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuditConfigDeltasIsMutable(); - auditConfigDeltas_.add(index, value); - onChanged(); - } else { - auditConfigDeltasBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public Builder addAuditConfigDeltas( - com.google.iam.v1.AuditConfigDelta.Builder builderForValue) { - if (auditConfigDeltasBuilder_ == null) { - ensureAuditConfigDeltasIsMutable(); - auditConfigDeltas_.add(builderForValue.build()); - onChanged(); - } else { - auditConfigDeltasBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public Builder addAuditConfigDeltas( - int index, com.google.iam.v1.AuditConfigDelta.Builder builderForValue) { - if (auditConfigDeltasBuilder_ == null) { - ensureAuditConfigDeltasIsMutable(); - auditConfigDeltas_.add(index, builderForValue.build()); - onChanged(); - } else { - auditConfigDeltasBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public Builder addAllAuditConfigDeltas( - java.lang.Iterable values) { - if (auditConfigDeltasBuilder_ == null) { - ensureAuditConfigDeltasIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, auditConfigDeltas_); - onChanged(); - } else { - auditConfigDeltasBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public Builder clearAuditConfigDeltas() { - if (auditConfigDeltasBuilder_ == null) { - auditConfigDeltas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - auditConfigDeltasBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public Builder removeAuditConfigDeltas(int index) { - if (auditConfigDeltasBuilder_ == null) { - ensureAuditConfigDeltasIsMutable(); - auditConfigDeltas_.remove(index); - onChanged(); - } else { - auditConfigDeltasBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public com.google.iam.v1.AuditConfigDelta.Builder getAuditConfigDeltasBuilder(int index) { - return getAuditConfigDeltasFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public com.google.iam.v1.AuditConfigDeltaOrBuilder getAuditConfigDeltasOrBuilder(int index) { - if (auditConfigDeltasBuilder_ == null) { - return auditConfigDeltas_.get(index); - } else { - return auditConfigDeltasBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public java.util.List - getAuditConfigDeltasOrBuilderList() { - if (auditConfigDeltasBuilder_ != null) { - return auditConfigDeltasBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(auditConfigDeltas_); - } - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public com.google.iam.v1.AuditConfigDelta.Builder addAuditConfigDeltasBuilder() { - return getAuditConfigDeltasFieldBuilder() - .addBuilder(com.google.iam.v1.AuditConfigDelta.getDefaultInstance()); - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public com.google.iam.v1.AuditConfigDelta.Builder addAuditConfigDeltasBuilder(int index) { - return getAuditConfigDeltasFieldBuilder() - .addBuilder(index, com.google.iam.v1.AuditConfigDelta.getDefaultInstance()); - } - /** - * - * - *
-     * The delta for AuditConfigs between two policies.
-     * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - public java.util.List - getAuditConfigDeltasBuilderList() { - return getAuditConfigDeltasFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.AuditConfigDelta, - com.google.iam.v1.AuditConfigDelta.Builder, - com.google.iam.v1.AuditConfigDeltaOrBuilder> - getAuditConfigDeltasFieldBuilder() { - if (auditConfigDeltasBuilder_ == null) { - auditConfigDeltasBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v1.AuditConfigDelta, - com.google.iam.v1.AuditConfigDelta.Builder, - com.google.iam.v1.AuditConfigDeltaOrBuilder>( - auditConfigDeltas_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - auditConfigDeltas_ = null; - } - return auditConfigDeltasBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.PolicyDelta) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.PolicyDelta) - private static final com.google.iam.v1.PolicyDelta DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.PolicyDelta(); - } - - public static com.google.iam.v1.PolicyDelta getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PolicyDelta parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.PolicyDelta getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDeltaOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDeltaOrBuilder.java deleted file mode 100644 index fd3e1c0d..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDeltaOrBuilder.java +++ /dev/null @@ -1,128 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -public interface PolicyDeltaOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.PolicyDelta) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - java.util.List getBindingDeltasList(); - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - com.google.iam.v1.BindingDelta getBindingDeltas(int index); - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - int getBindingDeltasCount(); - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - java.util.List getBindingDeltasOrBuilderList(); - /** - * - * - *
-   * The delta for Bindings between two policies.
-   * 
- * - * repeated .google.iam.v1.BindingDelta binding_deltas = 1; - */ - com.google.iam.v1.BindingDeltaOrBuilder getBindingDeltasOrBuilder(int index); - - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - java.util.List getAuditConfigDeltasList(); - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - com.google.iam.v1.AuditConfigDelta getAuditConfigDeltas(int index); - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - int getAuditConfigDeltasCount(); - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - java.util.List - getAuditConfigDeltasOrBuilderList(); - /** - * - * - *
-   * The delta for AuditConfigs between two policies.
-   * 
- * - * repeated .google.iam.v1.AuditConfigDelta audit_config_deltas = 2; - */ - com.google.iam.v1.AuditConfigDeltaOrBuilder getAuditConfigDeltasOrBuilder(int index); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyOrBuilder.java deleted file mode 100644 index 571dcb80..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyOrBuilder.java +++ /dev/null @@ -1,220 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -public interface PolicyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.Policy) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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).
-   * 
- * - * int32 version = 1; - * - * @return The version. - */ - int getVersion(); - - /** - * - * - *
-   * 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - java.util.List getBindingsList(); - /** - * - * - *
-   * 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - com.google.iam.v1.Binding getBindings(int index); - /** - * - * - *
-   * 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - int getBindingsCount(); - /** - * - * - *
-   * 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - java.util.List getBindingsOrBuilderList(); - /** - * - * - *
-   * 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`.
-   * 
- * - * repeated .google.iam.v1.Binding bindings = 4; - */ - com.google.iam.v1.BindingOrBuilder getBindingsOrBuilder(int index); - - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - java.util.List getAuditConfigsList(); - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - com.google.iam.v1.AuditConfig getAuditConfigs(int index); - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - int getAuditConfigsCount(); - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - java.util.List getAuditConfigsOrBuilderList(); - /** - * - * - *
-   * Specifies cloud audit logging configuration for this policy.
-   * 
- * - * repeated .google.iam.v1.AuditConfig audit_configs = 6; - */ - com.google.iam.v1.AuditConfigOrBuilder getAuditConfigsOrBuilder(int index); - - /** - * - * - *
-   * `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.
-   * 
- * - * bytes etag = 3; - * - * @return The etag. - */ - com.google.protobuf.ByteString getEtag(); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyProto.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyProto.java deleted file mode 100644 index 8ba3e50a..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyProto.java +++ /dev/null @@ -1,161 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/policy.proto - -package com.google.iam.v1; - -public final class PolicyProto { - private PolicyProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_Policy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_Policy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_Binding_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_Binding_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_AuditConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_AuditConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_AuditLogConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_AuditLogConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_PolicyDelta_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_PolicyDelta_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_BindingDelta_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_BindingDelta_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_AuditConfigDelta_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\032google/iam/v1/policy.proto\022\rgoogle.iam" - + ".v1\032\026google/type/expr.proto\"\204\001\n\006Policy\022\017" - + "\n\007version\030\001 \001(\005\022(\n\010bindings\030\004 \003(\0132\026.goog" - + "le.iam.v1.Binding\0221\n\raudit_configs\030\006 \003(\013" - + "2\032.google.iam.v1.AuditConfig\022\014\n\004etag\030\003 \001" - + "(\014\"N\n\007Binding\022\014\n\004role\030\001 \001(\t\022\017\n\007members\030\002" - + " \003(\t\022$\n\tcondition\030\003 \001(\0132\021.google.type.Ex" - + "pr\"X\n\013AuditConfig\022\017\n\007service\030\001 \001(\t\0228\n\021au" - + "dit_log_configs\030\003 \003(\0132\035.google.iam.v1.Au" - + "ditLogConfig\"\267\001\n\016AuditLogConfig\0227\n\010log_t" - + "ype\030\001 \001(\0162%.google.iam.v1.AuditLogConfig" - + ".LogType\022\030\n\020exempted_members\030\002 \003(\t\"R\n\007Lo" - + "gType\022\030\n\024LOG_TYPE_UNSPECIFIED\020\000\022\016\n\nADMIN" - + "_READ\020\001\022\016\n\nDATA_WRITE\020\002\022\r\n\tDATA_READ\020\003\"\200" - + "\001\n\013PolicyDelta\0223\n\016binding_deltas\030\001 \003(\0132\033" - + ".google.iam.v1.BindingDelta\022<\n\023audit_con" - + "fig_deltas\030\002 \003(\0132\037.google.iam.v1.AuditCo" - + "nfigDelta\"\275\001\n\014BindingDelta\0222\n\006action\030\001 \001" - + "(\0162\".google.iam.v1.BindingDelta.Action\022\014" - + "\n\004role\030\002 \001(\t\022\016\n\006member\030\003 \001(\t\022$\n\tconditio" - + "n\030\004 \001(\0132\021.google.type.Expr\"5\n\006Action\022\026\n\022" - + "ACTION_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020" - + "\002\"\275\001\n\020AuditConfigDelta\0226\n\006action\030\001 \001(\0162&" - + ".google.iam.v1.AuditConfigDelta.Action\022\017" - + "\n\007service\030\002 \001(\t\022\027\n\017exempted_member\030\003 \001(\t" - + "\022\020\n\010log_type\030\004 \001(\t\"5\n\006Action\022\026\n\022ACTION_U" - + "NSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002B\203\001\n\021co" - + "m.google.iam.v1B\013PolicyProtoP\001Z0google.g" - + "olang.org/genproto/googleapis/iam/v1;iam" - + "\370\001\001\252\002\023Google.Cloud.Iam.V1\312\002\023Google\\Cloud" - + "\\Iam\\V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.type.ExprProto.getDescriptor(), - }); - internal_static_google_iam_v1_Policy_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_google_iam_v1_Policy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_Policy_descriptor, - new java.lang.String[] { - "Version", "Bindings", "AuditConfigs", "Etag", - }); - internal_static_google_iam_v1_Binding_descriptor = getDescriptor().getMessageTypes().get(1); - internal_static_google_iam_v1_Binding_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_Binding_descriptor, - new java.lang.String[] { - "Role", "Members", "Condition", - }); - internal_static_google_iam_v1_AuditConfig_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_google_iam_v1_AuditConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_AuditConfig_descriptor, - new java.lang.String[] { - "Service", "AuditLogConfigs", - }); - internal_static_google_iam_v1_AuditLogConfig_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_iam_v1_AuditLogConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_AuditLogConfig_descriptor, - new java.lang.String[] { - "LogType", "ExemptedMembers", - }); - internal_static_google_iam_v1_PolicyDelta_descriptor = getDescriptor().getMessageTypes().get(4); - internal_static_google_iam_v1_PolicyDelta_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_PolicyDelta_descriptor, - new java.lang.String[] { - "BindingDeltas", "AuditConfigDeltas", - }); - internal_static_google_iam_v1_BindingDelta_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_iam_v1_BindingDelta_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_BindingDelta_descriptor, - new java.lang.String[] { - "Action", "Role", "Member", "Condition", - }); - internal_static_google_iam_v1_AuditConfigDelta_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_iam_v1_AuditConfigDelta_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v1_AuditConfigDelta_descriptor, - new java.lang.String[] { - "Action", "Service", "ExemptedMember", "LogType", - }); - com.google.type.ExprProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java deleted file mode 100644 index 78d0c7aa..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java +++ /dev/null @@ -1,1225 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/iam_policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * Request message for `SetIamPolicy` method.
- * 
- * - * Protobuf type {@code google.iam.v1.SetIamPolicyRequest} - */ -public final class SetIamPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.SetIamPolicyRequest) - SetIamPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use SetIamPolicyRequest.newBuilder() to construct. - private SetIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SetIamPolicyRequest() { - resource_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SetIamPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_SetIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_SetIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.SetIamPolicyRequest.class, - com.google.iam.v1.SetIamPolicyRequest.Builder.class); - } - - public static final int RESOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object resource_; - /** - * - * - *
-   * REQUIRED: The resource for which the policy is being specified.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } - /** - * - * - *
-   * REQUIRED: The resource for which the policy is being specified.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int POLICY_FIELD_NUMBER = 2; - private com.google.iam.v1.Policy 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 Cloud Platform services (such as Projects)
-   * might reject them.
-   * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - * - * - *
-   * 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 Cloud Platform services (such as Projects)
-   * might reject them.
-   * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - @java.lang.Override - public com.google.iam.v1.Policy getPolicy() { - return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : 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 Cloud Platform services (such as Projects)
-   * might reject them.
-   * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask 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"`
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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"`
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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"`
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); - } - if (policy_ != null) { - output.writeMessage(2, getPolicy()); - } - if (updateMask_ != null) { - output.writeMessage(3, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); - } - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicy()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.SetIamPolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v1.SetIamPolicyRequest other = (com.google.iam.v1.SetIamPolicyRequest) obj; - - if (!getResource().equals(other.getResource())) return false; - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy().equals(other.getPolicy())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.SetIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.SetIamPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `SetIamPolicy` method.
-   * 
- * - * Protobuf type {@code google.iam.v1.SetIamPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.SetIamPolicyRequest) - com.google.iam.v1.SetIamPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_SetIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_SetIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.SetIamPolicyRequest.class, - com.google.iam.v1.SetIamPolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v1.SetIamPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - resource_ = ""; - - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_SetIamPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.SetIamPolicyRequest getDefaultInstanceForType() { - return com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.SetIamPolicyRequest build() { - com.google.iam.v1.SetIamPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.SetIamPolicyRequest buildPartial() { - com.google.iam.v1.SetIamPolicyRequest result = - new com.google.iam.v1.SetIamPolicyRequest(this); - result.resource_ = resource_; - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.SetIamPolicyRequest) { - return mergeFrom((com.google.iam.v1.SetIamPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.SetIamPolicyRequest other) { - if (other == com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance()) return this; - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - onChanged(); - } - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - resource_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object resource_ = ""; - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being specified.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being specified.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being specified.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The resource to set. - * @return This builder for chaining. - */ - public Builder setResource(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resource_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being specified.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearResource() { - - resource_ = getDefaultInstance().getResource(); - onChanged(); - return this; - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy is being specified.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for resource to set. - * @return This builder for chaining. - */ - public Builder setResourceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resource_ = value; - onChanged(); - return this; - } - - private com.google.iam.v1.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, - com.google.iam.v1.Policy.Builder, - com.google.iam.v1.PolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * 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 Cloud Platform services (such as Projects)
-     * might reject them.
-     * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - * - * - *
-     * 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 Cloud Platform services (such as Projects)
-     * might reject them.
-     * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - public com.google.iam.v1.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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 Cloud Platform services (such as Projects)
-     * might reject them.
-     * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v1.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * 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 Cloud Platform services (such as Projects)
-     * might reject them.
-     * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v1.Policy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * 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 Cloud Platform services (such as Projects)
-     * might reject them.
-     * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergePolicy(com.google.iam.v1.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = com.google.iam.v1.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * 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 Cloud Platform services (such as Projects)
-     * might reject them.
-     * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * 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 Cloud Platform services (such as Projects)
-     * might reject them.
-     * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v1.Policy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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 Cloud Platform services (such as Projects)
-     * might reject them.
-     * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : 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 Cloud Platform services (such as Projects)
-     * might reject them.
-     * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, - com.google.iam.v1.Policy.Builder, - com.google.iam.v1.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, - com.google.iam.v1.Policy.Builder, - com.google.iam.v1.PolicyOrBuilder>(getPolicy(), getParentForChildren(), isClean()); - policy_ = null; - } - return policyBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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"`
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * 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"`
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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"`
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * 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"`
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * 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"`
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * 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"`
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * 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"`
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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"`
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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"`
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.SetIamPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.SetIamPolicyRequest) - private static final com.google.iam.v1.SetIamPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.SetIamPolicyRequest(); - } - - public static com.google.iam.v1.SetIamPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SetIamPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.SetIamPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequestOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequestOrBuilder.java deleted file mode 100644 index 48ab0dff..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequestOrBuilder.java +++ /dev/null @@ -1,144 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/iam_policy.proto - -package com.google.iam.v1; - -public interface SetIamPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.SetIamPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * REQUIRED: The resource for which the policy is being specified.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - java.lang.String getResource(); - /** - * - * - *
-   * REQUIRED: The resource for which the policy is being specified.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - com.google.protobuf.ByteString getResourceBytes(); - - /** - * - * - *
-   * 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 Cloud Platform services (such as Projects)
-   * might reject them.
-   * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - * - * - *
-   * 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 Cloud Platform services (such as Projects)
-   * might reject them.
-   * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - com.google.iam.v1.Policy getPolicy(); - /** - * - * - *
-   * 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 Cloud Platform services (such as Projects)
-   * might reject them.
-   * 
- * - * .google.iam.v1.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder(); - - /** - * - * - *
-   * 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"`
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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"`
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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"`
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java deleted file mode 100644 index cb5dab7d..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java +++ /dev/null @@ -1,947 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/iam_policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * Request message for `TestIamPermissions` method.
- * 
- * - * Protobuf type {@code google.iam.v1.TestIamPermissionsRequest} - */ -public final class TestIamPermissionsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.TestIamPermissionsRequest) - TestIamPermissionsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use TestIamPermissionsRequest.newBuilder() to construct. - private TestIamPermissionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TestIamPermissionsRequest() { - resource_ = ""; - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TestIamPermissionsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.TestIamPermissionsRequest.class, - com.google.iam.v1.TestIamPermissionsRequest.Builder.class); - } - - public static final int RESOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object resource_; - /** - * - * - *
-   * REQUIRED: The resource for which the policy detail is being requested.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } - /** - * - * - *
-   * REQUIRED: The resource for which the policy detail is being requested.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PERMISSIONS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList 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).
-   * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList getPermissionsList() { - return 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).
-   * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - * - * - *
-   * 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).
-   * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - * - * - *
-   * 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).
-   * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); - } - for (int i = 0; i < permissions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permissions_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); - } - { - int dataSize = 0; - for (int i = 0; i < permissions_.size(); i++) { - dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); - } - size += dataSize; - size += 1 * getPermissionsList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.TestIamPermissionsRequest)) { - return super.equals(obj); - } - com.google.iam.v1.TestIamPermissionsRequest other = - (com.google.iam.v1.TestIamPermissionsRequest) obj; - - if (!getResource().equals(other.getResource())) return false; - if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - if (getPermissionsCount() > 0) { - hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + getPermissionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.TestIamPermissionsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.TestIamPermissionsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `TestIamPermissions` method.
-   * 
- * - * Protobuf type {@code google.iam.v1.TestIamPermissionsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.TestIamPermissionsRequest) - com.google.iam.v1.TestIamPermissionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.TestIamPermissionsRequest.class, - com.google.iam.v1.TestIamPermissionsRequest.Builder.class); - } - - // Construct using com.google.iam.v1.TestIamPermissionsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - resource_ = ""; - - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.TestIamPermissionsRequest getDefaultInstanceForType() { - return com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.TestIamPermissionsRequest build() { - com.google.iam.v1.TestIamPermissionsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.TestIamPermissionsRequest buildPartial() { - com.google.iam.v1.TestIamPermissionsRequest result = - new com.google.iam.v1.TestIamPermissionsRequest(this); - int from_bitField0_ = bitField0_; - result.resource_ = resource_; - if (((bitField0_ & 0x00000001) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.permissions_ = permissions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.TestIamPermissionsRequest) { - return mergeFrom((com.google.iam.v1.TestIamPermissionsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.TestIamPermissionsRequest other) { - if (other == com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance()) return this; - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - onChanged(); - } - if (!other.permissions_.isEmpty()) { - if (permissions_.isEmpty()) { - permissions_ = other.permissions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePermissionsIsMutable(); - permissions_.addAll(other.permissions_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - resource_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensurePermissionsIsMutable(); - permissions_.add(s); - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object resource_ = ""; - /** - * - * - *
-     * REQUIRED: The resource for which the policy detail is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy detail is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy detail is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The resource to set. - * @return This builder for chaining. - */ - public Builder setResource(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resource_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy detail is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearResource() { - - resource_ = getDefaultInstance().getResource(); - onChanged(); - return this; - } - /** - * - * - *
-     * REQUIRED: The resource for which the policy detail is being requested.
-     * See the operation documentation for the appropriate value for this field.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for resource to set. - * @return This builder for chaining. - */ - public Builder setResourceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resource_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList permissions_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensurePermissionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * 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).
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList getPermissionsList() { - return permissions_.getUnmodifiableView(); - } - /** - * - * - *
-     * 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).
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - * - * - *
-     * 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).
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - * - * - *
-     * 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).
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - /** - * - * - *
-     * 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).
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index to set the value at. - * @param value The permissions to set. - * @return This builder for chaining. - */ - public Builder setPermissions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param values The permissions to add. - * @return This builder for chaining. - */ - public Builder addAllPermissions(java.lang.Iterable values) { - ensurePermissionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, permissions_); - onChanged(); - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearPermissions() { - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * 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).
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes of the permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.TestIamPermissionsRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.TestIamPermissionsRequest) - private static final com.google.iam.v1.TestIamPermissionsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.TestIamPermissionsRequest(); - } - - public static com.google.iam.v1.TestIamPermissionsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TestIamPermissionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.TestIamPermissionsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequestOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequestOrBuilder.java deleted file mode 100644 index 53b56f27..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequestOrBuilder.java +++ /dev/null @@ -1,119 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/iam_policy.proto - -package com.google.iam.v1; - -public interface TestIamPermissionsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.TestIamPermissionsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * REQUIRED: The resource for which the policy detail is being requested.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - java.lang.String getResource(); - /** - * - * - *
-   * REQUIRED: The resource for which the policy detail is being requested.
-   * See the operation documentation for the appropriate value for this field.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - com.google.protobuf.ByteString getResourceBytes(); - - /** - * - * - *
-   * 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).
-   * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the permissions. - */ - java.util.List getPermissionsList(); - /** - * - * - *
-   * 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).
-   * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of permissions. - */ - int getPermissionsCount(); - /** - * - * - *
-   * 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).
-   * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - java.lang.String getPermissions(int index); - /** - * - * - *
-   * 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).
-   * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - com.google.protobuf.ByteString getPermissionsBytes(int index); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java deleted file mode 100644 index fbe4f1a3..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java +++ /dev/null @@ -1,722 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/iam_policy.proto - -package com.google.iam.v1; - -/** - * - * - *
- * Response message for `TestIamPermissions` method.
- * 
- * - * Protobuf type {@code google.iam.v1.TestIamPermissionsResponse} - */ -public final class TestIamPermissionsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.TestIamPermissionsResponse) - TestIamPermissionsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use TestIamPermissionsResponse.newBuilder() to construct. - private TestIamPermissionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TestIamPermissionsResponse() { - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TestIamPermissionsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.TestIamPermissionsResponse.class, - com.google.iam.v1.TestIamPermissionsResponse.Builder.class); - } - - public static final int PERMISSIONS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList permissions_; - /** - * - * - *
-   * A subset of `TestPermissionsRequest.permissions` that the caller is
-   * allowed.
-   * 
- * - * repeated string permissions = 1; - * - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList getPermissionsList() { - return permissions_; - } - /** - * - * - *
-   * A subset of `TestPermissionsRequest.permissions` that the caller is
-   * allowed.
-   * 
- * - * repeated string permissions = 1; - * - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - * - * - *
-   * A subset of `TestPermissionsRequest.permissions` that the caller is
-   * allowed.
-   * 
- * - * repeated string permissions = 1; - * - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - * - * - *
-   * A subset of `TestPermissionsRequest.permissions` that the caller is
-   * allowed.
-   * 
- * - * repeated string permissions = 1; - * - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < permissions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, permissions_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < permissions_.size(); i++) { - dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); - } - size += dataSize; - size += 1 * getPermissionsList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.TestIamPermissionsResponse)) { - return super.equals(obj); - } - com.google.iam.v1.TestIamPermissionsResponse other = - (com.google.iam.v1.TestIamPermissionsResponse) obj; - - if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPermissionsCount() > 0) { - hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + getPermissionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.TestIamPermissionsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.TestIamPermissionsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for `TestIamPermissions` method.
-   * 
- * - * Protobuf type {@code google.iam.v1.TestIamPermissionsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.TestIamPermissionsResponse) - com.google.iam.v1.TestIamPermissionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.TestIamPermissionsResponse.class, - com.google.iam.v1.TestIamPermissionsResponse.Builder.class); - } - - // Construct using com.google.iam.v1.TestIamPermissionsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.IamPolicyProto - .internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.TestIamPermissionsResponse getDefaultInstanceForType() { - return com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.TestIamPermissionsResponse build() { - com.google.iam.v1.TestIamPermissionsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.TestIamPermissionsResponse buildPartial() { - com.google.iam.v1.TestIamPermissionsResponse result = - new com.google.iam.v1.TestIamPermissionsResponse(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.permissions_ = permissions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.TestIamPermissionsResponse) { - return mergeFrom((com.google.iam.v1.TestIamPermissionsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.TestIamPermissionsResponse other) { - if (other == com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance()) return this; - if (!other.permissions_.isEmpty()) { - if (permissions_.isEmpty()) { - permissions_ = other.permissions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePermissionsIsMutable(); - permissions_.addAll(other.permissions_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - ensurePermissionsIsMutable(); - permissions_.add(s); - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList permissions_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensurePermissionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * A subset of `TestPermissionsRequest.permissions` that the caller is
-     * allowed.
-     * 
- * - * repeated string permissions = 1; - * - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList getPermissionsList() { - return permissions_.getUnmodifiableView(); - } - /** - * - * - *
-     * A subset of `TestPermissionsRequest.permissions` that the caller is
-     * allowed.
-     * 
- * - * repeated string permissions = 1; - * - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - * - * - *
-     * A subset of `TestPermissionsRequest.permissions` that the caller is
-     * allowed.
-     * 
- * - * repeated string permissions = 1; - * - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - * - * - *
-     * A subset of `TestPermissionsRequest.permissions` that the caller is
-     * allowed.
-     * 
- * - * repeated string permissions = 1; - * - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - /** - * - * - *
-     * A subset of `TestPermissionsRequest.permissions` that the caller is
-     * allowed.
-     * 
- * - * repeated string permissions = 1; - * - * @param index The index to set the value at. - * @param value The permissions to set. - * @return This builder for chaining. - */ - public Builder setPermissions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * A subset of `TestPermissionsRequest.permissions` that the caller is
-     * allowed.
-     * 
- * - * repeated string permissions = 1; - * - * @param value The permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * A subset of `TestPermissionsRequest.permissions` that the caller is
-     * allowed.
-     * 
- * - * repeated string permissions = 1; - * - * @param values The permissions to add. - * @return This builder for chaining. - */ - public Builder addAllPermissions(java.lang.Iterable values) { - ensurePermissionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, permissions_); - onChanged(); - return this; - } - /** - * - * - *
-     * A subset of `TestPermissionsRequest.permissions` that the caller is
-     * allowed.
-     * 
- * - * repeated string permissions = 1; - * - * @return This builder for chaining. - */ - public Builder clearPermissions() { - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * A subset of `TestPermissionsRequest.permissions` that the caller is
-     * allowed.
-     * 
- * - * repeated string permissions = 1; - * - * @param value The bytes of the permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.TestIamPermissionsResponse) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.TestIamPermissionsResponse) - private static final com.google.iam.v1.TestIamPermissionsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.TestIamPermissionsResponse(); - } - - public static com.google.iam.v1.TestIamPermissionsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TestIamPermissionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.TestIamPermissionsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponseOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponseOrBuilder.java deleted file mode 100644 index da677cbe..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponseOrBuilder.java +++ /dev/null @@ -1,80 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/iam_policy.proto - -package com.google.iam.v1; - -public interface TestIamPermissionsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.TestIamPermissionsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A subset of `TestPermissionsRequest.permissions` that the caller is
-   * allowed.
-   * 
- * - * repeated string permissions = 1; - * - * @return A list containing the permissions. - */ - java.util.List getPermissionsList(); - /** - * - * - *
-   * A subset of `TestPermissionsRequest.permissions` that the caller is
-   * allowed.
-   * 
- * - * repeated string permissions = 1; - * - * @return The count of permissions. - */ - int getPermissionsCount(); - /** - * - * - *
-   * A subset of `TestPermissionsRequest.permissions` that the caller is
-   * allowed.
-   * 
- * - * repeated string permissions = 1; - * - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - java.lang.String getPermissions(int index); - /** - * - * - *
-   * A subset of `TestPermissionsRequest.permissions` that the caller is
-   * allowed.
-   * 
- * - * repeated string permissions = 1; - * - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - com.google.protobuf.ByteString getPermissionsBytes(int index); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditData.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditData.java deleted file mode 100644 index 268cbc4d..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditData.java +++ /dev/null @@ -1,729 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/logging/audit_data.proto - -package com.google.iam.v1.logging; - -/** - * - * - *
- * Audit log information specific to Cloud IAM. This message is serialized
- * as an `Any` type in the `ServiceData` message of an
- * `AuditLog` message.
- * 
- * - * Protobuf type {@code google.iam.v1.logging.AuditData} - */ -public final class AuditData extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v1.logging.AuditData) - AuditDataOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuditData.newBuilder() to construct. - private AuditData(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AuditData() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuditData(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AuditData( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - com.google.iam.v1.PolicyDelta.Builder subBuilder = null; - if (policyDelta_ != null) { - subBuilder = policyDelta_.toBuilder(); - } - policyDelta_ = - input.readMessage(com.google.iam.v1.PolicyDelta.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policyDelta_); - policyDelta_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.logging.AuditDataProto - .internal_static_google_iam_v1_logging_AuditData_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.logging.AuditDataProto - .internal_static_google_iam_v1_logging_AuditData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.logging.AuditData.class, - com.google.iam.v1.logging.AuditData.Builder.class); - } - - public static final int POLICY_DELTA_FIELD_NUMBER = 2; - private com.google.iam.v1.PolicyDelta policyDelta_; - /** - * - * - *
-   * Policy delta between the original policy and the newly set policy.
-   * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - * - * @return Whether the policyDelta field is set. - */ - @java.lang.Override - public boolean hasPolicyDelta() { - return policyDelta_ != null; - } - /** - * - * - *
-   * Policy delta between the original policy and the newly set policy.
-   * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - * - * @return The policyDelta. - */ - @java.lang.Override - public com.google.iam.v1.PolicyDelta getPolicyDelta() { - return policyDelta_ == null ? com.google.iam.v1.PolicyDelta.getDefaultInstance() : policyDelta_; - } - /** - * - * - *
-   * Policy delta between the original policy and the newly set policy.
-   * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - */ - @java.lang.Override - public com.google.iam.v1.PolicyDeltaOrBuilder getPolicyDeltaOrBuilder() { - return getPolicyDelta(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (policyDelta_ != null) { - output.writeMessage(2, getPolicyDelta()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policyDelta_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicyDelta()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v1.logging.AuditData)) { - return super.equals(obj); - } - com.google.iam.v1.logging.AuditData other = (com.google.iam.v1.logging.AuditData) obj; - - if (hasPolicyDelta() != other.hasPolicyDelta()) return false; - if (hasPolicyDelta()) { - if (!getPolicyDelta().equals(other.getPolicyDelta())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicyDelta()) { - hash = (37 * hash) + POLICY_DELTA_FIELD_NUMBER; - hash = (53 * hash) + getPolicyDelta().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v1.logging.AuditData parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.logging.AuditData parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.logging.AuditData parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.logging.AuditData parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.logging.AuditData parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v1.logging.AuditData parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v1.logging.AuditData parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.logging.AuditData parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.logging.AuditData parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v1.logging.AuditData parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v1.logging.AuditData parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v1.logging.AuditData parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v1.logging.AuditData prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Audit log information specific to Cloud IAM. This message is serialized
-   * as an `Any` type in the `ServiceData` message of an
-   * `AuditLog` message.
-   * 
- * - * Protobuf type {@code google.iam.v1.logging.AuditData} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v1.logging.AuditData) - com.google.iam.v1.logging.AuditDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v1.logging.AuditDataProto - .internal_static_google_iam_v1_logging_AuditData_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v1.logging.AuditDataProto - .internal_static_google_iam_v1_logging_AuditData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v1.logging.AuditData.class, - com.google.iam.v1.logging.AuditData.Builder.class); - } - - // Construct using com.google.iam.v1.logging.AuditData.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policyDeltaBuilder_ == null) { - policyDelta_ = null; - } else { - policyDelta_ = null; - policyDeltaBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v1.logging.AuditDataProto - .internal_static_google_iam_v1_logging_AuditData_descriptor; - } - - @java.lang.Override - public com.google.iam.v1.logging.AuditData getDefaultInstanceForType() { - return com.google.iam.v1.logging.AuditData.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v1.logging.AuditData build() { - com.google.iam.v1.logging.AuditData result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v1.logging.AuditData buildPartial() { - com.google.iam.v1.logging.AuditData result = new com.google.iam.v1.logging.AuditData(this); - if (policyDeltaBuilder_ == null) { - result.policyDelta_ = policyDelta_; - } else { - result.policyDelta_ = policyDeltaBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v1.logging.AuditData) { - return mergeFrom((com.google.iam.v1.logging.AuditData) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v1.logging.AuditData other) { - if (other == com.google.iam.v1.logging.AuditData.getDefaultInstance()) return this; - if (other.hasPolicyDelta()) { - mergePolicyDelta(other.getPolicyDelta()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.iam.v1.logging.AuditData parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v1.logging.AuditData) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.iam.v1.PolicyDelta policyDelta_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.PolicyDelta, - com.google.iam.v1.PolicyDelta.Builder, - com.google.iam.v1.PolicyDeltaOrBuilder> - policyDeltaBuilder_; - /** - * - * - *
-     * Policy delta between the original policy and the newly set policy.
-     * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - * - * @return Whether the policyDelta field is set. - */ - public boolean hasPolicyDelta() { - return policyDeltaBuilder_ != null || policyDelta_ != null; - } - /** - * - * - *
-     * Policy delta between the original policy and the newly set policy.
-     * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - * - * @return The policyDelta. - */ - public com.google.iam.v1.PolicyDelta getPolicyDelta() { - if (policyDeltaBuilder_ == null) { - return policyDelta_ == null - ? com.google.iam.v1.PolicyDelta.getDefaultInstance() - : policyDelta_; - } else { - return policyDeltaBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Policy delta between the original policy and the newly set policy.
-     * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - */ - public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta value) { - if (policyDeltaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policyDelta_ = value; - onChanged(); - } else { - policyDeltaBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Policy delta between the original policy and the newly set policy.
-     * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - */ - public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta.Builder builderForValue) { - if (policyDeltaBuilder_ == null) { - policyDelta_ = builderForValue.build(); - onChanged(); - } else { - policyDeltaBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Policy delta between the original policy and the newly set policy.
-     * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - */ - public Builder mergePolicyDelta(com.google.iam.v1.PolicyDelta value) { - if (policyDeltaBuilder_ == null) { - if (policyDelta_ != null) { - policyDelta_ = - com.google.iam.v1.PolicyDelta.newBuilder(policyDelta_) - .mergeFrom(value) - .buildPartial(); - } else { - policyDelta_ = value; - } - onChanged(); - } else { - policyDeltaBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Policy delta between the original policy and the newly set policy.
-     * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - */ - public Builder clearPolicyDelta() { - if (policyDeltaBuilder_ == null) { - policyDelta_ = null; - onChanged(); - } else { - policyDelta_ = null; - policyDeltaBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Policy delta between the original policy and the newly set policy.
-     * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - */ - public com.google.iam.v1.PolicyDelta.Builder getPolicyDeltaBuilder() { - - onChanged(); - return getPolicyDeltaFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Policy delta between the original policy and the newly set policy.
-     * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - */ - public com.google.iam.v1.PolicyDeltaOrBuilder getPolicyDeltaOrBuilder() { - if (policyDeltaBuilder_ != null) { - return policyDeltaBuilder_.getMessageOrBuilder(); - } else { - return policyDelta_ == null - ? com.google.iam.v1.PolicyDelta.getDefaultInstance() - : policyDelta_; - } - } - /** - * - * - *
-     * Policy delta between the original policy and the newly set policy.
-     * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.PolicyDelta, - com.google.iam.v1.PolicyDelta.Builder, - com.google.iam.v1.PolicyDeltaOrBuilder> - getPolicyDeltaFieldBuilder() { - if (policyDeltaBuilder_ == null) { - policyDeltaBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.PolicyDelta, - com.google.iam.v1.PolicyDelta.Builder, - com.google.iam.v1.PolicyDeltaOrBuilder>( - getPolicyDelta(), getParentForChildren(), isClean()); - policyDelta_ = null; - } - return policyDeltaBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v1.logging.AuditData) - } - - // @@protoc_insertion_point(class_scope:google.iam.v1.logging.AuditData) - private static final com.google.iam.v1.logging.AuditData DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v1.logging.AuditData(); - } - - public static com.google.iam.v1.logging.AuditData getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuditData parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AuditData(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v1.logging.AuditData getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditDataOrBuilder.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditDataOrBuilder.java deleted file mode 100644 index 8076902f..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditDataOrBuilder.java +++ /dev/null @@ -1,60 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/logging/audit_data.proto - -package com.google.iam.v1.logging; - -public interface AuditDataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v1.logging.AuditData) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Policy delta between the original policy and the newly set policy.
-   * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - * - * @return Whether the policyDelta field is set. - */ - boolean hasPolicyDelta(); - /** - * - * - *
-   * Policy delta between the original policy and the newly set policy.
-   * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - * - * @return The policyDelta. - */ - com.google.iam.v1.PolicyDelta getPolicyDelta(); - /** - * - * - *
-   * Policy delta between the original policy and the newly set policy.
-   * 
- * - * .google.iam.v1.PolicyDelta policy_delta = 2; - */ - com.google.iam.v1.PolicyDeltaOrBuilder getPolicyDeltaOrBuilder(); -} diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditDataProto.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditDataProto.java deleted file mode 100644 index 7a5309a6..00000000 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging/AuditDataProto.java +++ /dev/null @@ -1,73 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v1/logging/audit_data.proto - -package com.google.iam.v1.logging; - -public final class AuditDataProto { - private AuditDataProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v1_logging_AuditData_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v1_logging_AuditData_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n&google/iam/v1/logging/audit_data.proto" - + "\022\025google.iam.v1.logging\032\034google/api/anno" - + "tations.proto\032\032google/iam/v1/policy.prot" - + "o\"=\n\tAuditData\0220\n\014policy_delta\030\002 \001(\0132\032.g" - + "oogle.iam.v1.PolicyDeltaB\211\001\n\031com.google." - + "iam.v1.loggingB\016AuditDataProtoP\001Z - - - - 7012 - com/google/iam/v2/*OrBuilder - * get*(*) - - - 7012 - com/google/iam/v2/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/iam/v2/*OrBuilder - boolean has*(*) - - diff --git a/proto-google-iam-v2/pom.xml b/proto-google-iam-v2/pom.xml deleted file mode 100644 index 22844caa..00000000 --- a/proto-google-iam-v2/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-iam-v2 - 1.6.24-SNAPSHOT - proto-google-iam-v2 - Proto library for proto-google-iam-v1 - - com.google.cloud - google-iam-parent - 1.6.24-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java deleted file mode 100644 index 3566ce1a..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java +++ /dev/null @@ -1,1117 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * Request message for `CreatePolicy`.
- * 
- * - * Protobuf type {@code google.iam.v2.CreatePolicyRequest} - */ -public final class CreatePolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.CreatePolicyRequest) - CreatePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreatePolicyRequest.newBuilder() to construct. - private CreatePolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreatePolicyRequest() { - parent_ = ""; - policyId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreatePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_CreatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_CreatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.CreatePolicyRequest.class, - com.google.iam.v2.CreatePolicyRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to create. Format: `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to create. Format: `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int POLICY_FIELD_NUMBER = 2; - private com.google.iam.v2.Policy policy_; - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - @java.lang.Override - public com.google.iam.v2.Policy getPolicy() { - return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; - } - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - public static final int POLICY_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object policyId_; - /** - * - * - *
-   * The ID to use for this policy, which will become the final component of
-   * the policy's resource name. The ID must contain 3 to 63 characters. It can
-   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-   * (`.`). The first character must be a lowercase letter.
-   * 
- * - * string policy_id = 3; - * - * @return The policyId. - */ - @java.lang.Override - public java.lang.String getPolicyId() { - java.lang.Object ref = policyId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - policyId_ = s; - return s; - } - } - /** - * - * - *
-   * The ID to use for this policy, which will become the final component of
-   * the policy's resource name. The ID must contain 3 to 63 characters. It can
-   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-   * (`.`). The first character must be a lowercase letter.
-   * 
- * - * string policy_id = 3; - * - * @return The bytes for policyId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPolicyIdBytes() { - java.lang.Object ref = policyId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - policyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (policy_ != null) { - output.writeMessage(2, getPolicy()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, policyId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicy()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, policyId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.CreatePolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v2.CreatePolicyRequest other = (com.google.iam.v2.CreatePolicyRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy().equals(other.getPolicy())) return false; - } - if (!getPolicyId().equals(other.getPolicyId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - hash = (37 * hash) + POLICY_ID_FIELD_NUMBER; - hash = (53 * hash) + getPolicyId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.CreatePolicyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.CreatePolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.CreatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.CreatePolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `CreatePolicy`.
-   * 
- * - * Protobuf type {@code google.iam.v2.CreatePolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.CreatePolicyRequest) - com.google.iam.v2.CreatePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_CreatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_CreatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.CreatePolicyRequest.class, - com.google.iam.v2.CreatePolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v2.CreatePolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - policyId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_CreatePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.CreatePolicyRequest getDefaultInstanceForType() { - return com.google.iam.v2.CreatePolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.CreatePolicyRequest build() { - com.google.iam.v2.CreatePolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.CreatePolicyRequest buildPartial() { - com.google.iam.v2.CreatePolicyRequest result = - new com.google.iam.v2.CreatePolicyRequest(this); - result.parent_ = parent_; - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.build(); - } - result.policyId_ = policyId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.CreatePolicyRequest) { - return mergeFrom((com.google.iam.v2.CreatePolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.CreatePolicyRequest other) { - if (other == com.google.iam.v2.CreatePolicyRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - if (!other.getPolicyId().isEmpty()) { - policyId_ = other.policyId_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - policyId_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.iam.v2.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - public com.google.iam.v2.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v2.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v2.Policy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergePolicy(com.google.iam.v2.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = com.google.iam.v2.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v2.Policy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; - } - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder>(getPolicy(), getParentForChildren(), isClean()); - policy_ = null; - } - return policyBuilder_; - } - - private java.lang.Object policyId_ = ""; - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @return The policyId. - */ - public java.lang.String getPolicyId() { - java.lang.Object ref = policyId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - policyId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @return The bytes for policyId. - */ - public com.google.protobuf.ByteString getPolicyIdBytes() { - java.lang.Object ref = policyId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - policyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @param value The policyId to set. - * @return This builder for chaining. - */ - public Builder setPolicyId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - policyId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @return This builder for chaining. - */ - public Builder clearPolicyId() { - - policyId_ = getDefaultInstance().getPolicyId(); - onChanged(); - return this; - } - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @param value The bytes for policyId to set. - * @return This builder for chaining. - */ - public Builder setPolicyIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - policyId_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.CreatePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.CreatePolicyRequest) - private static final com.google.iam.v2.CreatePolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.CreatePolicyRequest(); - } - - public static com.google.iam.v2.CreatePolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreatePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.CreatePolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java deleted file mode 100644 index 3825ae18..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java +++ /dev/null @@ -1,130 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface CreatePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.CreatePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to create. Format: `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to create. Format: `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - com.google.iam.v2.Policy getPolicy(); - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder(); - - /** - * - * - *
-   * The ID to use for this policy, which will become the final component of
-   * the policy's resource name. The ID must contain 3 to 63 characters. It can
-   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-   * (`.`). The first character must be a lowercase letter.
-   * 
- * - * string policy_id = 3; - * - * @return The policyId. - */ - java.lang.String getPolicyId(); - /** - * - * - *
-   * The ID to use for this policy, which will become the final component of
-   * the policy's resource name. The ID must contain 3 to 63 characters. It can
-   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-   * (`.`). The first character must be a lowercase letter.
-   * 
- * - * string policy_id = 3; - * - * @return The bytes for policyId. - */ - com.google.protobuf.ByteString getPolicyIdBytes(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java deleted file mode 100644 index 3900d3dc..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java +++ /dev/null @@ -1,860 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * Request message for `DeletePolicy`.
- * 
- * - * Protobuf type {@code google.iam.v2.DeletePolicyRequest} - */ -public final class DeletePolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.DeletePolicyRequest) - DeletePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeletePolicyRequest.newBuilder() to construct. - private DeletePolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeletePolicyRequest() { - name_ = ""; - etag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeletePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_DeletePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.DeletePolicyRequest.class, - com.google.iam.v2.DeletePolicyRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the policy to delete. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the policy to delete. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ETAG_FIELD_NUMBER = 2; - private volatile java.lang.Object etag_; - /** - * - * - *
-   * Optional. The expected `etag` of the policy to delete. If the value does not match
-   * the value that is stored in IAM, the request fails with a `409` error code
-   * and `ABORTED` status.
-   * If you omit this field, the policy is deleted regardless of its current
-   * `etag`.
-   * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The expected `etag` of the policy to delete. If the value does not match
-   * the value that is stored in IAM, the request fails with a `409` error code
-   * and `ABORTED` status.
-   * If you omit this field, the policy is deleted regardless of its current
-   * `etag`.
-   * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.DeletePolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v2.DeletePolicyRequest other = (com.google.iam.v2.DeletePolicyRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getEtag().equals(other.getEtag())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.DeletePolicyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.DeletePolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.DeletePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.DeletePolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `DeletePolicy`.
-   * 
- * - * Protobuf type {@code google.iam.v2.DeletePolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.DeletePolicyRequest) - com.google.iam.v2.DeletePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_DeletePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.DeletePolicyRequest.class, - com.google.iam.v2.DeletePolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v2.DeletePolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - etag_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_DeletePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.DeletePolicyRequest getDefaultInstanceForType() { - return com.google.iam.v2.DeletePolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.DeletePolicyRequest build() { - com.google.iam.v2.DeletePolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.DeletePolicyRequest buildPartial() { - com.google.iam.v2.DeletePolicyRequest result = - new com.google.iam.v2.DeletePolicyRequest(this); - result.name_ = name_; - result.etag_ = etag_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.DeletePolicyRequest) { - return mergeFrom((com.google.iam.v2.DeletePolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.DeletePolicyRequest other) { - if (other == com.google.iam.v2.DeletePolicyRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - etag_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object etag_ = ""; - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - etag_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - - etag_ = getDefaultInstance().getEtag(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for etag to set. - * @return This builder for chaining. - */ - public Builder setEtagBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - etag_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.DeletePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.DeletePolicyRequest) - private static final com.google.iam.v2.DeletePolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.DeletePolicyRequest(); - } - - public static com.google.iam.v2.DeletePolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeletePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.DeletePolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java deleted file mode 100644 index 9bdd7fc3..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java +++ /dev/null @@ -1,95 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface DeletePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.DeletePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the policy to delete. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of the policy to delete. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. The expected `etag` of the policy to delete. If the value does not match
-   * the value that is stored in IAM, the request fails with a `409` error code
-   * and `ABORTED` status.
-   * If you omit this field, the policy is deleted regardless of its current
-   * `etag`.
-   * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - java.lang.String getEtag(); - /** - * - * - *
-   * Optional. The expected `etag` of the policy to delete. If the value does not match
-   * the value that is stored in IAM, the request fails with a `409` error code
-   * and `ABORTED` status.
-   * If you omit this field, the policy is deleted regardless of its current
-   * `etag`.
-   * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - com.google.protobuf.ByteString getEtagBytes(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java deleted file mode 100644 index f3bc03f5..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java +++ /dev/null @@ -1,2449 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/deny.proto - -package com.google.iam.v2; - -/** - * - * - *
- * A deny rule in an IAM deny policy.
- * 
- * - * Protobuf type {@code google.iam.v2.DenyRule} - */ -public final class DenyRule extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.DenyRule) - DenyRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use DenyRule.newBuilder() to construct. - private DenyRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DenyRule() { - deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - deniedPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DenyRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.DenyRule.class, com.google.iam.v2.DenyRule.Builder.class); - } - - public static final int DENIED_PRINCIPALS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList deniedPrincipals_; - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @return A list containing the deniedPrincipals. - */ - public com.google.protobuf.ProtocolStringList getDeniedPrincipalsList() { - return deniedPrincipals_; - } - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @return The count of deniedPrincipals. - */ - public int getDeniedPrincipalsCount() { - return deniedPrincipals_.size(); - } - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the element to return. - * @return The deniedPrincipals at the given index. - */ - public java.lang.String getDeniedPrincipals(int index) { - return deniedPrincipals_.get(index); - } - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPrincipals at the given index. - */ - public com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index) { - return deniedPrincipals_.getByteString(index); - } - - public static final int EXCEPTION_PRINCIPALS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList exceptionPrincipals_; - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @return A list containing the exceptionPrincipals. - */ - public com.google.protobuf.ProtocolStringList getExceptionPrincipalsList() { - return exceptionPrincipals_; - } - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @return The count of exceptionPrincipals. - */ - public int getExceptionPrincipalsCount() { - return exceptionPrincipals_.size(); - } - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the element to return. - * @return The exceptionPrincipals at the given index. - */ - public java.lang.String getExceptionPrincipals(int index) { - return exceptionPrincipals_.get(index); - } - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPrincipals at the given index. - */ - public com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index) { - return exceptionPrincipals_.getByteString(index); - } - - public static final int DENIED_PERMISSIONS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList deniedPermissions_; - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @return A list containing the deniedPermissions. - */ - public com.google.protobuf.ProtocolStringList getDeniedPermissionsList() { - return deniedPermissions_; - } - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @return The count of deniedPermissions. - */ - public int getDeniedPermissionsCount() { - return deniedPermissions_.size(); - } - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the element to return. - * @return The deniedPermissions at the given index. - */ - public java.lang.String getDeniedPermissions(int index) { - return deniedPermissions_.get(index); - } - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPermissions at the given index. - */ - public com.google.protobuf.ByteString getDeniedPermissionsBytes(int index) { - return deniedPermissions_.getByteString(index); - } - - public static final int EXCEPTION_PERMISSIONS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList exceptionPermissions_; - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @return A list containing the exceptionPermissions. - */ - public com.google.protobuf.ProtocolStringList getExceptionPermissionsList() { - return exceptionPermissions_; - } - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @return The count of exceptionPermissions. - */ - public int getExceptionPermissionsCount() { - return exceptionPermissions_.size(); - } - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the element to return. - * @return The exceptionPermissions at the given index. - */ - public java.lang.String getExceptionPermissions(int index) { - return exceptionPermissions_.get(index); - } - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPermissions at the given index. - */ - public com.google.protobuf.ByteString getExceptionPermissionsBytes(int index) { - return exceptionPermissions_.getByteString(index); - } - - public static final int DENIAL_CONDITION_FIELD_NUMBER = 5; - private com.google.type.Expr denialCondition_; - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return Whether the denialCondition field is set. - */ - @java.lang.Override - public boolean hasDenialCondition() { - return denialCondition_ != null; - } - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return The denialCondition. - */ - @java.lang.Override - public com.google.type.Expr getDenialCondition() { - return denialCondition_ == null ? com.google.type.Expr.getDefaultInstance() : denialCondition_; - } - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - */ - @java.lang.Override - public com.google.type.ExprOrBuilder getDenialConditionOrBuilder() { - return getDenialCondition(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < deniedPrincipals_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deniedPrincipals_.getRaw(i)); - } - for (int i = 0; i < exceptionPrincipals_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, exceptionPrincipals_.getRaw(i)); - } - for (int i = 0; i < deniedPermissions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deniedPermissions_.getRaw(i)); - } - for (int i = 0; i < exceptionPermissions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 4, exceptionPermissions_.getRaw(i)); - } - if (denialCondition_ != null) { - output.writeMessage(5, getDenialCondition()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < deniedPrincipals_.size(); i++) { - dataSize += computeStringSizeNoTag(deniedPrincipals_.getRaw(i)); - } - size += dataSize; - size += 1 * getDeniedPrincipalsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < exceptionPrincipals_.size(); i++) { - dataSize += computeStringSizeNoTag(exceptionPrincipals_.getRaw(i)); - } - size += dataSize; - size += 1 * getExceptionPrincipalsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < deniedPermissions_.size(); i++) { - dataSize += computeStringSizeNoTag(deniedPermissions_.getRaw(i)); - } - size += dataSize; - size += 1 * getDeniedPermissionsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < exceptionPermissions_.size(); i++) { - dataSize += computeStringSizeNoTag(exceptionPermissions_.getRaw(i)); - } - size += dataSize; - size += 1 * getExceptionPermissionsList().size(); - } - if (denialCondition_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDenialCondition()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.DenyRule)) { - return super.equals(obj); - } - com.google.iam.v2.DenyRule other = (com.google.iam.v2.DenyRule) obj; - - if (!getDeniedPrincipalsList().equals(other.getDeniedPrincipalsList())) return false; - if (!getExceptionPrincipalsList().equals(other.getExceptionPrincipalsList())) return false; - if (!getDeniedPermissionsList().equals(other.getDeniedPermissionsList())) return false; - if (!getExceptionPermissionsList().equals(other.getExceptionPermissionsList())) return false; - if (hasDenialCondition() != other.hasDenialCondition()) return false; - if (hasDenialCondition()) { - if (!getDenialCondition().equals(other.getDenialCondition())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDeniedPrincipalsCount() > 0) { - hash = (37 * hash) + DENIED_PRINCIPALS_FIELD_NUMBER; - hash = (53 * hash) + getDeniedPrincipalsList().hashCode(); - } - if (getExceptionPrincipalsCount() > 0) { - hash = (37 * hash) + EXCEPTION_PRINCIPALS_FIELD_NUMBER; - hash = (53 * hash) + getExceptionPrincipalsList().hashCode(); - } - if (getDeniedPermissionsCount() > 0) { - hash = (37 * hash) + DENIED_PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + getDeniedPermissionsList().hashCode(); - } - if (getExceptionPermissionsCount() > 0) { - hash = (37 * hash) + EXCEPTION_PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + getExceptionPermissionsList().hashCode(); - } - if (hasDenialCondition()) { - hash = (37 * hash) + DENIAL_CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getDenialCondition().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.DenyRule parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.DenyRule parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.DenyRule parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.DenyRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.DenyRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.DenyRule parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.DenyRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.DenyRule parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.DenyRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.DenyRule parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.DenyRule parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.DenyRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.DenyRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A deny rule in an IAM deny policy.
-   * 
- * - * Protobuf type {@code google.iam.v2.DenyRule} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.DenyRule) - com.google.iam.v2.DenyRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.DenyRuleProto - .internal_static_google_iam_v2_DenyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.DenyRule.class, com.google.iam.v2.DenyRule.Builder.class); - } - - // Construct using com.google.iam.v2.DenyRule.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - deniedPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - if (denialConditionBuilder_ == null) { - denialCondition_ = null; - } else { - denialCondition_ = null; - denialConditionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.DenyRule getDefaultInstanceForType() { - return com.google.iam.v2.DenyRule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.DenyRule build() { - com.google.iam.v2.DenyRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.DenyRule buildPartial() { - com.google.iam.v2.DenyRule result = new com.google.iam.v2.DenyRule(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - deniedPrincipals_ = deniedPrincipals_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deniedPrincipals_ = deniedPrincipals_; - if (((bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = exceptionPrincipals_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.exceptionPrincipals_ = exceptionPrincipals_; - if (((bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = deniedPermissions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.deniedPermissions_ = deniedPermissions_; - if (((bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = exceptionPermissions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.exceptionPermissions_ = exceptionPermissions_; - if (denialConditionBuilder_ == null) { - result.denialCondition_ = denialCondition_; - } else { - result.denialCondition_ = denialConditionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.DenyRule) { - return mergeFrom((com.google.iam.v2.DenyRule) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.DenyRule other) { - if (other == com.google.iam.v2.DenyRule.getDefaultInstance()) return this; - if (!other.deniedPrincipals_.isEmpty()) { - if (deniedPrincipals_.isEmpty()) { - deniedPrincipals_ = other.deniedPrincipals_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.addAll(other.deniedPrincipals_); - } - onChanged(); - } - if (!other.exceptionPrincipals_.isEmpty()) { - if (exceptionPrincipals_.isEmpty()) { - exceptionPrincipals_ = other.exceptionPrincipals_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.addAll(other.exceptionPrincipals_); - } - onChanged(); - } - if (!other.deniedPermissions_.isEmpty()) { - if (deniedPermissions_.isEmpty()) { - deniedPermissions_ = other.deniedPermissions_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.addAll(other.deniedPermissions_); - } - onChanged(); - } - if (!other.exceptionPermissions_.isEmpty()) { - if (exceptionPermissions_.isEmpty()) { - exceptionPermissions_ = other.exceptionPermissions_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.addAll(other.exceptionPermissions_); - } - onChanged(); - } - if (other.hasDenialCondition()) { - mergeDenialCondition(other.getDenialCondition()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.add(s); - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.add(s); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.add(s); - break; - } // case 26 - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.add(s); - break; - } // case 34 - case 42: - { - input.readMessage(getDenialConditionFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList deniedPrincipals_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureDeniedPrincipalsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deniedPrincipals_ = new com.google.protobuf.LazyStringArrayList(deniedPrincipals_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @return A list containing the deniedPrincipals. - */ - public com.google.protobuf.ProtocolStringList getDeniedPrincipalsList() { - return deniedPrincipals_.getUnmodifiableView(); - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @return The count of deniedPrincipals. - */ - public int getDeniedPrincipalsCount() { - return deniedPrincipals_.size(); - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the element to return. - * @return The deniedPrincipals at the given index. - */ - public java.lang.String getDeniedPrincipals(int index) { - return deniedPrincipals_.get(index); - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPrincipals at the given index. - */ - public com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index) { - return deniedPrincipals_.getByteString(index); - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param index The index to set the value at. - * @param value The deniedPrincipals to set. - * @return This builder for chaining. - */ - public Builder setDeniedPrincipals(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param value The deniedPrincipals to add. - * @return This builder for chaining. - */ - public Builder addDeniedPrincipals(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param values The deniedPrincipals to add. - * @return This builder for chaining. - */ - public Builder addAllDeniedPrincipals(java.lang.Iterable values) { - ensureDeniedPrincipalsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deniedPrincipals_); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @return This builder for chaining. - */ - public Builder clearDeniedPrincipals() { - deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param value The bytes of the deniedPrincipals to add. - * @return This builder for chaining. - */ - public Builder addDeniedPrincipalsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList exceptionPrincipals_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureExceptionPrincipalsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = new com.google.protobuf.LazyStringArrayList(exceptionPrincipals_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @return A list containing the exceptionPrincipals. - */ - public com.google.protobuf.ProtocolStringList getExceptionPrincipalsList() { - return exceptionPrincipals_.getUnmodifiableView(); - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @return The count of exceptionPrincipals. - */ - public int getExceptionPrincipalsCount() { - return exceptionPrincipals_.size(); - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the element to return. - * @return The exceptionPrincipals at the given index. - */ - public java.lang.String getExceptionPrincipals(int index) { - return exceptionPrincipals_.get(index); - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPrincipals at the given index. - */ - public com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index) { - return exceptionPrincipals_.getByteString(index); - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param index The index to set the value at. - * @param value The exceptionPrincipals to set. - * @return This builder for chaining. - */ - public Builder setExceptionPrincipals(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param value The exceptionPrincipals to add. - * @return This builder for chaining. - */ - public Builder addExceptionPrincipals(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param values The exceptionPrincipals to add. - * @return This builder for chaining. - */ - public Builder addAllExceptionPrincipals(java.lang.Iterable values) { - ensureExceptionPrincipalsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exceptionPrincipals_); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @return This builder for chaining. - */ - public Builder clearExceptionPrincipals() { - exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param value The bytes of the exceptionPrincipals to add. - * @return This builder for chaining. - */ - public Builder addExceptionPrincipalsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList deniedPermissions_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureDeniedPermissionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = new com.google.protobuf.LazyStringArrayList(deniedPermissions_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @return A list containing the deniedPermissions. - */ - public com.google.protobuf.ProtocolStringList getDeniedPermissionsList() { - return deniedPermissions_.getUnmodifiableView(); - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @return The count of deniedPermissions. - */ - public int getDeniedPermissionsCount() { - return deniedPermissions_.size(); - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the element to return. - * @return The deniedPermissions at the given index. - */ - public java.lang.String getDeniedPermissions(int index) { - return deniedPermissions_.get(index); - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPermissions at the given index. - */ - public com.google.protobuf.ByteString getDeniedPermissionsBytes(int index) { - return deniedPermissions_.getByteString(index); - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index to set the value at. - * @param value The deniedPermissions to set. - * @return This builder for chaining. - */ - public Builder setDeniedPermissions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param value The deniedPermissions to add. - * @return This builder for chaining. - */ - public Builder addDeniedPermissions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param values The deniedPermissions to add. - * @return This builder for chaining. - */ - public Builder addAllDeniedPermissions(java.lang.Iterable values) { - ensureDeniedPermissionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deniedPermissions_); - onChanged(); - return this; - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @return This builder for chaining. - */ - public Builder clearDeniedPermissions() { - deniedPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param value The bytes of the deniedPermissions to add. - * @return This builder for chaining. - */ - public Builder addDeniedPermissionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList exceptionPermissions_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureExceptionPermissionsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = new com.google.protobuf.LazyStringArrayList(exceptionPermissions_); - bitField0_ |= 0x00000008; - } - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @return A list containing the exceptionPermissions. - */ - public com.google.protobuf.ProtocolStringList getExceptionPermissionsList() { - return exceptionPermissions_.getUnmodifiableView(); - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @return The count of exceptionPermissions. - */ - public int getExceptionPermissionsCount() { - return exceptionPermissions_.size(); - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the element to return. - * @return The exceptionPermissions at the given index. - */ - public java.lang.String getExceptionPermissions(int index) { - return exceptionPermissions_.get(index); - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPermissions at the given index. - */ - public com.google.protobuf.ByteString getExceptionPermissionsBytes(int index) { - return exceptionPermissions_.getByteString(index); - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index to set the value at. - * @param value The exceptionPermissions to set. - * @return This builder for chaining. - */ - public Builder setExceptionPermissions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param value The exceptionPermissions to add. - * @return This builder for chaining. - */ - public Builder addExceptionPermissions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param values The exceptionPermissions to add. - * @return This builder for chaining. - */ - public Builder addAllExceptionPermissions(java.lang.Iterable values) { - ensureExceptionPermissionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exceptionPermissions_); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @return This builder for chaining. - */ - public Builder clearExceptionPermissions() { - exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param value The bytes of the exceptionPermissions to add. - * @return This builder for chaining. - */ - public Builder addExceptionPermissionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.add(value); - onChanged(); - return this; - } - - private com.google.type.Expr denialCondition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> - denialConditionBuilder_; - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return Whether the denialCondition field is set. - */ - public boolean hasDenialCondition() { - return denialConditionBuilder_ != null || denialCondition_ != null; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return The denialCondition. - */ - public com.google.type.Expr getDenialCondition() { - if (denialConditionBuilder_ == null) { - return denialCondition_ == null - ? com.google.type.Expr.getDefaultInstance() - : denialCondition_; - } else { - return denialConditionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public Builder setDenialCondition(com.google.type.Expr value) { - if (denialConditionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - denialCondition_ = value; - onChanged(); - } else { - denialConditionBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public Builder setDenialCondition(com.google.type.Expr.Builder builderForValue) { - if (denialConditionBuilder_ == null) { - denialCondition_ = builderForValue.build(); - onChanged(); - } else { - denialConditionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public Builder mergeDenialCondition(com.google.type.Expr value) { - if (denialConditionBuilder_ == null) { - if (denialCondition_ != null) { - denialCondition_ = - com.google.type.Expr.newBuilder(denialCondition_).mergeFrom(value).buildPartial(); - } else { - denialCondition_ = value; - } - onChanged(); - } else { - denialConditionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public Builder clearDenialCondition() { - if (denialConditionBuilder_ == null) { - denialCondition_ = null; - onChanged(); - } else { - denialCondition_ = null; - denialConditionBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public com.google.type.Expr.Builder getDenialConditionBuilder() { - - onChanged(); - return getDenialConditionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public com.google.type.ExprOrBuilder getDenialConditionOrBuilder() { - if (denialConditionBuilder_ != null) { - return denialConditionBuilder_.getMessageOrBuilder(); - } else { - return denialCondition_ == null - ? com.google.type.Expr.getDefaultInstance() - : denialCondition_; - } - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> - getDenialConditionFieldBuilder() { - if (denialConditionBuilder_ == null) { - denialConditionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( - getDenialCondition(), getParentForChildren(), isClean()); - denialCondition_ = null; - } - return denialConditionBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.DenyRule) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.DenyRule) - private static final com.google.iam.v2.DenyRule DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.DenyRule(); - } - - public static com.google.iam.v2.DenyRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DenyRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.DenyRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRuleOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRuleOrBuilder.java deleted file mode 100644 index 1d35367f..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRuleOrBuilder.java +++ /dev/null @@ -1,468 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/deny.proto - -package com.google.iam.v2; - -public interface DenyRuleOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.DenyRule) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @return A list containing the deniedPrincipals. - */ - java.util.List getDeniedPrincipalsList(); - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @return The count of deniedPrincipals. - */ - int getDeniedPrincipalsCount(); - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the element to return. - * @return The deniedPrincipals at the given index. - */ - java.lang.String getDeniedPrincipals(int index); - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPrincipals at the given index. - */ - com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index); - - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @return A list containing the exceptionPrincipals. - */ - java.util.List getExceptionPrincipalsList(); - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @return The count of exceptionPrincipals. - */ - int getExceptionPrincipalsCount(); - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the element to return. - * @return The exceptionPrincipals at the given index. - */ - java.lang.String getExceptionPrincipals(int index); - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPrincipals at the given index. - */ - com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index); - - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @return A list containing the deniedPermissions. - */ - java.util.List getDeniedPermissionsList(); - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @return The count of deniedPermissions. - */ - int getDeniedPermissionsCount(); - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the element to return. - * @return The deniedPermissions at the given index. - */ - java.lang.String getDeniedPermissions(int index); - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPermissions at the given index. - */ - com.google.protobuf.ByteString getDeniedPermissionsBytes(int index); - - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @return A list containing the exceptionPermissions. - */ - java.util.List getExceptionPermissionsList(); - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @return The count of exceptionPermissions. - */ - int getExceptionPermissionsCount(); - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the element to return. - * @return The exceptionPermissions at the given index. - */ - java.lang.String getExceptionPermissions(int index); - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPermissions at the given index. - */ - com.google.protobuf.ByteString getExceptionPermissionsBytes(int index); - - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return Whether the denialCondition field is set. - */ - boolean hasDenialCondition(); - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return The denialCondition. - */ - com.google.type.Expr getDenialCondition(); - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - */ - com.google.type.ExprOrBuilder getDenialConditionOrBuilder(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRuleProto.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRuleProto.java deleted file mode 100644 index 55a5ff75..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRuleProto.java +++ /dev/null @@ -1,75 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/deny.proto - -package com.google.iam.v2; - -public final class DenyRuleProto { - private DenyRuleProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_DenyRule_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_DenyRule_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\030google/iam/v2/deny.proto\022\rgoogle.iam.v" - + "2\032\026google/type/expr.proto\"\253\001\n\010DenyRule\022\031" - + "\n\021denied_principals\030\001 \003(\t\022\034\n\024exception_p" - + "rincipals\030\002 \003(\t\022\032\n\022denied_permissions\030\003 " - + "\003(\t\022\035\n\025exception_permissions\030\004 \003(\t\022+\n\020de" - + "nial_condition\030\005 \001(\0132\021.google.type.ExprB" - + "\202\001\n\021com.google.iam.v2B\rDenyRuleProtoP\001Z0" - + "google.golang.org/genproto/googleapis/ia" - + "m/v2;iam\252\002\023Google.Cloud.Iam.V2\312\002\023Google\\" - + "Cloud\\Iam\\V2b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.type.ExprProto.getDescriptor(), - }); - internal_static_google_iam_v2_DenyRule_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_google_iam_v2_DenyRule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_DenyRule_descriptor, - new java.lang.String[] { - "DeniedPrincipals", - "ExceptionPrincipals", - "DeniedPermissions", - "ExceptionPermissions", - "DenialCondition", - }); - com.google.type.ExprProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java deleted file mode 100644 index e3888a12..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java +++ /dev/null @@ -1,652 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * Request message for `GetPolicy`.
- * 
- * - * Protobuf type {@code google.iam.v2.GetPolicyRequest} - */ -public final class GetPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.GetPolicyRequest) - GetPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetPolicyRequest.newBuilder() to construct. - private GetPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetPolicyRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_GetPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_GetPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.GetPolicyRequest.class, - com.google.iam.v2.GetPolicyRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the policy to retrieve. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the policy to retrieve. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.GetPolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v2.GetPolicyRequest other = (com.google.iam.v2.GetPolicyRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.GetPolicyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.GetPolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.GetPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.GetPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `GetPolicy`.
-   * 
- * - * Protobuf type {@code google.iam.v2.GetPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.GetPolicyRequest) - com.google.iam.v2.GetPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_GetPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_GetPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.GetPolicyRequest.class, - com.google.iam.v2.GetPolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v2.GetPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_GetPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.GetPolicyRequest getDefaultInstanceForType() { - return com.google.iam.v2.GetPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.GetPolicyRequest build() { - com.google.iam.v2.GetPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.GetPolicyRequest buildPartial() { - com.google.iam.v2.GetPolicyRequest result = new com.google.iam.v2.GetPolicyRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.GetPolicyRequest) { - return mergeFrom((com.google.iam.v2.GetPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.GetPolicyRequest other) { - if (other == com.google.iam.v2.GetPolicyRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.GetPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.GetPolicyRequest) - private static final com.google.iam.v2.GetPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.GetPolicyRequest(); - } - - public static com.google.iam.v2.GetPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.GetPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequestOrBuilder.java deleted file mode 100644 index 6f293a32..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequestOrBuilder.java +++ /dev/null @@ -1,62 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface GetPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.GetPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the policy to retrieve. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of the policy to retrieve. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java deleted file mode 100644 index 124798c3..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java +++ /dev/null @@ -1,948 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * Request message for `ListPolicies`.
- * 
- * - * Protobuf type {@code google.iam.v2.ListPoliciesRequest} - */ -public final class ListPoliciesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.ListPoliciesRequest) - ListPoliciesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListPoliciesRequest.newBuilder() to construct. - private ListPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListPoliciesRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListPoliciesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListPoliciesRequest.class, - com.google.iam.v2.ListPoliciesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to list. Format:
-   * `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to list. Format:
-   * `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * - * - *
-   * The maximum number of policies to return. IAM ignores this value and uses
-   * the value 1000.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
-   * retrieve the next page.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
-   * retrieve the next page.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.ListPoliciesRequest)) { - return super.equals(obj); - } - com.google.iam.v2.ListPoliciesRequest other = (com.google.iam.v2.ListPoliciesRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListPoliciesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.ListPoliciesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `ListPolicies`.
-   * 
- * - * Protobuf type {@code google.iam.v2.ListPoliciesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.ListPoliciesRequest) - com.google.iam.v2.ListPoliciesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListPoliciesRequest.class, - com.google.iam.v2.ListPoliciesRequest.Builder.class); - } - - // Construct using com.google.iam.v2.ListPoliciesRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.ListPoliciesRequest getDefaultInstanceForType() { - return com.google.iam.v2.ListPoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.ListPoliciesRequest build() { - com.google.iam.v2.ListPoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.ListPoliciesRequest buildPartial() { - com.google.iam.v2.ListPoliciesRequest result = - new com.google.iam.v2.ListPoliciesRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.ListPoliciesRequest) { - return mergeFrom((com.google.iam.v2.ListPoliciesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.ListPoliciesRequest other) { - if (other == com.google.iam.v2.ListPoliciesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * The maximum number of policies to return. IAM ignores this value and uses
-     * the value 1000.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * The maximum number of policies to return. IAM ignores this value and uses
-     * the value 1000.
-     * 
- * - * int32 page_size = 2; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The maximum number of policies to return. IAM ignores this value and uses
-     * the value 1000.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.ListPoliciesRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.ListPoliciesRequest) - private static final com.google.iam.v2.ListPoliciesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.ListPoliciesRequest(); - } - - public static com.google.iam.v2.ListPoliciesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListPoliciesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.ListPoliciesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java deleted file mode 100644 index bfea871b..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java +++ /dev/null @@ -1,107 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface ListPoliciesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.ListPoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to list. Format:
-   * `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to list. Format:
-   * `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * The maximum number of policies to return. IAM ignores this value and uses
-   * the value 1000.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
-   * retrieve the next page.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
-   * retrieve the next page.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java deleted file mode 100644 index 62cdb5ec..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java +++ /dev/null @@ -1,1100 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * Response message for `ListPolicies`.
- * 
- * - * Protobuf type {@code google.iam.v2.ListPoliciesResponse} - */ -public final class ListPoliciesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.ListPoliciesResponse) - ListPoliciesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListPoliciesResponse.newBuilder() to construct. - private ListPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListPoliciesResponse() { - policies_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListPoliciesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListPoliciesResponse.class, - com.google.iam.v2.ListPoliciesResponse.Builder.class); - } - - public static final int POLICIES_FIELD_NUMBER = 1; - private java.util.List policies_; - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public java.util.List getPoliciesList() { - return policies_; - } - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public java.util.List getPoliciesOrBuilderList() { - return policies_; - } - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public int getPoliciesCount() { - return policies_.size(); - } - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public com.google.iam.v2.Policy getPolicies(int index) { - return policies_.get(index); - } - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { - return policies_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
-   * next page. If this field is omitted, there are no additional pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
-   * next page. If this field is omitted, there are no additional pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < policies_.size(); i++) { - output.writeMessage(1, policies_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policies_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.ListPoliciesResponse)) { - return super.equals(obj); - } - com.google.iam.v2.ListPoliciesResponse other = (com.google.iam.v2.ListPoliciesResponse) obj; - - if (!getPoliciesList().equals(other.getPoliciesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPoliciesCount() > 0) { - hash = (37 * hash) + POLICIES_FIELD_NUMBER; - hash = (53 * hash) + getPoliciesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListPoliciesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.ListPoliciesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for `ListPolicies`.
-   * 
- * - * Protobuf type {@code google.iam.v2.ListPoliciesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.ListPoliciesResponse) - com.google.iam.v2.ListPoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListPoliciesResponse.class, - com.google.iam.v2.ListPoliciesResponse.Builder.class); - } - - // Construct using com.google.iam.v2.ListPoliciesResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - } else { - policies_ = null; - policiesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListPoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.ListPoliciesResponse getDefaultInstanceForType() { - return com.google.iam.v2.ListPoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.ListPoliciesResponse build() { - com.google.iam.v2.ListPoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.ListPoliciesResponse buildPartial() { - com.google.iam.v2.ListPoliciesResponse result = - new com.google.iam.v2.ListPoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (policiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policies_ = policies_; - } else { - result.policies_ = policiesBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.ListPoliciesResponse) { - return mergeFrom((com.google.iam.v2.ListPoliciesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.ListPoliciesResponse other) { - if (other == com.google.iam.v2.ListPoliciesResponse.getDefaultInstance()) return this; - if (policiesBuilder_ == null) { - if (!other.policies_.isEmpty()) { - if (policies_.isEmpty()) { - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePoliciesIsMutable(); - policies_.addAll(other.policies_); - } - onChanged(); - } - } else { - if (!other.policies_.isEmpty()) { - if (policiesBuilder_.isEmpty()) { - policiesBuilder_.dispose(); - policiesBuilder_ = null; - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - policiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPoliciesFieldBuilder() - : null; - } else { - policiesBuilder_.addAllMessages(other.policies_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.iam.v2.Policy m = - input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry); - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(m); - } else { - policiesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List policies_ = java.util.Collections.emptyList(); - - private void ensurePoliciesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policies_ = new java.util.ArrayList(policies_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - policiesBuilder_; - - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public java.util.List getPoliciesList() { - if (policiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(policies_); - } else { - return policiesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public int getPoliciesCount() { - if (policiesBuilder_ == null) { - return policies_.size(); - } else { - return policiesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.Policy getPolicies(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder setPolicies(int index, com.google.iam.v2.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.set(index, value); - onChanged(); - } else { - policiesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder setPolicies(int index, com.google.iam.v2.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.set(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addPolicies(com.google.iam.v2.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(value); - onChanged(); - } else { - policiesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addPolicies(int index, com.google.iam.v2.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(index, value); - onChanged(); - } else { - policiesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addPolicies(com.google.iam.v2.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addPolicies(int index, com.google.iam.v2.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addAllPolicies(java.lang.Iterable values) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policies_); - onChanged(); - } else { - policiesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder clearPolicies() { - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policiesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder removePolicies(int index) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.remove(index); - onChanged(); - } else { - policiesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.Policy.Builder getPoliciesBuilder(int index) { - return getPoliciesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public java.util.List getPoliciesOrBuilderList() { - if (policiesBuilder_ != null) { - return policiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policies_); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.Policy.Builder addPoliciesBuilder() { - return getPoliciesFieldBuilder().addBuilder(com.google.iam.v2.Policy.getDefaultInstance()); - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.Policy.Builder addPoliciesBuilder(int index) { - return getPoliciesFieldBuilder() - .addBuilder(index, com.google.iam.v2.Policy.getDefaultInstance()); - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public java.util.List getPoliciesBuilderList() { - return getPoliciesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - getPoliciesFieldBuilder() { - if (policiesBuilder_ == null) { - policiesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder>( - policies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - policies_ = null; - } - return policiesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.ListPoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.ListPoliciesResponse) - private static final com.google.iam.v2.ListPoliciesResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.ListPoliciesResponse(); - } - - public static com.google.iam.v2.ListPoliciesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListPoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.ListPoliciesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java deleted file mode 100644 index 1faeb31c..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java +++ /dev/null @@ -1,103 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface ListPoliciesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.ListPoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - java.util.List getPoliciesList(); - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - com.google.iam.v2.Policy getPolicies(int index); - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - int getPoliciesCount(); - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - java.util.List getPoliciesOrBuilderList(); - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index); - - /** - * - * - *
-   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
-   * next page. If this field is omitted, there are no additional pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
-   * next page. If this field is omitted, there are no additional pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java deleted file mode 100644 index 82a241e7..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java +++ /dev/null @@ -1,3289 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * Data for an IAM policy.
- * 
- * - * Protobuf type {@code google.iam.v2.Policy} - */ -public final class Policy extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.Policy) - PolicyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Policy.newBuilder() to construct. - private Policy(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Policy() { - name_ = ""; - uid_ = ""; - kind_ = ""; - displayName_ = ""; - etag_ = ""; - rules_ = java.util.Collections.emptyList(); - managingAuthority_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Policy(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetAnnotations(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.Policy.class, com.google.iam.v2.Policy.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Immutable. The resource name of the `Policy`, which must be unique. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, requests can use the alphanumeric or the numeric ID.
-   * Responses always contain the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The resource name of the `Policy`, which must be unique. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, requests can use the alphanumeric or the numeric ID.
-   * Responses always contain the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UID_FIELD_NUMBER = 2; - private volatile java.lang.Object uid_; - /** - * - * - *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-   * `Policy` is created.
-   * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-   * `Policy` is created.
-   * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KIND_FIELD_NUMBER = 3; - private volatile java.lang.Object kind_; - /** - * - * - *
-   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-   * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The kind. - */ - @java.lang.Override - public java.lang.String getKind() { - java.lang.Object ref = kind_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kind_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-   * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for kind. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKindBytes() { - java.lang.Object ref = kind_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kind_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * A user-specified description of the `Policy`. This value can be up to 63
-   * characters.
-   * 
- * - * string display_name = 4; - * - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * - * - *
-   * A user-specified description of the `Policy`. This value can be up to 63
-   * characters.
-   * 
- * - * string display_name = 4; - * - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ANNOTATIONS_FIELD_NUMBER = 5; - - private static final class AnnotationsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_Policy_AnnotationsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField annotations_; - - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public boolean containsAnnotations(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetAnnotations().getMap().containsKey(key); - } - /** Use {@link #getAnnotationsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.lang.String getAnnotationsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ETAG_FIELD_NUMBER = 6; - private volatile java.lang.Object etag_; - /** - * - * - *
-   * An opaque tag that identifies the current version of the `Policy`. IAM uses
-   * this value to help manage concurrent updates, so they do not cause one
-   * update to be overwritten by another.
-   * If this field is present in a [CreatePolicy][] request, the value is
-   * ignored.
-   * 
- * - * string etag = 6; - * - * @return The etag. - */ - @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } - } - /** - * - * - *
-   * An opaque tag that identifies the current version of the `Policy`. IAM uses
-   * this value to help manage concurrent updates, so they do not cause one
-   * update to be overwritten by another.
-   * If this field is present in a [CreatePolicy][] request, the value is
-   * ignored.
-   * 
- * - * string etag = 6; - * - * @return The bytes for etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int DELETE_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp deleteTime_; - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteTime field is set. - */ - @java.lang.Override - public boolean hasDeleteTime() { - return deleteTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getDeleteTime() { - return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { - return getDeleteTime(); - } - - public static final int RULES_FIELD_NUMBER = 10; - private java.util.List rules_; - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - @java.lang.Override - public java.util.List getRulesList() { - return rules_; - } - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - @java.lang.Override - public java.util.List getRulesOrBuilderList() { - return rules_; - } - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - @java.lang.Override - public int getRulesCount() { - return rules_.size(); - } - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - @java.lang.Override - public com.google.iam.v2.PolicyRule getRules(int index) { - return rules_.get(index); - } - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - @java.lang.Override - public com.google.iam.v2.PolicyRuleOrBuilder getRulesOrBuilder(int index) { - return rules_.get(index); - } - - public static final int MANAGING_AUTHORITY_FIELD_NUMBER = 11; - private volatile java.lang.Object managingAuthority_; - /** - * - * - *
-   * Immutable. Specifies that this policy is managed by an authority and can only be
-   * modified by that authority. Usage is restricted.
-   * 
- * - * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The managingAuthority. - */ - @java.lang.Override - public java.lang.String getManagingAuthority() { - java.lang.Object ref = managingAuthority_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - managingAuthority_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. Specifies that this policy is managed by an authority and can only be
-   * modified by that authority. Usage is restricted.
-   * 
- * - * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for managingAuthority. - */ - @java.lang.Override - public com.google.protobuf.ByteString getManagingAuthorityBytes() { - java.lang.Object ref = managingAuthority_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - managingAuthority_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, etag_); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(8, getUpdateTime()); - } - if (deleteTime_ != null) { - output.writeMessage(9, getDeleteTime()); - } - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(10, rules_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(managingAuthority_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, managingAuthority_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); - } - for (java.util.Map.Entry entry : - internalGetAnnotations().getMap().entrySet()) { - com.google.protobuf.MapEntry annotations__ = - AnnotationsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, etag_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); - } - if (deleteTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDeleteTime()); - } - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, rules_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(managingAuthority_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, managingAuthority_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.Policy)) { - return super.equals(obj); - } - com.google.iam.v2.Policy other = (com.google.iam.v2.Policy) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUid().equals(other.getUid())) return false; - if (!getKind().equals(other.getKind())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; - if (!getEtag().equals(other.getEtag())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (hasDeleteTime() != other.hasDeleteTime()) return false; - if (hasDeleteTime()) { - if (!getDeleteTime().equals(other.getDeleteTime())) return false; - } - if (!getRulesList().equals(other.getRulesList())) return false; - if (!getManagingAuthority().equals(other.getManagingAuthority())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + getKind().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (!internalGetAnnotations().getMap().isEmpty()) { - hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetAnnotations().hashCode(); - } - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasDeleteTime()) { - hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getDeleteTime().hashCode(); - } - if (getRulesCount() > 0) { - hash = (37 * hash) + RULES_FIELD_NUMBER; - hash = (53 * hash) + getRulesList().hashCode(); - } - hash = (37 * hash) + MANAGING_AUTHORITY_FIELD_NUMBER; - hash = (53 * hash) + getManagingAuthority().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.Policy parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.Policy parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.Policy parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.Policy parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.Policy parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.Policy parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.Policy parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.Policy parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.Policy parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.Policy parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.Policy parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.Policy parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.Policy prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Data for an IAM policy.
-   * 
- * - * Protobuf type {@code google.iam.v2.Policy} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.Policy) - com.google.iam.v2.PolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetAnnotations(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 5: - return internalGetMutableAnnotations(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.Policy.class, com.google.iam.v2.Policy.Builder.class); - } - - // Construct using com.google.iam.v2.Policy.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - uid_ = ""; - - kind_ = ""; - - displayName_ = ""; - - internalGetMutableAnnotations().clear(); - etag_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - if (deleteTimeBuilder_ == null) { - deleteTime_ = null; - } else { - deleteTime_ = null; - deleteTimeBuilder_ = null; - } - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - } else { - rules_ = null; - rulesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - managingAuthority_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.Policy getDefaultInstanceForType() { - return com.google.iam.v2.Policy.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.Policy build() { - com.google.iam.v2.Policy result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.Policy buildPartial() { - com.google.iam.v2.Policy result = new com.google.iam.v2.Policy(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.uid_ = uid_; - result.kind_ = kind_; - result.displayName_ = displayName_; - result.annotations_ = internalGetAnnotations(); - result.annotations_.makeImmutable(); - result.etag_ = etag_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - if (deleteTimeBuilder_ == null) { - result.deleteTime_ = deleteTime_; - } else { - result.deleteTime_ = deleteTimeBuilder_.build(); - } - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - result.managingAuthority_ = managingAuthority_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.Policy) { - return mergeFrom((com.google.iam.v2.Policy) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.Policy other) { - if (other == com.google.iam.v2.Policy.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - onChanged(); - } - if (!other.getKind().isEmpty()) { - kind_ = other.kind_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasDeleteTime()) { - mergeDeleteTime(other.getDeleteTime()); - } - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000002); - rulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRulesFieldBuilder() - : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } - } - } - if (!other.getManagingAuthority().isEmpty()) { - managingAuthority_ = other.managingAuthority_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - uid_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - kind_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - displayName_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableAnnotations() - .getMutableMap() - .put(annotations__.getKey(), annotations__.getValue()); - break; - } // case 42 - case 50: - { - etag_ = input.readStringRequireUtf8(); - - break; - } // case 50 - case 58: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 58 - case 66: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 66 - case 74: - { - input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 74 - case 82: - { - com.google.iam.v2.PolicyRule m = - input.readMessage(com.google.iam.v2.PolicyRule.parser(), extensionRegistry); - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(m); - } else { - rulesBuilder_.addMessage(m); - } - break; - } // case 82 - case 90: - { - managingAuthority_ = input.readStringRequireUtf8(); - - break; - } // case 90 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object uid_ = ""; - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearUid() { - - uid_ = getDefaultInstance().getUid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uid_ = value; - onChanged(); - return this; - } - - private java.lang.Object kind_ = ""; - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The kind. - */ - public java.lang.String getKind() { - java.lang.Object ref = kind_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kind_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for kind. - */ - public com.google.protobuf.ByteString getKindBytes() { - java.lang.Object ref = kind_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kind_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kind_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearKind() { - - kind_ = getDefaultInstance().getKind(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for kind to set. - * @return This builder for chaining. - */ - public Builder setKindBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kind_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField annotations_; - - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - - private com.google.protobuf.MapField - internalGetMutableAnnotations() { - onChanged(); - ; - if (annotations_ == null) { - annotations_ = - com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); - } - if (!annotations_.isMutable()) { - annotations_ = annotations_.copy(); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public boolean containsAnnotations(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetAnnotations().getMap().containsKey(key); - } - /** Use {@link #getAnnotationsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.lang.String getAnnotationsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAnnotations() { - internalGetMutableAnnotations().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - public Builder removeAnnotations(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableAnnotations().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableAnnotations() { - return internalGetMutableAnnotations().getMutableMap(); - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - public Builder putAnnotations(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableAnnotations().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - public Builder putAllAnnotations(java.util.Map values) { - internalGetMutableAnnotations().getMutableMap().putAll(values); - return this; - } - - private java.lang.Object etag_ = ""; - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @return The bytes for etag. - */ - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - etag_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - - etag_ = getDefaultInstance().getEtag(); - onChanged(); - return this; - } - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @param value The bytes for etag to set. - * @return This builder for chaining. - */ - public Builder setEtagBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - etag_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.Timestamp deleteTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - deleteTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteTime field is set. - */ - public boolean hasDeleteTime() { - return deleteTimeBuilder_ != null || deleteTime_ != null; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteTime. - */ - public com.google.protobuf.Timestamp getDeleteTime() { - if (deleteTimeBuilder_ == null) { - return deleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deleteTime_; - } else { - return deleteTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeleteTime(com.google.protobuf.Timestamp value) { - if (deleteTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deleteTime_ = value; - onChanged(); - } else { - deleteTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (deleteTimeBuilder_ == null) { - deleteTime_ = builderForValue.build(); - onChanged(); - } else { - deleteTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { - if (deleteTimeBuilder_ == null) { - if (deleteTime_ != null) { - deleteTime_ = - com.google.protobuf.Timestamp.newBuilder(deleteTime_).mergeFrom(value).buildPartial(); - } else { - deleteTime_ = value; - } - onChanged(); - } else { - deleteTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearDeleteTime() { - if (deleteTimeBuilder_ == null) { - deleteTime_ = null; - onChanged(); - } else { - deleteTime_ = null; - deleteTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { - - onChanged(); - return getDeleteTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { - if (deleteTimeBuilder_ != null) { - return deleteTimeBuilder_.getMessageOrBuilder(); - } else { - return deleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deleteTime_; - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getDeleteTimeFieldBuilder() { - if (deleteTimeBuilder_ == null) { - deleteTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getDeleteTime(), getParentForChildren(), isClean()); - deleteTime_ = null; - } - return deleteTimeBuilder_; - } - - private java.util.List rules_ = java.util.Collections.emptyList(); - - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.PolicyRule, - com.google.iam.v2.PolicyRule.Builder, - com.google.iam.v2.PolicyRuleOrBuilder> - rulesBuilder_; - - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public com.google.iam.v2.PolicyRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public Builder setRules(int index, com.google.iam.v2.PolicyRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public Builder setRules(int index, com.google.iam.v2.PolicyRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public Builder addRules(com.google.iam.v2.PolicyRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public Builder addRules(int index, com.google.iam.v2.PolicyRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public Builder addRules(com.google.iam.v2.PolicyRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public Builder addRules(int index, com.google.iam.v2.PolicyRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public Builder addAllRules(java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public com.google.iam.v2.PolicyRule.Builder getRulesBuilder(int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public com.google.iam.v2.PolicyRuleOrBuilder getRulesOrBuilder(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public java.util.List getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public com.google.iam.v2.PolicyRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder(com.google.iam.v2.PolicyRule.getDefaultInstance()); - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public com.google.iam.v2.PolicyRule.Builder addRulesBuilder(int index) { - return getRulesFieldBuilder() - .addBuilder(index, com.google.iam.v2.PolicyRule.getDefaultInstance()); - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - public java.util.List getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.PolicyRule, - com.google.iam.v2.PolicyRule.Builder, - com.google.iam.v2.PolicyRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.PolicyRule, - com.google.iam.v2.PolicyRule.Builder, - com.google.iam.v2.PolicyRuleOrBuilder>( - rules_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - rules_ = null; - } - return rulesBuilder_; - } - - private java.lang.Object managingAuthority_ = ""; - /** - * - * - *
-     * Immutable. Specifies that this policy is managed by an authority and can only be
-     * modified by that authority. Usage is restricted.
-     * 
- * - * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The managingAuthority. - */ - public java.lang.String getManagingAuthority() { - java.lang.Object ref = managingAuthority_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - managingAuthority_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. Specifies that this policy is managed by an authority and can only be
-     * modified by that authority. Usage is restricted.
-     * 
- * - * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for managingAuthority. - */ - public com.google.protobuf.ByteString getManagingAuthorityBytes() { - java.lang.Object ref = managingAuthority_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - managingAuthority_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. Specifies that this policy is managed by an authority and can only be
-     * modified by that authority. Usage is restricted.
-     * 
- * - * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The managingAuthority to set. - * @return This builder for chaining. - */ - public Builder setManagingAuthority(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - managingAuthority_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Specifies that this policy is managed by an authority and can only be
-     * modified by that authority. Usage is restricted.
-     * 
- * - * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearManagingAuthority() { - - managingAuthority_ = getDefaultInstance().getManagingAuthority(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Specifies that this policy is managed by an authority and can only be
-     * modified by that authority. Usage is restricted.
-     * 
- * - * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for managingAuthority to set. - * @return This builder for chaining. - */ - public Builder setManagingAuthorityBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - managingAuthority_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.Policy) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.Policy) - private static final com.google.iam.v2.Policy DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.Policy(); - } - - public static com.google.iam.v2.Policy getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Policy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.Policy getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java deleted file mode 100644 index b8aae544..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java +++ /dev/null @@ -1,698 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * Metadata for long-running `Policy` operations.
- * 
- * - * Protobuf type {@code google.iam.v2.PolicyOperationMetadata} - */ -public final class PolicyOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.PolicyOperationMetadata) - PolicyOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyOperationMetadata.newBuilder() to construct. - private PolicyOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PolicyOperationMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PolicyOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.PolicyOperationMetadata.class, - com.google.iam.v2.PolicyOperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.PolicyOperationMetadata)) { - return super.equals(obj); - } - com.google.iam.v2.PolicyOperationMetadata other = - (com.google.iam.v2.PolicyOperationMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.PolicyOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.PolicyOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Metadata for long-running `Policy` operations.
-   * 
- * - * Protobuf type {@code google.iam.v2.PolicyOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.PolicyOperationMetadata) - com.google.iam.v2.PolicyOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.PolicyOperationMetadata.class, - com.google.iam.v2.PolicyOperationMetadata.Builder.class); - } - - // Construct using com.google.iam.v2.PolicyOperationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.PolicyOperationMetadata getDefaultInstanceForType() { - return com.google.iam.v2.PolicyOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.PolicyOperationMetadata build() { - com.google.iam.v2.PolicyOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.PolicyOperationMetadata buildPartial() { - com.google.iam.v2.PolicyOperationMetadata result = - new com.google.iam.v2.PolicyOperationMetadata(this); - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.PolicyOperationMetadata) { - return mergeFrom((com.google.iam.v2.PolicyOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.PolicyOperationMetadata other) { - if (other == com.google.iam.v2.PolicyOperationMetadata.getDefaultInstance()) return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.PolicyOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.PolicyOperationMetadata) - private static final com.google.iam.v2.PolicyOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.PolicyOperationMetadata(); - } - - public static com.google.iam.v2.PolicyOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PolicyOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.PolicyOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadataOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadataOrBuilder.java deleted file mode 100644 index 902e8200..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadataOrBuilder.java +++ /dev/null @@ -1,60 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface PolicyOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.PolicyOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java deleted file mode 100644 index 84433497..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java +++ /dev/null @@ -1,439 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface PolicyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.Policy) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The resource name of the `Policy`, which must be unique. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, requests can use the alphanumeric or the numeric ID.
-   * Responses always contain the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The resource name of the `Policy`, which must be unique. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, requests can use the alphanumeric or the numeric ID.
-   * Responses always contain the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-   * `Policy` is created.
-   * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The uid. - */ - java.lang.String getUid(); - /** - * - * - *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-   * `Policy` is created.
-   * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for uid. - */ - com.google.protobuf.ByteString getUidBytes(); - - /** - * - * - *
-   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-   * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The kind. - */ - java.lang.String getKind(); - /** - * - * - *
-   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-   * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for kind. - */ - com.google.protobuf.ByteString getKindBytes(); - - /** - * - * - *
-   * A user-specified description of the `Policy`. This value can be up to 63
-   * characters.
-   * 
- * - * string display_name = 4; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * A user-specified description of the `Policy`. This value can be up to 63
-   * characters.
-   * 
- * - * string display_name = 4; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - int getAnnotationsCount(); - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - boolean containsAnnotations(java.lang.String key); - /** Use {@link #getAnnotationsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getAnnotations(); - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - java.util.Map getAnnotationsMap(); - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - - /* nullable */ - java.lang.String getAnnotationsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - java.lang.String getAnnotationsOrThrow(java.lang.String key); - - /** - * - * - *
-   * An opaque tag that identifies the current version of the `Policy`. IAM uses
-   * this value to help manage concurrent updates, so they do not cause one
-   * update to be overwritten by another.
-   * If this field is present in a [CreatePolicy][] request, the value is
-   * ignored.
-   * 
- * - * string etag = 6; - * - * @return The etag. - */ - java.lang.String getEtag(); - /** - * - * - *
-   * An opaque tag that identifies the current version of the `Policy`. IAM uses
-   * this value to help manage concurrent updates, so they do not cause one
-   * update to be overwritten by another.
-   * If this field is present in a [CreatePolicy][] request, the value is
-   * ignored.
-   * 
- * - * string etag = 6; - * - * @return The bytes for etag. - */ - com.google.protobuf.ByteString getEtagBytes(); - - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteTime field is set. - */ - boolean hasDeleteTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteTime. - */ - com.google.protobuf.Timestamp getDeleteTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); - - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - java.util.List getRulesList(); - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - com.google.iam.v2.PolicyRule getRules(int index); - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - int getRulesCount(); - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - java.util.List getRulesOrBuilderList(); - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2.PolicyRule rules = 10; - */ - com.google.iam.v2.PolicyRuleOrBuilder getRulesOrBuilder(int index); - - /** - * - * - *
-   * Immutable. Specifies that this policy is managed by an authority and can only be
-   * modified by that authority. Usage is restricted.
-   * 
- * - * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The managingAuthority. - */ - java.lang.String getManagingAuthority(); - /** - * - * - *
-   * Immutable. Specifies that this policy is managed by an authority and can only be
-   * modified by that authority. Usage is restricted.
-   * 
- * - * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for managingAuthority. - */ - com.google.protobuf.ByteString getManagingAuthorityBytes(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java deleted file mode 100644 index 9cbab033..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java +++ /dev/null @@ -1,256 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public final class PolicyProto { - private PolicyProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_Policy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_Policy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_Policy_AnnotationsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_Policy_AnnotationsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_PolicyRule_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_PolicyRule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_ListPoliciesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_ListPoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_ListPoliciesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_ListPoliciesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_GetPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_GetPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_CreatePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_CreatePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_UpdatePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_DeletePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\032google/iam/v2/policy.proto\022\rgoogle.iam" - + ".v2\032\034google/api/annotations.proto\032\027googl" - + "e/api/client.proto\032\037google/api/field_beh" - + "avior.proto\032\030google/iam/v2/deny.proto\032#g" - + "oogle/longrunning/operations.proto\032\037goog" - + "le/protobuf/timestamp.proto\"\302\003\n\006Policy\022\021" - + "\n\004name\030\001 \001(\tB\003\340A\005\022\020\n\003uid\030\002 \001(\tB\003\340A\005\022\021\n\004k" - + "ind\030\003 \001(\tB\003\340A\003\022\024\n\014display_name\030\004 \001(\t\022;\n\013" - + "annotations\030\005 \003(\0132&.google.iam.v2.Policy" - + ".AnnotationsEntry\022\014\n\004etag\030\006 \001(\t\0224\n\013creat" - + "e_time\030\007 \001(\0132\032.google.protobuf.Timestamp" - + "B\003\340A\003\0224\n\013update_time\030\010 \001(\0132\032.google.prot" - + "obuf.TimestampB\003\340A\003\0224\n\013delete_time\030\t \001(\013" - + "2\032.google.protobuf.TimestampB\003\340A\003\022(\n\005rul" - + "es\030\n \003(\0132\031.google.iam.v2.PolicyRule\022\037\n\022m" - + "anaging_authority\030\013 \001(\tB\003\340A\005\0322\n\020Annotati" - + "onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - + "\"W\n\nPolicyRule\022,\n\tdeny_rule\030\002 \001(\0132\027.goog" - + "le.iam.v2.DenyRuleH\000\022\023\n\013description\030\001 \001(" - + "\tB\006\n\004kind\"Q\n\023ListPoliciesRequest\022\023\n\006pare" - + "nt\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage" - + "_token\030\003 \001(\t\"X\n\024ListPoliciesResponse\022\'\n\010" - + "policies\030\001 \003(\0132\025.google.iam.v2.Policy\022\027\n" - + "\017next_page_token\030\002 \001(\t\"%\n\020GetPolicyReque" - + "st\022\021\n\004name\030\001 \001(\tB\003\340A\002\"i\n\023CreatePolicyReq" - + "uest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022*\n\006policy\030\002 \001(" - + "\0132\025.google.iam.v2.PolicyB\003\340A\002\022\021\n\tpolicy_" - + "id\030\003 \001(\t\"A\n\023UpdatePolicyRequest\022*\n\006polic" - + "y\030\001 \001(\0132\025.google.iam.v2.PolicyB\003\340A\002\";\n\023D" - + "eletePolicyRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\021\n" - + "\004etag\030\002 \001(\tB\003\340A\001\"J\n\027PolicyOperationMetad" - + "ata\022/\n\013create_time\030\001 \001(\0132\032.google.protob" - + "uf.Timestamp2\320\006\n\010Policies\022\203\001\n\014ListPolici" - + "es\022\".google.iam.v2.ListPoliciesRequest\032#" - + ".google.iam.v2.ListPoliciesResponse\"*\202\323\344" - + "\223\002\033\022\031/v2/{parent=policies/*/*}\332A\006parent\022" - + "m\n\tGetPolicy\022\037.google.iam.v2.GetPolicyRe" - + "quest\032\025.google.iam.v2.Policy\"(\202\323\344\223\002\033\022\031/v" - + "2/{name=policies/*/*/*}\332A\004name\022\272\001\n\014Creat" - + "ePolicy\022\".google.iam.v2.CreatePolicyRequ" - + "est\032\035.google.longrunning.Operation\"g\202\323\344\223" - + "\002#\"\031/v2/{parent=policies/*/*}:\006policy\332A\027" - + "parent,policy,policy_id\312A!\n\006Policy\022\027Poli" - + "cyOperationMetadata\022\247\001\n\014UpdatePolicy\022\".g" - + "oogle.iam.v2.UpdatePolicyRequest\032\035.googl" - + "e.longrunning.Operation\"T\202\323\344\223\002*\032 /v2/{po" - + "licy.name=policies/*/*/*}:\006policy\312A!\n\006Po" - + "licy\022\027PolicyOperationMetadata\022\237\001\n\014Delete" - + "Policy\022\".google.iam.v2.DeletePolicyReque" - + "st\032\035.google.longrunning.Operation\"L\202\323\344\223\002" - + "\033*\031/v2/{name=policies/*/*/*}\332A\004name\312A!\n\006" - + "Policy\022\027PolicyOperationMetadata\032F\312A\022iam." - + "googleapis.com\322A.https://www.googleapis." - + "com/auth/cloud-platformB\200\001\n\021com.google.i" - + "am.v2B\013PolicyProtoP\001Z0google.golang.org/" - + "genproto/googleapis/iam/v2;iam\252\002\023Google." - + "Cloud.Iam.V2\312\002\023Google\\Cloud\\Iam\\V2b\006prot" - + "o3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.iam.v2.DenyRuleProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_iam_v2_Policy_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_google_iam_v2_Policy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_Policy_descriptor, - new java.lang.String[] { - "Name", - "Uid", - "Kind", - "DisplayName", - "Annotations", - "Etag", - "CreateTime", - "UpdateTime", - "DeleteTime", - "Rules", - "ManagingAuthority", - }); - internal_static_google_iam_v2_Policy_AnnotationsEntry_descriptor = - internal_static_google_iam_v2_Policy_descriptor.getNestedTypes().get(0); - internal_static_google_iam_v2_Policy_AnnotationsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_Policy_AnnotationsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_iam_v2_PolicyRule_descriptor = getDescriptor().getMessageTypes().get(1); - internal_static_google_iam_v2_PolicyRule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_PolicyRule_descriptor, - new java.lang.String[] { - "DenyRule", "Description", "Kind", - }); - internal_static_google_iam_v2_ListPoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_iam_v2_ListPoliciesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_ListPoliciesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_iam_v2_ListPoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_iam_v2_ListPoliciesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_ListPoliciesResponse_descriptor, - new java.lang.String[] { - "Policies", "NextPageToken", - }); - internal_static_google_iam_v2_GetPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_iam_v2_GetPolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_GetPolicyRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_iam_v2_CreatePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_iam_v2_CreatePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_CreatePolicyRequest_descriptor, - new java.lang.String[] { - "Parent", "Policy", "PolicyId", - }); - internal_static_google_iam_v2_UpdatePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_iam_v2_UpdatePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_UpdatePolicyRequest_descriptor, - new java.lang.String[] { - "Policy", - }); - internal_static_google_iam_v2_DeletePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_DeletePolicyRequest_descriptor, - new java.lang.String[] { - "Name", "Etag", - }); - internal_static_google_iam_v2_PolicyOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_PolicyOperationMetadata_descriptor, - new java.lang.String[] { - "CreateTime", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.iam.v2.DenyRuleProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java deleted file mode 100644 index 032fa2bb..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java +++ /dev/null @@ -1,980 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * A single rule in a `Policy`.
- * 
- * - * Protobuf type {@code google.iam.v2.PolicyRule} - */ -public final class PolicyRule extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.PolicyRule) - PolicyRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRule.newBuilder() to construct. - private PolicyRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PolicyRule() { - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PolicyRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.PolicyRule.class, com.google.iam.v2.PolicyRule.Builder.class); - } - - private int kindCase_ = 0; - private java.lang.Object kind_; - - public enum KindCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DENY_RULE(2), - KIND_NOT_SET(0); - private final int value; - - private KindCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static KindCase valueOf(int value) { - return forNumber(value); - } - - public static KindCase forNumber(int value) { - switch (value) { - case 2: - return DENY_RULE; - case 0: - return KIND_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public KindCase getKindCase() { - return KindCase.forNumber(kindCase_); - } - - public static final int DENY_RULE_FIELD_NUMBER = 2; - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - * - * @return Whether the denyRule field is set. - */ - @java.lang.Override - public boolean hasDenyRule() { - return kindCase_ == 2; - } - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - * - * @return The denyRule. - */ - @java.lang.Override - public com.google.iam.v2.DenyRule getDenyRule() { - if (kindCase_ == 2) { - return (com.google.iam.v2.DenyRule) kind_; - } - return com.google.iam.v2.DenyRule.getDefaultInstance(); - } - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - */ - @java.lang.Override - public com.google.iam.v2.DenyRuleOrBuilder getDenyRuleOrBuilder() { - if (kindCase_ == 2) { - return (com.google.iam.v2.DenyRule) kind_; - } - return com.google.iam.v2.DenyRule.getDefaultInstance(); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object description_; - /** - * - * - *
-   * A user-specified description of the rule. This value can be up to 256
-   * characters.
-   * 
- * - * string description = 1; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * A user-specified description of the rule. This value can be up to 256
-   * characters.
-   * 
- * - * string description = 1; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); - } - if (kindCase_ == 2) { - output.writeMessage(2, (com.google.iam.v2.DenyRule) kind_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); - } - if (kindCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.iam.v2.DenyRule) kind_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.PolicyRule)) { - return super.equals(obj); - } - com.google.iam.v2.PolicyRule other = (com.google.iam.v2.PolicyRule) obj; - - if (!getDescription().equals(other.getDescription())) return false; - if (!getKindCase().equals(other.getKindCase())) return false; - switch (kindCase_) { - case 2: - if (!getDenyRule().equals(other.getDenyRule())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - switch (kindCase_) { - case 2: - hash = (37 * hash) + DENY_RULE_FIELD_NUMBER; - hash = (53 * hash) + getDenyRule().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.PolicyRule parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.PolicyRule parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.PolicyRule parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.PolicyRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.PolicyRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.PolicyRule parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.PolicyRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.PolicyRule parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.PolicyRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.PolicyRule parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.PolicyRule parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.PolicyRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.PolicyRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A single rule in a `Policy`.
-   * 
- * - * Protobuf type {@code google.iam.v2.PolicyRule} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.PolicyRule) - com.google.iam.v2.PolicyRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_PolicyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.PolicyRule.class, com.google.iam.v2.PolicyRule.Builder.class); - } - - // Construct using com.google.iam.v2.PolicyRule.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (denyRuleBuilder_ != null) { - denyRuleBuilder_.clear(); - } - description_ = ""; - - kindCase_ = 0; - kind_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.PolicyRule getDefaultInstanceForType() { - return com.google.iam.v2.PolicyRule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.PolicyRule build() { - com.google.iam.v2.PolicyRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.PolicyRule buildPartial() { - com.google.iam.v2.PolicyRule result = new com.google.iam.v2.PolicyRule(this); - if (kindCase_ == 2) { - if (denyRuleBuilder_ == null) { - result.kind_ = kind_; - } else { - result.kind_ = denyRuleBuilder_.build(); - } - } - result.description_ = description_; - result.kindCase_ = kindCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.PolicyRule) { - return mergeFrom((com.google.iam.v2.PolicyRule) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.PolicyRule other) { - if (other == com.google.iam.v2.PolicyRule.getDefaultInstance()) return this; - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - switch (other.getKindCase()) { - case DENY_RULE: - { - mergeDenyRule(other.getDenyRule()); - break; - } - case KIND_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getDenyRuleFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 2; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int kindCase_ = 0; - private java.lang.Object kind_; - - public KindCase getKindCase() { - return KindCase.forNumber(kindCase_); - } - - public Builder clearKind() { - kindCase_ = 0; - kind_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2.DenyRule, - com.google.iam.v2.DenyRule.Builder, - com.google.iam.v2.DenyRuleOrBuilder> - denyRuleBuilder_; - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - * - * @return Whether the denyRule field is set. - */ - @java.lang.Override - public boolean hasDenyRule() { - return kindCase_ == 2; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - * - * @return The denyRule. - */ - @java.lang.Override - public com.google.iam.v2.DenyRule getDenyRule() { - if (denyRuleBuilder_ == null) { - if (kindCase_ == 2) { - return (com.google.iam.v2.DenyRule) kind_; - } - return com.google.iam.v2.DenyRule.getDefaultInstance(); - } else { - if (kindCase_ == 2) { - return denyRuleBuilder_.getMessage(); - } - return com.google.iam.v2.DenyRule.getDefaultInstance(); - } - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - */ - public Builder setDenyRule(com.google.iam.v2.DenyRule value) { - if (denyRuleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kind_ = value; - onChanged(); - } else { - denyRuleBuilder_.setMessage(value); - } - kindCase_ = 2; - return this; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - */ - public Builder setDenyRule(com.google.iam.v2.DenyRule.Builder builderForValue) { - if (denyRuleBuilder_ == null) { - kind_ = builderForValue.build(); - onChanged(); - } else { - denyRuleBuilder_.setMessage(builderForValue.build()); - } - kindCase_ = 2; - return this; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - */ - public Builder mergeDenyRule(com.google.iam.v2.DenyRule value) { - if (denyRuleBuilder_ == null) { - if (kindCase_ == 2 && kind_ != com.google.iam.v2.DenyRule.getDefaultInstance()) { - kind_ = - com.google.iam.v2.DenyRule.newBuilder((com.google.iam.v2.DenyRule) kind_) - .mergeFrom(value) - .buildPartial(); - } else { - kind_ = value; - } - onChanged(); - } else { - if (kindCase_ == 2) { - denyRuleBuilder_.mergeFrom(value); - } else { - denyRuleBuilder_.setMessage(value); - } - } - kindCase_ = 2; - return this; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - */ - public Builder clearDenyRule() { - if (denyRuleBuilder_ == null) { - if (kindCase_ == 2) { - kindCase_ = 0; - kind_ = null; - onChanged(); - } - } else { - if (kindCase_ == 2) { - kindCase_ = 0; - kind_ = null; - } - denyRuleBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - */ - public com.google.iam.v2.DenyRule.Builder getDenyRuleBuilder() { - return getDenyRuleFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - */ - @java.lang.Override - public com.google.iam.v2.DenyRuleOrBuilder getDenyRuleOrBuilder() { - if ((kindCase_ == 2) && (denyRuleBuilder_ != null)) { - return denyRuleBuilder_.getMessageOrBuilder(); - } else { - if (kindCase_ == 2) { - return (com.google.iam.v2.DenyRule) kind_; - } - return com.google.iam.v2.DenyRule.getDefaultInstance(); - } - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2.DenyRule, - com.google.iam.v2.DenyRule.Builder, - com.google.iam.v2.DenyRuleOrBuilder> - getDenyRuleFieldBuilder() { - if (denyRuleBuilder_ == null) { - if (!(kindCase_ == 2)) { - kind_ = com.google.iam.v2.DenyRule.getDefaultInstance(); - } - denyRuleBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2.DenyRule, - com.google.iam.v2.DenyRule.Builder, - com.google.iam.v2.DenyRuleOrBuilder>( - (com.google.iam.v2.DenyRule) kind_, getParentForChildren(), isClean()); - kind_ = null; - } - kindCase_ = 2; - onChanged(); - ; - return denyRuleBuilder_; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.PolicyRule) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.PolicyRule) - private static final com.google.iam.v2.PolicyRule DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.PolicyRule(); - } - - public static com.google.iam.v2.PolicyRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PolicyRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.PolicyRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRuleOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRuleOrBuilder.java deleted file mode 100644 index 712ec072..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRuleOrBuilder.java +++ /dev/null @@ -1,89 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface PolicyRuleOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.PolicyRule) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - * - * @return Whether the denyRule field is set. - */ - boolean hasDenyRule(); - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - * - * @return The denyRule. - */ - com.google.iam.v2.DenyRule getDenyRule(); - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2.DenyRule deny_rule = 2; - */ - com.google.iam.v2.DenyRuleOrBuilder getDenyRuleOrBuilder(); - - /** - * - * - *
-   * A user-specified description of the rule. This value can be up to 256
-   * characters.
-   * 
- * - * string description = 1; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * A user-specified description of the rule. This value can be up to 256
-   * characters.
-   * 
- * - * string description = 1; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - public com.google.iam.v2.PolicyRule.KindCase getKindCase(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java deleted file mode 100644 index d7810fed..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java +++ /dev/null @@ -1,726 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * Request message for `UpdatePolicy`.
- * 
- * - * Protobuf type {@code google.iam.v2.UpdatePolicyRequest} - */ -public final class UpdatePolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.UpdatePolicyRequest) - UpdatePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdatePolicyRequest.newBuilder() to construct. - private UpdatePolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdatePolicyRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdatePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_UpdatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.UpdatePolicyRequest.class, - com.google.iam.v2.UpdatePolicyRequest.Builder.class); - } - - public static final int POLICY_FIELD_NUMBER = 1; - private com.google.iam.v2.Policy policy_; - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - @java.lang.Override - public com.google.iam.v2.Policy getPolicy() { - return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; - } - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (policy_ != null) { - output.writeMessage(1, getPolicy()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.UpdatePolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v2.UpdatePolicyRequest other = (com.google.iam.v2.UpdatePolicyRequest) obj; - - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy().equals(other.getPolicy())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.UpdatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2.UpdatePolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `UpdatePolicy`.
-   * 
- * - * Protobuf type {@code google.iam.v2.UpdatePolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.UpdatePolicyRequest) - com.google.iam.v2.UpdatePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_UpdatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.UpdatePolicyRequest.class, - com.google.iam.v2.UpdatePolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v2.UpdatePolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.UpdatePolicyRequest getDefaultInstanceForType() { - return com.google.iam.v2.UpdatePolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.UpdatePolicyRequest build() { - com.google.iam.v2.UpdatePolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.UpdatePolicyRequest buildPartial() { - com.google.iam.v2.UpdatePolicyRequest result = - new com.google.iam.v2.UpdatePolicyRequest(this); - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2.UpdatePolicyRequest) { - return mergeFrom((com.google.iam.v2.UpdatePolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.UpdatePolicyRequest other) { - if (other == com.google.iam.v2.UpdatePolicyRequest.getDefaultInstance()) return this; - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.iam.v2.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - public com.google.iam.v2.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v2.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v2.Policy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergePolicy(com.google.iam.v2.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = com.google.iam.v2.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v2.Policy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null ? com.google.iam.v2.Policy.getDefaultInstance() : policy_; - } - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder>(getPolicy(), getParentForChildren(), isClean()); - policy_ = null; - } - return policyBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.UpdatePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.UpdatePolicyRequest) - private static final com.google.iam.v2.UpdatePolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.UpdatePolicyRequest(); - } - - public static com.google.iam.v2.UpdatePolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdatePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.UpdatePolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequestOrBuilder.java deleted file mode 100644 index fa20ec03..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequestOrBuilder.java +++ /dev/null @@ -1,69 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface UpdatePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.UpdatePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - com.google.iam.v2.Policy getPolicy(); - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.iam.v2.PolicyOrBuilder getPolicyOrBuilder(); -} diff --git a/proto-google-iam-v2/src/main/proto/google/iam/v2/deny.proto b/proto-google-iam-v2/src/main/proto/google/iam/v2/deny.proto deleted file mode 100644 index db9f15f8..00000000 --- a/proto-google-iam-v2/src/main/proto/google/iam/v2/deny.proto +++ /dev/null @@ -1,109 +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. - -syntax = "proto3"; - -package google.iam.v2; - -import "google/type/expr.proto"; - -option csharp_namespace = "Google.Cloud.Iam.V2"; -option go_package = "google.golang.org/genproto/googleapis/iam/v2;iam"; -option java_multiple_files = true; -option java_outer_classname = "DenyRuleProto"; -option java_package = "com.google.iam.v2"; -option php_namespace = "Google\\Cloud\\Iam\\V2"; - -// A deny rule in an IAM deny policy. -message DenyRule { - // The identities that are prevented from using one or more permissions on - // Google Cloud resources. This field can contain the following values: - // - // * `principalSet://goog/public:all`: A special identifier that represents - // any principal that is on the internet, even if they do not have a Google - // Account or are not logged in. - // - // * `principal://goog/subject/{email_id}`: A specific Google Account. - // Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - // example, `principal://goog/subject/alice@example.com`. - // - // * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - // Google Account that was deleted recently. For example, - // `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - // the Google Account is recovered, this identifier reverts to the standard - // identifier for a Google Account. - // - // * `principalSet://goog/group/{group_id}`: A Google group. For example, - // `principalSet://goog/group/admins@example.com`. - // - // * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - // that was deleted recently. For example, - // `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - // the Google group is restored, this identifier reverts to the standard - // identifier for a Google group. - // - // * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - // A Google Cloud service account. For example, - // `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - // - // * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - // A Google Cloud service account that was deleted recently. For example, - // `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - // If the service account is undeleted, this identifier reverts to the - // standard identifier for a service account. - // - // * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - // principals associated with the specified Google Workspace or Cloud - // Identity customer ID. For example, - // `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - repeated string denied_principals = 1; - - // The identities that are excluded from the deny rule, even if they are - // listed in the `denied_principals`. For example, you could add a Google - // group to the `denied_principals`, then exclude specific users who belong to - // that group. - // - // This field can contain the same values as the `denied_principals` field, - // excluding `principalSet://goog/public:all`, which represents all users on - // the internet. - repeated string exception_principals = 2; - - // The permissions that are explicitly denied by this rule. Each permission - // uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - // is the fully qualified domain name for the service. For example, - // `iam.googleapis.com/roles.list`. - repeated string denied_permissions = 3; - - // Specifies the permissions that this rule excludes from the set of denied - // permissions given by `denied_permissions`. If a permission appears in - // `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - // denied. - // - // The excluded permissions can be specified using the same syntax as - // `denied_permissions`. - repeated string exception_permissions = 4; - - // The condition that determines whether this deny rule applies to a request. - // If the condition expression evaluates to `true`, then the deny rule is - // applied; otherwise, the deny rule is not applied. - // - // Each deny rule is evaluated independently. If this deny rule does not apply - // to a request, other deny rules might still apply. - // - // The condition can use CEL functions that evaluate - // [resource - // tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - // functions and operators are not supported. - google.type.Expr denial_condition = 5; -} diff --git a/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto b/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto deleted file mode 100644 index d8923d3b..00000000 --- a/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto +++ /dev/null @@ -1,287 +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. - -syntax = "proto3"; - -package google.iam.v2; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/iam/v2/deny.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Iam.V2"; -option go_package = "google.golang.org/genproto/googleapis/iam/v2;iam"; -option java_multiple_files = true; -option java_outer_classname = "PolicyProto"; -option java_package = "com.google.iam.v2"; -option php_namespace = "Google\\Cloud\\Iam\\V2"; - -// An interface for managing Identity and Access Management (IAM) policies. -service Policies { - option (google.api.default_host) = "iam.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Retrieves the policies of the specified kind that are attached to a - // resource. - // - // The response lists only policy metadata. In particular, policy rules are - // omitted. - rpc ListPolicies(ListPoliciesRequest) returns (ListPoliciesResponse) { - option (google.api.http) = { - get: "/v2/{parent=policies/*/*}" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a policy. - rpc GetPolicy(GetPolicyRequest) returns (Policy) { - option (google.api.http) = { - get: "/v2/{name=policies/*/*/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a policy. - rpc CreatePolicy(CreatePolicyRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=policies/*/*}" - body: "policy" - }; - option (google.api.method_signature) = "parent,policy,policy_id"; - option (google.longrunning.operation_info) = { - response_type: "Policy" - metadata_type: "PolicyOperationMetadata" - }; - } - - // Updates the specified policy. - // - // You can update only the rules and the display name for the policy. - // - // To update a policy, you should use a read-modify-write loop: - // - // 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. - // 2. Modify the policy as needed. - // 3. Use `UpdatePolicy` to write the updated policy. - // - // This pattern helps prevent conflicts between concurrent updates. - rpc UpdatePolicy(UpdatePolicyRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - put: "/v2/{policy.name=policies/*/*/*}" - body: "policy" - }; - option (google.longrunning.operation_info) = { - response_type: "Policy" - metadata_type: "PolicyOperationMetadata" - }; - } - - // Deletes a policy. This action is permanent. - rpc DeletePolicy(DeletePolicyRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v2/{name=policies/*/*/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "Policy" - metadata_type: "PolicyOperationMetadata" - }; - } -} - -// Data for an IAM policy. -message Policy { - // Immutable. The resource name of the `Policy`, which must be unique. Format: - // `policies/{attachment_point}/denypolicies/{policy_id}` - // - // - // The attachment point is identified by its URL-encoded full resource name, - // which means that the forward-slash character, `/`, must be written as - // `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, requests can use the alphanumeric or the numeric ID. - // Responses always contain the numeric ID. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - // `Policy` is created. - string uid = 2 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - string kind = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A user-specified description of the `Policy`. This value can be up to 63 - // characters. - string display_name = 4; - - // A key-value map to store arbitrary metadata for the `Policy`. Keys - // can be up to 63 characters. Values can be up to 255 characters. - map annotations = 5; - - // An opaque tag that identifies the current version of the `Policy`. IAM uses - // this value to help manage concurrent updates, so they do not cause one - // update to be overwritten by another. - // - // If this field is present in a [CreatePolicy][] request, the value is - // ignored. - string etag = 6; - - // Output only. The time when the `Policy` was created. - google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the `Policy` was last updated. - google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A list of rules that specify the behavior of the `Policy`. All of the rules - // should be of the `kind` specified in the `Policy`. - repeated PolicyRule rules = 10; - - // Immutable. Specifies that this policy is managed by an authority and can only be - // modified by that authority. Usage is restricted. - string managing_authority = 11 [(google.api.field_behavior) = IMMUTABLE]; -} - -// A single rule in a `Policy`. -message PolicyRule { - oneof kind { - // A rule for a deny policy. - DenyRule deny_rule = 2; - } - - // A user-specified description of the rule. This value can be up to 256 - // characters. - string description = 1; -} - -// Request message for `ListPolicies`. -message ListPoliciesRequest { - // Required. The resource that the policy is attached to, along with the kind of policy - // to list. Format: - // `policies/{attachment_point}/denypolicies` - // - // - // The attachment point is identified by its URL-encoded full resource name, - // which means that the forward-slash character, `/`, must be written as - // `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, you can use the alphanumeric or the numeric ID. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // The maximum number of policies to return. IAM ignores this value and uses - // the value 1000. - int32 page_size = 2; - - // A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to - // retrieve the next page. - string page_token = 3; -} - -// Response message for `ListPolicies`. -message ListPoliciesResponse { - // Metadata for the policies that are attached to the resource. - repeated Policy policies = 1; - - // A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the - // next page. If this field is omitted, there are no additional pages. - string next_page_token = 2; -} - -// Request message for `GetPolicy`. -message GetPolicyRequest { - // Required. The resource name of the policy to retrieve. Format: - // `policies/{attachment_point}/denypolicies/{policy_id}` - // - // - // Use the URL-encoded full resource name, which means that the forward-slash - // character, `/`, must be written as `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, you can use the alphanumeric or the numeric ID. - string name = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `CreatePolicy`. -message CreatePolicyRequest { - // Required. The resource that the policy is attached to, along with the kind of policy - // to create. Format: `policies/{attachment_point}/denypolicies` - // - // - // The attachment point is identified by its URL-encoded full resource name, - // which means that the forward-slash character, `/`, must be written as - // `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, you can use the alphanumeric or the numeric ID. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The policy to create. - Policy policy = 2 [(google.api.field_behavior) = REQUIRED]; - - // The ID to use for this policy, which will become the final component of - // the policy's resource name. The ID must contain 3 to 63 characters. It can - // contain lowercase letters and numbers, as well as dashes (`-`) and periods - // (`.`). The first character must be a lowercase letter. - string policy_id = 3; -} - -// Request message for `UpdatePolicy`. -message UpdatePolicyRequest { - // Required. The policy to update. - // - // To prevent conflicting updates, the `etag` value must match the value that - // is stored in IAM. If the `etag` values do not match, the request fails with - // a `409` error code and `ABORTED` status. - Policy policy = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `DeletePolicy`. -message DeletePolicyRequest { - // Required. The resource name of the policy to delete. Format: - // `policies/{attachment_point}/denypolicies/{policy_id}` - // - // - // Use the URL-encoded full resource name, which means that the forward-slash - // character, `/`, must be written as `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, you can use the alphanumeric or the numeric ID. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The expected `etag` of the policy to delete. If the value does not match - // the value that is stored in IAM, the request fails with a `409` error code - // and `ABORTED` status. - // - // If you omit this field, the policy is deleted regardless of its current - // `etag`. - string etag = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Metadata for long-running `Policy` operations. -message PolicyOperationMetadata { - // Timestamp when the `google.longrunning.Operation` was created. - google.protobuf.Timestamp create_time = 1; -} diff --git a/proto-google-iam-v2beta/clirr-ignored-differences.xml b/proto-google-iam-v2beta/clirr-ignored-differences.xml deleted file mode 100644 index 136c027b..00000000 --- a/proto-google-iam-v2beta/clirr-ignored-differences.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - 7012 - com/google/iam/v2beta/*OrBuilder - * get*(*) - - - 7012 - com/google/iam/v2beta/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/iam/v2beta/*OrBuilder - boolean has*(*) - - diff --git a/proto-google-iam-v2beta/pom.xml b/proto-google-iam-v2beta/pom.xml deleted file mode 100644 index 6b130444..00000000 --- a/proto-google-iam-v2beta/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-iam-v2beta - 1.6.24-SNAPSHOT - proto-google-iam-v2beta - Proto library for proto-google-iam-v1 - - com.google.cloud - google-iam-parent - 1.6.24-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java deleted file mode 100644 index 4c91193e..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java +++ /dev/null @@ -1,1121 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * Request message for `CreatePolicy`.
- * 
- * - * Protobuf type {@code google.iam.v2beta.CreatePolicyRequest} - */ -public final class CreatePolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.CreatePolicyRequest) - CreatePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreatePolicyRequest.newBuilder() to construct. - private CreatePolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreatePolicyRequest() { - parent_ = ""; - policyId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreatePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_CreatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.CreatePolicyRequest.class, - com.google.iam.v2beta.CreatePolicyRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to create. Format: `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to create. Format: `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int POLICY_FIELD_NUMBER = 2; - private com.google.iam.v2beta.Policy policy_; - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - @java.lang.Override - public com.google.iam.v2beta.Policy getPolicy() { - return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; - } - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - public static final int POLICY_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object policyId_; - /** - * - * - *
-   * The ID to use for this policy, which will become the final component of
-   * the policy's resource name. The ID must contain 3 to 63 characters. It can
-   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-   * (`.`). The first character must be a lowercase letter.
-   * 
- * - * string policy_id = 3; - * - * @return The policyId. - */ - @java.lang.Override - public java.lang.String getPolicyId() { - java.lang.Object ref = policyId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - policyId_ = s; - return s; - } - } - /** - * - * - *
-   * The ID to use for this policy, which will become the final component of
-   * the policy's resource name. The ID must contain 3 to 63 characters. It can
-   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-   * (`.`). The first character must be a lowercase letter.
-   * 
- * - * string policy_id = 3; - * - * @return The bytes for policyId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPolicyIdBytes() { - java.lang.Object ref = policyId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - policyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (policy_ != null) { - output.writeMessage(2, getPolicy()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, policyId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicy()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, policyId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.CreatePolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v2beta.CreatePolicyRequest other = - (com.google.iam.v2beta.CreatePolicyRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy().equals(other.getPolicy())) return false; - } - if (!getPolicyId().equals(other.getPolicyId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - hash = (37 * hash) + POLICY_ID_FIELD_NUMBER; - hash = (53 * hash) + getPolicyId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.CreatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.CreatePolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `CreatePolicy`.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.CreatePolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.CreatePolicyRequest) - com.google.iam.v2beta.CreatePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_CreatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.CreatePolicyRequest.class, - com.google.iam.v2beta.CreatePolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v2beta.CreatePolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - policyId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.CreatePolicyRequest getDefaultInstanceForType() { - return com.google.iam.v2beta.CreatePolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.CreatePolicyRequest build() { - com.google.iam.v2beta.CreatePolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.CreatePolicyRequest buildPartial() { - com.google.iam.v2beta.CreatePolicyRequest result = - new com.google.iam.v2beta.CreatePolicyRequest(this); - result.parent_ = parent_; - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.build(); - } - result.policyId_ = policyId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.CreatePolicyRequest) { - return mergeFrom((com.google.iam.v2beta.CreatePolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.CreatePolicyRequest other) { - if (other == com.google.iam.v2beta.CreatePolicyRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - if (!other.getPolicyId().isEmpty()) { - policyId_ = other.policyId_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - policyId_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to create. Format: `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.iam.v2beta.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2beta.Policy, - com.google.iam.v2beta.Policy.Builder, - com.google.iam.v2beta.PolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - public com.google.iam.v2beta.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v2beta.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v2beta.Policy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergePolicy(com.google.iam.v2beta.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.iam.v2beta.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v2beta.Policy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; - } - } - /** - * - * - *
-     * Required. The policy to create.
-     * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2beta.Policy, - com.google.iam.v2beta.Policy.Builder, - com.google.iam.v2beta.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2beta.Policy, - com.google.iam.v2beta.Policy.Builder, - com.google.iam.v2beta.PolicyOrBuilder>( - getPolicy(), getParentForChildren(), isClean()); - policy_ = null; - } - return policyBuilder_; - } - - private java.lang.Object policyId_ = ""; - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @return The policyId. - */ - public java.lang.String getPolicyId() { - java.lang.Object ref = policyId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - policyId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @return The bytes for policyId. - */ - public com.google.protobuf.ByteString getPolicyIdBytes() { - java.lang.Object ref = policyId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - policyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @param value The policyId to set. - * @return This builder for chaining. - */ - public Builder setPolicyId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - policyId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @return This builder for chaining. - */ - public Builder clearPolicyId() { - - policyId_ = getDefaultInstance().getPolicyId(); - onChanged(); - return this; - } - /** - * - * - *
-     * The ID to use for this policy, which will become the final component of
-     * the policy's resource name. The ID must contain 3 to 63 characters. It can
-     * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-     * (`.`). The first character must be a lowercase letter.
-     * 
- * - * string policy_id = 3; - * - * @param value The bytes for policyId to set. - * @return This builder for chaining. - */ - public Builder setPolicyIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - policyId_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.CreatePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.CreatePolicyRequest) - private static final com.google.iam.v2beta.CreatePolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.CreatePolicyRequest(); - } - - public static com.google.iam.v2beta.CreatePolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreatePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.CreatePolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequestOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequestOrBuilder.java deleted file mode 100644 index 24c4fc2f..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequestOrBuilder.java +++ /dev/null @@ -1,130 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public interface CreatePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.CreatePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to create. Format: `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to create. Format: `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - com.google.iam.v2beta.Policy getPolicy(); - /** - * - * - *
-   * Required. The policy to create.
-   * 
- * - * .google.iam.v2beta.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder(); - - /** - * - * - *
-   * The ID to use for this policy, which will become the final component of
-   * the policy's resource name. The ID must contain 3 to 63 characters. It can
-   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-   * (`.`). The first character must be a lowercase letter.
-   * 
- * - * string policy_id = 3; - * - * @return The policyId. - */ - java.lang.String getPolicyId(); - /** - * - * - *
-   * The ID to use for this policy, which will become the final component of
-   * the policy's resource name. The ID must contain 3 to 63 characters. It can
-   * contain lowercase letters and numbers, as well as dashes (`-`) and periods
-   * (`.`). The first character must be a lowercase letter.
-   * 
- * - * string policy_id = 3; - * - * @return The bytes for policyId. - */ - com.google.protobuf.ByteString getPolicyIdBytes(); -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java deleted file mode 100644 index 255a71ec..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java +++ /dev/null @@ -1,862 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * Request message for `DeletePolicy`.
- * 
- * - * Protobuf type {@code google.iam.v2beta.DeletePolicyRequest} - */ -public final class DeletePolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.DeletePolicyRequest) - DeletePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeletePolicyRequest.newBuilder() to construct. - private DeletePolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeletePolicyRequest() { - name_ = ""; - etag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeletePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_DeletePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.DeletePolicyRequest.class, - com.google.iam.v2beta.DeletePolicyRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the policy to delete. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the policy to delete. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ETAG_FIELD_NUMBER = 2; - private volatile java.lang.Object etag_; - /** - * - * - *
-   * Optional. The expected `etag` of the policy to delete. If the value does not match
-   * the value that is stored in IAM, the request fails with a `409` error code
-   * and `ABORTED` status.
-   * If you omit this field, the policy is deleted regardless of its current
-   * `etag`.
-   * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The expected `etag` of the policy to delete. If the value does not match
-   * the value that is stored in IAM, the request fails with a `409` error code
-   * and `ABORTED` status.
-   * If you omit this field, the policy is deleted regardless of its current
-   * `etag`.
-   * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.DeletePolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v2beta.DeletePolicyRequest other = - (com.google.iam.v2beta.DeletePolicyRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getEtag().equals(other.getEtag())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.DeletePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.DeletePolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `DeletePolicy`.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.DeletePolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.DeletePolicyRequest) - com.google.iam.v2beta.DeletePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_DeletePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.DeletePolicyRequest.class, - com.google.iam.v2beta.DeletePolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v2beta.DeletePolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - etag_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.DeletePolicyRequest getDefaultInstanceForType() { - return com.google.iam.v2beta.DeletePolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.DeletePolicyRequest build() { - com.google.iam.v2beta.DeletePolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.DeletePolicyRequest buildPartial() { - com.google.iam.v2beta.DeletePolicyRequest result = - new com.google.iam.v2beta.DeletePolicyRequest(this); - result.name_ = name_; - result.etag_ = etag_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.DeletePolicyRequest) { - return mergeFrom((com.google.iam.v2beta.DeletePolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.DeletePolicyRequest other) { - if (other == com.google.iam.v2beta.DeletePolicyRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - etag_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the policy to delete. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object etag_ = ""; - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - etag_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - - etag_ = getDefaultInstance().getEtag(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The expected `etag` of the policy to delete. If the value does not match
-     * the value that is stored in IAM, the request fails with a `409` error code
-     * and `ABORTED` status.
-     * If you omit this field, the policy is deleted regardless of its current
-     * `etag`.
-     * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for etag to set. - * @return This builder for chaining. - */ - public Builder setEtagBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - etag_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.DeletePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.DeletePolicyRequest) - private static final com.google.iam.v2beta.DeletePolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.DeletePolicyRequest(); - } - - public static com.google.iam.v2beta.DeletePolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeletePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.DeletePolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequestOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequestOrBuilder.java deleted file mode 100644 index 1b195298..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequestOrBuilder.java +++ /dev/null @@ -1,95 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public interface DeletePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.DeletePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the policy to delete. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of the policy to delete. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. The expected `etag` of the policy to delete. If the value does not match
-   * the value that is stored in IAM, the request fails with a `409` error code
-   * and `ABORTED` status.
-   * If you omit this field, the policy is deleted regardless of its current
-   * `etag`.
-   * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - java.lang.String getEtag(); - /** - * - * - *
-   * Optional. The expected `etag` of the policy to delete. If the value does not match
-   * the value that is stored in IAM, the request fails with a `409` error code
-   * and `ABORTED` status.
-   * If you omit this field, the policy is deleted regardless of its current
-   * `etag`.
-   * 
- * - * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - com.google.protobuf.ByteString getEtagBytes(); -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java deleted file mode 100644 index b776f7b1..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java +++ /dev/null @@ -1,2453 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/deny.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * A deny rule in an IAM deny policy.
- * 
- * - * Protobuf type {@code google.iam.v2beta.DenyRule} - */ -public final class DenyRule extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.DenyRule) - DenyRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use DenyRule.newBuilder() to construct. - private DenyRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DenyRule() { - deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - deniedPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DenyRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.DenyRuleProto - .internal_static_google_iam_v2beta_DenyRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.DenyRuleProto - .internal_static_google_iam_v2beta_DenyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.DenyRule.class, com.google.iam.v2beta.DenyRule.Builder.class); - } - - public static final int DENIED_PRINCIPALS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList deniedPrincipals_; - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @return A list containing the deniedPrincipals. - */ - public com.google.protobuf.ProtocolStringList getDeniedPrincipalsList() { - return deniedPrincipals_; - } - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @return The count of deniedPrincipals. - */ - public int getDeniedPrincipalsCount() { - return deniedPrincipals_.size(); - } - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the element to return. - * @return The deniedPrincipals at the given index. - */ - public java.lang.String getDeniedPrincipals(int index) { - return deniedPrincipals_.get(index); - } - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPrincipals at the given index. - */ - public com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index) { - return deniedPrincipals_.getByteString(index); - } - - public static final int EXCEPTION_PRINCIPALS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList exceptionPrincipals_; - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @return A list containing the exceptionPrincipals. - */ - public com.google.protobuf.ProtocolStringList getExceptionPrincipalsList() { - return exceptionPrincipals_; - } - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @return The count of exceptionPrincipals. - */ - public int getExceptionPrincipalsCount() { - return exceptionPrincipals_.size(); - } - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the element to return. - * @return The exceptionPrincipals at the given index. - */ - public java.lang.String getExceptionPrincipals(int index) { - return exceptionPrincipals_.get(index); - } - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPrincipals at the given index. - */ - public com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index) { - return exceptionPrincipals_.getByteString(index); - } - - public static final int DENIED_PERMISSIONS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList deniedPermissions_; - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @return A list containing the deniedPermissions. - */ - public com.google.protobuf.ProtocolStringList getDeniedPermissionsList() { - return deniedPermissions_; - } - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @return The count of deniedPermissions. - */ - public int getDeniedPermissionsCount() { - return deniedPermissions_.size(); - } - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the element to return. - * @return The deniedPermissions at the given index. - */ - public java.lang.String getDeniedPermissions(int index) { - return deniedPermissions_.get(index); - } - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPermissions at the given index. - */ - public com.google.protobuf.ByteString getDeniedPermissionsBytes(int index) { - return deniedPermissions_.getByteString(index); - } - - public static final int EXCEPTION_PERMISSIONS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList exceptionPermissions_; - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @return A list containing the exceptionPermissions. - */ - public com.google.protobuf.ProtocolStringList getExceptionPermissionsList() { - return exceptionPermissions_; - } - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @return The count of exceptionPermissions. - */ - public int getExceptionPermissionsCount() { - return exceptionPermissions_.size(); - } - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the element to return. - * @return The exceptionPermissions at the given index. - */ - public java.lang.String getExceptionPermissions(int index) { - return exceptionPermissions_.get(index); - } - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPermissions at the given index. - */ - public com.google.protobuf.ByteString getExceptionPermissionsBytes(int index) { - return exceptionPermissions_.getByteString(index); - } - - public static final int DENIAL_CONDITION_FIELD_NUMBER = 5; - private com.google.type.Expr denialCondition_; - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return Whether the denialCondition field is set. - */ - @java.lang.Override - public boolean hasDenialCondition() { - return denialCondition_ != null; - } - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return The denialCondition. - */ - @java.lang.Override - public com.google.type.Expr getDenialCondition() { - return denialCondition_ == null ? com.google.type.Expr.getDefaultInstance() : denialCondition_; - } - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - */ - @java.lang.Override - public com.google.type.ExprOrBuilder getDenialConditionOrBuilder() { - return getDenialCondition(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < deniedPrincipals_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deniedPrincipals_.getRaw(i)); - } - for (int i = 0; i < exceptionPrincipals_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, exceptionPrincipals_.getRaw(i)); - } - for (int i = 0; i < deniedPermissions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deniedPermissions_.getRaw(i)); - } - for (int i = 0; i < exceptionPermissions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 4, exceptionPermissions_.getRaw(i)); - } - if (denialCondition_ != null) { - output.writeMessage(5, getDenialCondition()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < deniedPrincipals_.size(); i++) { - dataSize += computeStringSizeNoTag(deniedPrincipals_.getRaw(i)); - } - size += dataSize; - size += 1 * getDeniedPrincipalsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < exceptionPrincipals_.size(); i++) { - dataSize += computeStringSizeNoTag(exceptionPrincipals_.getRaw(i)); - } - size += dataSize; - size += 1 * getExceptionPrincipalsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < deniedPermissions_.size(); i++) { - dataSize += computeStringSizeNoTag(deniedPermissions_.getRaw(i)); - } - size += dataSize; - size += 1 * getDeniedPermissionsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < exceptionPermissions_.size(); i++) { - dataSize += computeStringSizeNoTag(exceptionPermissions_.getRaw(i)); - } - size += dataSize; - size += 1 * getExceptionPermissionsList().size(); - } - if (denialCondition_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDenialCondition()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.DenyRule)) { - return super.equals(obj); - } - com.google.iam.v2beta.DenyRule other = (com.google.iam.v2beta.DenyRule) obj; - - if (!getDeniedPrincipalsList().equals(other.getDeniedPrincipalsList())) return false; - if (!getExceptionPrincipalsList().equals(other.getExceptionPrincipalsList())) return false; - if (!getDeniedPermissionsList().equals(other.getDeniedPermissionsList())) return false; - if (!getExceptionPermissionsList().equals(other.getExceptionPermissionsList())) return false; - if (hasDenialCondition() != other.hasDenialCondition()) return false; - if (hasDenialCondition()) { - if (!getDenialCondition().equals(other.getDenialCondition())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDeniedPrincipalsCount() > 0) { - hash = (37 * hash) + DENIED_PRINCIPALS_FIELD_NUMBER; - hash = (53 * hash) + getDeniedPrincipalsList().hashCode(); - } - if (getExceptionPrincipalsCount() > 0) { - hash = (37 * hash) + EXCEPTION_PRINCIPALS_FIELD_NUMBER; - hash = (53 * hash) + getExceptionPrincipalsList().hashCode(); - } - if (getDeniedPermissionsCount() > 0) { - hash = (37 * hash) + DENIED_PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + getDeniedPermissionsList().hashCode(); - } - if (getExceptionPermissionsCount() > 0) { - hash = (37 * hash) + EXCEPTION_PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + getExceptionPermissionsList().hashCode(); - } - if (hasDenialCondition()) { - hash = (37 * hash) + DENIAL_CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getDenialCondition().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.DenyRule parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.DenyRule parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.DenyRule parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.DenyRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.DenyRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.DenyRule parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.DenyRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.DenyRule parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.DenyRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.DenyRule parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.DenyRule parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.DenyRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.DenyRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A deny rule in an IAM deny policy.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.DenyRule} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.DenyRule) - com.google.iam.v2beta.DenyRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.DenyRuleProto - .internal_static_google_iam_v2beta_DenyRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.DenyRuleProto - .internal_static_google_iam_v2beta_DenyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.DenyRule.class, com.google.iam.v2beta.DenyRule.Builder.class); - } - - // Construct using com.google.iam.v2beta.DenyRule.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - deniedPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - if (denialConditionBuilder_ == null) { - denialCondition_ = null; - } else { - denialCondition_ = null; - denialConditionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.DenyRuleProto - .internal_static_google_iam_v2beta_DenyRule_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.DenyRule getDefaultInstanceForType() { - return com.google.iam.v2beta.DenyRule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.DenyRule build() { - com.google.iam.v2beta.DenyRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.DenyRule buildPartial() { - com.google.iam.v2beta.DenyRule result = new com.google.iam.v2beta.DenyRule(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - deniedPrincipals_ = deniedPrincipals_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deniedPrincipals_ = deniedPrincipals_; - if (((bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = exceptionPrincipals_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.exceptionPrincipals_ = exceptionPrincipals_; - if (((bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = deniedPermissions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.deniedPermissions_ = deniedPermissions_; - if (((bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = exceptionPermissions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.exceptionPermissions_ = exceptionPermissions_; - if (denialConditionBuilder_ == null) { - result.denialCondition_ = denialCondition_; - } else { - result.denialCondition_ = denialConditionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.DenyRule) { - return mergeFrom((com.google.iam.v2beta.DenyRule) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.DenyRule other) { - if (other == com.google.iam.v2beta.DenyRule.getDefaultInstance()) return this; - if (!other.deniedPrincipals_.isEmpty()) { - if (deniedPrincipals_.isEmpty()) { - deniedPrincipals_ = other.deniedPrincipals_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.addAll(other.deniedPrincipals_); - } - onChanged(); - } - if (!other.exceptionPrincipals_.isEmpty()) { - if (exceptionPrincipals_.isEmpty()) { - exceptionPrincipals_ = other.exceptionPrincipals_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.addAll(other.exceptionPrincipals_); - } - onChanged(); - } - if (!other.deniedPermissions_.isEmpty()) { - if (deniedPermissions_.isEmpty()) { - deniedPermissions_ = other.deniedPermissions_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.addAll(other.deniedPermissions_); - } - onChanged(); - } - if (!other.exceptionPermissions_.isEmpty()) { - if (exceptionPermissions_.isEmpty()) { - exceptionPermissions_ = other.exceptionPermissions_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.addAll(other.exceptionPermissions_); - } - onChanged(); - } - if (other.hasDenialCondition()) { - mergeDenialCondition(other.getDenialCondition()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.add(s); - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.add(s); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.add(s); - break; - } // case 26 - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.add(s); - break; - } // case 34 - case 42: - { - input.readMessage(getDenialConditionFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList deniedPrincipals_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureDeniedPrincipalsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deniedPrincipals_ = new com.google.protobuf.LazyStringArrayList(deniedPrincipals_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @return A list containing the deniedPrincipals. - */ - public com.google.protobuf.ProtocolStringList getDeniedPrincipalsList() { - return deniedPrincipals_.getUnmodifiableView(); - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @return The count of deniedPrincipals. - */ - public int getDeniedPrincipalsCount() { - return deniedPrincipals_.size(); - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the element to return. - * @return The deniedPrincipals at the given index. - */ - public java.lang.String getDeniedPrincipals(int index) { - return deniedPrincipals_.get(index); - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPrincipals at the given index. - */ - public com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index) { - return deniedPrincipals_.getByteString(index); - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param index The index to set the value at. - * @param value The deniedPrincipals to set. - * @return This builder for chaining. - */ - public Builder setDeniedPrincipals(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param value The deniedPrincipals to add. - * @return This builder for chaining. - */ - public Builder addDeniedPrincipals(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param values The deniedPrincipals to add. - * @return This builder for chaining. - */ - public Builder addAllDeniedPrincipals(java.lang.Iterable values) { - ensureDeniedPrincipalsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deniedPrincipals_); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @return This builder for chaining. - */ - public Builder clearDeniedPrincipals() { - deniedPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are prevented from using one or more permissions on
-     * Google Cloud resources. This field can contain the following values:
-     * * `principalSet://goog/public:all`: A special identifier that represents
-     *   any principal that is on the internet, even if they do not have a Google
-     *   Account or are not logged in.
-     * * `principal://goog/subject/{email_id}`: A specific Google Account.
-     *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-     *   example, `principal://goog/subject/alice@example.com`.
-     * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-     *   Google Account that was deleted recently. For example,
-     *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-     *   the Google Account is recovered, this identifier reverts to the standard
-     *   identifier for a Google Account.
-     * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-     *   `principalSet://goog/group/admins@example.com`.
-     * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-     *   that was deleted recently. For example,
-     *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-     *   the Google group is restored, this identifier reverts to the standard
-     *   identifier for a Google group.
-     * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-     *   A Google Cloud service account. For example,
-     *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-     * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-     *   A Google Cloud service account that was deleted recently. For example,
-     *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-     *   If the service account is undeleted, this identifier reverts to the
-     *   standard identifier for a service account.
-     * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-     *   principals associated with the specified Google Workspace or Cloud
-     *   Identity customer ID. For example,
-     *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-     * 
- * - * repeated string denied_principals = 1; - * - * @param value The bytes of the deniedPrincipals to add. - * @return This builder for chaining. - */ - public Builder addDeniedPrincipalsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDeniedPrincipalsIsMutable(); - deniedPrincipals_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList exceptionPrincipals_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureExceptionPrincipalsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = new com.google.protobuf.LazyStringArrayList(exceptionPrincipals_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @return A list containing the exceptionPrincipals. - */ - public com.google.protobuf.ProtocolStringList getExceptionPrincipalsList() { - return exceptionPrincipals_.getUnmodifiableView(); - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @return The count of exceptionPrincipals. - */ - public int getExceptionPrincipalsCount() { - return exceptionPrincipals_.size(); - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the element to return. - * @return The exceptionPrincipals at the given index. - */ - public java.lang.String getExceptionPrincipals(int index) { - return exceptionPrincipals_.get(index); - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPrincipals at the given index. - */ - public com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index) { - return exceptionPrincipals_.getByteString(index); - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param index The index to set the value at. - * @param value The exceptionPrincipals to set. - * @return This builder for chaining. - */ - public Builder setExceptionPrincipals(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param value The exceptionPrincipals to add. - * @return This builder for chaining. - */ - public Builder addExceptionPrincipals(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param values The exceptionPrincipals to add. - * @return This builder for chaining. - */ - public Builder addAllExceptionPrincipals(java.lang.Iterable values) { - ensureExceptionPrincipalsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exceptionPrincipals_); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @return This builder for chaining. - */ - public Builder clearExceptionPrincipals() { - exceptionPrincipals_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * The identities that are excluded from the deny rule, even if they are
-     * listed in the `denied_principals`. For example, you could add a Google
-     * group to the `denied_principals`, then exclude specific users who belong to
-     * that group.
-     * This field can contain the same values as the `denied_principals` field,
-     * excluding `principalSet://goog/public:all`, which represents all users on
-     * the internet.
-     * 
- * - * repeated string exception_principals = 2; - * - * @param value The bytes of the exceptionPrincipals to add. - * @return This builder for chaining. - */ - public Builder addExceptionPrincipalsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureExceptionPrincipalsIsMutable(); - exceptionPrincipals_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList deniedPermissions_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureDeniedPermissionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = new com.google.protobuf.LazyStringArrayList(deniedPermissions_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @return A list containing the deniedPermissions. - */ - public com.google.protobuf.ProtocolStringList getDeniedPermissionsList() { - return deniedPermissions_.getUnmodifiableView(); - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @return The count of deniedPermissions. - */ - public int getDeniedPermissionsCount() { - return deniedPermissions_.size(); - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the element to return. - * @return The deniedPermissions at the given index. - */ - public java.lang.String getDeniedPermissions(int index) { - return deniedPermissions_.get(index); - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPermissions at the given index. - */ - public com.google.protobuf.ByteString getDeniedPermissionsBytes(int index) { - return deniedPermissions_.getByteString(index); - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index to set the value at. - * @param value The deniedPermissions to set. - * @return This builder for chaining. - */ - public Builder setDeniedPermissions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param value The deniedPermissions to add. - * @return This builder for chaining. - */ - public Builder addDeniedPermissions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param values The deniedPermissions to add. - * @return This builder for chaining. - */ - public Builder addAllDeniedPermissions(java.lang.Iterable values) { - ensureDeniedPermissionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deniedPermissions_); - onChanged(); - return this; - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @return This builder for chaining. - */ - public Builder clearDeniedPermissions() { - deniedPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * The permissions that are explicitly denied by this rule. Each permission
-     * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-     * is the fully qualified domain name for the service. For example,
-     * `iam.googleapis.com/roles.list`.
-     * 
- * - * repeated string denied_permissions = 3; - * - * @param value The bytes of the deniedPermissions to add. - * @return This builder for chaining. - */ - public Builder addDeniedPermissionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDeniedPermissionsIsMutable(); - deniedPermissions_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList exceptionPermissions_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureExceptionPermissionsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = new com.google.protobuf.LazyStringArrayList(exceptionPermissions_); - bitField0_ |= 0x00000008; - } - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @return A list containing the exceptionPermissions. - */ - public com.google.protobuf.ProtocolStringList getExceptionPermissionsList() { - return exceptionPermissions_.getUnmodifiableView(); - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @return The count of exceptionPermissions. - */ - public int getExceptionPermissionsCount() { - return exceptionPermissions_.size(); - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the element to return. - * @return The exceptionPermissions at the given index. - */ - public java.lang.String getExceptionPermissions(int index) { - return exceptionPermissions_.get(index); - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPermissions at the given index. - */ - public com.google.protobuf.ByteString getExceptionPermissionsBytes(int index) { - return exceptionPermissions_.getByteString(index); - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index to set the value at. - * @param value The exceptionPermissions to set. - * @return This builder for chaining. - */ - public Builder setExceptionPermissions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param value The exceptionPermissions to add. - * @return This builder for chaining. - */ - public Builder addExceptionPermissions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param values The exceptionPermissions to add. - * @return This builder for chaining. - */ - public Builder addAllExceptionPermissions(java.lang.Iterable values) { - ensureExceptionPermissionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exceptionPermissions_); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @return This builder for chaining. - */ - public Builder clearExceptionPermissions() { - exceptionPermissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the permissions that this rule excludes from the set of denied
-     * permissions given by `denied_permissions`. If a permission appears in
-     * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-     * denied.
-     * The excluded permissions can be specified using the same syntax as
-     * `denied_permissions`.
-     * 
- * - * repeated string exception_permissions = 4; - * - * @param value The bytes of the exceptionPermissions to add. - * @return This builder for chaining. - */ - public Builder addExceptionPermissionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureExceptionPermissionsIsMutable(); - exceptionPermissions_.add(value); - onChanged(); - return this; - } - - private com.google.type.Expr denialCondition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> - denialConditionBuilder_; - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return Whether the denialCondition field is set. - */ - public boolean hasDenialCondition() { - return denialConditionBuilder_ != null || denialCondition_ != null; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return The denialCondition. - */ - public com.google.type.Expr getDenialCondition() { - if (denialConditionBuilder_ == null) { - return denialCondition_ == null - ? com.google.type.Expr.getDefaultInstance() - : denialCondition_; - } else { - return denialConditionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public Builder setDenialCondition(com.google.type.Expr value) { - if (denialConditionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - denialCondition_ = value; - onChanged(); - } else { - denialConditionBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public Builder setDenialCondition(com.google.type.Expr.Builder builderForValue) { - if (denialConditionBuilder_ == null) { - denialCondition_ = builderForValue.build(); - onChanged(); - } else { - denialConditionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public Builder mergeDenialCondition(com.google.type.Expr value) { - if (denialConditionBuilder_ == null) { - if (denialCondition_ != null) { - denialCondition_ = - com.google.type.Expr.newBuilder(denialCondition_).mergeFrom(value).buildPartial(); - } else { - denialCondition_ = value; - } - onChanged(); - } else { - denialConditionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public Builder clearDenialCondition() { - if (denialConditionBuilder_ == null) { - denialCondition_ = null; - onChanged(); - } else { - denialCondition_ = null; - denialConditionBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public com.google.type.Expr.Builder getDenialConditionBuilder() { - - onChanged(); - return getDenialConditionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - public com.google.type.ExprOrBuilder getDenialConditionOrBuilder() { - if (denialConditionBuilder_ != null) { - return denialConditionBuilder_.getMessageOrBuilder(); - } else { - return denialCondition_ == null - ? com.google.type.Expr.getDefaultInstance() - : denialCondition_; - } - } - /** - * - * - *
-     * The condition that determines whether this deny rule applies to a request.
-     * If the condition expression evaluates to `true`, then the deny rule is
-     * applied; otherwise, the deny rule is not applied.
-     * Each deny rule is evaluated independently. If this deny rule does not apply
-     * to a request, other deny rules might still apply.
-     * The condition can use CEL functions that evaluate
-     * [resource
-     * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-     * functions and operators are not supported.
-     * 
- * - * .google.type.Expr denial_condition = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> - getDenialConditionFieldBuilder() { - if (denialConditionBuilder_ == null) { - denialConditionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( - getDenialCondition(), getParentForChildren(), isClean()); - denialCondition_ = null; - } - return denialConditionBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.DenyRule) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.DenyRule) - private static final com.google.iam.v2beta.DenyRule DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.DenyRule(); - } - - public static com.google.iam.v2beta.DenyRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DenyRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.DenyRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleOrBuilder.java deleted file mode 100644 index 30258206..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleOrBuilder.java +++ /dev/null @@ -1,468 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/deny.proto - -package com.google.iam.v2beta; - -public interface DenyRuleOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.DenyRule) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @return A list containing the deniedPrincipals. - */ - java.util.List getDeniedPrincipalsList(); - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @return The count of deniedPrincipals. - */ - int getDeniedPrincipalsCount(); - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the element to return. - * @return The deniedPrincipals at the given index. - */ - java.lang.String getDeniedPrincipals(int index); - /** - * - * - *
-   * The identities that are prevented from using one or more permissions on
-   * Google Cloud resources. This field can contain the following values:
-   * * `principalSet://goog/public:all`: A special identifier that represents
-   *   any principal that is on the internet, even if they do not have a Google
-   *   Account or are not logged in.
-   * * `principal://goog/subject/{email_id}`: A specific Google Account.
-   *   Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
-   *   example, `principal://goog/subject/alice@example.com`.
-   * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
-   *   Google Account that was deleted recently. For example,
-   *   `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
-   *   the Google Account is recovered, this identifier reverts to the standard
-   *   identifier for a Google Account.
-   * * `principalSet://goog/group/{group_id}`: A Google group. For example,
-   *   `principalSet://goog/group/admins@example.com`.
-   * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
-   *   that was deleted recently. For example,
-   *   `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
-   *   the Google group is restored, this identifier reverts to the standard
-   *   identifier for a Google group.
-   * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
-   *   A Google Cloud service account. For example,
-   *   `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
-   * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
-   *   A Google Cloud service account that was deleted recently. For example,
-   *   `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
-   *   If the service account is undeleted, this identifier reverts to the
-   *   standard identifier for a service account.
-   * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
-   *   principals associated with the specified Google Workspace or Cloud
-   *   Identity customer ID. For example,
-   *   `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
-   * 
- * - * repeated string denied_principals = 1; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPrincipals at the given index. - */ - com.google.protobuf.ByteString getDeniedPrincipalsBytes(int index); - - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @return A list containing the exceptionPrincipals. - */ - java.util.List getExceptionPrincipalsList(); - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @return The count of exceptionPrincipals. - */ - int getExceptionPrincipalsCount(); - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the element to return. - * @return The exceptionPrincipals at the given index. - */ - java.lang.String getExceptionPrincipals(int index); - /** - * - * - *
-   * The identities that are excluded from the deny rule, even if they are
-   * listed in the `denied_principals`. For example, you could add a Google
-   * group to the `denied_principals`, then exclude specific users who belong to
-   * that group.
-   * This field can contain the same values as the `denied_principals` field,
-   * excluding `principalSet://goog/public:all`, which represents all users on
-   * the internet.
-   * 
- * - * repeated string exception_principals = 2; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPrincipals at the given index. - */ - com.google.protobuf.ByteString getExceptionPrincipalsBytes(int index); - - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @return A list containing the deniedPermissions. - */ - java.util.List getDeniedPermissionsList(); - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @return The count of deniedPermissions. - */ - int getDeniedPermissionsCount(); - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the element to return. - * @return The deniedPermissions at the given index. - */ - java.lang.String getDeniedPermissions(int index); - /** - * - * - *
-   * The permissions that are explicitly denied by this rule. Each permission
-   * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
-   * is the fully qualified domain name for the service. For example,
-   * `iam.googleapis.com/roles.list`.
-   * 
- * - * repeated string denied_permissions = 3; - * - * @param index The index of the value to return. - * @return The bytes of the deniedPermissions at the given index. - */ - com.google.protobuf.ByteString getDeniedPermissionsBytes(int index); - - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @return A list containing the exceptionPermissions. - */ - java.util.List getExceptionPermissionsList(); - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @return The count of exceptionPermissions. - */ - int getExceptionPermissionsCount(); - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the element to return. - * @return The exceptionPermissions at the given index. - */ - java.lang.String getExceptionPermissions(int index); - /** - * - * - *
-   * Specifies the permissions that this rule excludes from the set of denied
-   * permissions given by `denied_permissions`. If a permission appears in
-   * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
-   * denied.
-   * The excluded permissions can be specified using the same syntax as
-   * `denied_permissions`.
-   * 
- * - * repeated string exception_permissions = 4; - * - * @param index The index of the value to return. - * @return The bytes of the exceptionPermissions at the given index. - */ - com.google.protobuf.ByteString getExceptionPermissionsBytes(int index); - - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return Whether the denialCondition field is set. - */ - boolean hasDenialCondition(); - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - * - * @return The denialCondition. - */ - com.google.type.Expr getDenialCondition(); - /** - * - * - *
-   * The condition that determines whether this deny rule applies to a request.
-   * If the condition expression evaluates to `true`, then the deny rule is
-   * applied; otherwise, the deny rule is not applied.
-   * Each deny rule is evaluated independently. If this deny rule does not apply
-   * to a request, other deny rules might still apply.
-   * The condition can use CEL functions that evaluate
-   * [resource
-   * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
-   * functions and operators are not supported.
-   * 
- * - * .google.type.Expr denial_condition = 5; - */ - com.google.type.ExprOrBuilder getDenialConditionOrBuilder(); -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleProto.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleProto.java deleted file mode 100644 index ef77af91..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRuleProto.java +++ /dev/null @@ -1,77 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/deny.proto - -package com.google.iam.v2beta; - -public final class DenyRuleProto { - private DenyRuleProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_DenyRule_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_DenyRule_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\034google/iam/v2beta/deny.proto\022\021google.i" - + "am.v2beta\032\026google/type/expr.proto\"\253\001\n\010De" - + "nyRule\022\031\n\021denied_principals\030\001 \003(\t\022\034\n\024exc" - + "eption_principals\030\002 \003(\t\022\032\n\022denied_permis" - + "sions\030\003 \003(\t\022\035\n\025exception_permissions\030\004 \003" - + "(\t\022+\n\020denial_condition\030\005 \001(\0132\021.google.ty" - + "pe.ExprB\222\001\n\025com.google.iam.v2betaB\rDenyR" - + "uleProtoP\001Z4google.golang.org/genproto/g" - + "oogleapis/iam/v2beta;iam\252\002\027Google.Cloud." - + "Iam.V2Beta\312\002\027Google\\Cloud\\Iam\\V2betab\006pr" - + "oto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.type.ExprProto.getDescriptor(), - }); - internal_static_google_iam_v2beta_DenyRule_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_iam_v2beta_DenyRule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_DenyRule_descriptor, - new java.lang.String[] { - "DeniedPrincipals", - "ExceptionPrincipals", - "DeniedPermissions", - "ExceptionPermissions", - "DenialCondition", - }); - com.google.type.ExprProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java deleted file mode 100644 index b579600e..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java +++ /dev/null @@ -1,655 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * Request message for `GetPolicy`.
- * 
- * - * Protobuf type {@code google.iam.v2beta.GetPolicyRequest} - */ -public final class GetPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.GetPolicyRequest) - GetPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetPolicyRequest.newBuilder() to construct. - private GetPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetPolicyRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_GetPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.GetPolicyRequest.class, - com.google.iam.v2beta.GetPolicyRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the policy to retrieve. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the policy to retrieve. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.GetPolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v2beta.GetPolicyRequest other = (com.google.iam.v2beta.GetPolicyRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.GetPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.GetPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `GetPolicy`.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.GetPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.GetPolicyRequest) - com.google.iam.v2beta.GetPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_GetPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.GetPolicyRequest.class, - com.google.iam.v2beta.GetPolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v2beta.GetPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.GetPolicyRequest getDefaultInstanceForType() { - return com.google.iam.v2beta.GetPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.GetPolicyRequest build() { - com.google.iam.v2beta.GetPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.GetPolicyRequest buildPartial() { - com.google.iam.v2beta.GetPolicyRequest result = - new com.google.iam.v2beta.GetPolicyRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.GetPolicyRequest) { - return mergeFrom((com.google.iam.v2beta.GetPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.GetPolicyRequest other) { - if (other == com.google.iam.v2beta.GetPolicyRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the policy to retrieve. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * Use the URL-encoded full resource name, which means that the forward-slash
-     * character, `/`, must be written as `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.GetPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.GetPolicyRequest) - private static final com.google.iam.v2beta.GetPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.GetPolicyRequest(); - } - - public static com.google.iam.v2beta.GetPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.GetPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequestOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequestOrBuilder.java deleted file mode 100644 index def78621..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequestOrBuilder.java +++ /dev/null @@ -1,62 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public interface GetPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.GetPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the policy to retrieve. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of the policy to retrieve. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * Use the URL-encoded full resource name, which means that the forward-slash
-   * character, `/`, must be written as `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java deleted file mode 100644 index c66f7d36..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java +++ /dev/null @@ -1,950 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * Request message for `ListPolicies`.
- * 
- * - * Protobuf type {@code google.iam.v2beta.ListPoliciesRequest} - */ -public final class ListPoliciesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.ListPoliciesRequest) - ListPoliciesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListPoliciesRequest.newBuilder() to construct. - private ListPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListPoliciesRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListPoliciesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.ListPoliciesRequest.class, - com.google.iam.v2beta.ListPoliciesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to list. Format:
-   * `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to list. Format:
-   * `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * - * - *
-   * The maximum number of policies to return. IAM ignores this value and uses
-   * the value 1000.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
-   * retrieve the next page.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
-   * retrieve the next page.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.ListPoliciesRequest)) { - return super.equals(obj); - } - com.google.iam.v2beta.ListPoliciesRequest other = - (com.google.iam.v2beta.ListPoliciesRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.ListPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.ListPoliciesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `ListPolicies`.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.ListPoliciesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.ListPoliciesRequest) - com.google.iam.v2beta.ListPoliciesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.ListPoliciesRequest.class, - com.google.iam.v2beta.ListPoliciesRequest.Builder.class); - } - - // Construct using com.google.iam.v2beta.ListPoliciesRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.ListPoliciesRequest getDefaultInstanceForType() { - return com.google.iam.v2beta.ListPoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.ListPoliciesRequest build() { - com.google.iam.v2beta.ListPoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.ListPoliciesRequest buildPartial() { - com.google.iam.v2beta.ListPoliciesRequest result = - new com.google.iam.v2beta.ListPoliciesRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.ListPoliciesRequest) { - return mergeFrom((com.google.iam.v2beta.ListPoliciesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.ListPoliciesRequest other) { - if (other == com.google.iam.v2beta.ListPoliciesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource that the policy is attached to, along with the kind of policy
-     * to list. Format:
-     * `policies/{attachment_point}/denypolicies`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, you can use the alphanumeric or the numeric ID.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * The maximum number of policies to return. IAM ignores this value and uses
-     * the value 1000.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * The maximum number of policies to return. IAM ignores this value and uses
-     * the value 1000.
-     * 
- * - * int32 page_size = 2; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The maximum number of policies to return. IAM ignores this value and uses
-     * the value 1000.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
-     * retrieve the next page.
-     * 
- * - * string page_token = 3; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.ListPoliciesRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.ListPoliciesRequest) - private static final com.google.iam.v2beta.ListPoliciesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.ListPoliciesRequest(); - } - - public static com.google.iam.v2beta.ListPoliciesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListPoliciesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.ListPoliciesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequestOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequestOrBuilder.java deleted file mode 100644 index 3090b502..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequestOrBuilder.java +++ /dev/null @@ -1,107 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public interface ListPoliciesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.ListPoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to list. Format:
-   * `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The resource that the policy is attached to, along with the kind of policy
-   * to list. Format:
-   * `policies/{attachment_point}/denypolicies`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, you can use the alphanumeric or the numeric ID.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * The maximum number of policies to return. IAM ignores this value and uses
-   * the value 1000.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
-   * retrieve the next page.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to
-   * retrieve the next page.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java deleted file mode 100644 index b7559c50..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java +++ /dev/null @@ -1,1106 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * Response message for `ListPolicies`.
- * 
- * - * Protobuf type {@code google.iam.v2beta.ListPoliciesResponse} - */ -public final class ListPoliciesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.ListPoliciesResponse) - ListPoliciesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListPoliciesResponse.newBuilder() to construct. - private ListPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListPoliciesResponse() { - policies_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListPoliciesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.ListPoliciesResponse.class, - com.google.iam.v2beta.ListPoliciesResponse.Builder.class); - } - - public static final int POLICIES_FIELD_NUMBER = 1; - private java.util.List policies_; - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - @java.lang.Override - public java.util.List getPoliciesList() { - return policies_; - } - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - @java.lang.Override - public java.util.List - getPoliciesOrBuilderList() { - return policies_; - } - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - @java.lang.Override - public int getPoliciesCount() { - return policies_.size(); - } - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - @java.lang.Override - public com.google.iam.v2beta.Policy getPolicies(int index) { - return policies_.get(index); - } - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - @java.lang.Override - public com.google.iam.v2beta.PolicyOrBuilder getPoliciesOrBuilder(int index) { - return policies_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
-   * next page. If this field is omitted, there are no additional pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
-   * next page. If this field is omitted, there are no additional pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < policies_.size(); i++) { - output.writeMessage(1, policies_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policies_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.ListPoliciesResponse)) { - return super.equals(obj); - } - com.google.iam.v2beta.ListPoliciesResponse other = - (com.google.iam.v2beta.ListPoliciesResponse) obj; - - if (!getPoliciesList().equals(other.getPoliciesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPoliciesCount() > 0) { - hash = (37 * hash) + POLICIES_FIELD_NUMBER; - hash = (53 * hash) + getPoliciesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.ListPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.ListPoliciesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for `ListPolicies`.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.ListPoliciesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.ListPoliciesResponse) - com.google.iam.v2beta.ListPoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.ListPoliciesResponse.class, - com.google.iam.v2beta.ListPoliciesResponse.Builder.class); - } - - // Construct using com.google.iam.v2beta.ListPoliciesResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - } else { - policies_ = null; - policiesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.ListPoliciesResponse getDefaultInstanceForType() { - return com.google.iam.v2beta.ListPoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.ListPoliciesResponse build() { - com.google.iam.v2beta.ListPoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.ListPoliciesResponse buildPartial() { - com.google.iam.v2beta.ListPoliciesResponse result = - new com.google.iam.v2beta.ListPoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (policiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policies_ = policies_; - } else { - result.policies_ = policiesBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.ListPoliciesResponse) { - return mergeFrom((com.google.iam.v2beta.ListPoliciesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.ListPoliciesResponse other) { - if (other == com.google.iam.v2beta.ListPoliciesResponse.getDefaultInstance()) return this; - if (policiesBuilder_ == null) { - if (!other.policies_.isEmpty()) { - if (policies_.isEmpty()) { - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePoliciesIsMutable(); - policies_.addAll(other.policies_); - } - onChanged(); - } - } else { - if (!other.policies_.isEmpty()) { - if (policiesBuilder_.isEmpty()) { - policiesBuilder_.dispose(); - policiesBuilder_ = null; - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - policiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPoliciesFieldBuilder() - : null; - } else { - policiesBuilder_.addAllMessages(other.policies_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.iam.v2beta.Policy m = - input.readMessage(com.google.iam.v2beta.Policy.parser(), extensionRegistry); - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(m); - } else { - policiesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List policies_ = - java.util.Collections.emptyList(); - - private void ensurePoliciesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policies_ = new java.util.ArrayList(policies_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2beta.Policy, - com.google.iam.v2beta.Policy.Builder, - com.google.iam.v2beta.PolicyOrBuilder> - policiesBuilder_; - - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public java.util.List getPoliciesList() { - if (policiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(policies_); - } else { - return policiesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public int getPoliciesCount() { - if (policiesBuilder_ == null) { - return policies_.size(); - } else { - return policiesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public com.google.iam.v2beta.Policy getPolicies(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public Builder setPolicies(int index, com.google.iam.v2beta.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.set(index, value); - onChanged(); - } else { - policiesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public Builder setPolicies(int index, com.google.iam.v2beta.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.set(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public Builder addPolicies(com.google.iam.v2beta.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(value); - onChanged(); - } else { - policiesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public Builder addPolicies(int index, com.google.iam.v2beta.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(index, value); - onChanged(); - } else { - policiesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public Builder addPolicies(com.google.iam.v2beta.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public Builder addPolicies(int index, com.google.iam.v2beta.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public Builder addAllPolicies( - java.lang.Iterable values) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policies_); - onChanged(); - } else { - policiesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public Builder clearPolicies() { - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policiesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public Builder removePolicies(int index) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.remove(index); - onChanged(); - } else { - policiesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public com.google.iam.v2beta.Policy.Builder getPoliciesBuilder(int index) { - return getPoliciesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public com.google.iam.v2beta.PolicyOrBuilder getPoliciesOrBuilder(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public java.util.List - getPoliciesOrBuilderList() { - if (policiesBuilder_ != null) { - return policiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policies_); - } - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public com.google.iam.v2beta.Policy.Builder addPoliciesBuilder() { - return getPoliciesFieldBuilder() - .addBuilder(com.google.iam.v2beta.Policy.getDefaultInstance()); - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public com.google.iam.v2beta.Policy.Builder addPoliciesBuilder(int index) { - return getPoliciesFieldBuilder() - .addBuilder(index, com.google.iam.v2beta.Policy.getDefaultInstance()); - } - /** - * - * - *
-     * Metadata for the policies that are attached to the resource.
-     * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - public java.util.List getPoliciesBuilderList() { - return getPoliciesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2beta.Policy, - com.google.iam.v2beta.Policy.Builder, - com.google.iam.v2beta.PolicyOrBuilder> - getPoliciesFieldBuilder() { - if (policiesBuilder_ == null) { - policiesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2beta.Policy, - com.google.iam.v2beta.Policy.Builder, - com.google.iam.v2beta.PolicyOrBuilder>( - policies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - policies_ = null; - } - return policiesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
-     * next page. If this field is omitted, there are no additional pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.ListPoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.ListPoliciesResponse) - private static final com.google.iam.v2beta.ListPoliciesResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.ListPoliciesResponse(); - } - - public static com.google.iam.v2beta.ListPoliciesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListPoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.ListPoliciesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponseOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponseOrBuilder.java deleted file mode 100644 index 51d88d35..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponseOrBuilder.java +++ /dev/null @@ -1,103 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public interface ListPoliciesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.ListPoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - java.util.List getPoliciesList(); - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - com.google.iam.v2beta.Policy getPolicies(int index); - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - int getPoliciesCount(); - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - java.util.List getPoliciesOrBuilderList(); - /** - * - * - *
-   * Metadata for the policies that are attached to the resource.
-   * 
- * - * repeated .google.iam.v2beta.Policy policies = 1; - */ - com.google.iam.v2beta.PolicyOrBuilder getPoliciesOrBuilder(int index); - - /** - * - * - *
-   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
-   * next page. If this field is omitted, there are no additional pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the
-   * next page. If this field is omitted, there are no additional pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java deleted file mode 100644 index a2e1a8b7..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java +++ /dev/null @@ -1,3111 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * Data for an IAM policy.
- * 
- * - * Protobuf type {@code google.iam.v2beta.Policy} - */ -public final class Policy extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.Policy) - PolicyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Policy.newBuilder() to construct. - private Policy(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Policy() { - name_ = ""; - uid_ = ""; - kind_ = ""; - displayName_ = ""; - etag_ = ""; - rules_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Policy(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto.internal_static_google_iam_v2beta_Policy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetAnnotations(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.Policy.class, com.google.iam.v2beta.Policy.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Immutable. The resource name of the `Policy`, which must be unique. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, requests can use the alphanumeric or the numeric ID.
-   * Responses always contain the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The resource name of the `Policy`, which must be unique. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, requests can use the alphanumeric or the numeric ID.
-   * Responses always contain the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UID_FIELD_NUMBER = 2; - private volatile java.lang.Object uid_; - /** - * - * - *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-   * `Policy` is created.
-   * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-   * `Policy` is created.
-   * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KIND_FIELD_NUMBER = 3; - private volatile java.lang.Object kind_; - /** - * - * - *
-   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-   * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The kind. - */ - @java.lang.Override - public java.lang.String getKind() { - java.lang.Object ref = kind_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kind_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-   * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for kind. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKindBytes() { - java.lang.Object ref = kind_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kind_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * A user-specified description of the `Policy`. This value can be up to 63
-   * characters.
-   * 
- * - * string display_name = 4; - * - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * - * - *
-   * A user-specified description of the `Policy`. This value can be up to 63
-   * characters.
-   * 
- * - * string display_name = 4; - * - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ANNOTATIONS_FIELD_NUMBER = 5; - - private static final class AnnotationsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_Policy_AnnotationsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField annotations_; - - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public boolean containsAnnotations(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetAnnotations().getMap().containsKey(key); - } - /** Use {@link #getAnnotationsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.lang.String getAnnotationsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ETAG_FIELD_NUMBER = 6; - private volatile java.lang.Object etag_; - /** - * - * - *
-   * An opaque tag that identifies the current version of the `Policy`. IAM uses
-   * this value to help manage concurrent updates, so they do not cause one
-   * update to be overwritten by another.
-   * If this field is present in a [CreatePolicy][] request, the value is
-   * ignored.
-   * 
- * - * string etag = 6; - * - * @return The etag. - */ - @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } - } - /** - * - * - *
-   * An opaque tag that identifies the current version of the `Policy`. IAM uses
-   * this value to help manage concurrent updates, so they do not cause one
-   * update to be overwritten by another.
-   * If this field is present in a [CreatePolicy][] request, the value is
-   * ignored.
-   * 
- * - * string etag = 6; - * - * @return The bytes for etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int DELETE_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp deleteTime_; - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteTime field is set. - */ - @java.lang.Override - public boolean hasDeleteTime() { - return deleteTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getDeleteTime() { - return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; - } - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { - return getDeleteTime(); - } - - public static final int RULES_FIELD_NUMBER = 10; - private java.util.List rules_; - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - @java.lang.Override - public java.util.List getRulesList() { - return rules_; - } - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - @java.lang.Override - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - @java.lang.Override - public int getRulesCount() { - return rules_.size(); - } - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - @java.lang.Override - public com.google.iam.v2beta.PolicyRule getRules(int index) { - return rules_.get(index); - } - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - @java.lang.Override - public com.google.iam.v2beta.PolicyRuleOrBuilder getRulesOrBuilder(int index) { - return rules_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, etag_); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(8, getUpdateTime()); - } - if (deleteTime_ != null) { - output.writeMessage(9, getDeleteTime()); - } - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(10, rules_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kind_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); - } - for (java.util.Map.Entry entry : - internalGetAnnotations().getMap().entrySet()) { - com.google.protobuf.MapEntry annotations__ = - AnnotationsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, etag_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); - } - if (deleteTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDeleteTime()); - } - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, rules_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.Policy)) { - return super.equals(obj); - } - com.google.iam.v2beta.Policy other = (com.google.iam.v2beta.Policy) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUid().equals(other.getUid())) return false; - if (!getKind().equals(other.getKind())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; - if (!getEtag().equals(other.getEtag())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (hasDeleteTime() != other.hasDeleteTime()) return false; - if (hasDeleteTime()) { - if (!getDeleteTime().equals(other.getDeleteTime())) return false; - } - if (!getRulesList().equals(other.getRulesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + getKind().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (!internalGetAnnotations().getMap().isEmpty()) { - hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetAnnotations().hashCode(); - } - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasDeleteTime()) { - hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getDeleteTime().hashCode(); - } - if (getRulesCount() > 0) { - hash = (37 * hash) + RULES_FIELD_NUMBER; - hash = (53 * hash) + getRulesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.Policy parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.Policy parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.Policy parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.Policy parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.Policy parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.Policy parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.Policy parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.Policy parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.Policy parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.Policy parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.Policy parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.Policy parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.Policy prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Data for an IAM policy.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.Policy} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.Policy) - com.google.iam.v2beta.PolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto.internal_static_google_iam_v2beta_Policy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetAnnotations(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 5: - return internalGetMutableAnnotations(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.Policy.class, com.google.iam.v2beta.Policy.Builder.class); - } - - // Construct using com.google.iam.v2beta.Policy.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - uid_ = ""; - - kind_ = ""; - - displayName_ = ""; - - internalGetMutableAnnotations().clear(); - etag_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - if (deleteTimeBuilder_ == null) { - deleteTime_ = null; - } else { - deleteTime_ = null; - deleteTimeBuilder_ = null; - } - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - } else { - rules_ = null; - rulesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.PolicyProto.internal_static_google_iam_v2beta_Policy_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.Policy getDefaultInstanceForType() { - return com.google.iam.v2beta.Policy.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.Policy build() { - com.google.iam.v2beta.Policy result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.Policy buildPartial() { - com.google.iam.v2beta.Policy result = new com.google.iam.v2beta.Policy(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.uid_ = uid_; - result.kind_ = kind_; - result.displayName_ = displayName_; - result.annotations_ = internalGetAnnotations(); - result.annotations_.makeImmutable(); - result.etag_ = etag_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - if (deleteTimeBuilder_ == null) { - result.deleteTime_ = deleteTime_; - } else { - result.deleteTime_ = deleteTimeBuilder_.build(); - } - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.Policy) { - return mergeFrom((com.google.iam.v2beta.Policy) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.Policy other) { - if (other == com.google.iam.v2beta.Policy.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - onChanged(); - } - if (!other.getKind().isEmpty()) { - kind_ = other.kind_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasDeleteTime()) { - mergeDeleteTime(other.getDeleteTime()); - } - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000002); - rulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRulesFieldBuilder() - : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - uid_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - kind_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - displayName_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableAnnotations() - .getMutableMap() - .put(annotations__.getKey(), annotations__.getValue()); - break; - } // case 42 - case 50: - { - etag_ = input.readStringRequireUtf8(); - - break; - } // case 50 - case 58: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 58 - case 66: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 66 - case 74: - { - input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 74 - case 82: - { - com.google.iam.v2beta.PolicyRule m = - input.readMessage(com.google.iam.v2beta.PolicyRule.parser(), extensionRegistry); - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(m); - } else { - rulesBuilder_.addMessage(m); - } - break; - } // case 82 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The resource name of the `Policy`, which must be unique. Format:
-     * `policies/{attachment_point}/denypolicies/{policy_id}`
-     * The attachment point is identified by its URL-encoded full resource name,
-     * which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-     * For organizations and folders, use the numeric ID in the full resource
-     * name. For projects, requests can use the alphanumeric or the numeric ID.
-     * Responses always contain the numeric ID.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object uid_ = ""; - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearUid() { - - uid_ = getDefaultInstance().getUid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-     * `Policy` is created.
-     * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uid_ = value; - onChanged(); - return this; - } - - private java.lang.Object kind_ = ""; - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The kind. - */ - public java.lang.String getKind() { - java.lang.Object ref = kind_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kind_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for kind. - */ - public com.google.protobuf.ByteString getKindBytes() { - java.lang.Object ref = kind_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kind_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kind_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearKind() { - - kind_ = getDefaultInstance().getKind(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-     * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for kind to set. - * @return This builder for chaining. - */ - public Builder setKindBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kind_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * A user-specified description of the `Policy`. This value can be up to 63
-     * characters.
-     * 
- * - * string display_name = 4; - * - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField annotations_; - - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - - private com.google.protobuf.MapField - internalGetMutableAnnotations() { - onChanged(); - ; - if (annotations_ == null) { - annotations_ = - com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); - } - if (!annotations_.isMutable()) { - annotations_ = annotations_.copy(); - } - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public boolean containsAnnotations(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetAnnotations().getMap().containsKey(key); - } - /** Use {@link #getAnnotationsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.lang.String getAnnotationsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - @java.lang.Override - public java.lang.String getAnnotationsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAnnotations() { - internalGetMutableAnnotations().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - public Builder removeAnnotations(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableAnnotations().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableAnnotations() { - return internalGetMutableAnnotations().getMutableMap(); - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - public Builder putAnnotations(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableAnnotations().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * A key-value map to store arbitrary metadata for the `Policy`. Keys
-     * can be up to 63 characters. Values can be up to 255 characters.
-     * 
- * - * map<string, string> annotations = 5; - */ - public Builder putAllAnnotations(java.util.Map values) { - internalGetMutableAnnotations().getMutableMap().putAll(values); - return this; - } - - private java.lang.Object etag_ = ""; - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @return The bytes for etag. - */ - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - etag_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - - etag_ = getDefaultInstance().getEtag(); - onChanged(); - return this; - } - /** - * - * - *
-     * An opaque tag that identifies the current version of the `Policy`. IAM uses
-     * this value to help manage concurrent updates, so they do not cause one
-     * update to be overwritten by another.
-     * If this field is present in a [CreatePolicy][] request, the value is
-     * ignored.
-     * 
- * - * string etag = 6; - * - * @param value The bytes for etag to set. - * @return This builder for chaining. - */ - public Builder setEtagBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - etag_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.Timestamp deleteTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - deleteTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteTime field is set. - */ - public boolean hasDeleteTime() { - return deleteTimeBuilder_ != null || deleteTime_ != null; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteTime. - */ - public com.google.protobuf.Timestamp getDeleteTime() { - if (deleteTimeBuilder_ == null) { - return deleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deleteTime_; - } else { - return deleteTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeleteTime(com.google.protobuf.Timestamp value) { - if (deleteTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deleteTime_ = value; - onChanged(); - } else { - deleteTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (deleteTimeBuilder_ == null) { - deleteTime_ = builderForValue.build(); - onChanged(); - } else { - deleteTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { - if (deleteTimeBuilder_ == null) { - if (deleteTime_ != null) { - deleteTime_ = - com.google.protobuf.Timestamp.newBuilder(deleteTime_).mergeFrom(value).buildPartial(); - } else { - deleteTime_ = value; - } - onChanged(); - } else { - deleteTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearDeleteTime() { - if (deleteTimeBuilder_ == null) { - deleteTime_ = null; - onChanged(); - } else { - deleteTime_ = null; - deleteTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { - - onChanged(); - return getDeleteTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { - if (deleteTimeBuilder_ != null) { - return deleteTimeBuilder_.getMessageOrBuilder(); - } else { - return deleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deleteTime_; - } - } - /** - * - * - *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-     * 
- * - * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getDeleteTimeFieldBuilder() { - if (deleteTimeBuilder_ == null) { - deleteTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getDeleteTime(), getParentForChildren(), isClean()); - deleteTime_ = null; - } - return deleteTimeBuilder_; - } - - private java.util.List rules_ = - java.util.Collections.emptyList(); - - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2beta.PolicyRule, - com.google.iam.v2beta.PolicyRule.Builder, - com.google.iam.v2beta.PolicyRuleOrBuilder> - rulesBuilder_; - - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public com.google.iam.v2beta.PolicyRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public Builder setRules(int index, com.google.iam.v2beta.PolicyRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public Builder setRules(int index, com.google.iam.v2beta.PolicyRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public Builder addRules(com.google.iam.v2beta.PolicyRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public Builder addRules(int index, com.google.iam.v2beta.PolicyRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public Builder addRules(com.google.iam.v2beta.PolicyRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public Builder addRules(int index, com.google.iam.v2beta.PolicyRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public Builder addAllRules( - java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public com.google.iam.v2beta.PolicyRule.Builder getRulesBuilder(int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public com.google.iam.v2beta.PolicyRuleOrBuilder getRulesOrBuilder(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public com.google.iam.v2beta.PolicyRule.Builder addRulesBuilder() { - return getRulesFieldBuilder() - .addBuilder(com.google.iam.v2beta.PolicyRule.getDefaultInstance()); - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public com.google.iam.v2beta.PolicyRule.Builder addRulesBuilder(int index) { - return getRulesFieldBuilder() - .addBuilder(index, com.google.iam.v2beta.PolicyRule.getDefaultInstance()); - } - /** - * - * - *
-     * A list of rules that specify the behavior of the `Policy`. All of the rules
-     * should be of the `kind` specified in the `Policy`.
-     * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - public java.util.List getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2beta.PolicyRule, - com.google.iam.v2beta.PolicyRule.Builder, - com.google.iam.v2beta.PolicyRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2beta.PolicyRule, - com.google.iam.v2beta.PolicyRule.Builder, - com.google.iam.v2beta.PolicyRuleOrBuilder>( - rules_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - rules_ = null; - } - return rulesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.Policy) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.Policy) - private static final com.google.iam.v2beta.Policy DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.Policy(); - } - - public static com.google.iam.v2beta.Policy getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Policy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.Policy getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java deleted file mode 100644 index 766a87f7..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java +++ /dev/null @@ -1,698 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * Metadata for long-running `Policy` operations.
- * 
- * - * Protobuf type {@code google.iam.v2beta.PolicyOperationMetadata} - */ -public final class PolicyOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.PolicyOperationMetadata) - PolicyOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyOperationMetadata.newBuilder() to construct. - private PolicyOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PolicyOperationMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PolicyOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.PolicyOperationMetadata.class, - com.google.iam.v2beta.PolicyOperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.PolicyOperationMetadata)) { - return super.equals(obj); - } - com.google.iam.v2beta.PolicyOperationMetadata other = - (com.google.iam.v2beta.PolicyOperationMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.PolicyOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Metadata for long-running `Policy` operations.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.PolicyOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.PolicyOperationMetadata) - com.google.iam.v2beta.PolicyOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.PolicyOperationMetadata.class, - com.google.iam.v2beta.PolicyOperationMetadata.Builder.class); - } - - // Construct using com.google.iam.v2beta.PolicyOperationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.PolicyOperationMetadata getDefaultInstanceForType() { - return com.google.iam.v2beta.PolicyOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.PolicyOperationMetadata build() { - com.google.iam.v2beta.PolicyOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.PolicyOperationMetadata buildPartial() { - com.google.iam.v2beta.PolicyOperationMetadata result = - new com.google.iam.v2beta.PolicyOperationMetadata(this); - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.PolicyOperationMetadata) { - return mergeFrom((com.google.iam.v2beta.PolicyOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.PolicyOperationMetadata other) { - if (other == com.google.iam.v2beta.PolicyOperationMetadata.getDefaultInstance()) return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Timestamp when the `google.longrunning.Operation` was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.PolicyOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.PolicyOperationMetadata) - private static final com.google.iam.v2beta.PolicyOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.PolicyOperationMetadata(); - } - - public static com.google.iam.v2beta.PolicyOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PolicyOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.PolicyOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadataOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadataOrBuilder.java deleted file mode 100644 index 11fc1dca..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadataOrBuilder.java +++ /dev/null @@ -1,60 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public interface PolicyOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.PolicyOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Timestamp when the `google.longrunning.Operation` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOrBuilder.java deleted file mode 100644 index fdfbab33..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOrBuilder.java +++ /dev/null @@ -1,412 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public interface PolicyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.Policy) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The resource name of the `Policy`, which must be unique. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, requests can use the alphanumeric or the numeric ID.
-   * Responses always contain the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The resource name of the `Policy`, which must be unique. Format:
-   * `policies/{attachment_point}/denypolicies/{policy_id}`
-   * The attachment point is identified by its URL-encoded full resource name,
-   * which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
-   * For organizations and folders, use the numeric ID in the full resource
-   * name. For projects, requests can use the alphanumeric or the numeric ID.
-   * Responses always contain the numeric ID.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-   * `Policy` is created.
-   * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The uid. - */ - java.lang.String getUid(); - /** - * - * - *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
-   * `Policy` is created.
-   * 
- * - * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for uid. - */ - com.google.protobuf.ByteString getUidBytes(); - - /** - * - * - *
-   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-   * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The kind. - */ - java.lang.String getKind(); - /** - * - * - *
-   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
-   * 
- * - * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for kind. - */ - com.google.protobuf.ByteString getKindBytes(); - - /** - * - * - *
-   * A user-specified description of the `Policy`. This value can be up to 63
-   * characters.
-   * 
- * - * string display_name = 4; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * A user-specified description of the `Policy`. This value can be up to 63
-   * characters.
-   * 
- * - * string display_name = 4; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - int getAnnotationsCount(); - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - boolean containsAnnotations(java.lang.String key); - /** Use {@link #getAnnotationsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getAnnotations(); - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - java.util.Map getAnnotationsMap(); - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - - /* nullable */ - java.lang.String getAnnotationsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * A key-value map to store arbitrary metadata for the `Policy`. Keys
-   * can be up to 63 characters. Values can be up to 255 characters.
-   * 
- * - * map<string, string> annotations = 5; - */ - java.lang.String getAnnotationsOrThrow(java.lang.String key); - - /** - * - * - *
-   * An opaque tag that identifies the current version of the `Policy`. IAM uses
-   * this value to help manage concurrent updates, so they do not cause one
-   * update to be overwritten by another.
-   * If this field is present in a [CreatePolicy][] request, the value is
-   * ignored.
-   * 
- * - * string etag = 6; - * - * @return The etag. - */ - java.lang.String getEtag(); - /** - * - * - *
-   * An opaque tag that identifies the current version of the `Policy`. IAM uses
-   * this value to help manage concurrent updates, so they do not cause one
-   * update to be overwritten by another.
-   * If this field is present in a [CreatePolicy][] request, the value is
-   * ignored.
-   * 
- * - * string etag = 6; - * - * @return The bytes for etag. - */ - com.google.protobuf.ByteString getEtagBytes(); - - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteTime field is set. - */ - boolean hasDeleteTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteTime. - */ - com.google.protobuf.Timestamp getDeleteTime(); - /** - * - * - *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
-   * 
- * - * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder(); - - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - java.util.List getRulesList(); - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - com.google.iam.v2beta.PolicyRule getRules(int index); - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - int getRulesCount(); - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - java.util.List getRulesOrBuilderList(); - /** - * - * - *
-   * A list of rules that specify the behavior of the `Policy`. All of the rules
-   * should be of the `kind` specified in the `Policy`.
-   * 
- * - * repeated .google.iam.v2beta.PolicyRule rules = 10; - */ - com.google.iam.v2beta.PolicyRuleOrBuilder getRulesOrBuilder(int index); -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyProto.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyProto.java deleted file mode 100644 index fd7363e9..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyProto.java +++ /dev/null @@ -1,257 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public final class PolicyProto { - private PolicyProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_Policy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_Policy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_Policy_AnnotationsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_Policy_AnnotationsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_PolicyRule_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_PolicyRule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_ListPoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_ListPoliciesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_GetPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_CreatePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_UpdatePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_DeletePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2beta_PolicyOperationMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\036google/iam/v2beta/policy.proto\022\021google" - + ".iam.v2beta\032\034google/api/annotations.prot" - + "o\032\027google/api/client.proto\032\037google/api/f" - + "ield_behavior.proto\032\034google/iam/v2beta/d" - + "eny.proto\032#google/longrunning/operations" - + ".proto\032\037google/protobuf/timestamp.proto\"" - + "\251\003\n\006Policy\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\020\n\003uid\030\002 \001" - + "(\tB\003\340A\005\022\021\n\004kind\030\003 \001(\tB\003\340A\003\022\024\n\014display_na" - + "me\030\004 \001(\t\022?\n\013annotations\030\005 \003(\0132*.google.i" - + "am.v2beta.Policy.AnnotationsEntry\022\014\n\004eta" - + "g\030\006 \001(\t\0224\n\013create_time\030\007 \001(\0132\032.google.pr" - + "otobuf.TimestampB\003\340A\003\0224\n\013update_time\030\010 \001" - + "(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013d" - + "elete_time\030\t \001(\0132\032.google.protobuf.Times" - + "tampB\003\340A\003\022,\n\005rules\030\n \003(\0132\035.google.iam.v2" - + "beta.PolicyRule\0322\n\020AnnotationsEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"[\n\nPolicyRul" - + "e\0220\n\tdeny_rule\030\002 \001(\0132\033.google.iam.v2beta" - + ".DenyRuleH\000\022\023\n\013description\030\001 \001(\tB\006\n\004kind" - + "\"Q\n\023ListPoliciesRequest\022\023\n\006parent\030\001 \001(\tB" - + "\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " - + "\001(\t\"\\\n\024ListPoliciesResponse\022+\n\010policies\030" - + "\001 \003(\0132\031.google.iam.v2beta.Policy\022\027\n\017next" - + "_page_token\030\002 \001(\t\"%\n\020GetPolicyRequest\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\"m\n\023CreatePolicyRequest\022" - + "\023\n\006parent\030\001 \001(\tB\003\340A\002\022.\n\006policy\030\002 \001(\0132\031.g" - + "oogle.iam.v2beta.PolicyB\003\340A\002\022\021\n\tpolicy_i" - + "d\030\003 \001(\t\"E\n\023UpdatePolicyRequest\022.\n\006policy" - + "\030\001 \001(\0132\031.google.iam.v2beta.PolicyB\003\340A\002\";" - + "\n\023DeletePolicyRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002" - + "\022\021\n\004etag\030\002 \001(\tB\003\340A\001\"J\n\027PolicyOperationMe" - + "tadata\022/\n\013create_time\030\001 \001(\0132\032.google.pro" - + "tobuf.Timestamp2\200\007\n\010Policies\022\217\001\n\014ListPol" - + "icies\022&.google.iam.v2beta.ListPoliciesRe" - + "quest\032\'.google.iam.v2beta.ListPoliciesRe" - + "sponse\".\202\323\344\223\002\037\022\035/v2beta/{parent=policies" - + "/*/*}\332A\006parent\022y\n\tGetPolicy\022#.google.iam" - + ".v2beta.GetPolicyRequest\032\031.google.iam.v2" - + "beta.Policy\",\202\323\344\223\002\037\022\035/v2beta/{name=polic" - + "ies/*/*/*}\332A\004name\022\302\001\n\014CreatePolicy\022&.goo" - + "gle.iam.v2beta.CreatePolicyRequest\032\035.goo" - + "gle.longrunning.Operation\"k\202\323\344\223\002\'\"\035/v2be" - + "ta/{parent=policies/*/*}:\006policy\332A\027paren" - + "t,policy,policy_id\312A!\n\006Policy\022\027PolicyOpe" - + "rationMetadata\022\257\001\n\014UpdatePolicy\022&.google" - + ".iam.v2beta.UpdatePolicyRequest\032\035.google" - + ".longrunning.Operation\"X\202\323\344\223\002.\032$/v2beta/" - + "{policy.name=policies/*/*/*}:\006policy\312A!\n" - + "\006Policy\022\027PolicyOperationMetadata\022\247\001\n\014Del" - + "etePolicy\022&.google.iam.v2beta.DeletePoli" - + "cyRequest\032\035.google.longrunning.Operation" - + "\"P\202\323\344\223\002\037*\035/v2beta/{name=policies/*/*/*}\332" - + "A\004name\312A!\n\006Policy\022\027PolicyOperationMetada" - + "ta\032F\312A\022iam.googleapis.com\322A.https://www." - + "googleapis.com/auth/cloud-platformB\220\001\n\025c" - + "om.google.iam.v2betaB\013PolicyProtoP\001Z4goo" - + "gle.golang.org/genproto/googleapis/iam/v" - + "2beta;iam\252\002\027Google.Cloud.Iam.V2Beta\312\002\027Go" - + "ogle\\Cloud\\Iam\\V2betab\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.iam.v2beta.DenyRuleProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_iam_v2beta_Policy_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_google_iam_v2beta_Policy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_Policy_descriptor, - new java.lang.String[] { - "Name", - "Uid", - "Kind", - "DisplayName", - "Annotations", - "Etag", - "CreateTime", - "UpdateTime", - "DeleteTime", - "Rules", - }); - internal_static_google_iam_v2beta_Policy_AnnotationsEntry_descriptor = - internal_static_google_iam_v2beta_Policy_descriptor.getNestedTypes().get(0); - internal_static_google_iam_v2beta_Policy_AnnotationsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_Policy_AnnotationsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_iam_v2beta_PolicyRule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_iam_v2beta_PolicyRule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_PolicyRule_descriptor, - new java.lang.String[] { - "DenyRule", "Description", "Kind", - }); - internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_iam_v2beta_ListPoliciesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_iam_v2beta_ListPoliciesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor, - new java.lang.String[] { - "Policies", "NextPageToken", - }); - internal_static_google_iam_v2beta_GetPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_iam_v2beta_GetPolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_GetPolicyRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_iam_v2beta_CreatePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor, - new java.lang.String[] { - "Parent", "Policy", "PolicyId", - }); - internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_iam_v2beta_UpdatePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor, - new java.lang.String[] { - "Policy", - }); - internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_iam_v2beta_DeletePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor, - new java.lang.String[] { - "Name", "Etag", - }); - internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_iam_v2beta_PolicyOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor, - new java.lang.String[] { - "CreateTime", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.iam.v2beta.DenyRuleProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java deleted file mode 100644 index 27084c7c..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java +++ /dev/null @@ -1,985 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * A single rule in a `Policy`.
- * 
- * - * Protobuf type {@code google.iam.v2beta.PolicyRule} - */ -public final class PolicyRule extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.PolicyRule) - PolicyRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRule.newBuilder() to construct. - private PolicyRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PolicyRule() { - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PolicyRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.PolicyRule.class, com.google.iam.v2beta.PolicyRule.Builder.class); - } - - private int kindCase_ = 0; - private java.lang.Object kind_; - - public enum KindCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DENY_RULE(2), - KIND_NOT_SET(0); - private final int value; - - private KindCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static KindCase valueOf(int value) { - return forNumber(value); - } - - public static KindCase forNumber(int value) { - switch (value) { - case 2: - return DENY_RULE; - case 0: - return KIND_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public KindCase getKindCase() { - return KindCase.forNumber(kindCase_); - } - - public static final int DENY_RULE_FIELD_NUMBER = 2; - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - * - * @return Whether the denyRule field is set. - */ - @java.lang.Override - public boolean hasDenyRule() { - return kindCase_ == 2; - } - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - * - * @return The denyRule. - */ - @java.lang.Override - public com.google.iam.v2beta.DenyRule getDenyRule() { - if (kindCase_ == 2) { - return (com.google.iam.v2beta.DenyRule) kind_; - } - return com.google.iam.v2beta.DenyRule.getDefaultInstance(); - } - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - */ - @java.lang.Override - public com.google.iam.v2beta.DenyRuleOrBuilder getDenyRuleOrBuilder() { - if (kindCase_ == 2) { - return (com.google.iam.v2beta.DenyRule) kind_; - } - return com.google.iam.v2beta.DenyRule.getDefaultInstance(); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object description_; - /** - * - * - *
-   * A user-specified description of the rule. This value can be up to 256
-   * characters.
-   * 
- * - * string description = 1; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * A user-specified description of the rule. This value can be up to 256
-   * characters.
-   * 
- * - * string description = 1; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); - } - if (kindCase_ == 2) { - output.writeMessage(2, (com.google.iam.v2beta.DenyRule) kind_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); - } - if (kindCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.iam.v2beta.DenyRule) kind_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.PolicyRule)) { - return super.equals(obj); - } - com.google.iam.v2beta.PolicyRule other = (com.google.iam.v2beta.PolicyRule) obj; - - if (!getDescription().equals(other.getDescription())) return false; - if (!getKindCase().equals(other.getKindCase())) return false; - switch (kindCase_) { - case 2: - if (!getDenyRule().equals(other.getDenyRule())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - switch (kindCase_) { - case 2: - hash = (37 * hash) + DENY_RULE_FIELD_NUMBER; - hash = (53 * hash) + getDenyRule().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.PolicyRule parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.PolicyRule parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyRule parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.PolicyRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.PolicyRule parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.PolicyRule parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.PolicyRule parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.PolicyRule parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.PolicyRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.PolicyRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A single rule in a `Policy`.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.PolicyRule} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.PolicyRule) - com.google.iam.v2beta.PolicyRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.PolicyRule.class, - com.google.iam.v2beta.PolicyRule.Builder.class); - } - - // Construct using com.google.iam.v2beta.PolicyRule.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (denyRuleBuilder_ != null) { - denyRuleBuilder_.clear(); - } - description_ = ""; - - kindCase_ = 0; - kind_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_PolicyRule_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.PolicyRule getDefaultInstanceForType() { - return com.google.iam.v2beta.PolicyRule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.PolicyRule build() { - com.google.iam.v2beta.PolicyRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.PolicyRule buildPartial() { - com.google.iam.v2beta.PolicyRule result = new com.google.iam.v2beta.PolicyRule(this); - if (kindCase_ == 2) { - if (denyRuleBuilder_ == null) { - result.kind_ = kind_; - } else { - result.kind_ = denyRuleBuilder_.build(); - } - } - result.description_ = description_; - result.kindCase_ = kindCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.PolicyRule) { - return mergeFrom((com.google.iam.v2beta.PolicyRule) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.PolicyRule other) { - if (other == com.google.iam.v2beta.PolicyRule.getDefaultInstance()) return this; - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - switch (other.getKindCase()) { - case DENY_RULE: - { - mergeDenyRule(other.getDenyRule()); - break; - } - case KIND_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getDenyRuleFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 2; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int kindCase_ = 0; - private java.lang.Object kind_; - - public KindCase getKindCase() { - return KindCase.forNumber(kindCase_); - } - - public Builder clearKind() { - kindCase_ = 0; - kind_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2beta.DenyRule, - com.google.iam.v2beta.DenyRule.Builder, - com.google.iam.v2beta.DenyRuleOrBuilder> - denyRuleBuilder_; - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - * - * @return Whether the denyRule field is set. - */ - @java.lang.Override - public boolean hasDenyRule() { - return kindCase_ == 2; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - * - * @return The denyRule. - */ - @java.lang.Override - public com.google.iam.v2beta.DenyRule getDenyRule() { - if (denyRuleBuilder_ == null) { - if (kindCase_ == 2) { - return (com.google.iam.v2beta.DenyRule) kind_; - } - return com.google.iam.v2beta.DenyRule.getDefaultInstance(); - } else { - if (kindCase_ == 2) { - return denyRuleBuilder_.getMessage(); - } - return com.google.iam.v2beta.DenyRule.getDefaultInstance(); - } - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - */ - public Builder setDenyRule(com.google.iam.v2beta.DenyRule value) { - if (denyRuleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kind_ = value; - onChanged(); - } else { - denyRuleBuilder_.setMessage(value); - } - kindCase_ = 2; - return this; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - */ - public Builder setDenyRule(com.google.iam.v2beta.DenyRule.Builder builderForValue) { - if (denyRuleBuilder_ == null) { - kind_ = builderForValue.build(); - onChanged(); - } else { - denyRuleBuilder_.setMessage(builderForValue.build()); - } - kindCase_ = 2; - return this; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - */ - public Builder mergeDenyRule(com.google.iam.v2beta.DenyRule value) { - if (denyRuleBuilder_ == null) { - if (kindCase_ == 2 && kind_ != com.google.iam.v2beta.DenyRule.getDefaultInstance()) { - kind_ = - com.google.iam.v2beta.DenyRule.newBuilder((com.google.iam.v2beta.DenyRule) kind_) - .mergeFrom(value) - .buildPartial(); - } else { - kind_ = value; - } - onChanged(); - } else { - if (kindCase_ == 2) { - denyRuleBuilder_.mergeFrom(value); - } else { - denyRuleBuilder_.setMessage(value); - } - } - kindCase_ = 2; - return this; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - */ - public Builder clearDenyRule() { - if (denyRuleBuilder_ == null) { - if (kindCase_ == 2) { - kindCase_ = 0; - kind_ = null; - onChanged(); - } - } else { - if (kindCase_ == 2) { - kindCase_ = 0; - kind_ = null; - } - denyRuleBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - */ - public com.google.iam.v2beta.DenyRule.Builder getDenyRuleBuilder() { - return getDenyRuleFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - */ - @java.lang.Override - public com.google.iam.v2beta.DenyRuleOrBuilder getDenyRuleOrBuilder() { - if ((kindCase_ == 2) && (denyRuleBuilder_ != null)) { - return denyRuleBuilder_.getMessageOrBuilder(); - } else { - if (kindCase_ == 2) { - return (com.google.iam.v2beta.DenyRule) kind_; - } - return com.google.iam.v2beta.DenyRule.getDefaultInstance(); - } - } - /** - * - * - *
-     * A rule for a deny policy.
-     * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2beta.DenyRule, - com.google.iam.v2beta.DenyRule.Builder, - com.google.iam.v2beta.DenyRuleOrBuilder> - getDenyRuleFieldBuilder() { - if (denyRuleBuilder_ == null) { - if (!(kindCase_ == 2)) { - kind_ = com.google.iam.v2beta.DenyRule.getDefaultInstance(); - } - denyRuleBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2beta.DenyRule, - com.google.iam.v2beta.DenyRule.Builder, - com.google.iam.v2beta.DenyRuleOrBuilder>( - (com.google.iam.v2beta.DenyRule) kind_, getParentForChildren(), isClean()); - kind_ = null; - } - kindCase_ = 2; - onChanged(); - ; - return denyRuleBuilder_; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * A user-specified description of the rule. This value can be up to 256
-     * characters.
-     * 
- * - * string description = 1; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.PolicyRule) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.PolicyRule) - private static final com.google.iam.v2beta.PolicyRule DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.PolicyRule(); - } - - public static com.google.iam.v2beta.PolicyRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PolicyRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.PolicyRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRuleOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRuleOrBuilder.java deleted file mode 100644 index 1c71f86b..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRuleOrBuilder.java +++ /dev/null @@ -1,89 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public interface PolicyRuleOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.PolicyRule) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - * - * @return Whether the denyRule field is set. - */ - boolean hasDenyRule(); - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - * - * @return The denyRule. - */ - com.google.iam.v2beta.DenyRule getDenyRule(); - /** - * - * - *
-   * A rule for a deny policy.
-   * 
- * - * .google.iam.v2beta.DenyRule deny_rule = 2; - */ - com.google.iam.v2beta.DenyRuleOrBuilder getDenyRuleOrBuilder(); - - /** - * - * - *
-   * A user-specified description of the rule. This value can be up to 256
-   * characters.
-   * 
- * - * string description = 1; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * A user-specified description of the rule. This value can be up to 256
-   * characters.
-   * 
- * - * string description = 1; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - public com.google.iam.v2beta.PolicyRule.KindCase getKindCase(); -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java deleted file mode 100644 index 95eabcdd..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java +++ /dev/null @@ -1,730 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -/** - * - * - *
- * Request message for `UpdatePolicy`.
- * 
- * - * Protobuf type {@code google.iam.v2beta.UpdatePolicyRequest} - */ -public final class UpdatePolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2beta.UpdatePolicyRequest) - UpdatePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdatePolicyRequest.newBuilder() to construct. - private UpdatePolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdatePolicyRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdatePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_UpdatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.UpdatePolicyRequest.class, - com.google.iam.v2beta.UpdatePolicyRequest.Builder.class); - } - - public static final int POLICY_FIELD_NUMBER = 1; - private com.google.iam.v2beta.Policy policy_; - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - @java.lang.Override - public com.google.iam.v2beta.Policy getPolicy() { - return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; - } - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (policy_ != null) { - output.writeMessage(1, getPolicy()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2beta.UpdatePolicyRequest)) { - return super.equals(obj); - } - com.google.iam.v2beta.UpdatePolicyRequest other = - (com.google.iam.v2beta.UpdatePolicyRequest) obj; - - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy().equals(other.getPolicy())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.iam.v2beta.UpdatePolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for `UpdatePolicy`.
-   * 
- * - * Protobuf type {@code google.iam.v2beta.UpdatePolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2beta.UpdatePolicyRequest) - com.google.iam.v2beta.UpdatePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_UpdatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2beta.UpdatePolicyRequest.class, - com.google.iam.v2beta.UpdatePolicyRequest.Builder.class); - } - - // Construct using com.google.iam.v2beta.UpdatePolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2beta.PolicyProto - .internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2beta.UpdatePolicyRequest getDefaultInstanceForType() { - return com.google.iam.v2beta.UpdatePolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2beta.UpdatePolicyRequest build() { - com.google.iam.v2beta.UpdatePolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2beta.UpdatePolicyRequest buildPartial() { - com.google.iam.v2beta.UpdatePolicyRequest result = - new com.google.iam.v2beta.UpdatePolicyRequest(this); - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.iam.v2beta.UpdatePolicyRequest) { - return mergeFrom((com.google.iam.v2beta.UpdatePolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2beta.UpdatePolicyRequest other) { - if (other == com.google.iam.v2beta.UpdatePolicyRequest.getDefaultInstance()) return this; - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.iam.v2beta.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2beta.Policy, - com.google.iam.v2beta.Policy.Builder, - com.google.iam.v2beta.PolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - public com.google.iam.v2beta.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v2beta.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPolicy(com.google.iam.v2beta.Policy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergePolicy(com.google.iam.v2beta.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.iam.v2beta.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v2beta.Policy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null ? com.google.iam.v2beta.Policy.getDefaultInstance() : policy_; - } - } - /** - * - * - *
-     * Required. The policy to update.
-     * To prevent conflicting updates, the `etag` value must match the value that
-     * is stored in IAM. If the `etag` values do not match, the request fails with
-     * a `409` error code and `ABORTED` status.
-     * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2beta.Policy, - com.google.iam.v2beta.Policy.Builder, - com.google.iam.v2beta.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v2beta.Policy, - com.google.iam.v2beta.Policy.Builder, - com.google.iam.v2beta.PolicyOrBuilder>( - getPolicy(), getParentForChildren(), isClean()); - policy_ = null; - } - return policyBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2beta.UpdatePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2beta.UpdatePolicyRequest) - private static final com.google.iam.v2beta.UpdatePolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2beta.UpdatePolicyRequest(); - } - - public static com.google.iam.v2beta.UpdatePolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdatePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2beta.UpdatePolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequestOrBuilder.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequestOrBuilder.java deleted file mode 100644 index ffbd2892..00000000 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequestOrBuilder.java +++ /dev/null @@ -1,69 +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 - * - * 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2beta/policy.proto - -package com.google.iam.v2beta; - -public interface UpdatePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2beta.UpdatePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The policy. - */ - com.google.iam.v2beta.Policy getPolicy(); - /** - * - * - *
-   * Required. The policy to update.
-   * To prevent conflicting updates, the `etag` value must match the value that
-   * is stored in IAM. If the `etag` values do not match, the request fails with
-   * a `409` error code and `ABORTED` status.
-   * 
- * - * .google.iam.v2beta.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.iam.v2beta.PolicyOrBuilder getPolicyOrBuilder(); -} diff --git a/proto-google-iam-v2beta/src/main/proto/google/iam/v2beta/deny.proto b/proto-google-iam-v2beta/src/main/proto/google/iam/v2beta/deny.proto deleted file mode 100644 index 73ae7bbd..00000000 --- a/proto-google-iam-v2beta/src/main/proto/google/iam/v2beta/deny.proto +++ /dev/null @@ -1,109 +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. - -syntax = "proto3"; - -package google.iam.v2beta; - -import "google/type/expr.proto"; - -option csharp_namespace = "Google.Cloud.Iam.V2Beta"; -option go_package = "google.golang.org/genproto/googleapis/iam/v2beta;iam"; -option java_multiple_files = true; -option java_outer_classname = "DenyRuleProto"; -option java_package = "com.google.iam.v2beta"; -option php_namespace = "Google\\Cloud\\Iam\\V2beta"; - -// A deny rule in an IAM deny policy. -message DenyRule { - // The identities that are prevented from using one or more permissions on - // Google Cloud resources. This field can contain the following values: - // - // * `principalSet://goog/public:all`: A special identifier that represents - // any principal that is on the internet, even if they do not have a Google - // Account or are not logged in. - // - // * `principal://goog/subject/{email_id}`: A specific Google Account. - // Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - // example, `principal://goog/subject/alice@example.com`. - // - // * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - // Google Account that was deleted recently. For example, - // `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - // the Google Account is recovered, this identifier reverts to the standard - // identifier for a Google Account. - // - // * `principalSet://goog/group/{group_id}`: A Google group. For example, - // `principalSet://goog/group/admins@example.com`. - // - // * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - // that was deleted recently. For example, - // `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - // the Google group is restored, this identifier reverts to the standard - // identifier for a Google group. - // - // * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - // A Google Cloud service account. For example, - // `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - // - // * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - // A Google Cloud service account that was deleted recently. For example, - // `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - // If the service account is undeleted, this identifier reverts to the - // standard identifier for a service account. - // - // * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - // principals associated with the specified Google Workspace or Cloud - // Identity customer ID. For example, - // `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - repeated string denied_principals = 1; - - // The identities that are excluded from the deny rule, even if they are - // listed in the `denied_principals`. For example, you could add a Google - // group to the `denied_principals`, then exclude specific users who belong to - // that group. - // - // This field can contain the same values as the `denied_principals` field, - // excluding `principalSet://goog/public:all`, which represents all users on - // the internet. - repeated string exception_principals = 2; - - // The permissions that are explicitly denied by this rule. Each permission - // uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - // is the fully qualified domain name for the service. For example, - // `iam.googleapis.com/roles.list`. - repeated string denied_permissions = 3; - - // Specifies the permissions that this rule excludes from the set of denied - // permissions given by `denied_permissions`. If a permission appears in - // `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - // denied. - // - // The excluded permissions can be specified using the same syntax as - // `denied_permissions`. - repeated string exception_permissions = 4; - - // The condition that determines whether this deny rule applies to a request. - // If the condition expression evaluates to `true`, then the deny rule is - // applied; otherwise, the deny rule is not applied. - // - // Each deny rule is evaluated independently. If this deny rule does not apply - // to a request, other deny rules might still apply. - // - // The condition can use CEL functions that evaluate - // [resource - // tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - // functions and operators are not supported. - google.type.Expr denial_condition = 5; -} diff --git a/proto-google-iam-v2beta/src/main/proto/google/iam/v2beta/policy.proto b/proto-google-iam-v2beta/src/main/proto/google/iam/v2beta/policy.proto deleted file mode 100644 index 99df3db0..00000000 --- a/proto-google-iam-v2beta/src/main/proto/google/iam/v2beta/policy.proto +++ /dev/null @@ -1,283 +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. - -syntax = "proto3"; - -package google.iam.v2beta; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/iam/v2beta/deny.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Iam.V2Beta"; -option go_package = "google.golang.org/genproto/googleapis/iam/v2beta;iam"; -option java_multiple_files = true; -option java_outer_classname = "PolicyProto"; -option java_package = "com.google.iam.v2beta"; -option php_namespace = "Google\\Cloud\\Iam\\V2beta"; - -// An interface for managing Identity and Access Management (IAM) policies. -service Policies { - option (google.api.default_host) = "iam.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Retrieves the policies of the specified kind that are attached to a - // resource. - // - // The response lists only policy metadata. In particular, policy rules are - // omitted. - rpc ListPolicies(ListPoliciesRequest) returns (ListPoliciesResponse) { - option (google.api.http) = { - get: "/v2beta/{parent=policies/*/*}" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a policy. - rpc GetPolicy(GetPolicyRequest) returns (Policy) { - option (google.api.http) = { - get: "/v2beta/{name=policies/*/*/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a policy. - rpc CreatePolicy(CreatePolicyRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta/{parent=policies/*/*}" - body: "policy" - }; - option (google.api.method_signature) = "parent,policy,policy_id"; - option (google.longrunning.operation_info) = { - response_type: "Policy" - metadata_type: "PolicyOperationMetadata" - }; - } - - // Updates the specified policy. - // - // You can update only the rules and the display name for the policy. - // - // To update a policy, you should use a read-modify-write loop: - // - // 1. Use [GetPolicy][google.iam.v2beta.Policies.GetPolicy] to read the current version of the policy. - // 2. Modify the policy as needed. - // 3. Use `UpdatePolicy` to write the updated policy. - // - // This pattern helps prevent conflicts between concurrent updates. - rpc UpdatePolicy(UpdatePolicyRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - put: "/v2beta/{policy.name=policies/*/*/*}" - body: "policy" - }; - option (google.longrunning.operation_info) = { - response_type: "Policy" - metadata_type: "PolicyOperationMetadata" - }; - } - - // Deletes a policy. This action is permanent. - rpc DeletePolicy(DeletePolicyRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v2beta/{name=policies/*/*/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "Policy" - metadata_type: "PolicyOperationMetadata" - }; - } -} - -// Data for an IAM policy. -message Policy { - // Immutable. The resource name of the `Policy`, which must be unique. Format: - // `policies/{attachment_point}/denypolicies/{policy_id}` - // - // - // The attachment point is identified by its URL-encoded full resource name, - // which means that the forward-slash character, `/`, must be written as - // `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, requests can use the alphanumeric or the numeric ID. - // Responses always contain the numeric ID. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - // `Policy` is created. - string uid = 2 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - string kind = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A user-specified description of the `Policy`. This value can be up to 63 - // characters. - string display_name = 4; - - // A key-value map to store arbitrary metadata for the `Policy`. Keys - // can be up to 63 characters. Values can be up to 255 characters. - map annotations = 5; - - // An opaque tag that identifies the current version of the `Policy`. IAM uses - // this value to help manage concurrent updates, so they do not cause one - // update to be overwritten by another. - // - // If this field is present in a [CreatePolicy][] request, the value is - // ignored. - string etag = 6; - - // Output only. The time when the `Policy` was created. - google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the `Policy` was last updated. - google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A list of rules that specify the behavior of the `Policy`. All of the rules - // should be of the `kind` specified in the `Policy`. - repeated PolicyRule rules = 10; -} - -// A single rule in a `Policy`. -message PolicyRule { - oneof kind { - // A rule for a deny policy. - DenyRule deny_rule = 2; - } - - // A user-specified description of the rule. This value can be up to 256 - // characters. - string description = 1; -} - -// Request message for `ListPolicies`. -message ListPoliciesRequest { - // Required. The resource that the policy is attached to, along with the kind of policy - // to list. Format: - // `policies/{attachment_point}/denypolicies` - // - // - // The attachment point is identified by its URL-encoded full resource name, - // which means that the forward-slash character, `/`, must be written as - // `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, you can use the alphanumeric or the numeric ID. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // The maximum number of policies to return. IAM ignores this value and uses - // the value 1000. - int32 page_size = 2; - - // A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to - // retrieve the next page. - string page_token = 3; -} - -// Response message for `ListPolicies`. -message ListPoliciesResponse { - // Metadata for the policies that are attached to the resource. - repeated Policy policies = 1; - - // A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the - // next page. If this field is omitted, there are no additional pages. - string next_page_token = 2; -} - -// Request message for `GetPolicy`. -message GetPolicyRequest { - // Required. The resource name of the policy to retrieve. Format: - // `policies/{attachment_point}/denypolicies/{policy_id}` - // - // - // Use the URL-encoded full resource name, which means that the forward-slash - // character, `/`, must be written as `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, you can use the alphanumeric or the numeric ID. - string name = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `CreatePolicy`. -message CreatePolicyRequest { - // Required. The resource that the policy is attached to, along with the kind of policy - // to create. Format: `policies/{attachment_point}/denypolicies` - // - // - // The attachment point is identified by its URL-encoded full resource name, - // which means that the forward-slash character, `/`, must be written as - // `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, you can use the alphanumeric or the numeric ID. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The policy to create. - Policy policy = 2 [(google.api.field_behavior) = REQUIRED]; - - // The ID to use for this policy, which will become the final component of - // the policy's resource name. The ID must contain 3 to 63 characters. It can - // contain lowercase letters and numbers, as well as dashes (`-`) and periods - // (`.`). The first character must be a lowercase letter. - string policy_id = 3; -} - -// Request message for `UpdatePolicy`. -message UpdatePolicyRequest { - // Required. The policy to update. - // - // To prevent conflicting updates, the `etag` value must match the value that - // is stored in IAM. If the `etag` values do not match, the request fails with - // a `409` error code and `ABORTED` status. - Policy policy = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `DeletePolicy`. -message DeletePolicyRequest { - // Required. The resource name of the policy to delete. Format: - // `policies/{attachment_point}/denypolicies/{policy_id}` - // - // - // Use the URL-encoded full resource name, which means that the forward-slash - // character, `/`, must be written as `%2F`. For example, - // `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - // - // For organizations and folders, use the numeric ID in the full resource - // name. For projects, you can use the alphanumeric or the numeric ID. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The expected `etag` of the policy to delete. If the value does not match - // the value that is stored in IAM, the request fails with a `409` error code - // and `ABORTED` status. - // - // If you omit this field, the policy is deleted regardless of its current - // `etag`. - string etag = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Metadata for long-running `Policy` operations. -message PolicyOperationMetadata { - // Timestamp when the `google.longrunning.Operation` was created. - google.protobuf.Timestamp create_time = 1; -} From 5abdfd7ac77caa7d40ebf40a2f1d00d600e95936 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 10 Jan 2023 15:22:08 +0000 Subject: [PATCH 02/12] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 176628d7..609750f7 100644 --- a/pom.xml +++ b/pom.xml @@ -120,6 +120,11 @@ + proto-google-iam-v1 + grpc-google-iam-v2beta + grpc-google-iam-v2 + proto-google-iam-v2beta + proto-google-iam-v2 google-iam-policy From c1d74526c5ce9ff80a0662595993377211cfca93 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 10 Jan 2023 10:26:09 -0500 Subject: [PATCH 03/12] fixing versions --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 609750f7..dfd88024 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-iam-policy-parent pom - 1.6.24-SNAPSHOT + 1.6.24-SNAPSHOT Google IAM Policy Parent https://github.com/googleapis/java-iam From fc9aa39e12219204086cce1b302363a29d56e6a9 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 10 Jan 2023 10:26:31 -0500 Subject: [PATCH 04/12] removed unnecessary entries --- versions.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/versions.txt b/versions.txt index 304f9158..920771e6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,4 @@ # Format: # module:released-version:current-version -proto-google-iam-v1:1.6.23:1.6.24-SNAPSHOT -grpc-google-iam-v1:1.6.23:1.6.24-SNAPSHOT -proto-google-iam-v2beta:1.6.23:1.6.24-SNAPSHOT -grpc-google-iam-v2beta:1.6.23:1.6.24-SNAPSHOT google-iam-policy:1.6.23:1.6.24-SNAPSHOT -proto-google-iam-v2:1.6.23:1.6.24-SNAPSHOT -grpc-google-iam-v2:1.6.23:1.6.24-SNAPSHOT From 49111a88bba945253cd7aafab06e340855a15b4f Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 10 Jan 2023 10:26:55 -0500 Subject: [PATCH 05/12] removed migrated modules from pom.xml --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index dfd88024..deb85fef 100644 --- a/pom.xml +++ b/pom.xml @@ -120,11 +120,6 @@ - proto-google-iam-v1 - grpc-google-iam-v2beta - grpc-google-iam-v2 - proto-google-iam-v2beta - proto-google-iam-v2 google-iam-policy From 9a53e487c4d56ac67a55fcfb0ce1ce0cb3d5f4df Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 10 Jan 2023 15:29:20 +0000 Subject: [PATCH 06/12] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- pom.xml | 1 + versions.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index deb85fef..f6fb4494 100644 --- a/pom.xml +++ b/pom.xml @@ -120,6 +120,7 @@ + proto-google-iam-v1 google-iam-policy diff --git a/versions.txt b/versions.txt index 920771e6..953e7270 100644 --- a/versions.txt +++ b/versions.txt @@ -2,3 +2,4 @@ # module:released-version:current-version google-iam-policy:1.6.23:1.6.24-SNAPSHOT +proto-google-iam-v1:0.0.0:0.0.1-SNAPSHOT From 6799d5cf297473e779b5e6bc848684f74abf819c Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 10 Jan 2023 10:32:14 -0500 Subject: [PATCH 07/12] distribution_name --- .repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index c8064171..27a079aa 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -11,7 +11,7 @@ "repo": "googleapis/java-iam", "repo_short": "java-iam", "library_type": "OTHER", - "distribution_name": "com.google.api.grpc:proto-google-iam-v1", + "distribution_name": "com.google.cloud:google-iam-policy", "excluded_poms": "proto-google-iam-v1-bom,google-iam-policy,proto-google-iam-v1", "excluded_dependencies": "grpc-google-iam-v1" } From c87bc048ca4bdc4f30428d9612790c0f9015eb43 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 10 Jan 2023 10:32:37 -0500 Subject: [PATCH 08/12] removed unnecessary module --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index f6fb4494..deb85fef 100644 --- a/pom.xml +++ b/pom.xml @@ -120,7 +120,6 @@ - proto-google-iam-v1 google-iam-policy From 74e7772b0da071e77cdbb706627e9c24ebd9cfdc Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 10 Jan 2023 10:32:58 -0500 Subject: [PATCH 09/12] removed unnecessary modules --- versions.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/versions.txt b/versions.txt index 953e7270..920771e6 100644 --- a/versions.txt +++ b/versions.txt @@ -2,4 +2,3 @@ # module:released-version:current-version google-iam-policy:1.6.23:1.6.24-SNAPSHOT -proto-google-iam-v1:0.0.0:0.0.1-SNAPSHOT From 7d429247cd3927aaa2ced040844f4592d2b20185 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 10 Jan 2023 10:36:38 -0500 Subject: [PATCH 10/12] excluded dependencies --- .repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 27a079aa..3b4b6df1 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -13,5 +13,5 @@ "library_type": "OTHER", "distribution_name": "com.google.cloud:google-iam-policy", "excluded_poms": "proto-google-iam-v1-bom,google-iam-policy,proto-google-iam-v1", - "excluded_dependencies": "grpc-google-iam-v1" + "excluded_dependencies": "google-iam-policy" } From 5541d149ff0558bc5b371a4b404daf9df470b6f4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 10 Jan 2023 15:38:29 +0000 Subject: [PATCH 11/12] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.sh | 2 +- renovate.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 0196aca2..4b26b0f6 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -33,7 +33,7 @@ python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true -export NAME=proto-google-iam-v1 +export NAME=google-iam-policy export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 8040a363..79ec95ab 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -33,7 +33,7 @@ python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true -export NAME=proto-google-iam-v1 +export NAME=google-iam-policy export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # cloud RAD generation diff --git a/renovate.json b/renovate.json index c52f7a39..5686899d 100644 --- a/renovate.json +++ b/renovate.json @@ -39,7 +39,7 @@ }, { "packagePatterns": [ - "^com.google.api.grpc:proto-google-iam-v1", + "^com.google.cloud:google-iam-policy", "^com.google.cloud:libraries-bom", "^com.google.cloud.samples:shared-configuration" ], From 167cc89c16d660fc10e20cc28eef247eb22ae4d1 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 10 Jan 2023 10:41:09 -0500 Subject: [PATCH 12/12] removing unnecessary dependencyManagement entries --- pom.xml | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/pom.xml b/pom.xml index deb85fef..c0e44682 100644 --- a/pom.xml +++ b/pom.xml @@ -74,42 +74,6 @@ pom import - - com.google.api.grpc - proto-google-iam-v2 - 1.7.0 - - - com.google.api.grpc - grpc-google-iam-v2 - 1.7.0 - - - com.google.cloud - google-iam-policy - 1.7.0 - - - com.google.api.grpc - proto-google-iam-v2beta - 1.7.0 - - - com.google.api.grpc - grpc-google-iam-v1 - 1.7.0 - - - com.google.api.grpc - grpc-google-iam-v2beta - 1.7.0 - - - com.google.api.grpc - proto-google-iam-v1 - 1.7.0 - - junit junit