1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/iam/v1/policy.proto 18 19 package com.google.iam.v1; 20 21 public interface PolicyOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.iam.v1.Policy) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Specifies the format of the policy. 31 * Valid values are `0`, `1`, and `3`. Requests that specify an invalid value 32 * are rejected. 33 * Any operation that affects conditional role bindings must specify version 34 * `3`. This requirement applies to the following operations: 35 * * Getting a policy that includes a conditional role binding 36 * * Adding a conditional role binding to a policy 37 * * Changing a conditional role binding in a policy 38 * * Removing any role binding, with or without a condition, from a policy 39 * that includes conditions 40 * **Important:** If you use IAM Conditions, you must include the `etag` field 41 * whenever you call `setIamPolicy`. If you omit this field, then IAM allows 42 * you to overwrite a version `3` policy with a version `1` policy, and all of 43 * the conditions in the version `3` policy are lost. 44 * If a policy does not include any conditions, operations on that policy may 45 * specify any valid version or leave the field unset. 46 * To learn which resources support conditions in their IAM policies, see the 47 * [IAM 48 * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 49 * </pre> 50 * 51 * <code>int32 version = 1;</code> 52 * 53 * @return The version. 54 */ getVersion()55 int getVersion(); 56 57 /** 58 * 59 * 60 * <pre> 61 * Associates a list of `members`, or principals, with a `role`. Optionally, 62 * may specify a `condition` that determines how and when the `bindings` are 63 * applied. Each of the `bindings` must contain at least one principal. 64 * The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 65 * of these principals can be Google groups. Each occurrence of a principal 66 * counts towards these limits. For example, if the `bindings` grant 50 67 * different roles to `user:alice@example.com`, and not to any other 68 * principal, then you can add another 1,450 principals to the `bindings` in 69 * the `Policy`. 70 * </pre> 71 * 72 * <code>repeated .google.iam.v1.Binding bindings = 4;</code> 73 */ getBindingsList()74 java.util.List<com.google.iam.v1.Binding> getBindingsList(); 75 /** 76 * 77 * 78 * <pre> 79 * Associates a list of `members`, or principals, with a `role`. Optionally, 80 * may specify a `condition` that determines how and when the `bindings` are 81 * applied. Each of the `bindings` must contain at least one principal. 82 * The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 83 * of these principals can be Google groups. Each occurrence of a principal 84 * counts towards these limits. For example, if the `bindings` grant 50 85 * different roles to `user:alice@example.com`, and not to any other 86 * principal, then you can add another 1,450 principals to the `bindings` in 87 * the `Policy`. 88 * </pre> 89 * 90 * <code>repeated .google.iam.v1.Binding bindings = 4;</code> 91 */ getBindings(int index)92 com.google.iam.v1.Binding getBindings(int index); 93 /** 94 * 95 * 96 * <pre> 97 * Associates a list of `members`, or principals, with a `role`. Optionally, 98 * may specify a `condition` that determines how and when the `bindings` are 99 * applied. Each of the `bindings` must contain at least one principal. 100 * The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 101 * of these principals can be Google groups. Each occurrence of a principal 102 * counts towards these limits. For example, if the `bindings` grant 50 103 * different roles to `user:alice@example.com`, and not to any other 104 * principal, then you can add another 1,450 principals to the `bindings` in 105 * the `Policy`. 106 * </pre> 107 * 108 * <code>repeated .google.iam.v1.Binding bindings = 4;</code> 109 */ getBindingsCount()110 int getBindingsCount(); 111 /** 112 * 113 * 114 * <pre> 115 * Associates a list of `members`, or principals, with a `role`. Optionally, 116 * may specify a `condition` that determines how and when the `bindings` are 117 * applied. Each of the `bindings` must contain at least one principal. 118 * The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 119 * of these principals can be Google groups. Each occurrence of a principal 120 * counts towards these limits. For example, if the `bindings` grant 50 121 * different roles to `user:alice@example.com`, and not to any other 122 * principal, then you can add another 1,450 principals to the `bindings` in 123 * the `Policy`. 124 * </pre> 125 * 126 * <code>repeated .google.iam.v1.Binding bindings = 4;</code> 127 */ getBindingsOrBuilderList()128 java.util.List<? extends com.google.iam.v1.BindingOrBuilder> getBindingsOrBuilderList(); 129 /** 130 * 131 * 132 * <pre> 133 * Associates a list of `members`, or principals, with a `role`. Optionally, 134 * may specify a `condition` that determines how and when the `bindings` are 135 * applied. Each of the `bindings` must contain at least one principal. 136 * The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 137 * of these principals can be Google groups. Each occurrence of a principal 138 * counts towards these limits. For example, if the `bindings` grant 50 139 * different roles to `user:alice@example.com`, and not to any other 140 * principal, then you can add another 1,450 principals to the `bindings` in 141 * the `Policy`. 142 * </pre> 143 * 144 * <code>repeated .google.iam.v1.Binding bindings = 4;</code> 145 */ getBindingsOrBuilder(int index)146 com.google.iam.v1.BindingOrBuilder getBindingsOrBuilder(int index); 147 148 /** 149 * 150 * 151 * <pre> 152 * Specifies cloud audit logging configuration for this policy. 153 * </pre> 154 * 155 * <code>repeated .google.iam.v1.AuditConfig audit_configs = 6;</code> 156 */ getAuditConfigsList()157 java.util.List<com.google.iam.v1.AuditConfig> getAuditConfigsList(); 158 /** 159 * 160 * 161 * <pre> 162 * Specifies cloud audit logging configuration for this policy. 163 * </pre> 164 * 165 * <code>repeated .google.iam.v1.AuditConfig audit_configs = 6;</code> 166 */ getAuditConfigs(int index)167 com.google.iam.v1.AuditConfig getAuditConfigs(int index); 168 /** 169 * 170 * 171 * <pre> 172 * Specifies cloud audit logging configuration for this policy. 173 * </pre> 174 * 175 * <code>repeated .google.iam.v1.AuditConfig audit_configs = 6;</code> 176 */ getAuditConfigsCount()177 int getAuditConfigsCount(); 178 /** 179 * 180 * 181 * <pre> 182 * Specifies cloud audit logging configuration for this policy. 183 * </pre> 184 * 185 * <code>repeated .google.iam.v1.AuditConfig audit_configs = 6;</code> 186 */ getAuditConfigsOrBuilderList()187 java.util.List<? extends com.google.iam.v1.AuditConfigOrBuilder> getAuditConfigsOrBuilderList(); 188 /** 189 * 190 * 191 * <pre> 192 * Specifies cloud audit logging configuration for this policy. 193 * </pre> 194 * 195 * <code>repeated .google.iam.v1.AuditConfig audit_configs = 6;</code> 196 */ getAuditConfigsOrBuilder(int index)197 com.google.iam.v1.AuditConfigOrBuilder getAuditConfigsOrBuilder(int index); 198 199 /** 200 * 201 * 202 * <pre> 203 * `etag` is used for optimistic concurrency control as a way to help 204 * prevent simultaneous updates of a policy from overwriting each other. 205 * It is strongly suggested that systems make use of the `etag` in the 206 * read-modify-write cycle to perform policy updates in order to avoid race 207 * conditions: An `etag` is returned in the response to `getIamPolicy`, and 208 * systems are expected to put that etag in the request to `setIamPolicy` to 209 * ensure that their change will be applied to the same version of the policy. 210 * **Important:** If you use IAM Conditions, you must include the `etag` field 211 * whenever you call `setIamPolicy`. If you omit this field, then IAM allows 212 * you to overwrite a version `3` policy with a version `1` policy, and all of 213 * the conditions in the version `3` policy are lost. 214 * </pre> 215 * 216 * <code>bytes etag = 3;</code> 217 * 218 * @return The etag. 219 */ getEtag()220 com.google.protobuf.ByteString getEtag(); 221 } 222