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/cloud/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Associates `members`, or principals, with a `role`. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.Binding} 29 */ 30 public final class Binding extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Binding) 33 BindingOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Binding.newBuilder() to construct. Binding(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Binding(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Binding()40 private Binding() { 41 bindingId_ = ""; 42 members_ = com.google.protobuf.LazyStringArrayList.EMPTY; 43 role_ = ""; 44 } 45 46 @java.lang.Override 47 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)48 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 49 return new Binding(); 50 } 51 52 @java.lang.Override getUnknownFields()53 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 54 return this.unknownFields; 55 } 56 getDescriptor()57 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 58 return com.google.cloud.compute.v1.Compute 59 .internal_static_google_cloud_compute_v1_Binding_descriptor; 60 } 61 62 @java.lang.Override 63 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()64 internalGetFieldAccessorTable() { 65 return com.google.cloud.compute.v1.Compute 66 .internal_static_google_cloud_compute_v1_Binding_fieldAccessorTable 67 .ensureFieldAccessorsInitialized( 68 com.google.cloud.compute.v1.Binding.class, 69 com.google.cloud.compute.v1.Binding.Builder.class); 70 } 71 72 private int bitField0_; 73 public static final int BINDING_ID_FIELD_NUMBER = 441088277; 74 75 @SuppressWarnings("serial") 76 private volatile java.lang.Object bindingId_ = ""; 77 /** 78 * 79 * 80 * <pre> 81 * This is deprecated and has no effect. Do not use. 82 * </pre> 83 * 84 * <code>optional string binding_id = 441088277;</code> 85 * 86 * @return Whether the bindingId field is set. 87 */ 88 @java.lang.Override hasBindingId()89 public boolean hasBindingId() { 90 return ((bitField0_ & 0x00000001) != 0); 91 } 92 /** 93 * 94 * 95 * <pre> 96 * This is deprecated and has no effect. Do not use. 97 * </pre> 98 * 99 * <code>optional string binding_id = 441088277;</code> 100 * 101 * @return The bindingId. 102 */ 103 @java.lang.Override getBindingId()104 public java.lang.String getBindingId() { 105 java.lang.Object ref = bindingId_; 106 if (ref instanceof java.lang.String) { 107 return (java.lang.String) ref; 108 } else { 109 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 110 java.lang.String s = bs.toStringUtf8(); 111 bindingId_ = s; 112 return s; 113 } 114 } 115 /** 116 * 117 * 118 * <pre> 119 * This is deprecated and has no effect. Do not use. 120 * </pre> 121 * 122 * <code>optional string binding_id = 441088277;</code> 123 * 124 * @return The bytes for bindingId. 125 */ 126 @java.lang.Override getBindingIdBytes()127 public com.google.protobuf.ByteString getBindingIdBytes() { 128 java.lang.Object ref = bindingId_; 129 if (ref instanceof java.lang.String) { 130 com.google.protobuf.ByteString b = 131 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 132 bindingId_ = b; 133 return b; 134 } else { 135 return (com.google.protobuf.ByteString) ref; 136 } 137 } 138 139 public static final int CONDITION_FIELD_NUMBER = 212430107; 140 private com.google.cloud.compute.v1.Expr condition_; 141 /** 142 * 143 * 144 * <pre> 145 * 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). 146 * </pre> 147 * 148 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 149 * 150 * @return Whether the condition field is set. 151 */ 152 @java.lang.Override hasCondition()153 public boolean hasCondition() { 154 return ((bitField0_ & 0x00000002) != 0); 155 } 156 /** 157 * 158 * 159 * <pre> 160 * 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). 161 * </pre> 162 * 163 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 164 * 165 * @return The condition. 166 */ 167 @java.lang.Override getCondition()168 public com.google.cloud.compute.v1.Expr getCondition() { 169 return condition_ == null ? com.google.cloud.compute.v1.Expr.getDefaultInstance() : condition_; 170 } 171 /** 172 * 173 * 174 * <pre> 175 * 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). 176 * </pre> 177 * 178 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 179 */ 180 @java.lang.Override getConditionOrBuilder()181 public com.google.cloud.compute.v1.ExprOrBuilder getConditionOrBuilder() { 182 return condition_ == null ? com.google.cloud.compute.v1.Expr.getDefaultInstance() : condition_; 183 } 184 185 public static final int MEMBERS_FIELD_NUMBER = 412010777; 186 187 @SuppressWarnings("serial") 188 private com.google.protobuf.LazyStringList members_; 189 /** 190 * 191 * 192 * <pre> 193 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 194 * </pre> 195 * 196 * <code>repeated string members = 412010777;</code> 197 * 198 * @return A list containing the members. 199 */ getMembersList()200 public com.google.protobuf.ProtocolStringList getMembersList() { 201 return members_; 202 } 203 /** 204 * 205 * 206 * <pre> 207 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 208 * </pre> 209 * 210 * <code>repeated string members = 412010777;</code> 211 * 212 * @return The count of members. 213 */ getMembersCount()214 public int getMembersCount() { 215 return members_.size(); 216 } 217 /** 218 * 219 * 220 * <pre> 221 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 222 * </pre> 223 * 224 * <code>repeated string members = 412010777;</code> 225 * 226 * @param index The index of the element to return. 227 * @return The members at the given index. 228 */ getMembers(int index)229 public java.lang.String getMembers(int index) { 230 return members_.get(index); 231 } 232 /** 233 * 234 * 235 * <pre> 236 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 237 * </pre> 238 * 239 * <code>repeated string members = 412010777;</code> 240 * 241 * @param index The index of the value to return. 242 * @return The bytes of the members at the given index. 243 */ getMembersBytes(int index)244 public com.google.protobuf.ByteString getMembersBytes(int index) { 245 return members_.getByteString(index); 246 } 247 248 public static final int ROLE_FIELD_NUMBER = 3506294; 249 250 @SuppressWarnings("serial") 251 private volatile java.lang.Object role_ = ""; 252 /** 253 * 254 * 255 * <pre> 256 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 257 * </pre> 258 * 259 * <code>optional string role = 3506294;</code> 260 * 261 * @return Whether the role field is set. 262 */ 263 @java.lang.Override hasRole()264 public boolean hasRole() { 265 return ((bitField0_ & 0x00000004) != 0); 266 } 267 /** 268 * 269 * 270 * <pre> 271 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 272 * </pre> 273 * 274 * <code>optional string role = 3506294;</code> 275 * 276 * @return The role. 277 */ 278 @java.lang.Override getRole()279 public java.lang.String getRole() { 280 java.lang.Object ref = role_; 281 if (ref instanceof java.lang.String) { 282 return (java.lang.String) ref; 283 } else { 284 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 285 java.lang.String s = bs.toStringUtf8(); 286 role_ = s; 287 return s; 288 } 289 } 290 /** 291 * 292 * 293 * <pre> 294 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 295 * </pre> 296 * 297 * <code>optional string role = 3506294;</code> 298 * 299 * @return The bytes for role. 300 */ 301 @java.lang.Override getRoleBytes()302 public com.google.protobuf.ByteString getRoleBytes() { 303 java.lang.Object ref = role_; 304 if (ref instanceof java.lang.String) { 305 com.google.protobuf.ByteString b = 306 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 307 role_ = b; 308 return b; 309 } else { 310 return (com.google.protobuf.ByteString) ref; 311 } 312 } 313 314 private byte memoizedIsInitialized = -1; 315 316 @java.lang.Override isInitialized()317 public final boolean isInitialized() { 318 byte isInitialized = memoizedIsInitialized; 319 if (isInitialized == 1) return true; 320 if (isInitialized == 0) return false; 321 322 memoizedIsInitialized = 1; 323 return true; 324 } 325 326 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)327 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 328 if (((bitField0_ & 0x00000004) != 0)) { 329 com.google.protobuf.GeneratedMessageV3.writeString(output, 3506294, role_); 330 } 331 if (((bitField0_ & 0x00000002) != 0)) { 332 output.writeMessage(212430107, getCondition()); 333 } 334 for (int i = 0; i < members_.size(); i++) { 335 com.google.protobuf.GeneratedMessageV3.writeString(output, 412010777, members_.getRaw(i)); 336 } 337 if (((bitField0_ & 0x00000001) != 0)) { 338 com.google.protobuf.GeneratedMessageV3.writeString(output, 441088277, bindingId_); 339 } 340 getUnknownFields().writeTo(output); 341 } 342 343 @java.lang.Override getSerializedSize()344 public int getSerializedSize() { 345 int size = memoizedSize; 346 if (size != -1) return size; 347 348 size = 0; 349 if (((bitField0_ & 0x00000004) != 0)) { 350 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3506294, role_); 351 } 352 if (((bitField0_ & 0x00000002) != 0)) { 353 size += com.google.protobuf.CodedOutputStream.computeMessageSize(212430107, getCondition()); 354 } 355 { 356 int dataSize = 0; 357 for (int i = 0; i < members_.size(); i++) { 358 dataSize += computeStringSizeNoTag(members_.getRaw(i)); 359 } 360 size += dataSize; 361 size += 5 * getMembersList().size(); 362 } 363 if (((bitField0_ & 0x00000001) != 0)) { 364 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(441088277, bindingId_); 365 } 366 size += getUnknownFields().getSerializedSize(); 367 memoizedSize = size; 368 return size; 369 } 370 371 @java.lang.Override equals(final java.lang.Object obj)372 public boolean equals(final java.lang.Object obj) { 373 if (obj == this) { 374 return true; 375 } 376 if (!(obj instanceof com.google.cloud.compute.v1.Binding)) { 377 return super.equals(obj); 378 } 379 com.google.cloud.compute.v1.Binding other = (com.google.cloud.compute.v1.Binding) obj; 380 381 if (hasBindingId() != other.hasBindingId()) return false; 382 if (hasBindingId()) { 383 if (!getBindingId().equals(other.getBindingId())) return false; 384 } 385 if (hasCondition() != other.hasCondition()) return false; 386 if (hasCondition()) { 387 if (!getCondition().equals(other.getCondition())) return false; 388 } 389 if (!getMembersList().equals(other.getMembersList())) return false; 390 if (hasRole() != other.hasRole()) return false; 391 if (hasRole()) { 392 if (!getRole().equals(other.getRole())) return false; 393 } 394 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 395 return true; 396 } 397 398 @java.lang.Override hashCode()399 public int hashCode() { 400 if (memoizedHashCode != 0) { 401 return memoizedHashCode; 402 } 403 int hash = 41; 404 hash = (19 * hash) + getDescriptor().hashCode(); 405 if (hasBindingId()) { 406 hash = (37 * hash) + BINDING_ID_FIELD_NUMBER; 407 hash = (53 * hash) + getBindingId().hashCode(); 408 } 409 if (hasCondition()) { 410 hash = (37 * hash) + CONDITION_FIELD_NUMBER; 411 hash = (53 * hash) + getCondition().hashCode(); 412 } 413 if (getMembersCount() > 0) { 414 hash = (37 * hash) + MEMBERS_FIELD_NUMBER; 415 hash = (53 * hash) + getMembersList().hashCode(); 416 } 417 if (hasRole()) { 418 hash = (37 * hash) + ROLE_FIELD_NUMBER; 419 hash = (53 * hash) + getRole().hashCode(); 420 } 421 hash = (29 * hash) + getUnknownFields().hashCode(); 422 memoizedHashCode = hash; 423 return hash; 424 } 425 parseFrom(java.nio.ByteBuffer data)426 public static com.google.cloud.compute.v1.Binding parseFrom(java.nio.ByteBuffer data) 427 throws com.google.protobuf.InvalidProtocolBufferException { 428 return PARSER.parseFrom(data); 429 } 430 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)431 public static com.google.cloud.compute.v1.Binding parseFrom( 432 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 433 throws com.google.protobuf.InvalidProtocolBufferException { 434 return PARSER.parseFrom(data, extensionRegistry); 435 } 436 parseFrom(com.google.protobuf.ByteString data)437 public static com.google.cloud.compute.v1.Binding parseFrom(com.google.protobuf.ByteString data) 438 throws com.google.protobuf.InvalidProtocolBufferException { 439 return PARSER.parseFrom(data); 440 } 441 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)442 public static com.google.cloud.compute.v1.Binding parseFrom( 443 com.google.protobuf.ByteString data, 444 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 445 throws com.google.protobuf.InvalidProtocolBufferException { 446 return PARSER.parseFrom(data, extensionRegistry); 447 } 448 parseFrom(byte[] data)449 public static com.google.cloud.compute.v1.Binding parseFrom(byte[] data) 450 throws com.google.protobuf.InvalidProtocolBufferException { 451 return PARSER.parseFrom(data); 452 } 453 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)454 public static com.google.cloud.compute.v1.Binding parseFrom( 455 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 456 throws com.google.protobuf.InvalidProtocolBufferException { 457 return PARSER.parseFrom(data, extensionRegistry); 458 } 459 parseFrom(java.io.InputStream input)460 public static com.google.cloud.compute.v1.Binding parseFrom(java.io.InputStream input) 461 throws java.io.IOException { 462 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 463 } 464 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)465 public static com.google.cloud.compute.v1.Binding parseFrom( 466 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 467 throws java.io.IOException { 468 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 469 PARSER, input, extensionRegistry); 470 } 471 parseDelimitedFrom(java.io.InputStream input)472 public static com.google.cloud.compute.v1.Binding parseDelimitedFrom(java.io.InputStream input) 473 throws java.io.IOException { 474 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 475 } 476 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)477 public static com.google.cloud.compute.v1.Binding parseDelimitedFrom( 478 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 479 throws java.io.IOException { 480 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 481 PARSER, input, extensionRegistry); 482 } 483 parseFrom( com.google.protobuf.CodedInputStream input)484 public static com.google.cloud.compute.v1.Binding parseFrom( 485 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 486 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 487 } 488 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)489 public static com.google.cloud.compute.v1.Binding parseFrom( 490 com.google.protobuf.CodedInputStream input, 491 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 492 throws java.io.IOException { 493 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 494 PARSER, input, extensionRegistry); 495 } 496 497 @java.lang.Override newBuilderForType()498 public Builder newBuilderForType() { 499 return newBuilder(); 500 } 501 newBuilder()502 public static Builder newBuilder() { 503 return DEFAULT_INSTANCE.toBuilder(); 504 } 505 newBuilder(com.google.cloud.compute.v1.Binding prototype)506 public static Builder newBuilder(com.google.cloud.compute.v1.Binding prototype) { 507 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 508 } 509 510 @java.lang.Override toBuilder()511 public Builder toBuilder() { 512 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 513 } 514 515 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)516 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 517 Builder builder = new Builder(parent); 518 return builder; 519 } 520 /** 521 * 522 * 523 * <pre> 524 * Associates `members`, or principals, with a `role`. 525 * </pre> 526 * 527 * Protobuf type {@code google.cloud.compute.v1.Binding} 528 */ 529 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 530 implements 531 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Binding) 532 com.google.cloud.compute.v1.BindingOrBuilder { getDescriptor()533 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 534 return com.google.cloud.compute.v1.Compute 535 .internal_static_google_cloud_compute_v1_Binding_descriptor; 536 } 537 538 @java.lang.Override 539 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()540 internalGetFieldAccessorTable() { 541 return com.google.cloud.compute.v1.Compute 542 .internal_static_google_cloud_compute_v1_Binding_fieldAccessorTable 543 .ensureFieldAccessorsInitialized( 544 com.google.cloud.compute.v1.Binding.class, 545 com.google.cloud.compute.v1.Binding.Builder.class); 546 } 547 548 // Construct using com.google.cloud.compute.v1.Binding.newBuilder() Builder()549 private Builder() { 550 maybeForceBuilderInitialization(); 551 } 552 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)553 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 554 super(parent); 555 maybeForceBuilderInitialization(); 556 } 557 maybeForceBuilderInitialization()558 private void maybeForceBuilderInitialization() { 559 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 560 getConditionFieldBuilder(); 561 } 562 } 563 564 @java.lang.Override clear()565 public Builder clear() { 566 super.clear(); 567 bitField0_ = 0; 568 bindingId_ = ""; 569 condition_ = null; 570 if (conditionBuilder_ != null) { 571 conditionBuilder_.dispose(); 572 conditionBuilder_ = null; 573 } 574 members_ = com.google.protobuf.LazyStringArrayList.EMPTY; 575 bitField0_ = (bitField0_ & ~0x00000004); 576 role_ = ""; 577 return this; 578 } 579 580 @java.lang.Override getDescriptorForType()581 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 582 return com.google.cloud.compute.v1.Compute 583 .internal_static_google_cloud_compute_v1_Binding_descriptor; 584 } 585 586 @java.lang.Override getDefaultInstanceForType()587 public com.google.cloud.compute.v1.Binding getDefaultInstanceForType() { 588 return com.google.cloud.compute.v1.Binding.getDefaultInstance(); 589 } 590 591 @java.lang.Override build()592 public com.google.cloud.compute.v1.Binding build() { 593 com.google.cloud.compute.v1.Binding result = buildPartial(); 594 if (!result.isInitialized()) { 595 throw newUninitializedMessageException(result); 596 } 597 return result; 598 } 599 600 @java.lang.Override buildPartial()601 public com.google.cloud.compute.v1.Binding buildPartial() { 602 com.google.cloud.compute.v1.Binding result = new com.google.cloud.compute.v1.Binding(this); 603 buildPartialRepeatedFields(result); 604 if (bitField0_ != 0) { 605 buildPartial0(result); 606 } 607 onBuilt(); 608 return result; 609 } 610 buildPartialRepeatedFields(com.google.cloud.compute.v1.Binding result)611 private void buildPartialRepeatedFields(com.google.cloud.compute.v1.Binding result) { 612 if (((bitField0_ & 0x00000004) != 0)) { 613 members_ = members_.getUnmodifiableView(); 614 bitField0_ = (bitField0_ & ~0x00000004); 615 } 616 result.members_ = members_; 617 } 618 buildPartial0(com.google.cloud.compute.v1.Binding result)619 private void buildPartial0(com.google.cloud.compute.v1.Binding result) { 620 int from_bitField0_ = bitField0_; 621 int to_bitField0_ = 0; 622 if (((from_bitField0_ & 0x00000001) != 0)) { 623 result.bindingId_ = bindingId_; 624 to_bitField0_ |= 0x00000001; 625 } 626 if (((from_bitField0_ & 0x00000002) != 0)) { 627 result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); 628 to_bitField0_ |= 0x00000002; 629 } 630 if (((from_bitField0_ & 0x00000008) != 0)) { 631 result.role_ = role_; 632 to_bitField0_ |= 0x00000004; 633 } 634 result.bitField0_ |= to_bitField0_; 635 } 636 637 @java.lang.Override clone()638 public Builder clone() { 639 return super.clone(); 640 } 641 642 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)643 public Builder setField( 644 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 645 return super.setField(field, value); 646 } 647 648 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)649 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 650 return super.clearField(field); 651 } 652 653 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)654 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 655 return super.clearOneof(oneof); 656 } 657 658 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)659 public Builder setRepeatedField( 660 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 661 return super.setRepeatedField(field, index, value); 662 } 663 664 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)665 public Builder addRepeatedField( 666 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 667 return super.addRepeatedField(field, value); 668 } 669 670 @java.lang.Override mergeFrom(com.google.protobuf.Message other)671 public Builder mergeFrom(com.google.protobuf.Message other) { 672 if (other instanceof com.google.cloud.compute.v1.Binding) { 673 return mergeFrom((com.google.cloud.compute.v1.Binding) other); 674 } else { 675 super.mergeFrom(other); 676 return this; 677 } 678 } 679 mergeFrom(com.google.cloud.compute.v1.Binding other)680 public Builder mergeFrom(com.google.cloud.compute.v1.Binding other) { 681 if (other == com.google.cloud.compute.v1.Binding.getDefaultInstance()) return this; 682 if (other.hasBindingId()) { 683 bindingId_ = other.bindingId_; 684 bitField0_ |= 0x00000001; 685 onChanged(); 686 } 687 if (other.hasCondition()) { 688 mergeCondition(other.getCondition()); 689 } 690 if (!other.members_.isEmpty()) { 691 if (members_.isEmpty()) { 692 members_ = other.members_; 693 bitField0_ = (bitField0_ & ~0x00000004); 694 } else { 695 ensureMembersIsMutable(); 696 members_.addAll(other.members_); 697 } 698 onChanged(); 699 } 700 if (other.hasRole()) { 701 role_ = other.role_; 702 bitField0_ |= 0x00000008; 703 onChanged(); 704 } 705 this.mergeUnknownFields(other.getUnknownFields()); 706 onChanged(); 707 return this; 708 } 709 710 @java.lang.Override isInitialized()711 public final boolean isInitialized() { 712 return true; 713 } 714 715 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)716 public Builder mergeFrom( 717 com.google.protobuf.CodedInputStream input, 718 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 719 throws java.io.IOException { 720 if (extensionRegistry == null) { 721 throw new java.lang.NullPointerException(); 722 } 723 try { 724 boolean done = false; 725 while (!done) { 726 int tag = input.readTag(); 727 switch (tag) { 728 case 0: 729 done = true; 730 break; 731 case 28050354: 732 { 733 role_ = input.readStringRequireUtf8(); 734 bitField0_ |= 0x00000008; 735 break; 736 } // case 28050354 737 case 1699440858: 738 { 739 input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); 740 bitField0_ |= 0x00000002; 741 break; 742 } // case 1699440858 743 case -998881078: 744 { 745 java.lang.String s = input.readStringRequireUtf8(); 746 ensureMembersIsMutable(); 747 members_.add(s); 748 break; 749 } // case -998881078 750 case -766261078: 751 { 752 bindingId_ = input.readStringRequireUtf8(); 753 bitField0_ |= 0x00000001; 754 break; 755 } // case -766261078 756 default: 757 { 758 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 759 done = true; // was an endgroup tag 760 } 761 break; 762 } // default: 763 } // switch (tag) 764 } // while (!done) 765 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 766 throw e.unwrapIOException(); 767 } finally { 768 onChanged(); 769 } // finally 770 return this; 771 } 772 773 private int bitField0_; 774 775 private java.lang.Object bindingId_ = ""; 776 /** 777 * 778 * 779 * <pre> 780 * This is deprecated and has no effect. Do not use. 781 * </pre> 782 * 783 * <code>optional string binding_id = 441088277;</code> 784 * 785 * @return Whether the bindingId field is set. 786 */ hasBindingId()787 public boolean hasBindingId() { 788 return ((bitField0_ & 0x00000001) != 0); 789 } 790 /** 791 * 792 * 793 * <pre> 794 * This is deprecated and has no effect. Do not use. 795 * </pre> 796 * 797 * <code>optional string binding_id = 441088277;</code> 798 * 799 * @return The bindingId. 800 */ getBindingId()801 public java.lang.String getBindingId() { 802 java.lang.Object ref = bindingId_; 803 if (!(ref instanceof java.lang.String)) { 804 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 805 java.lang.String s = bs.toStringUtf8(); 806 bindingId_ = s; 807 return s; 808 } else { 809 return (java.lang.String) ref; 810 } 811 } 812 /** 813 * 814 * 815 * <pre> 816 * This is deprecated and has no effect. Do not use. 817 * </pre> 818 * 819 * <code>optional string binding_id = 441088277;</code> 820 * 821 * @return The bytes for bindingId. 822 */ getBindingIdBytes()823 public com.google.protobuf.ByteString getBindingIdBytes() { 824 java.lang.Object ref = bindingId_; 825 if (ref instanceof String) { 826 com.google.protobuf.ByteString b = 827 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 828 bindingId_ = b; 829 return b; 830 } else { 831 return (com.google.protobuf.ByteString) ref; 832 } 833 } 834 /** 835 * 836 * 837 * <pre> 838 * This is deprecated and has no effect. Do not use. 839 * </pre> 840 * 841 * <code>optional string binding_id = 441088277;</code> 842 * 843 * @param value The bindingId to set. 844 * @return This builder for chaining. 845 */ setBindingId(java.lang.String value)846 public Builder setBindingId(java.lang.String value) { 847 if (value == null) { 848 throw new NullPointerException(); 849 } 850 bindingId_ = value; 851 bitField0_ |= 0x00000001; 852 onChanged(); 853 return this; 854 } 855 /** 856 * 857 * 858 * <pre> 859 * This is deprecated and has no effect. Do not use. 860 * </pre> 861 * 862 * <code>optional string binding_id = 441088277;</code> 863 * 864 * @return This builder for chaining. 865 */ clearBindingId()866 public Builder clearBindingId() { 867 bindingId_ = getDefaultInstance().getBindingId(); 868 bitField0_ = (bitField0_ & ~0x00000001); 869 onChanged(); 870 return this; 871 } 872 /** 873 * 874 * 875 * <pre> 876 * This is deprecated and has no effect. Do not use. 877 * </pre> 878 * 879 * <code>optional string binding_id = 441088277;</code> 880 * 881 * @param value The bytes for bindingId to set. 882 * @return This builder for chaining. 883 */ setBindingIdBytes(com.google.protobuf.ByteString value)884 public Builder setBindingIdBytes(com.google.protobuf.ByteString value) { 885 if (value == null) { 886 throw new NullPointerException(); 887 } 888 checkByteStringIsUtf8(value); 889 bindingId_ = value; 890 bitField0_ |= 0x00000001; 891 onChanged(); 892 return this; 893 } 894 895 private com.google.cloud.compute.v1.Expr condition_; 896 private com.google.protobuf.SingleFieldBuilderV3< 897 com.google.cloud.compute.v1.Expr, 898 com.google.cloud.compute.v1.Expr.Builder, 899 com.google.cloud.compute.v1.ExprOrBuilder> 900 conditionBuilder_; 901 /** 902 * 903 * 904 * <pre> 905 * 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). 906 * </pre> 907 * 908 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 909 * 910 * @return Whether the condition field is set. 911 */ hasCondition()912 public boolean hasCondition() { 913 return ((bitField0_ & 0x00000002) != 0); 914 } 915 /** 916 * 917 * 918 * <pre> 919 * 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). 920 * </pre> 921 * 922 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 923 * 924 * @return The condition. 925 */ getCondition()926 public com.google.cloud.compute.v1.Expr getCondition() { 927 if (conditionBuilder_ == null) { 928 return condition_ == null 929 ? com.google.cloud.compute.v1.Expr.getDefaultInstance() 930 : condition_; 931 } else { 932 return conditionBuilder_.getMessage(); 933 } 934 } 935 /** 936 * 937 * 938 * <pre> 939 * 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). 940 * </pre> 941 * 942 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 943 */ setCondition(com.google.cloud.compute.v1.Expr value)944 public Builder setCondition(com.google.cloud.compute.v1.Expr value) { 945 if (conditionBuilder_ == null) { 946 if (value == null) { 947 throw new NullPointerException(); 948 } 949 condition_ = value; 950 } else { 951 conditionBuilder_.setMessage(value); 952 } 953 bitField0_ |= 0x00000002; 954 onChanged(); 955 return this; 956 } 957 /** 958 * 959 * 960 * <pre> 961 * 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). 962 * </pre> 963 * 964 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 965 */ setCondition(com.google.cloud.compute.v1.Expr.Builder builderForValue)966 public Builder setCondition(com.google.cloud.compute.v1.Expr.Builder builderForValue) { 967 if (conditionBuilder_ == null) { 968 condition_ = builderForValue.build(); 969 } else { 970 conditionBuilder_.setMessage(builderForValue.build()); 971 } 972 bitField0_ |= 0x00000002; 973 onChanged(); 974 return this; 975 } 976 /** 977 * 978 * 979 * <pre> 980 * 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). 981 * </pre> 982 * 983 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 984 */ mergeCondition(com.google.cloud.compute.v1.Expr value)985 public Builder mergeCondition(com.google.cloud.compute.v1.Expr value) { 986 if (conditionBuilder_ == null) { 987 if (((bitField0_ & 0x00000002) != 0) 988 && condition_ != null 989 && condition_ != com.google.cloud.compute.v1.Expr.getDefaultInstance()) { 990 getConditionBuilder().mergeFrom(value); 991 } else { 992 condition_ = value; 993 } 994 } else { 995 conditionBuilder_.mergeFrom(value); 996 } 997 bitField0_ |= 0x00000002; 998 onChanged(); 999 return this; 1000 } 1001 /** 1002 * 1003 * 1004 * <pre> 1005 * 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). 1006 * </pre> 1007 * 1008 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 1009 */ clearCondition()1010 public Builder clearCondition() { 1011 bitField0_ = (bitField0_ & ~0x00000002); 1012 condition_ = null; 1013 if (conditionBuilder_ != null) { 1014 conditionBuilder_.dispose(); 1015 conditionBuilder_ = null; 1016 } 1017 onChanged(); 1018 return this; 1019 } 1020 /** 1021 * 1022 * 1023 * <pre> 1024 * 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). 1025 * </pre> 1026 * 1027 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 1028 */ getConditionBuilder()1029 public com.google.cloud.compute.v1.Expr.Builder getConditionBuilder() { 1030 bitField0_ |= 0x00000002; 1031 onChanged(); 1032 return getConditionFieldBuilder().getBuilder(); 1033 } 1034 /** 1035 * 1036 * 1037 * <pre> 1038 * 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). 1039 * </pre> 1040 * 1041 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 1042 */ getConditionOrBuilder()1043 public com.google.cloud.compute.v1.ExprOrBuilder getConditionOrBuilder() { 1044 if (conditionBuilder_ != null) { 1045 return conditionBuilder_.getMessageOrBuilder(); 1046 } else { 1047 return condition_ == null 1048 ? com.google.cloud.compute.v1.Expr.getDefaultInstance() 1049 : condition_; 1050 } 1051 } 1052 /** 1053 * 1054 * 1055 * <pre> 1056 * 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). 1057 * </pre> 1058 * 1059 * <code>optional .google.cloud.compute.v1.Expr condition = 212430107;</code> 1060 */ 1061 private com.google.protobuf.SingleFieldBuilderV3< 1062 com.google.cloud.compute.v1.Expr, 1063 com.google.cloud.compute.v1.Expr.Builder, 1064 com.google.cloud.compute.v1.ExprOrBuilder> getConditionFieldBuilder()1065 getConditionFieldBuilder() { 1066 if (conditionBuilder_ == null) { 1067 conditionBuilder_ = 1068 new com.google.protobuf.SingleFieldBuilderV3< 1069 com.google.cloud.compute.v1.Expr, 1070 com.google.cloud.compute.v1.Expr.Builder, 1071 com.google.cloud.compute.v1.ExprOrBuilder>( 1072 getCondition(), getParentForChildren(), isClean()); 1073 condition_ = null; 1074 } 1075 return conditionBuilder_; 1076 } 1077 1078 private com.google.protobuf.LazyStringList members_ = 1079 com.google.protobuf.LazyStringArrayList.EMPTY; 1080 ensureMembersIsMutable()1081 private void ensureMembersIsMutable() { 1082 if (!((bitField0_ & 0x00000004) != 0)) { 1083 members_ = new com.google.protobuf.LazyStringArrayList(members_); 1084 bitField0_ |= 0x00000004; 1085 } 1086 } 1087 /** 1088 * 1089 * 1090 * <pre> 1091 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 1092 * </pre> 1093 * 1094 * <code>repeated string members = 412010777;</code> 1095 * 1096 * @return A list containing the members. 1097 */ getMembersList()1098 public com.google.protobuf.ProtocolStringList getMembersList() { 1099 return members_.getUnmodifiableView(); 1100 } 1101 /** 1102 * 1103 * 1104 * <pre> 1105 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 1106 * </pre> 1107 * 1108 * <code>repeated string members = 412010777;</code> 1109 * 1110 * @return The count of members. 1111 */ getMembersCount()1112 public int getMembersCount() { 1113 return members_.size(); 1114 } 1115 /** 1116 * 1117 * 1118 * <pre> 1119 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 1120 * </pre> 1121 * 1122 * <code>repeated string members = 412010777;</code> 1123 * 1124 * @param index The index of the element to return. 1125 * @return The members at the given index. 1126 */ getMembers(int index)1127 public java.lang.String getMembers(int index) { 1128 return members_.get(index); 1129 } 1130 /** 1131 * 1132 * 1133 * <pre> 1134 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 1135 * </pre> 1136 * 1137 * <code>repeated string members = 412010777;</code> 1138 * 1139 * @param index The index of the value to return. 1140 * @return The bytes of the members at the given index. 1141 */ getMembersBytes(int index)1142 public com.google.protobuf.ByteString getMembersBytes(int index) { 1143 return members_.getByteString(index); 1144 } 1145 /** 1146 * 1147 * 1148 * <pre> 1149 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 1150 * </pre> 1151 * 1152 * <code>repeated string members = 412010777;</code> 1153 * 1154 * @param index The index to set the value at. 1155 * @param value The members to set. 1156 * @return This builder for chaining. 1157 */ setMembers(int index, java.lang.String value)1158 public Builder setMembers(int index, java.lang.String value) { 1159 if (value == null) { 1160 throw new NullPointerException(); 1161 } 1162 ensureMembersIsMutable(); 1163 members_.set(index, value); 1164 onChanged(); 1165 return this; 1166 } 1167 /** 1168 * 1169 * 1170 * <pre> 1171 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 1172 * </pre> 1173 * 1174 * <code>repeated string members = 412010777;</code> 1175 * 1176 * @param value The members to add. 1177 * @return This builder for chaining. 1178 */ addMembers(java.lang.String value)1179 public Builder addMembers(java.lang.String value) { 1180 if (value == null) { 1181 throw new NullPointerException(); 1182 } 1183 ensureMembersIsMutable(); 1184 members_.add(value); 1185 onChanged(); 1186 return this; 1187 } 1188 /** 1189 * 1190 * 1191 * <pre> 1192 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 1193 * </pre> 1194 * 1195 * <code>repeated string members = 412010777;</code> 1196 * 1197 * @param values The members to add. 1198 * @return This builder for chaining. 1199 */ addAllMembers(java.lang.Iterable<java.lang.String> values)1200 public Builder addAllMembers(java.lang.Iterable<java.lang.String> values) { 1201 ensureMembersIsMutable(); 1202 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, members_); 1203 onChanged(); 1204 return this; 1205 } 1206 /** 1207 * 1208 * 1209 * <pre> 1210 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 1211 * </pre> 1212 * 1213 * <code>repeated string members = 412010777;</code> 1214 * 1215 * @return This builder for chaining. 1216 */ clearMembers()1217 public Builder clearMembers() { 1218 members_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1219 bitField0_ = (bitField0_ & ~0x00000004); 1220 onChanged(); 1221 return this; 1222 } 1223 /** 1224 * 1225 * 1226 * <pre> 1227 * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `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. 1228 * </pre> 1229 * 1230 * <code>repeated string members = 412010777;</code> 1231 * 1232 * @param value The bytes of the members to add. 1233 * @return This builder for chaining. 1234 */ addMembersBytes(com.google.protobuf.ByteString value)1235 public Builder addMembersBytes(com.google.protobuf.ByteString value) { 1236 if (value == null) { 1237 throw new NullPointerException(); 1238 } 1239 checkByteStringIsUtf8(value); 1240 ensureMembersIsMutable(); 1241 members_.add(value); 1242 onChanged(); 1243 return this; 1244 } 1245 1246 private java.lang.Object role_ = ""; 1247 /** 1248 * 1249 * 1250 * <pre> 1251 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1252 * </pre> 1253 * 1254 * <code>optional string role = 3506294;</code> 1255 * 1256 * @return Whether the role field is set. 1257 */ hasRole()1258 public boolean hasRole() { 1259 return ((bitField0_ & 0x00000008) != 0); 1260 } 1261 /** 1262 * 1263 * 1264 * <pre> 1265 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1266 * </pre> 1267 * 1268 * <code>optional string role = 3506294;</code> 1269 * 1270 * @return The role. 1271 */ getRole()1272 public java.lang.String getRole() { 1273 java.lang.Object ref = role_; 1274 if (!(ref instanceof java.lang.String)) { 1275 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1276 java.lang.String s = bs.toStringUtf8(); 1277 role_ = s; 1278 return s; 1279 } else { 1280 return (java.lang.String) ref; 1281 } 1282 } 1283 /** 1284 * 1285 * 1286 * <pre> 1287 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1288 * </pre> 1289 * 1290 * <code>optional string role = 3506294;</code> 1291 * 1292 * @return The bytes for role. 1293 */ getRoleBytes()1294 public com.google.protobuf.ByteString getRoleBytes() { 1295 java.lang.Object ref = role_; 1296 if (ref instanceof String) { 1297 com.google.protobuf.ByteString b = 1298 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1299 role_ = b; 1300 return b; 1301 } else { 1302 return (com.google.protobuf.ByteString) ref; 1303 } 1304 } 1305 /** 1306 * 1307 * 1308 * <pre> 1309 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1310 * </pre> 1311 * 1312 * <code>optional string role = 3506294;</code> 1313 * 1314 * @param value The role to set. 1315 * @return This builder for chaining. 1316 */ setRole(java.lang.String value)1317 public Builder setRole(java.lang.String value) { 1318 if (value == null) { 1319 throw new NullPointerException(); 1320 } 1321 role_ = value; 1322 bitField0_ |= 0x00000008; 1323 onChanged(); 1324 return this; 1325 } 1326 /** 1327 * 1328 * 1329 * <pre> 1330 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1331 * </pre> 1332 * 1333 * <code>optional string role = 3506294;</code> 1334 * 1335 * @return This builder for chaining. 1336 */ clearRole()1337 public Builder clearRole() { 1338 role_ = getDefaultInstance().getRole(); 1339 bitField0_ = (bitField0_ & ~0x00000008); 1340 onChanged(); 1341 return this; 1342 } 1343 /** 1344 * 1345 * 1346 * <pre> 1347 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1348 * </pre> 1349 * 1350 * <code>optional string role = 3506294;</code> 1351 * 1352 * @param value The bytes for role to set. 1353 * @return This builder for chaining. 1354 */ setRoleBytes(com.google.protobuf.ByteString value)1355 public Builder setRoleBytes(com.google.protobuf.ByteString value) { 1356 if (value == null) { 1357 throw new NullPointerException(); 1358 } 1359 checkByteStringIsUtf8(value); 1360 role_ = value; 1361 bitField0_ |= 0x00000008; 1362 onChanged(); 1363 return this; 1364 } 1365 1366 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1367 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1368 return super.setUnknownFields(unknownFields); 1369 } 1370 1371 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1372 public final Builder mergeUnknownFields( 1373 final com.google.protobuf.UnknownFieldSet unknownFields) { 1374 return super.mergeUnknownFields(unknownFields); 1375 } 1376 1377 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.Binding) 1378 } 1379 1380 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Binding) 1381 private static final com.google.cloud.compute.v1.Binding DEFAULT_INSTANCE; 1382 1383 static { 1384 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Binding(); 1385 } 1386 getDefaultInstance()1387 public static com.google.cloud.compute.v1.Binding getDefaultInstance() { 1388 return DEFAULT_INSTANCE; 1389 } 1390 1391 private static final com.google.protobuf.Parser<Binding> PARSER = 1392 new com.google.protobuf.AbstractParser<Binding>() { 1393 @java.lang.Override 1394 public Binding parsePartialFrom( 1395 com.google.protobuf.CodedInputStream input, 1396 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1397 throws com.google.protobuf.InvalidProtocolBufferException { 1398 Builder builder = newBuilder(); 1399 try { 1400 builder.mergeFrom(input, extensionRegistry); 1401 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1402 throw e.setUnfinishedMessage(builder.buildPartial()); 1403 } catch (com.google.protobuf.UninitializedMessageException e) { 1404 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1405 } catch (java.io.IOException e) { 1406 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1407 .setUnfinishedMessage(builder.buildPartial()); 1408 } 1409 return builder.buildPartial(); 1410 } 1411 }; 1412 parser()1413 public static com.google.protobuf.Parser<Binding> parser() { 1414 return PARSER; 1415 } 1416 1417 @java.lang.Override getParserForType()1418 public com.google.protobuf.Parser<Binding> getParserForType() { 1419 return PARSER; 1420 } 1421 1422 @java.lang.Override getDefaultInstanceForType()1423 public com.google.cloud.compute.v1.Binding getDefaultInstanceForType() { 1424 return DEFAULT_INSTANCE; 1425 } 1426 } 1427