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/asset/v1/asset_service.proto 18 19 package com.google.cloud.asset.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * IAM policy analysis query message. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} 29 */ 30 public final class IamPolicyAnalysisQuery extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery) 33 IamPolicyAnalysisQueryOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use IamPolicyAnalysisQuery.newBuilder() to construct. IamPolicyAnalysisQuery(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private IamPolicyAnalysisQuery(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 IamPolicyAnalysisQuery()40 private IamPolicyAnalysisQuery() { 41 scope_ = ""; 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new IamPolicyAnalysisQuery(); 48 } 49 50 @java.lang.Override getUnknownFields()51 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 52 return this.unknownFields; 53 } 54 getDescriptor()55 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 56 return com.google.cloud.asset.v1.AssetServiceProto 57 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.asset.v1.AssetServiceProto 64 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.class, 67 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder.class); 68 } 69 70 public interface ResourceSelectorOrBuilder 71 extends 72 // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) 73 com.google.protobuf.MessageOrBuilder { 74 75 /** 76 * 77 * 78 * <pre> 79 * Required. The [full resource name] 80 * (https://cloud.google.com/asset-inventory/docs/resource-name-format) 81 * of a resource of [supported resource 82 * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). 83 * </pre> 84 * 85 * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code> 86 * 87 * @return The fullResourceName. 88 */ getFullResourceName()89 java.lang.String getFullResourceName(); 90 /** 91 * 92 * 93 * <pre> 94 * Required. The [full resource name] 95 * (https://cloud.google.com/asset-inventory/docs/resource-name-format) 96 * of a resource of [supported resource 97 * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). 98 * </pre> 99 * 100 * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code> 101 * 102 * @return The bytes for fullResourceName. 103 */ getFullResourceNameBytes()104 com.google.protobuf.ByteString getFullResourceNameBytes(); 105 } 106 /** 107 * 108 * 109 * <pre> 110 * Specifies the resource to analyze for access policies, which may be set 111 * directly on the resource, or on ancestors such as organizations, folders or 112 * projects. 113 * </pre> 114 * 115 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector} 116 */ 117 public static final class ResourceSelector extends com.google.protobuf.GeneratedMessageV3 118 implements 119 // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) 120 ResourceSelectorOrBuilder { 121 private static final long serialVersionUID = 0L; 122 // Use ResourceSelector.newBuilder() to construct. ResourceSelector(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)123 private ResourceSelector(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 124 super(builder); 125 } 126 ResourceSelector()127 private ResourceSelector() { 128 fullResourceName_ = ""; 129 } 130 131 @java.lang.Override 132 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)133 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 134 return new ResourceSelector(); 135 } 136 137 @java.lang.Override getUnknownFields()138 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 139 return this.unknownFields; 140 } 141 getDescriptor()142 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 143 return com.google.cloud.asset.v1.AssetServiceProto 144 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; 145 } 146 147 @java.lang.Override 148 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()149 internalGetFieldAccessorTable() { 150 return com.google.cloud.asset.v1.AssetServiceProto 151 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable 152 .ensureFieldAccessorsInitialized( 153 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.class, 154 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder.class); 155 } 156 157 public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; 158 159 @SuppressWarnings("serial") 160 private volatile java.lang.Object fullResourceName_ = ""; 161 /** 162 * 163 * 164 * <pre> 165 * Required. The [full resource name] 166 * (https://cloud.google.com/asset-inventory/docs/resource-name-format) 167 * of a resource of [supported resource 168 * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). 169 * </pre> 170 * 171 * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code> 172 * 173 * @return The fullResourceName. 174 */ 175 @java.lang.Override getFullResourceName()176 public java.lang.String getFullResourceName() { 177 java.lang.Object ref = fullResourceName_; 178 if (ref instanceof java.lang.String) { 179 return (java.lang.String) ref; 180 } else { 181 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 182 java.lang.String s = bs.toStringUtf8(); 183 fullResourceName_ = s; 184 return s; 185 } 186 } 187 /** 188 * 189 * 190 * <pre> 191 * Required. The [full resource name] 192 * (https://cloud.google.com/asset-inventory/docs/resource-name-format) 193 * of a resource of [supported resource 194 * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). 195 * </pre> 196 * 197 * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code> 198 * 199 * @return The bytes for fullResourceName. 200 */ 201 @java.lang.Override getFullResourceNameBytes()202 public com.google.protobuf.ByteString getFullResourceNameBytes() { 203 java.lang.Object ref = fullResourceName_; 204 if (ref instanceof java.lang.String) { 205 com.google.protobuf.ByteString b = 206 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 207 fullResourceName_ = b; 208 return b; 209 } else { 210 return (com.google.protobuf.ByteString) ref; 211 } 212 } 213 214 private byte memoizedIsInitialized = -1; 215 216 @java.lang.Override isInitialized()217 public final boolean isInitialized() { 218 byte isInitialized = memoizedIsInitialized; 219 if (isInitialized == 1) return true; 220 if (isInitialized == 0) return false; 221 222 memoizedIsInitialized = 1; 223 return true; 224 } 225 226 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)227 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 228 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { 229 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); 230 } 231 getUnknownFields().writeTo(output); 232 } 233 234 @java.lang.Override getSerializedSize()235 public int getSerializedSize() { 236 int size = memoizedSize; 237 if (size != -1) return size; 238 239 size = 0; 240 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { 241 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); 242 } 243 size += getUnknownFields().getSerializedSize(); 244 memoizedSize = size; 245 return size; 246 } 247 248 @java.lang.Override equals(final java.lang.Object obj)249 public boolean equals(final java.lang.Object obj) { 250 if (obj == this) { 251 return true; 252 } 253 if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector)) { 254 return super.equals(obj); 255 } 256 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other = 257 (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) obj; 258 259 if (!getFullResourceName().equals(other.getFullResourceName())) return false; 260 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 261 return true; 262 } 263 264 @java.lang.Override hashCode()265 public int hashCode() { 266 if (memoizedHashCode != 0) { 267 return memoizedHashCode; 268 } 269 int hash = 41; 270 hash = (19 * hash) + getDescriptor().hashCode(); 271 hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; 272 hash = (53 * hash) + getFullResourceName().hashCode(); 273 hash = (29 * hash) + getUnknownFields().hashCode(); 274 memoizedHashCode = hash; 275 return hash; 276 } 277 parseFrom( java.nio.ByteBuffer data)278 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 279 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 280 return PARSER.parseFrom(data); 281 } 282 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)283 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 284 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 285 throws com.google.protobuf.InvalidProtocolBufferException { 286 return PARSER.parseFrom(data, extensionRegistry); 287 } 288 parseFrom( com.google.protobuf.ByteString data)289 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 290 com.google.protobuf.ByteString data) 291 throws com.google.protobuf.InvalidProtocolBufferException { 292 return PARSER.parseFrom(data); 293 } 294 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)295 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 296 com.google.protobuf.ByteString data, 297 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 298 throws com.google.protobuf.InvalidProtocolBufferException { 299 return PARSER.parseFrom(data, extensionRegistry); 300 } 301 parseFrom( byte[] data)302 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 303 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 304 return PARSER.parseFrom(data); 305 } 306 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)307 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 308 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 309 throws com.google.protobuf.InvalidProtocolBufferException { 310 return PARSER.parseFrom(data, extensionRegistry); 311 } 312 parseFrom( java.io.InputStream input)313 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 314 java.io.InputStream input) throws java.io.IOException { 315 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 316 } 317 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)318 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 319 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 320 throws java.io.IOException { 321 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 322 PARSER, input, extensionRegistry); 323 } 324 325 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseDelimitedFrom(java.io.InputStream input)326 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { 327 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 328 } 329 330 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)331 parseDelimitedFrom( 332 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 333 throws java.io.IOException { 334 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 335 PARSER, input, extensionRegistry); 336 } 337 parseFrom( com.google.protobuf.CodedInputStream input)338 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 339 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 340 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 341 } 342 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)343 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( 344 com.google.protobuf.CodedInputStream input, 345 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 346 throws java.io.IOException { 347 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 348 PARSER, input, extensionRegistry); 349 } 350 351 @java.lang.Override newBuilderForType()352 public Builder newBuilderForType() { 353 return newBuilder(); 354 } 355 newBuilder()356 public static Builder newBuilder() { 357 return DEFAULT_INSTANCE.toBuilder(); 358 } 359 newBuilder( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector prototype)360 public static Builder newBuilder( 361 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector prototype) { 362 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 363 } 364 365 @java.lang.Override toBuilder()366 public Builder toBuilder() { 367 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 368 } 369 370 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)371 protected Builder newBuilderForType( 372 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 373 Builder builder = new Builder(parent); 374 return builder; 375 } 376 /** 377 * 378 * 379 * <pre> 380 * Specifies the resource to analyze for access policies, which may be set 381 * directly on the resource, or on ancestors such as organizations, folders or 382 * projects. 383 * </pre> 384 * 385 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector} 386 */ 387 public static final class Builder 388 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 389 implements 390 // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) 391 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder { getDescriptor()392 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 393 return com.google.cloud.asset.v1.AssetServiceProto 394 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; 395 } 396 397 @java.lang.Override 398 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()399 internalGetFieldAccessorTable() { 400 return com.google.cloud.asset.v1.AssetServiceProto 401 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable 402 .ensureFieldAccessorsInitialized( 403 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.class, 404 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder.class); 405 } 406 407 // Construct using 408 // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.newBuilder() Builder()409 private Builder() {} 410 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)411 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 412 super(parent); 413 } 414 415 @java.lang.Override clear()416 public Builder clear() { 417 super.clear(); 418 bitField0_ = 0; 419 fullResourceName_ = ""; 420 return this; 421 } 422 423 @java.lang.Override getDescriptorForType()424 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 425 return com.google.cloud.asset.v1.AssetServiceProto 426 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; 427 } 428 429 @java.lang.Override 430 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getDefaultInstanceForType()431 getDefaultInstanceForType() { 432 return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 433 .getDefaultInstance(); 434 } 435 436 @java.lang.Override build()437 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector build() { 438 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result = buildPartial(); 439 if (!result.isInitialized()) { 440 throw newUninitializedMessageException(result); 441 } 442 return result; 443 } 444 445 @java.lang.Override buildPartial()446 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector buildPartial() { 447 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result = 448 new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector(this); 449 if (bitField0_ != 0) { 450 buildPartial0(result); 451 } 452 onBuilt(); 453 return result; 454 } 455 buildPartial0( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result)456 private void buildPartial0( 457 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result) { 458 int from_bitField0_ = bitField0_; 459 if (((from_bitField0_ & 0x00000001) != 0)) { 460 result.fullResourceName_ = fullResourceName_; 461 } 462 } 463 464 @java.lang.Override clone()465 public Builder clone() { 466 return super.clone(); 467 } 468 469 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)470 public Builder setField( 471 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 472 return super.setField(field, value); 473 } 474 475 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)476 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 477 return super.clearField(field); 478 } 479 480 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)481 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 482 return super.clearOneof(oneof); 483 } 484 485 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)486 public Builder setRepeatedField( 487 com.google.protobuf.Descriptors.FieldDescriptor field, 488 int index, 489 java.lang.Object value) { 490 return super.setRepeatedField(field, index, value); 491 } 492 493 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)494 public Builder addRepeatedField( 495 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 496 return super.addRepeatedField(field, value); 497 } 498 499 @java.lang.Override mergeFrom(com.google.protobuf.Message other)500 public Builder mergeFrom(com.google.protobuf.Message other) { 501 if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) { 502 return mergeFrom( 503 (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) other); 504 } else { 505 super.mergeFrom(other); 506 return this; 507 } 508 } 509 mergeFrom( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other)510 public Builder mergeFrom( 511 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other) { 512 if (other 513 == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 514 .getDefaultInstance()) return this; 515 if (!other.getFullResourceName().isEmpty()) { 516 fullResourceName_ = other.fullResourceName_; 517 bitField0_ |= 0x00000001; 518 onChanged(); 519 } 520 this.mergeUnknownFields(other.getUnknownFields()); 521 onChanged(); 522 return this; 523 } 524 525 @java.lang.Override isInitialized()526 public final boolean isInitialized() { 527 return true; 528 } 529 530 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)531 public Builder mergeFrom( 532 com.google.protobuf.CodedInputStream input, 533 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 534 throws java.io.IOException { 535 if (extensionRegistry == null) { 536 throw new java.lang.NullPointerException(); 537 } 538 try { 539 boolean done = false; 540 while (!done) { 541 int tag = input.readTag(); 542 switch (tag) { 543 case 0: 544 done = true; 545 break; 546 case 10: 547 { 548 fullResourceName_ = input.readStringRequireUtf8(); 549 bitField0_ |= 0x00000001; 550 break; 551 } // case 10 552 default: 553 { 554 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 555 done = true; // was an endgroup tag 556 } 557 break; 558 } // default: 559 } // switch (tag) 560 } // while (!done) 561 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 562 throw e.unwrapIOException(); 563 } finally { 564 onChanged(); 565 } // finally 566 return this; 567 } 568 569 private int bitField0_; 570 571 private java.lang.Object fullResourceName_ = ""; 572 /** 573 * 574 * 575 * <pre> 576 * Required. The [full resource name] 577 * (https://cloud.google.com/asset-inventory/docs/resource-name-format) 578 * of a resource of [supported resource 579 * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). 580 * </pre> 581 * 582 * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code> 583 * 584 * @return The fullResourceName. 585 */ getFullResourceName()586 public java.lang.String getFullResourceName() { 587 java.lang.Object ref = fullResourceName_; 588 if (!(ref instanceof java.lang.String)) { 589 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 590 java.lang.String s = bs.toStringUtf8(); 591 fullResourceName_ = s; 592 return s; 593 } else { 594 return (java.lang.String) ref; 595 } 596 } 597 /** 598 * 599 * 600 * <pre> 601 * Required. The [full resource name] 602 * (https://cloud.google.com/asset-inventory/docs/resource-name-format) 603 * of a resource of [supported resource 604 * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). 605 * </pre> 606 * 607 * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code> 608 * 609 * @return The bytes for fullResourceName. 610 */ getFullResourceNameBytes()611 public com.google.protobuf.ByteString getFullResourceNameBytes() { 612 java.lang.Object ref = fullResourceName_; 613 if (ref instanceof String) { 614 com.google.protobuf.ByteString b = 615 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 616 fullResourceName_ = b; 617 return b; 618 } else { 619 return (com.google.protobuf.ByteString) ref; 620 } 621 } 622 /** 623 * 624 * 625 * <pre> 626 * Required. The [full resource name] 627 * (https://cloud.google.com/asset-inventory/docs/resource-name-format) 628 * of a resource of [supported resource 629 * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). 630 * </pre> 631 * 632 * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code> 633 * 634 * @param value The fullResourceName to set. 635 * @return This builder for chaining. 636 */ setFullResourceName(java.lang.String value)637 public Builder setFullResourceName(java.lang.String value) { 638 if (value == null) { 639 throw new NullPointerException(); 640 } 641 fullResourceName_ = value; 642 bitField0_ |= 0x00000001; 643 onChanged(); 644 return this; 645 } 646 /** 647 * 648 * 649 * <pre> 650 * Required. The [full resource name] 651 * (https://cloud.google.com/asset-inventory/docs/resource-name-format) 652 * of a resource of [supported resource 653 * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). 654 * </pre> 655 * 656 * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code> 657 * 658 * @return This builder for chaining. 659 */ clearFullResourceName()660 public Builder clearFullResourceName() { 661 fullResourceName_ = getDefaultInstance().getFullResourceName(); 662 bitField0_ = (bitField0_ & ~0x00000001); 663 onChanged(); 664 return this; 665 } 666 /** 667 * 668 * 669 * <pre> 670 * Required. The [full resource name] 671 * (https://cloud.google.com/asset-inventory/docs/resource-name-format) 672 * of a resource of [supported resource 673 * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). 674 * </pre> 675 * 676 * <code>string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED];</code> 677 * 678 * @param value The bytes for fullResourceName to set. 679 * @return This builder for chaining. 680 */ setFullResourceNameBytes(com.google.protobuf.ByteString value)681 public Builder setFullResourceNameBytes(com.google.protobuf.ByteString value) { 682 if (value == null) { 683 throw new NullPointerException(); 684 } 685 checkByteStringIsUtf8(value); 686 fullResourceName_ = value; 687 bitField0_ |= 0x00000001; 688 onChanged(); 689 return this; 690 } 691 692 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)693 public final Builder setUnknownFields( 694 final com.google.protobuf.UnknownFieldSet unknownFields) { 695 return super.setUnknownFields(unknownFields); 696 } 697 698 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)699 public final Builder mergeUnknownFields( 700 final com.google.protobuf.UnknownFieldSet unknownFields) { 701 return super.mergeUnknownFields(unknownFields); 702 } 703 704 // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) 705 } 706 707 // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) 708 private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 709 DEFAULT_INSTANCE; 710 711 static { 712 DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector(); 713 } 714 715 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getDefaultInstance()716 getDefaultInstance() { 717 return DEFAULT_INSTANCE; 718 } 719 720 private static final com.google.protobuf.Parser<ResourceSelector> PARSER = 721 new com.google.protobuf.AbstractParser<ResourceSelector>() { 722 @java.lang.Override 723 public ResourceSelector parsePartialFrom( 724 com.google.protobuf.CodedInputStream input, 725 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 726 throws com.google.protobuf.InvalidProtocolBufferException { 727 Builder builder = newBuilder(); 728 try { 729 builder.mergeFrom(input, extensionRegistry); 730 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 731 throw e.setUnfinishedMessage(builder.buildPartial()); 732 } catch (com.google.protobuf.UninitializedMessageException e) { 733 throw e.asInvalidProtocolBufferException() 734 .setUnfinishedMessage(builder.buildPartial()); 735 } catch (java.io.IOException e) { 736 throw new com.google.protobuf.InvalidProtocolBufferException(e) 737 .setUnfinishedMessage(builder.buildPartial()); 738 } 739 return builder.buildPartial(); 740 } 741 }; 742 parser()743 public static com.google.protobuf.Parser<ResourceSelector> parser() { 744 return PARSER; 745 } 746 747 @java.lang.Override getParserForType()748 public com.google.protobuf.Parser<ResourceSelector> getParserForType() { 749 return PARSER; 750 } 751 752 @java.lang.Override 753 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getDefaultInstanceForType()754 getDefaultInstanceForType() { 755 return DEFAULT_INSTANCE; 756 } 757 } 758 759 public interface IdentitySelectorOrBuilder 760 extends 761 // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) 762 com.google.protobuf.MessageOrBuilder { 763 764 /** 765 * 766 * 767 * <pre> 768 * Required. The identity appear in the form of principals in 769 * [IAM policy 770 * binding](https://cloud.google.com/iam/reference/rest/v1/Binding). 771 * The examples of supported forms are: 772 * "user:mike@example.com", 773 * "group:admins@example.com", 774 * "domain:google.com", 775 * "serviceAccount:my-project-id@appspot.gserviceaccount.com". 776 * Notice that wildcard characters (such as * and ?) are not supported. 777 * You must give a specific identity. 778 * </pre> 779 * 780 * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code> 781 * 782 * @return The identity. 783 */ getIdentity()784 java.lang.String getIdentity(); 785 /** 786 * 787 * 788 * <pre> 789 * Required. The identity appear in the form of principals in 790 * [IAM policy 791 * binding](https://cloud.google.com/iam/reference/rest/v1/Binding). 792 * The examples of supported forms are: 793 * "user:mike@example.com", 794 * "group:admins@example.com", 795 * "domain:google.com", 796 * "serviceAccount:my-project-id@appspot.gserviceaccount.com". 797 * Notice that wildcard characters (such as * and ?) are not supported. 798 * You must give a specific identity. 799 * </pre> 800 * 801 * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code> 802 * 803 * @return The bytes for identity. 804 */ getIdentityBytes()805 com.google.protobuf.ByteString getIdentityBytes(); 806 } 807 /** 808 * 809 * 810 * <pre> 811 * Specifies an identity for which to determine resource access, based on 812 * roles assigned either directly to them or to the groups they belong to, 813 * directly or indirectly. 814 * </pre> 815 * 816 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector} 817 */ 818 public static final class IdentitySelector extends com.google.protobuf.GeneratedMessageV3 819 implements 820 // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) 821 IdentitySelectorOrBuilder { 822 private static final long serialVersionUID = 0L; 823 // Use IdentitySelector.newBuilder() to construct. IdentitySelector(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)824 private IdentitySelector(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 825 super(builder); 826 } 827 IdentitySelector()828 private IdentitySelector() { 829 identity_ = ""; 830 } 831 832 @java.lang.Override 833 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)834 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 835 return new IdentitySelector(); 836 } 837 838 @java.lang.Override getUnknownFields()839 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 840 return this.unknownFields; 841 } 842 getDescriptor()843 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 844 return com.google.cloud.asset.v1.AssetServiceProto 845 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; 846 } 847 848 @java.lang.Override 849 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()850 internalGetFieldAccessorTable() { 851 return com.google.cloud.asset.v1.AssetServiceProto 852 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable 853 .ensureFieldAccessorsInitialized( 854 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.class, 855 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder.class); 856 } 857 858 public static final int IDENTITY_FIELD_NUMBER = 1; 859 860 @SuppressWarnings("serial") 861 private volatile java.lang.Object identity_ = ""; 862 /** 863 * 864 * 865 * <pre> 866 * Required. The identity appear in the form of principals in 867 * [IAM policy 868 * binding](https://cloud.google.com/iam/reference/rest/v1/Binding). 869 * The examples of supported forms are: 870 * "user:mike@example.com", 871 * "group:admins@example.com", 872 * "domain:google.com", 873 * "serviceAccount:my-project-id@appspot.gserviceaccount.com". 874 * Notice that wildcard characters (such as * and ?) are not supported. 875 * You must give a specific identity. 876 * </pre> 877 * 878 * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code> 879 * 880 * @return The identity. 881 */ 882 @java.lang.Override getIdentity()883 public java.lang.String getIdentity() { 884 java.lang.Object ref = identity_; 885 if (ref instanceof java.lang.String) { 886 return (java.lang.String) ref; 887 } else { 888 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 889 java.lang.String s = bs.toStringUtf8(); 890 identity_ = s; 891 return s; 892 } 893 } 894 /** 895 * 896 * 897 * <pre> 898 * Required. The identity appear in the form of principals in 899 * [IAM policy 900 * binding](https://cloud.google.com/iam/reference/rest/v1/Binding). 901 * The examples of supported forms are: 902 * "user:mike@example.com", 903 * "group:admins@example.com", 904 * "domain:google.com", 905 * "serviceAccount:my-project-id@appspot.gserviceaccount.com". 906 * Notice that wildcard characters (such as * and ?) are not supported. 907 * You must give a specific identity. 908 * </pre> 909 * 910 * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code> 911 * 912 * @return The bytes for identity. 913 */ 914 @java.lang.Override getIdentityBytes()915 public com.google.protobuf.ByteString getIdentityBytes() { 916 java.lang.Object ref = identity_; 917 if (ref instanceof java.lang.String) { 918 com.google.protobuf.ByteString b = 919 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 920 identity_ = b; 921 return b; 922 } else { 923 return (com.google.protobuf.ByteString) ref; 924 } 925 } 926 927 private byte memoizedIsInitialized = -1; 928 929 @java.lang.Override isInitialized()930 public final boolean isInitialized() { 931 byte isInitialized = memoizedIsInitialized; 932 if (isInitialized == 1) return true; 933 if (isInitialized == 0) return false; 934 935 memoizedIsInitialized = 1; 936 return true; 937 } 938 939 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)940 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 941 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identity_)) { 942 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identity_); 943 } 944 getUnknownFields().writeTo(output); 945 } 946 947 @java.lang.Override getSerializedSize()948 public int getSerializedSize() { 949 int size = memoizedSize; 950 if (size != -1) return size; 951 952 size = 0; 953 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identity_)) { 954 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identity_); 955 } 956 size += getUnknownFields().getSerializedSize(); 957 memoizedSize = size; 958 return size; 959 } 960 961 @java.lang.Override equals(final java.lang.Object obj)962 public boolean equals(final java.lang.Object obj) { 963 if (obj == this) { 964 return true; 965 } 966 if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector)) { 967 return super.equals(obj); 968 } 969 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other = 970 (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) obj; 971 972 if (!getIdentity().equals(other.getIdentity())) return false; 973 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 974 return true; 975 } 976 977 @java.lang.Override hashCode()978 public int hashCode() { 979 if (memoizedHashCode != 0) { 980 return memoizedHashCode; 981 } 982 int hash = 41; 983 hash = (19 * hash) + getDescriptor().hashCode(); 984 hash = (37 * hash) + IDENTITY_FIELD_NUMBER; 985 hash = (53 * hash) + getIdentity().hashCode(); 986 hash = (29 * hash) + getUnknownFields().hashCode(); 987 memoizedHashCode = hash; 988 return hash; 989 } 990 parseFrom( java.nio.ByteBuffer data)991 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 992 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 993 return PARSER.parseFrom(data); 994 } 995 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)996 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 997 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 998 throws com.google.protobuf.InvalidProtocolBufferException { 999 return PARSER.parseFrom(data, extensionRegistry); 1000 } 1001 parseFrom( com.google.protobuf.ByteString data)1002 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 1003 com.google.protobuf.ByteString data) 1004 throws com.google.protobuf.InvalidProtocolBufferException { 1005 return PARSER.parseFrom(data); 1006 } 1007 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1008 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 1009 com.google.protobuf.ByteString data, 1010 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1011 throws com.google.protobuf.InvalidProtocolBufferException { 1012 return PARSER.parseFrom(data, extensionRegistry); 1013 } 1014 parseFrom( byte[] data)1015 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 1016 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 1017 return PARSER.parseFrom(data); 1018 } 1019 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1020 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 1021 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1022 throws com.google.protobuf.InvalidProtocolBufferException { 1023 return PARSER.parseFrom(data, extensionRegistry); 1024 } 1025 parseFrom( java.io.InputStream input)1026 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 1027 java.io.InputStream input) throws java.io.IOException { 1028 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1029 } 1030 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1031 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 1032 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1033 throws java.io.IOException { 1034 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1035 PARSER, input, extensionRegistry); 1036 } 1037 1038 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseDelimitedFrom(java.io.InputStream input)1039 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { 1040 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1041 } 1042 1043 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1044 parseDelimitedFrom( 1045 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1046 throws java.io.IOException { 1047 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1048 PARSER, input, extensionRegistry); 1049 } 1050 parseFrom( com.google.protobuf.CodedInputStream input)1051 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 1052 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1053 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1054 } 1055 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1056 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( 1057 com.google.protobuf.CodedInputStream input, 1058 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1059 throws java.io.IOException { 1060 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1061 PARSER, input, extensionRegistry); 1062 } 1063 1064 @java.lang.Override newBuilderForType()1065 public Builder newBuilderForType() { 1066 return newBuilder(); 1067 } 1068 newBuilder()1069 public static Builder newBuilder() { 1070 return DEFAULT_INSTANCE.toBuilder(); 1071 } 1072 newBuilder( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector prototype)1073 public static Builder newBuilder( 1074 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector prototype) { 1075 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1076 } 1077 1078 @java.lang.Override toBuilder()1079 public Builder toBuilder() { 1080 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1081 } 1082 1083 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1084 protected Builder newBuilderForType( 1085 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1086 Builder builder = new Builder(parent); 1087 return builder; 1088 } 1089 /** 1090 * 1091 * 1092 * <pre> 1093 * Specifies an identity for which to determine resource access, based on 1094 * roles assigned either directly to them or to the groups they belong to, 1095 * directly or indirectly. 1096 * </pre> 1097 * 1098 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector} 1099 */ 1100 public static final class Builder 1101 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1102 implements 1103 // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) 1104 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder { getDescriptor()1105 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1106 return com.google.cloud.asset.v1.AssetServiceProto 1107 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; 1108 } 1109 1110 @java.lang.Override 1111 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1112 internalGetFieldAccessorTable() { 1113 return com.google.cloud.asset.v1.AssetServiceProto 1114 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable 1115 .ensureFieldAccessorsInitialized( 1116 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.class, 1117 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder.class); 1118 } 1119 1120 // Construct using 1121 // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.newBuilder() Builder()1122 private Builder() {} 1123 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1124 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1125 super(parent); 1126 } 1127 1128 @java.lang.Override clear()1129 public Builder clear() { 1130 super.clear(); 1131 bitField0_ = 0; 1132 identity_ = ""; 1133 return this; 1134 } 1135 1136 @java.lang.Override getDescriptorForType()1137 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1138 return com.google.cloud.asset.v1.AssetServiceProto 1139 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; 1140 } 1141 1142 @java.lang.Override 1143 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getDefaultInstanceForType()1144 getDefaultInstanceForType() { 1145 return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 1146 .getDefaultInstance(); 1147 } 1148 1149 @java.lang.Override build()1150 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector build() { 1151 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result = buildPartial(); 1152 if (!result.isInitialized()) { 1153 throw newUninitializedMessageException(result); 1154 } 1155 return result; 1156 } 1157 1158 @java.lang.Override buildPartial()1159 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector buildPartial() { 1160 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result = 1161 new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector(this); 1162 if (bitField0_ != 0) { 1163 buildPartial0(result); 1164 } 1165 onBuilt(); 1166 return result; 1167 } 1168 buildPartial0( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result)1169 private void buildPartial0( 1170 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result) { 1171 int from_bitField0_ = bitField0_; 1172 if (((from_bitField0_ & 0x00000001) != 0)) { 1173 result.identity_ = identity_; 1174 } 1175 } 1176 1177 @java.lang.Override clone()1178 public Builder clone() { 1179 return super.clone(); 1180 } 1181 1182 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1183 public Builder setField( 1184 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1185 return super.setField(field, value); 1186 } 1187 1188 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1189 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1190 return super.clearField(field); 1191 } 1192 1193 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1194 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1195 return super.clearOneof(oneof); 1196 } 1197 1198 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1199 public Builder setRepeatedField( 1200 com.google.protobuf.Descriptors.FieldDescriptor field, 1201 int index, 1202 java.lang.Object value) { 1203 return super.setRepeatedField(field, index, value); 1204 } 1205 1206 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1207 public Builder addRepeatedField( 1208 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1209 return super.addRepeatedField(field, value); 1210 } 1211 1212 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1213 public Builder mergeFrom(com.google.protobuf.Message other) { 1214 if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) { 1215 return mergeFrom( 1216 (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) other); 1217 } else { 1218 super.mergeFrom(other); 1219 return this; 1220 } 1221 } 1222 mergeFrom( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other)1223 public Builder mergeFrom( 1224 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other) { 1225 if (other 1226 == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 1227 .getDefaultInstance()) return this; 1228 if (!other.getIdentity().isEmpty()) { 1229 identity_ = other.identity_; 1230 bitField0_ |= 0x00000001; 1231 onChanged(); 1232 } 1233 this.mergeUnknownFields(other.getUnknownFields()); 1234 onChanged(); 1235 return this; 1236 } 1237 1238 @java.lang.Override isInitialized()1239 public final boolean isInitialized() { 1240 return true; 1241 } 1242 1243 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1244 public Builder mergeFrom( 1245 com.google.protobuf.CodedInputStream input, 1246 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1247 throws java.io.IOException { 1248 if (extensionRegistry == null) { 1249 throw new java.lang.NullPointerException(); 1250 } 1251 try { 1252 boolean done = false; 1253 while (!done) { 1254 int tag = input.readTag(); 1255 switch (tag) { 1256 case 0: 1257 done = true; 1258 break; 1259 case 10: 1260 { 1261 identity_ = input.readStringRequireUtf8(); 1262 bitField0_ |= 0x00000001; 1263 break; 1264 } // case 10 1265 default: 1266 { 1267 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1268 done = true; // was an endgroup tag 1269 } 1270 break; 1271 } // default: 1272 } // switch (tag) 1273 } // while (!done) 1274 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1275 throw e.unwrapIOException(); 1276 } finally { 1277 onChanged(); 1278 } // finally 1279 return this; 1280 } 1281 1282 private int bitField0_; 1283 1284 private java.lang.Object identity_ = ""; 1285 /** 1286 * 1287 * 1288 * <pre> 1289 * Required. The identity appear in the form of principals in 1290 * [IAM policy 1291 * binding](https://cloud.google.com/iam/reference/rest/v1/Binding). 1292 * The examples of supported forms are: 1293 * "user:mike@example.com", 1294 * "group:admins@example.com", 1295 * "domain:google.com", 1296 * "serviceAccount:my-project-id@appspot.gserviceaccount.com". 1297 * Notice that wildcard characters (such as * and ?) are not supported. 1298 * You must give a specific identity. 1299 * </pre> 1300 * 1301 * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1302 * 1303 * @return The identity. 1304 */ getIdentity()1305 public java.lang.String getIdentity() { 1306 java.lang.Object ref = identity_; 1307 if (!(ref instanceof java.lang.String)) { 1308 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1309 java.lang.String s = bs.toStringUtf8(); 1310 identity_ = s; 1311 return s; 1312 } else { 1313 return (java.lang.String) ref; 1314 } 1315 } 1316 /** 1317 * 1318 * 1319 * <pre> 1320 * Required. The identity appear in the form of principals in 1321 * [IAM policy 1322 * binding](https://cloud.google.com/iam/reference/rest/v1/Binding). 1323 * The examples of supported forms are: 1324 * "user:mike@example.com", 1325 * "group:admins@example.com", 1326 * "domain:google.com", 1327 * "serviceAccount:my-project-id@appspot.gserviceaccount.com". 1328 * Notice that wildcard characters (such as * and ?) are not supported. 1329 * You must give a specific identity. 1330 * </pre> 1331 * 1332 * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1333 * 1334 * @return The bytes for identity. 1335 */ getIdentityBytes()1336 public com.google.protobuf.ByteString getIdentityBytes() { 1337 java.lang.Object ref = identity_; 1338 if (ref instanceof String) { 1339 com.google.protobuf.ByteString b = 1340 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1341 identity_ = b; 1342 return b; 1343 } else { 1344 return (com.google.protobuf.ByteString) ref; 1345 } 1346 } 1347 /** 1348 * 1349 * 1350 * <pre> 1351 * Required. The identity appear in the form of principals in 1352 * [IAM policy 1353 * binding](https://cloud.google.com/iam/reference/rest/v1/Binding). 1354 * The examples of supported forms are: 1355 * "user:mike@example.com", 1356 * "group:admins@example.com", 1357 * "domain:google.com", 1358 * "serviceAccount:my-project-id@appspot.gserviceaccount.com". 1359 * Notice that wildcard characters (such as * and ?) are not supported. 1360 * You must give a specific identity. 1361 * </pre> 1362 * 1363 * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1364 * 1365 * @param value The identity to set. 1366 * @return This builder for chaining. 1367 */ setIdentity(java.lang.String value)1368 public Builder setIdentity(java.lang.String value) { 1369 if (value == null) { 1370 throw new NullPointerException(); 1371 } 1372 identity_ = value; 1373 bitField0_ |= 0x00000001; 1374 onChanged(); 1375 return this; 1376 } 1377 /** 1378 * 1379 * 1380 * <pre> 1381 * Required. The identity appear in the form of principals in 1382 * [IAM policy 1383 * binding](https://cloud.google.com/iam/reference/rest/v1/Binding). 1384 * The examples of supported forms are: 1385 * "user:mike@example.com", 1386 * "group:admins@example.com", 1387 * "domain:google.com", 1388 * "serviceAccount:my-project-id@appspot.gserviceaccount.com". 1389 * Notice that wildcard characters (such as * and ?) are not supported. 1390 * You must give a specific identity. 1391 * </pre> 1392 * 1393 * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1394 * 1395 * @return This builder for chaining. 1396 */ clearIdentity()1397 public Builder clearIdentity() { 1398 identity_ = getDefaultInstance().getIdentity(); 1399 bitField0_ = (bitField0_ & ~0x00000001); 1400 onChanged(); 1401 return this; 1402 } 1403 /** 1404 * 1405 * 1406 * <pre> 1407 * Required. The identity appear in the form of principals in 1408 * [IAM policy 1409 * binding](https://cloud.google.com/iam/reference/rest/v1/Binding). 1410 * The examples of supported forms are: 1411 * "user:mike@example.com", 1412 * "group:admins@example.com", 1413 * "domain:google.com", 1414 * "serviceAccount:my-project-id@appspot.gserviceaccount.com". 1415 * Notice that wildcard characters (such as * and ?) are not supported. 1416 * You must give a specific identity. 1417 * </pre> 1418 * 1419 * <code>string identity = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1420 * 1421 * @param value The bytes for identity to set. 1422 * @return This builder for chaining. 1423 */ setIdentityBytes(com.google.protobuf.ByteString value)1424 public Builder setIdentityBytes(com.google.protobuf.ByteString value) { 1425 if (value == null) { 1426 throw new NullPointerException(); 1427 } 1428 checkByteStringIsUtf8(value); 1429 identity_ = value; 1430 bitField0_ |= 0x00000001; 1431 onChanged(); 1432 return this; 1433 } 1434 1435 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1436 public final Builder setUnknownFields( 1437 final com.google.protobuf.UnknownFieldSet unknownFields) { 1438 return super.setUnknownFields(unknownFields); 1439 } 1440 1441 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1442 public final Builder mergeUnknownFields( 1443 final com.google.protobuf.UnknownFieldSet unknownFields) { 1444 return super.mergeUnknownFields(unknownFields); 1445 } 1446 1447 // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) 1448 } 1449 1450 // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) 1451 private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 1452 DEFAULT_INSTANCE; 1453 1454 static { 1455 DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector(); 1456 } 1457 1458 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getDefaultInstance()1459 getDefaultInstance() { 1460 return DEFAULT_INSTANCE; 1461 } 1462 1463 private static final com.google.protobuf.Parser<IdentitySelector> PARSER = 1464 new com.google.protobuf.AbstractParser<IdentitySelector>() { 1465 @java.lang.Override 1466 public IdentitySelector parsePartialFrom( 1467 com.google.protobuf.CodedInputStream input, 1468 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1469 throws com.google.protobuf.InvalidProtocolBufferException { 1470 Builder builder = newBuilder(); 1471 try { 1472 builder.mergeFrom(input, extensionRegistry); 1473 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1474 throw e.setUnfinishedMessage(builder.buildPartial()); 1475 } catch (com.google.protobuf.UninitializedMessageException e) { 1476 throw e.asInvalidProtocolBufferException() 1477 .setUnfinishedMessage(builder.buildPartial()); 1478 } catch (java.io.IOException e) { 1479 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1480 .setUnfinishedMessage(builder.buildPartial()); 1481 } 1482 return builder.buildPartial(); 1483 } 1484 }; 1485 parser()1486 public static com.google.protobuf.Parser<IdentitySelector> parser() { 1487 return PARSER; 1488 } 1489 1490 @java.lang.Override getParserForType()1491 public com.google.protobuf.Parser<IdentitySelector> getParserForType() { 1492 return PARSER; 1493 } 1494 1495 @java.lang.Override 1496 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getDefaultInstanceForType()1497 getDefaultInstanceForType() { 1498 return DEFAULT_INSTANCE; 1499 } 1500 } 1501 1502 public interface AccessSelectorOrBuilder 1503 extends 1504 // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) 1505 com.google.protobuf.MessageOrBuilder { 1506 1507 /** 1508 * 1509 * 1510 * <pre> 1511 * Optional. The roles to appear in result. 1512 * </pre> 1513 * 1514 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1515 * 1516 * @return A list containing the roles. 1517 */ getRolesList()1518 java.util.List<java.lang.String> getRolesList(); 1519 /** 1520 * 1521 * 1522 * <pre> 1523 * Optional. The roles to appear in result. 1524 * </pre> 1525 * 1526 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1527 * 1528 * @return The count of roles. 1529 */ getRolesCount()1530 int getRolesCount(); 1531 /** 1532 * 1533 * 1534 * <pre> 1535 * Optional. The roles to appear in result. 1536 * </pre> 1537 * 1538 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1539 * 1540 * @param index The index of the element to return. 1541 * @return The roles at the given index. 1542 */ getRoles(int index)1543 java.lang.String getRoles(int index); 1544 /** 1545 * 1546 * 1547 * <pre> 1548 * Optional. The roles to appear in result. 1549 * </pre> 1550 * 1551 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1552 * 1553 * @param index The index of the value to return. 1554 * @return The bytes of the roles at the given index. 1555 */ getRolesBytes(int index)1556 com.google.protobuf.ByteString getRolesBytes(int index); 1557 1558 /** 1559 * 1560 * 1561 * <pre> 1562 * Optional. The permissions to appear in result. 1563 * </pre> 1564 * 1565 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1566 * 1567 * @return A list containing the permissions. 1568 */ getPermissionsList()1569 java.util.List<java.lang.String> getPermissionsList(); 1570 /** 1571 * 1572 * 1573 * <pre> 1574 * Optional. The permissions to appear in result. 1575 * </pre> 1576 * 1577 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1578 * 1579 * @return The count of permissions. 1580 */ getPermissionsCount()1581 int getPermissionsCount(); 1582 /** 1583 * 1584 * 1585 * <pre> 1586 * Optional. The permissions to appear in result. 1587 * </pre> 1588 * 1589 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1590 * 1591 * @param index The index of the element to return. 1592 * @return The permissions at the given index. 1593 */ getPermissions(int index)1594 java.lang.String getPermissions(int index); 1595 /** 1596 * 1597 * 1598 * <pre> 1599 * Optional. The permissions to appear in result. 1600 * </pre> 1601 * 1602 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1603 * 1604 * @param index The index of the value to return. 1605 * @return The bytes of the permissions at the given index. 1606 */ getPermissionsBytes(int index)1607 com.google.protobuf.ByteString getPermissionsBytes(int index); 1608 } 1609 /** 1610 * 1611 * 1612 * <pre> 1613 * Specifies roles and/or permissions to analyze, to determine both the 1614 * identities possessing them and the resources they control. If multiple 1615 * values are specified, results will include roles or permissions matching 1616 * any of them. The total number of roles and permissions should be equal or 1617 * less than 10. 1618 * </pre> 1619 * 1620 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector} 1621 */ 1622 public static final class AccessSelector extends com.google.protobuf.GeneratedMessageV3 1623 implements 1624 // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) 1625 AccessSelectorOrBuilder { 1626 private static final long serialVersionUID = 0L; 1627 // Use AccessSelector.newBuilder() to construct. AccessSelector(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)1628 private AccessSelector(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 1629 super(builder); 1630 } 1631 AccessSelector()1632 private AccessSelector() { 1633 roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1634 permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1635 } 1636 1637 @java.lang.Override 1638 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)1639 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 1640 return new AccessSelector(); 1641 } 1642 1643 @java.lang.Override getUnknownFields()1644 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 1645 return this.unknownFields; 1646 } 1647 getDescriptor()1648 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1649 return com.google.cloud.asset.v1.AssetServiceProto 1650 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; 1651 } 1652 1653 @java.lang.Override 1654 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1655 internalGetFieldAccessorTable() { 1656 return com.google.cloud.asset.v1.AssetServiceProto 1657 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable 1658 .ensureFieldAccessorsInitialized( 1659 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.class, 1660 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder.class); 1661 } 1662 1663 public static final int ROLES_FIELD_NUMBER = 1; 1664 1665 @SuppressWarnings("serial") 1666 private com.google.protobuf.LazyStringList roles_; 1667 /** 1668 * 1669 * 1670 * <pre> 1671 * Optional. The roles to appear in result. 1672 * </pre> 1673 * 1674 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1675 * 1676 * @return A list containing the roles. 1677 */ getRolesList()1678 public com.google.protobuf.ProtocolStringList getRolesList() { 1679 return roles_; 1680 } 1681 /** 1682 * 1683 * 1684 * <pre> 1685 * Optional. The roles to appear in result. 1686 * </pre> 1687 * 1688 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1689 * 1690 * @return The count of roles. 1691 */ getRolesCount()1692 public int getRolesCount() { 1693 return roles_.size(); 1694 } 1695 /** 1696 * 1697 * 1698 * <pre> 1699 * Optional. The roles to appear in result. 1700 * </pre> 1701 * 1702 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1703 * 1704 * @param index The index of the element to return. 1705 * @return The roles at the given index. 1706 */ getRoles(int index)1707 public java.lang.String getRoles(int index) { 1708 return roles_.get(index); 1709 } 1710 /** 1711 * 1712 * 1713 * <pre> 1714 * Optional. The roles to appear in result. 1715 * </pre> 1716 * 1717 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1718 * 1719 * @param index The index of the value to return. 1720 * @return The bytes of the roles at the given index. 1721 */ getRolesBytes(int index)1722 public com.google.protobuf.ByteString getRolesBytes(int index) { 1723 return roles_.getByteString(index); 1724 } 1725 1726 public static final int PERMISSIONS_FIELD_NUMBER = 2; 1727 1728 @SuppressWarnings("serial") 1729 private com.google.protobuf.LazyStringList permissions_; 1730 /** 1731 * 1732 * 1733 * <pre> 1734 * Optional. The permissions to appear in result. 1735 * </pre> 1736 * 1737 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1738 * 1739 * @return A list containing the permissions. 1740 */ getPermissionsList()1741 public com.google.protobuf.ProtocolStringList getPermissionsList() { 1742 return permissions_; 1743 } 1744 /** 1745 * 1746 * 1747 * <pre> 1748 * Optional. The permissions to appear in result. 1749 * </pre> 1750 * 1751 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1752 * 1753 * @return The count of permissions. 1754 */ getPermissionsCount()1755 public int getPermissionsCount() { 1756 return permissions_.size(); 1757 } 1758 /** 1759 * 1760 * 1761 * <pre> 1762 * Optional. The permissions to appear in result. 1763 * </pre> 1764 * 1765 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1766 * 1767 * @param index The index of the element to return. 1768 * @return The permissions at the given index. 1769 */ getPermissions(int index)1770 public java.lang.String getPermissions(int index) { 1771 return permissions_.get(index); 1772 } 1773 /** 1774 * 1775 * 1776 * <pre> 1777 * Optional. The permissions to appear in result. 1778 * </pre> 1779 * 1780 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1781 * 1782 * @param index The index of the value to return. 1783 * @return The bytes of the permissions at the given index. 1784 */ getPermissionsBytes(int index)1785 public com.google.protobuf.ByteString getPermissionsBytes(int index) { 1786 return permissions_.getByteString(index); 1787 } 1788 1789 private byte memoizedIsInitialized = -1; 1790 1791 @java.lang.Override isInitialized()1792 public final boolean isInitialized() { 1793 byte isInitialized = memoizedIsInitialized; 1794 if (isInitialized == 1) return true; 1795 if (isInitialized == 0) return false; 1796 1797 memoizedIsInitialized = 1; 1798 return true; 1799 } 1800 1801 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1802 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1803 for (int i = 0; i < roles_.size(); i++) { 1804 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, roles_.getRaw(i)); 1805 } 1806 for (int i = 0; i < permissions_.size(); i++) { 1807 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permissions_.getRaw(i)); 1808 } 1809 getUnknownFields().writeTo(output); 1810 } 1811 1812 @java.lang.Override getSerializedSize()1813 public int getSerializedSize() { 1814 int size = memoizedSize; 1815 if (size != -1) return size; 1816 1817 size = 0; 1818 { 1819 int dataSize = 0; 1820 for (int i = 0; i < roles_.size(); i++) { 1821 dataSize += computeStringSizeNoTag(roles_.getRaw(i)); 1822 } 1823 size += dataSize; 1824 size += 1 * getRolesList().size(); 1825 } 1826 { 1827 int dataSize = 0; 1828 for (int i = 0; i < permissions_.size(); i++) { 1829 dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); 1830 } 1831 size += dataSize; 1832 size += 1 * getPermissionsList().size(); 1833 } 1834 size += getUnknownFields().getSerializedSize(); 1835 memoizedSize = size; 1836 return size; 1837 } 1838 1839 @java.lang.Override equals(final java.lang.Object obj)1840 public boolean equals(final java.lang.Object obj) { 1841 if (obj == this) { 1842 return true; 1843 } 1844 if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector)) { 1845 return super.equals(obj); 1846 } 1847 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other = 1848 (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) obj; 1849 1850 if (!getRolesList().equals(other.getRolesList())) return false; 1851 if (!getPermissionsList().equals(other.getPermissionsList())) return false; 1852 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1853 return true; 1854 } 1855 1856 @java.lang.Override hashCode()1857 public int hashCode() { 1858 if (memoizedHashCode != 0) { 1859 return memoizedHashCode; 1860 } 1861 int hash = 41; 1862 hash = (19 * hash) + getDescriptor().hashCode(); 1863 if (getRolesCount() > 0) { 1864 hash = (37 * hash) + ROLES_FIELD_NUMBER; 1865 hash = (53 * hash) + getRolesList().hashCode(); 1866 } 1867 if (getPermissionsCount() > 0) { 1868 hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; 1869 hash = (53 * hash) + getPermissionsList().hashCode(); 1870 } 1871 hash = (29 * hash) + getUnknownFields().hashCode(); 1872 memoizedHashCode = hash; 1873 return hash; 1874 } 1875 parseFrom( java.nio.ByteBuffer data)1876 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1877 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 1878 return PARSER.parseFrom(data); 1879 } 1880 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1881 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1882 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1883 throws com.google.protobuf.InvalidProtocolBufferException { 1884 return PARSER.parseFrom(data, extensionRegistry); 1885 } 1886 parseFrom( com.google.protobuf.ByteString data)1887 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1888 com.google.protobuf.ByteString data) 1889 throws com.google.protobuf.InvalidProtocolBufferException { 1890 return PARSER.parseFrom(data); 1891 } 1892 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1893 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1894 com.google.protobuf.ByteString data, 1895 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1896 throws com.google.protobuf.InvalidProtocolBufferException { 1897 return PARSER.parseFrom(data, extensionRegistry); 1898 } 1899 parseFrom( byte[] data)1900 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1901 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 1902 return PARSER.parseFrom(data); 1903 } 1904 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1905 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1906 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1907 throws com.google.protobuf.InvalidProtocolBufferException { 1908 return PARSER.parseFrom(data, extensionRegistry); 1909 } 1910 parseFrom( java.io.InputStream input)1911 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1912 java.io.InputStream input) throws java.io.IOException { 1913 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1914 } 1915 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1916 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1917 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1918 throws java.io.IOException { 1919 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1920 PARSER, input, extensionRegistry); 1921 } 1922 1923 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseDelimitedFrom(java.io.InputStream input)1924 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { 1925 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1926 } 1927 1928 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1929 parseDelimitedFrom( 1930 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1931 throws java.io.IOException { 1932 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1933 PARSER, input, extensionRegistry); 1934 } 1935 parseFrom( com.google.protobuf.CodedInputStream input)1936 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1937 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1938 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1939 } 1940 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1941 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( 1942 com.google.protobuf.CodedInputStream input, 1943 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1944 throws java.io.IOException { 1945 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1946 PARSER, input, extensionRegistry); 1947 } 1948 1949 @java.lang.Override newBuilderForType()1950 public Builder newBuilderForType() { 1951 return newBuilder(); 1952 } 1953 newBuilder()1954 public static Builder newBuilder() { 1955 return DEFAULT_INSTANCE.toBuilder(); 1956 } 1957 newBuilder( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector prototype)1958 public static Builder newBuilder( 1959 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector prototype) { 1960 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1961 } 1962 1963 @java.lang.Override toBuilder()1964 public Builder toBuilder() { 1965 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1966 } 1967 1968 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1969 protected Builder newBuilderForType( 1970 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1971 Builder builder = new Builder(parent); 1972 return builder; 1973 } 1974 /** 1975 * 1976 * 1977 * <pre> 1978 * Specifies roles and/or permissions to analyze, to determine both the 1979 * identities possessing them and the resources they control. If multiple 1980 * values are specified, results will include roles or permissions matching 1981 * any of them. The total number of roles and permissions should be equal or 1982 * less than 10. 1983 * </pre> 1984 * 1985 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector} 1986 */ 1987 public static final class Builder 1988 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1989 implements 1990 // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) 1991 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder { getDescriptor()1992 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1993 return com.google.cloud.asset.v1.AssetServiceProto 1994 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; 1995 } 1996 1997 @java.lang.Override 1998 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1999 internalGetFieldAccessorTable() { 2000 return com.google.cloud.asset.v1.AssetServiceProto 2001 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable 2002 .ensureFieldAccessorsInitialized( 2003 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.class, 2004 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder.class); 2005 } 2006 2007 // Construct using 2008 // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.newBuilder() Builder()2009 private Builder() {} 2010 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2011 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 2012 super(parent); 2013 } 2014 2015 @java.lang.Override clear()2016 public Builder clear() { 2017 super.clear(); 2018 bitField0_ = 0; 2019 roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; 2020 bitField0_ = (bitField0_ & ~0x00000001); 2021 permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; 2022 bitField0_ = (bitField0_ & ~0x00000002); 2023 return this; 2024 } 2025 2026 @java.lang.Override getDescriptorForType()2027 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 2028 return com.google.cloud.asset.v1.AssetServiceProto 2029 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; 2030 } 2031 2032 @java.lang.Override 2033 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getDefaultInstanceForType()2034 getDefaultInstanceForType() { 2035 return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance(); 2036 } 2037 2038 @java.lang.Override build()2039 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector build() { 2040 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result = buildPartial(); 2041 if (!result.isInitialized()) { 2042 throw newUninitializedMessageException(result); 2043 } 2044 return result; 2045 } 2046 2047 @java.lang.Override buildPartial()2048 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector buildPartial() { 2049 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result = 2050 new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector(this); 2051 buildPartialRepeatedFields(result); 2052 if (bitField0_ != 0) { 2053 buildPartial0(result); 2054 } 2055 onBuilt(); 2056 return result; 2057 } 2058 buildPartialRepeatedFields( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result)2059 private void buildPartialRepeatedFields( 2060 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result) { 2061 if (((bitField0_ & 0x00000001) != 0)) { 2062 roles_ = roles_.getUnmodifiableView(); 2063 bitField0_ = (bitField0_ & ~0x00000001); 2064 } 2065 result.roles_ = roles_; 2066 if (((bitField0_ & 0x00000002) != 0)) { 2067 permissions_ = permissions_.getUnmodifiableView(); 2068 bitField0_ = (bitField0_ & ~0x00000002); 2069 } 2070 result.permissions_ = permissions_; 2071 } 2072 buildPartial0( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result)2073 private void buildPartial0( 2074 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result) { 2075 int from_bitField0_ = bitField0_; 2076 } 2077 2078 @java.lang.Override clone()2079 public Builder clone() { 2080 return super.clone(); 2081 } 2082 2083 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2084 public Builder setField( 2085 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 2086 return super.setField(field, value); 2087 } 2088 2089 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2090 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 2091 return super.clearField(field); 2092 } 2093 2094 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2095 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 2096 return super.clearOneof(oneof); 2097 } 2098 2099 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2100 public Builder setRepeatedField( 2101 com.google.protobuf.Descriptors.FieldDescriptor field, 2102 int index, 2103 java.lang.Object value) { 2104 return super.setRepeatedField(field, index, value); 2105 } 2106 2107 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2108 public Builder addRepeatedField( 2109 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 2110 return super.addRepeatedField(field, value); 2111 } 2112 2113 @java.lang.Override mergeFrom(com.google.protobuf.Message other)2114 public Builder mergeFrom(com.google.protobuf.Message other) { 2115 if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) { 2116 return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) other); 2117 } else { 2118 super.mergeFrom(other); 2119 return this; 2120 } 2121 } 2122 mergeFrom( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other)2123 public Builder mergeFrom( 2124 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other) { 2125 if (other 2126 == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance()) 2127 return this; 2128 if (!other.roles_.isEmpty()) { 2129 if (roles_.isEmpty()) { 2130 roles_ = other.roles_; 2131 bitField0_ = (bitField0_ & ~0x00000001); 2132 } else { 2133 ensureRolesIsMutable(); 2134 roles_.addAll(other.roles_); 2135 } 2136 onChanged(); 2137 } 2138 if (!other.permissions_.isEmpty()) { 2139 if (permissions_.isEmpty()) { 2140 permissions_ = other.permissions_; 2141 bitField0_ = (bitField0_ & ~0x00000002); 2142 } else { 2143 ensurePermissionsIsMutable(); 2144 permissions_.addAll(other.permissions_); 2145 } 2146 onChanged(); 2147 } 2148 this.mergeUnknownFields(other.getUnknownFields()); 2149 onChanged(); 2150 return this; 2151 } 2152 2153 @java.lang.Override isInitialized()2154 public final boolean isInitialized() { 2155 return true; 2156 } 2157 2158 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2159 public Builder mergeFrom( 2160 com.google.protobuf.CodedInputStream input, 2161 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2162 throws java.io.IOException { 2163 if (extensionRegistry == null) { 2164 throw new java.lang.NullPointerException(); 2165 } 2166 try { 2167 boolean done = false; 2168 while (!done) { 2169 int tag = input.readTag(); 2170 switch (tag) { 2171 case 0: 2172 done = true; 2173 break; 2174 case 10: 2175 { 2176 java.lang.String s = input.readStringRequireUtf8(); 2177 ensureRolesIsMutable(); 2178 roles_.add(s); 2179 break; 2180 } // case 10 2181 case 18: 2182 { 2183 java.lang.String s = input.readStringRequireUtf8(); 2184 ensurePermissionsIsMutable(); 2185 permissions_.add(s); 2186 break; 2187 } // case 18 2188 default: 2189 { 2190 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 2191 done = true; // was an endgroup tag 2192 } 2193 break; 2194 } // default: 2195 } // switch (tag) 2196 } // while (!done) 2197 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2198 throw e.unwrapIOException(); 2199 } finally { 2200 onChanged(); 2201 } // finally 2202 return this; 2203 } 2204 2205 private int bitField0_; 2206 2207 private com.google.protobuf.LazyStringList roles_ = 2208 com.google.protobuf.LazyStringArrayList.EMPTY; 2209 ensureRolesIsMutable()2210 private void ensureRolesIsMutable() { 2211 if (!((bitField0_ & 0x00000001) != 0)) { 2212 roles_ = new com.google.protobuf.LazyStringArrayList(roles_); 2213 bitField0_ |= 0x00000001; 2214 } 2215 } 2216 /** 2217 * 2218 * 2219 * <pre> 2220 * Optional. The roles to appear in result. 2221 * </pre> 2222 * 2223 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2224 * 2225 * @return A list containing the roles. 2226 */ getRolesList()2227 public com.google.protobuf.ProtocolStringList getRolesList() { 2228 return roles_.getUnmodifiableView(); 2229 } 2230 /** 2231 * 2232 * 2233 * <pre> 2234 * Optional. The roles to appear in result. 2235 * </pre> 2236 * 2237 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2238 * 2239 * @return The count of roles. 2240 */ getRolesCount()2241 public int getRolesCount() { 2242 return roles_.size(); 2243 } 2244 /** 2245 * 2246 * 2247 * <pre> 2248 * Optional. The roles to appear in result. 2249 * </pre> 2250 * 2251 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2252 * 2253 * @param index The index of the element to return. 2254 * @return The roles at the given index. 2255 */ getRoles(int index)2256 public java.lang.String getRoles(int index) { 2257 return roles_.get(index); 2258 } 2259 /** 2260 * 2261 * 2262 * <pre> 2263 * Optional. The roles to appear in result. 2264 * </pre> 2265 * 2266 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2267 * 2268 * @param index The index of the value to return. 2269 * @return The bytes of the roles at the given index. 2270 */ getRolesBytes(int index)2271 public com.google.protobuf.ByteString getRolesBytes(int index) { 2272 return roles_.getByteString(index); 2273 } 2274 /** 2275 * 2276 * 2277 * <pre> 2278 * Optional. The roles to appear in result. 2279 * </pre> 2280 * 2281 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2282 * 2283 * @param index The index to set the value at. 2284 * @param value The roles to set. 2285 * @return This builder for chaining. 2286 */ setRoles(int index, java.lang.String value)2287 public Builder setRoles(int index, java.lang.String value) { 2288 if (value == null) { 2289 throw new NullPointerException(); 2290 } 2291 ensureRolesIsMutable(); 2292 roles_.set(index, value); 2293 onChanged(); 2294 return this; 2295 } 2296 /** 2297 * 2298 * 2299 * <pre> 2300 * Optional. The roles to appear in result. 2301 * </pre> 2302 * 2303 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2304 * 2305 * @param value The roles to add. 2306 * @return This builder for chaining. 2307 */ addRoles(java.lang.String value)2308 public Builder addRoles(java.lang.String value) { 2309 if (value == null) { 2310 throw new NullPointerException(); 2311 } 2312 ensureRolesIsMutable(); 2313 roles_.add(value); 2314 onChanged(); 2315 return this; 2316 } 2317 /** 2318 * 2319 * 2320 * <pre> 2321 * Optional. The roles to appear in result. 2322 * </pre> 2323 * 2324 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2325 * 2326 * @param values The roles to add. 2327 * @return This builder for chaining. 2328 */ addAllRoles(java.lang.Iterable<java.lang.String> values)2329 public Builder addAllRoles(java.lang.Iterable<java.lang.String> values) { 2330 ensureRolesIsMutable(); 2331 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, roles_); 2332 onChanged(); 2333 return this; 2334 } 2335 /** 2336 * 2337 * 2338 * <pre> 2339 * Optional. The roles to appear in result. 2340 * </pre> 2341 * 2342 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2343 * 2344 * @return This builder for chaining. 2345 */ clearRoles()2346 public Builder clearRoles() { 2347 roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; 2348 bitField0_ = (bitField0_ & ~0x00000001); 2349 onChanged(); 2350 return this; 2351 } 2352 /** 2353 * 2354 * 2355 * <pre> 2356 * Optional. The roles to appear in result. 2357 * </pre> 2358 * 2359 * <code>repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2360 * 2361 * @param value The bytes of the roles to add. 2362 * @return This builder for chaining. 2363 */ addRolesBytes(com.google.protobuf.ByteString value)2364 public Builder addRolesBytes(com.google.protobuf.ByteString value) { 2365 if (value == null) { 2366 throw new NullPointerException(); 2367 } 2368 checkByteStringIsUtf8(value); 2369 ensureRolesIsMutable(); 2370 roles_.add(value); 2371 onChanged(); 2372 return this; 2373 } 2374 2375 private com.google.protobuf.LazyStringList permissions_ = 2376 com.google.protobuf.LazyStringArrayList.EMPTY; 2377 ensurePermissionsIsMutable()2378 private void ensurePermissionsIsMutable() { 2379 if (!((bitField0_ & 0x00000002) != 0)) { 2380 permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); 2381 bitField0_ |= 0x00000002; 2382 } 2383 } 2384 /** 2385 * 2386 * 2387 * <pre> 2388 * Optional. The permissions to appear in result. 2389 * </pre> 2390 * 2391 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2392 * 2393 * @return A list containing the permissions. 2394 */ getPermissionsList()2395 public com.google.protobuf.ProtocolStringList getPermissionsList() { 2396 return permissions_.getUnmodifiableView(); 2397 } 2398 /** 2399 * 2400 * 2401 * <pre> 2402 * Optional. The permissions to appear in result. 2403 * </pre> 2404 * 2405 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2406 * 2407 * @return The count of permissions. 2408 */ getPermissionsCount()2409 public int getPermissionsCount() { 2410 return permissions_.size(); 2411 } 2412 /** 2413 * 2414 * 2415 * <pre> 2416 * Optional. The permissions to appear in result. 2417 * </pre> 2418 * 2419 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2420 * 2421 * @param index The index of the element to return. 2422 * @return The permissions at the given index. 2423 */ getPermissions(int index)2424 public java.lang.String getPermissions(int index) { 2425 return permissions_.get(index); 2426 } 2427 /** 2428 * 2429 * 2430 * <pre> 2431 * Optional. The permissions to appear in result. 2432 * </pre> 2433 * 2434 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2435 * 2436 * @param index The index of the value to return. 2437 * @return The bytes of the permissions at the given index. 2438 */ getPermissionsBytes(int index)2439 public com.google.protobuf.ByteString getPermissionsBytes(int index) { 2440 return permissions_.getByteString(index); 2441 } 2442 /** 2443 * 2444 * 2445 * <pre> 2446 * Optional. The permissions to appear in result. 2447 * </pre> 2448 * 2449 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2450 * 2451 * @param index The index to set the value at. 2452 * @param value The permissions to set. 2453 * @return This builder for chaining. 2454 */ setPermissions(int index, java.lang.String value)2455 public Builder setPermissions(int index, java.lang.String value) { 2456 if (value == null) { 2457 throw new NullPointerException(); 2458 } 2459 ensurePermissionsIsMutable(); 2460 permissions_.set(index, value); 2461 onChanged(); 2462 return this; 2463 } 2464 /** 2465 * 2466 * 2467 * <pre> 2468 * Optional. The permissions to appear in result. 2469 * </pre> 2470 * 2471 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2472 * 2473 * @param value The permissions to add. 2474 * @return This builder for chaining. 2475 */ addPermissions(java.lang.String value)2476 public Builder addPermissions(java.lang.String value) { 2477 if (value == null) { 2478 throw new NullPointerException(); 2479 } 2480 ensurePermissionsIsMutable(); 2481 permissions_.add(value); 2482 onChanged(); 2483 return this; 2484 } 2485 /** 2486 * 2487 * 2488 * <pre> 2489 * Optional. The permissions to appear in result. 2490 * </pre> 2491 * 2492 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2493 * 2494 * @param values The permissions to add. 2495 * @return This builder for chaining. 2496 */ addAllPermissions(java.lang.Iterable<java.lang.String> values)2497 public Builder addAllPermissions(java.lang.Iterable<java.lang.String> values) { 2498 ensurePermissionsIsMutable(); 2499 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, permissions_); 2500 onChanged(); 2501 return this; 2502 } 2503 /** 2504 * 2505 * 2506 * <pre> 2507 * Optional. The permissions to appear in result. 2508 * </pre> 2509 * 2510 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2511 * 2512 * @return This builder for chaining. 2513 */ clearPermissions()2514 public Builder clearPermissions() { 2515 permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; 2516 bitField0_ = (bitField0_ & ~0x00000002); 2517 onChanged(); 2518 return this; 2519 } 2520 /** 2521 * 2522 * 2523 * <pre> 2524 * Optional. The permissions to appear in result. 2525 * </pre> 2526 * 2527 * <code>repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2528 * 2529 * @param value The bytes of the permissions to add. 2530 * @return This builder for chaining. 2531 */ addPermissionsBytes(com.google.protobuf.ByteString value)2532 public Builder addPermissionsBytes(com.google.protobuf.ByteString value) { 2533 if (value == null) { 2534 throw new NullPointerException(); 2535 } 2536 checkByteStringIsUtf8(value); 2537 ensurePermissionsIsMutable(); 2538 permissions_.add(value); 2539 onChanged(); 2540 return this; 2541 } 2542 2543 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2544 public final Builder setUnknownFields( 2545 final com.google.protobuf.UnknownFieldSet unknownFields) { 2546 return super.setUnknownFields(unknownFields); 2547 } 2548 2549 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2550 public final Builder mergeUnknownFields( 2551 final com.google.protobuf.UnknownFieldSet unknownFields) { 2552 return super.mergeUnknownFields(unknownFields); 2553 } 2554 2555 // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) 2556 } 2557 2558 // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) 2559 private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 2560 DEFAULT_INSTANCE; 2561 2562 static { 2563 DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector(); 2564 } 2565 2566 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getDefaultInstance()2567 getDefaultInstance() { 2568 return DEFAULT_INSTANCE; 2569 } 2570 2571 private static final com.google.protobuf.Parser<AccessSelector> PARSER = 2572 new com.google.protobuf.AbstractParser<AccessSelector>() { 2573 @java.lang.Override 2574 public AccessSelector parsePartialFrom( 2575 com.google.protobuf.CodedInputStream input, 2576 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2577 throws com.google.protobuf.InvalidProtocolBufferException { 2578 Builder builder = newBuilder(); 2579 try { 2580 builder.mergeFrom(input, extensionRegistry); 2581 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2582 throw e.setUnfinishedMessage(builder.buildPartial()); 2583 } catch (com.google.protobuf.UninitializedMessageException e) { 2584 throw e.asInvalidProtocolBufferException() 2585 .setUnfinishedMessage(builder.buildPartial()); 2586 } catch (java.io.IOException e) { 2587 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2588 .setUnfinishedMessage(builder.buildPartial()); 2589 } 2590 return builder.buildPartial(); 2591 } 2592 }; 2593 parser()2594 public static com.google.protobuf.Parser<AccessSelector> parser() { 2595 return PARSER; 2596 } 2597 2598 @java.lang.Override getParserForType()2599 public com.google.protobuf.Parser<AccessSelector> getParserForType() { 2600 return PARSER; 2601 } 2602 2603 @java.lang.Override 2604 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getDefaultInstanceForType()2605 getDefaultInstanceForType() { 2606 return DEFAULT_INSTANCE; 2607 } 2608 } 2609 2610 public interface OptionsOrBuilder 2611 extends 2612 // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) 2613 com.google.protobuf.MessageOrBuilder { 2614 2615 /** 2616 * 2617 * 2618 * <pre> 2619 * Optional. If true, the identities section of the result will expand any 2620 * Google groups appearing in an IAM policy binding. 2621 * If 2622 * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector] 2623 * is specified, the identity in the result will be determined by the 2624 * selector, and this flag is not allowed to set. 2625 * If true, the default max expansion per group is 1000 for 2626 * AssetService.AnalyzeIamPolicy][]. 2627 * Default is false. 2628 * </pre> 2629 * 2630 * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2631 * 2632 * @return The expandGroups. 2633 */ getExpandGroups()2634 boolean getExpandGroups(); 2635 2636 /** 2637 * 2638 * 2639 * <pre> 2640 * Optional. If true, the access section of result will expand any roles 2641 * appearing in IAM policy bindings to include their permissions. 2642 * If 2643 * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector] 2644 * is specified, the access section of the result will be determined by the 2645 * selector, and this flag is not allowed to set. 2646 * Default is false. 2647 * </pre> 2648 * 2649 * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2650 * 2651 * @return The expandRoles. 2652 */ getExpandRoles()2653 boolean getExpandRoles(); 2654 2655 /** 2656 * 2657 * 2658 * <pre> 2659 * Optional. If true and 2660 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 2661 * is not specified, the resource section of the result will expand any 2662 * resource attached to an IAM policy to include resources lower in the 2663 * resource hierarchy. 2664 * For example, if the request analyzes for which resources user A has 2665 * permission P, and the results include an IAM policy with P on a Google 2666 * Cloud folder, the results will also include resources in that folder with 2667 * permission P. 2668 * If true and 2669 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 2670 * is specified, the resource section of the result will expand the 2671 * specified resource to include resources lower in the resource hierarchy. 2672 * Only project or lower resources are supported. Folder and organization 2673 * resources cannot be used together with this option. 2674 * For example, if the request analyzes for which users have permission P on 2675 * a Google Cloud project with this option enabled, the results will include 2676 * all users who have permission P on that project or any lower resource. 2677 * If true, the default max expansion per resource is 1000 for 2678 * AssetService.AnalyzeIamPolicy][] and 100000 for 2679 * AssetService.AnalyzeIamPolicyLongrunning][]. 2680 * Default is false. 2681 * </pre> 2682 * 2683 * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 2684 * 2685 * @return The expandResources. 2686 */ getExpandResources()2687 boolean getExpandResources(); 2688 2689 /** 2690 * 2691 * 2692 * <pre> 2693 * Optional. If true, the result will output the relevant parent/child 2694 * relationships between resources. Default is false. 2695 * </pre> 2696 * 2697 * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 2698 * 2699 * @return The outputResourceEdges. 2700 */ getOutputResourceEdges()2701 boolean getOutputResourceEdges(); 2702 2703 /** 2704 * 2705 * 2706 * <pre> 2707 * Optional. If true, the result will output the relevant membership 2708 * relationships between groups and other groups, and between groups and 2709 * principals. Default is false. 2710 * </pre> 2711 * 2712 * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2713 * 2714 * @return The outputGroupEdges. 2715 */ getOutputGroupEdges()2716 boolean getOutputGroupEdges(); 2717 2718 /** 2719 * 2720 * 2721 * <pre> 2722 * Optional. If true, the response will include access analysis from 2723 * identities to resources via service account impersonation. This is a very 2724 * expensive operation, because many derived queries will be executed. We 2725 * highly recommend you use 2726 * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 2727 * RPC instead. 2728 * For example, if the request analyzes for which resources user A has 2729 * permission P, and there's an IAM policy states user A has 2730 * iam.serviceAccounts.getAccessToken permission to a service account SA, 2731 * and there's another IAM policy states service account SA has permission P 2732 * to a Google Cloud folder F, then user A potentially has access to the 2733 * Google Cloud folder F. And those advanced analysis results will be 2734 * included in 2735 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 2736 * Another example, if the request analyzes for who has 2737 * permission P to a Google Cloud folder F, and there's an IAM policy states 2738 * user A has iam.serviceAccounts.actAs permission to a service account SA, 2739 * and there's another IAM policy states service account SA has permission P 2740 * to the Google Cloud folder F, then user A potentially has access to the 2741 * Google Cloud folder F. And those advanced analysis results will be 2742 * included in 2743 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 2744 * Only the following permissions are considered in this analysis: 2745 * * `iam.serviceAccounts.actAs` 2746 * * `iam.serviceAccounts.signBlob` 2747 * * `iam.serviceAccounts.signJwt` 2748 * * `iam.serviceAccounts.getAccessToken` 2749 * * `iam.serviceAccounts.getOpenIdToken` 2750 * * `iam.serviceAccounts.implicitDelegation` 2751 * Default is false. 2752 * </pre> 2753 * 2754 * <code> 2755 * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; 2756 * </code> 2757 * 2758 * @return The analyzeServiceAccountImpersonation. 2759 */ getAnalyzeServiceAccountImpersonation()2760 boolean getAnalyzeServiceAccountImpersonation(); 2761 } 2762 /** 2763 * 2764 * 2765 * <pre> 2766 * Contains query options. 2767 * </pre> 2768 * 2769 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options} 2770 */ 2771 public static final class Options extends com.google.protobuf.GeneratedMessageV3 2772 implements 2773 // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) 2774 OptionsOrBuilder { 2775 private static final long serialVersionUID = 0L; 2776 // Use Options.newBuilder() to construct. Options(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)2777 private Options(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 2778 super(builder); 2779 } 2780 Options()2781 private Options() {} 2782 2783 @java.lang.Override 2784 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)2785 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 2786 return new Options(); 2787 } 2788 2789 @java.lang.Override getUnknownFields()2790 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 2791 return this.unknownFields; 2792 } 2793 getDescriptor()2794 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 2795 return com.google.cloud.asset.v1.AssetServiceProto 2796 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; 2797 } 2798 2799 @java.lang.Override 2800 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()2801 internalGetFieldAccessorTable() { 2802 return com.google.cloud.asset.v1.AssetServiceProto 2803 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable 2804 .ensureFieldAccessorsInitialized( 2805 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.class, 2806 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder.class); 2807 } 2808 2809 public static final int EXPAND_GROUPS_FIELD_NUMBER = 1; 2810 private boolean expandGroups_ = false; 2811 /** 2812 * 2813 * 2814 * <pre> 2815 * Optional. If true, the identities section of the result will expand any 2816 * Google groups appearing in an IAM policy binding. 2817 * If 2818 * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector] 2819 * is specified, the identity in the result will be determined by the 2820 * selector, and this flag is not allowed to set. 2821 * If true, the default max expansion per group is 1000 for 2822 * AssetService.AnalyzeIamPolicy][]. 2823 * Default is false. 2824 * </pre> 2825 * 2826 * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 2827 * 2828 * @return The expandGroups. 2829 */ 2830 @java.lang.Override getExpandGroups()2831 public boolean getExpandGroups() { 2832 return expandGroups_; 2833 } 2834 2835 public static final int EXPAND_ROLES_FIELD_NUMBER = 2; 2836 private boolean expandRoles_ = false; 2837 /** 2838 * 2839 * 2840 * <pre> 2841 * Optional. If true, the access section of result will expand any roles 2842 * appearing in IAM policy bindings to include their permissions. 2843 * If 2844 * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector] 2845 * is specified, the access section of the result will be determined by the 2846 * selector, and this flag is not allowed to set. 2847 * Default is false. 2848 * </pre> 2849 * 2850 * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 2851 * 2852 * @return The expandRoles. 2853 */ 2854 @java.lang.Override getExpandRoles()2855 public boolean getExpandRoles() { 2856 return expandRoles_; 2857 } 2858 2859 public static final int EXPAND_RESOURCES_FIELD_NUMBER = 3; 2860 private boolean expandResources_ = false; 2861 /** 2862 * 2863 * 2864 * <pre> 2865 * Optional. If true and 2866 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 2867 * is not specified, the resource section of the result will expand any 2868 * resource attached to an IAM policy to include resources lower in the 2869 * resource hierarchy. 2870 * For example, if the request analyzes for which resources user A has 2871 * permission P, and the results include an IAM policy with P on a Google 2872 * Cloud folder, the results will also include resources in that folder with 2873 * permission P. 2874 * If true and 2875 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 2876 * is specified, the resource section of the result will expand the 2877 * specified resource to include resources lower in the resource hierarchy. 2878 * Only project or lower resources are supported. Folder and organization 2879 * resources cannot be used together with this option. 2880 * For example, if the request analyzes for which users have permission P on 2881 * a Google Cloud project with this option enabled, the results will include 2882 * all users who have permission P on that project or any lower resource. 2883 * If true, the default max expansion per resource is 1000 for 2884 * AssetService.AnalyzeIamPolicy][] and 100000 for 2885 * AssetService.AnalyzeIamPolicyLongrunning][]. 2886 * Default is false. 2887 * </pre> 2888 * 2889 * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 2890 * 2891 * @return The expandResources. 2892 */ 2893 @java.lang.Override getExpandResources()2894 public boolean getExpandResources() { 2895 return expandResources_; 2896 } 2897 2898 public static final int OUTPUT_RESOURCE_EDGES_FIELD_NUMBER = 4; 2899 private boolean outputResourceEdges_ = false; 2900 /** 2901 * 2902 * 2903 * <pre> 2904 * Optional. If true, the result will output the relevant parent/child 2905 * relationships between resources. Default is false. 2906 * </pre> 2907 * 2908 * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 2909 * 2910 * @return The outputResourceEdges. 2911 */ 2912 @java.lang.Override getOutputResourceEdges()2913 public boolean getOutputResourceEdges() { 2914 return outputResourceEdges_; 2915 } 2916 2917 public static final int OUTPUT_GROUP_EDGES_FIELD_NUMBER = 5; 2918 private boolean outputGroupEdges_ = false; 2919 /** 2920 * 2921 * 2922 * <pre> 2923 * Optional. If true, the result will output the relevant membership 2924 * relationships between groups and other groups, and between groups and 2925 * principals. Default is false. 2926 * </pre> 2927 * 2928 * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2929 * 2930 * @return The outputGroupEdges. 2931 */ 2932 @java.lang.Override getOutputGroupEdges()2933 public boolean getOutputGroupEdges() { 2934 return outputGroupEdges_; 2935 } 2936 2937 public static final int ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER = 6; 2938 private boolean analyzeServiceAccountImpersonation_ = false; 2939 /** 2940 * 2941 * 2942 * <pre> 2943 * Optional. If true, the response will include access analysis from 2944 * identities to resources via service account impersonation. This is a very 2945 * expensive operation, because many derived queries will be executed. We 2946 * highly recommend you use 2947 * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 2948 * RPC instead. 2949 * For example, if the request analyzes for which resources user A has 2950 * permission P, and there's an IAM policy states user A has 2951 * iam.serviceAccounts.getAccessToken permission to a service account SA, 2952 * and there's another IAM policy states service account SA has permission P 2953 * to a Google Cloud folder F, then user A potentially has access to the 2954 * Google Cloud folder F. And those advanced analysis results will be 2955 * included in 2956 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 2957 * Another example, if the request analyzes for who has 2958 * permission P to a Google Cloud folder F, and there's an IAM policy states 2959 * user A has iam.serviceAccounts.actAs permission to a service account SA, 2960 * and there's another IAM policy states service account SA has permission P 2961 * to the Google Cloud folder F, then user A potentially has access to the 2962 * Google Cloud folder F. And those advanced analysis results will be 2963 * included in 2964 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 2965 * Only the following permissions are considered in this analysis: 2966 * * `iam.serviceAccounts.actAs` 2967 * * `iam.serviceAccounts.signBlob` 2968 * * `iam.serviceAccounts.signJwt` 2969 * * `iam.serviceAccounts.getAccessToken` 2970 * * `iam.serviceAccounts.getOpenIdToken` 2971 * * `iam.serviceAccounts.implicitDelegation` 2972 * Default is false. 2973 * </pre> 2974 * 2975 * <code> 2976 * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; 2977 * </code> 2978 * 2979 * @return The analyzeServiceAccountImpersonation. 2980 */ 2981 @java.lang.Override getAnalyzeServiceAccountImpersonation()2982 public boolean getAnalyzeServiceAccountImpersonation() { 2983 return analyzeServiceAccountImpersonation_; 2984 } 2985 2986 private byte memoizedIsInitialized = -1; 2987 2988 @java.lang.Override isInitialized()2989 public final boolean isInitialized() { 2990 byte isInitialized = memoizedIsInitialized; 2991 if (isInitialized == 1) return true; 2992 if (isInitialized == 0) return false; 2993 2994 memoizedIsInitialized = 1; 2995 return true; 2996 } 2997 2998 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)2999 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 3000 if (expandGroups_ != false) { 3001 output.writeBool(1, expandGroups_); 3002 } 3003 if (expandRoles_ != false) { 3004 output.writeBool(2, expandRoles_); 3005 } 3006 if (expandResources_ != false) { 3007 output.writeBool(3, expandResources_); 3008 } 3009 if (outputResourceEdges_ != false) { 3010 output.writeBool(4, outputResourceEdges_); 3011 } 3012 if (outputGroupEdges_ != false) { 3013 output.writeBool(5, outputGroupEdges_); 3014 } 3015 if (analyzeServiceAccountImpersonation_ != false) { 3016 output.writeBool(6, analyzeServiceAccountImpersonation_); 3017 } 3018 getUnknownFields().writeTo(output); 3019 } 3020 3021 @java.lang.Override getSerializedSize()3022 public int getSerializedSize() { 3023 int size = memoizedSize; 3024 if (size != -1) return size; 3025 3026 size = 0; 3027 if (expandGroups_ != false) { 3028 size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, expandGroups_); 3029 } 3030 if (expandRoles_ != false) { 3031 size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, expandRoles_); 3032 } 3033 if (expandResources_ != false) { 3034 size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, expandResources_); 3035 } 3036 if (outputResourceEdges_ != false) { 3037 size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, outputResourceEdges_); 3038 } 3039 if (outputGroupEdges_ != false) { 3040 size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, outputGroupEdges_); 3041 } 3042 if (analyzeServiceAccountImpersonation_ != false) { 3043 size += 3044 com.google.protobuf.CodedOutputStream.computeBoolSize( 3045 6, analyzeServiceAccountImpersonation_); 3046 } 3047 size += getUnknownFields().getSerializedSize(); 3048 memoizedSize = size; 3049 return size; 3050 } 3051 3052 @java.lang.Override equals(final java.lang.Object obj)3053 public boolean equals(final java.lang.Object obj) { 3054 if (obj == this) { 3055 return true; 3056 } 3057 if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options)) { 3058 return super.equals(obj); 3059 } 3060 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other = 3061 (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) obj; 3062 3063 if (getExpandGroups() != other.getExpandGroups()) return false; 3064 if (getExpandRoles() != other.getExpandRoles()) return false; 3065 if (getExpandResources() != other.getExpandResources()) return false; 3066 if (getOutputResourceEdges() != other.getOutputResourceEdges()) return false; 3067 if (getOutputGroupEdges() != other.getOutputGroupEdges()) return false; 3068 if (getAnalyzeServiceAccountImpersonation() != other.getAnalyzeServiceAccountImpersonation()) 3069 return false; 3070 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 3071 return true; 3072 } 3073 3074 @java.lang.Override hashCode()3075 public int hashCode() { 3076 if (memoizedHashCode != 0) { 3077 return memoizedHashCode; 3078 } 3079 int hash = 41; 3080 hash = (19 * hash) + getDescriptor().hashCode(); 3081 hash = (37 * hash) + EXPAND_GROUPS_FIELD_NUMBER; 3082 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandGroups()); 3083 hash = (37 * hash) + EXPAND_ROLES_FIELD_NUMBER; 3084 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandRoles()); 3085 hash = (37 * hash) + EXPAND_RESOURCES_FIELD_NUMBER; 3086 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandResources()); 3087 hash = (37 * hash) + OUTPUT_RESOURCE_EDGES_FIELD_NUMBER; 3088 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOutputResourceEdges()); 3089 hash = (37 * hash) + OUTPUT_GROUP_EDGES_FIELD_NUMBER; 3090 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOutputGroupEdges()); 3091 hash = (37 * hash) + ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER; 3092 hash = 3093 (53 * hash) 3094 + com.google.protobuf.Internal.hashBoolean(getAnalyzeServiceAccountImpersonation()); 3095 hash = (29 * hash) + getUnknownFields().hashCode(); 3096 memoizedHashCode = hash; 3097 return hash; 3098 } 3099 parseFrom( java.nio.ByteBuffer data)3100 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( 3101 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 3102 return PARSER.parseFrom(data); 3103 } 3104 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3105 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( 3106 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3107 throws com.google.protobuf.InvalidProtocolBufferException { 3108 return PARSER.parseFrom(data, extensionRegistry); 3109 } 3110 parseFrom( com.google.protobuf.ByteString data)3111 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( 3112 com.google.protobuf.ByteString data) 3113 throws com.google.protobuf.InvalidProtocolBufferException { 3114 return PARSER.parseFrom(data); 3115 } 3116 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3117 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( 3118 com.google.protobuf.ByteString data, 3119 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3120 throws com.google.protobuf.InvalidProtocolBufferException { 3121 return PARSER.parseFrom(data, extensionRegistry); 3122 } 3123 parseFrom(byte[] data)3124 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom(byte[] data) 3125 throws com.google.protobuf.InvalidProtocolBufferException { 3126 return PARSER.parseFrom(data); 3127 } 3128 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3129 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( 3130 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3131 throws com.google.protobuf.InvalidProtocolBufferException { 3132 return PARSER.parseFrom(data, extensionRegistry); 3133 } 3134 parseFrom( java.io.InputStream input)3135 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( 3136 java.io.InputStream input) throws java.io.IOException { 3137 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 3138 } 3139 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3140 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( 3141 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3142 throws java.io.IOException { 3143 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 3144 PARSER, input, extensionRegistry); 3145 } 3146 parseDelimitedFrom( java.io.InputStream input)3147 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseDelimitedFrom( 3148 java.io.InputStream input) throws java.io.IOException { 3149 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 3150 } 3151 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3152 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseDelimitedFrom( 3153 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3154 throws java.io.IOException { 3155 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 3156 PARSER, input, extensionRegistry); 3157 } 3158 parseFrom( com.google.protobuf.CodedInputStream input)3159 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( 3160 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 3161 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 3162 } 3163 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3164 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( 3165 com.google.protobuf.CodedInputStream input, 3166 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3167 throws java.io.IOException { 3168 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 3169 PARSER, input, extensionRegistry); 3170 } 3171 3172 @java.lang.Override newBuilderForType()3173 public Builder newBuilderForType() { 3174 return newBuilder(); 3175 } 3176 newBuilder()3177 public static Builder newBuilder() { 3178 return DEFAULT_INSTANCE.toBuilder(); 3179 } 3180 newBuilder( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options prototype)3181 public static Builder newBuilder( 3182 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options prototype) { 3183 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 3184 } 3185 3186 @java.lang.Override toBuilder()3187 public Builder toBuilder() { 3188 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 3189 } 3190 3191 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3192 protected Builder newBuilderForType( 3193 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 3194 Builder builder = new Builder(parent); 3195 return builder; 3196 } 3197 /** 3198 * 3199 * 3200 * <pre> 3201 * Contains query options. 3202 * </pre> 3203 * 3204 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options} 3205 */ 3206 public static final class Builder 3207 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 3208 implements 3209 // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) 3210 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder { getDescriptor()3211 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 3212 return com.google.cloud.asset.v1.AssetServiceProto 3213 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; 3214 } 3215 3216 @java.lang.Override 3217 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()3218 internalGetFieldAccessorTable() { 3219 return com.google.cloud.asset.v1.AssetServiceProto 3220 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable 3221 .ensureFieldAccessorsInitialized( 3222 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.class, 3223 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder.class); 3224 } 3225 3226 // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.newBuilder() Builder()3227 private Builder() {} 3228 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3229 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 3230 super(parent); 3231 } 3232 3233 @java.lang.Override clear()3234 public Builder clear() { 3235 super.clear(); 3236 bitField0_ = 0; 3237 expandGroups_ = false; 3238 expandRoles_ = false; 3239 expandResources_ = false; 3240 outputResourceEdges_ = false; 3241 outputGroupEdges_ = false; 3242 analyzeServiceAccountImpersonation_ = false; 3243 return this; 3244 } 3245 3246 @java.lang.Override getDescriptorForType()3247 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 3248 return com.google.cloud.asset.v1.AssetServiceProto 3249 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; 3250 } 3251 3252 @java.lang.Override getDefaultInstanceForType()3253 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstanceForType() { 3254 return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance(); 3255 } 3256 3257 @java.lang.Override build()3258 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options build() { 3259 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result = buildPartial(); 3260 if (!result.isInitialized()) { 3261 throw newUninitializedMessageException(result); 3262 } 3263 return result; 3264 } 3265 3266 @java.lang.Override buildPartial()3267 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options buildPartial() { 3268 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result = 3269 new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options(this); 3270 if (bitField0_ != 0) { 3271 buildPartial0(result); 3272 } 3273 onBuilt(); 3274 return result; 3275 } 3276 buildPartial0(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result)3277 private void buildPartial0(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result) { 3278 int from_bitField0_ = bitField0_; 3279 if (((from_bitField0_ & 0x00000001) != 0)) { 3280 result.expandGroups_ = expandGroups_; 3281 } 3282 if (((from_bitField0_ & 0x00000002) != 0)) { 3283 result.expandRoles_ = expandRoles_; 3284 } 3285 if (((from_bitField0_ & 0x00000004) != 0)) { 3286 result.expandResources_ = expandResources_; 3287 } 3288 if (((from_bitField0_ & 0x00000008) != 0)) { 3289 result.outputResourceEdges_ = outputResourceEdges_; 3290 } 3291 if (((from_bitField0_ & 0x00000010) != 0)) { 3292 result.outputGroupEdges_ = outputGroupEdges_; 3293 } 3294 if (((from_bitField0_ & 0x00000020) != 0)) { 3295 result.analyzeServiceAccountImpersonation_ = analyzeServiceAccountImpersonation_; 3296 } 3297 } 3298 3299 @java.lang.Override clone()3300 public Builder clone() { 3301 return super.clone(); 3302 } 3303 3304 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3305 public Builder setField( 3306 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 3307 return super.setField(field, value); 3308 } 3309 3310 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)3311 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 3312 return super.clearField(field); 3313 } 3314 3315 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)3316 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 3317 return super.clearOneof(oneof); 3318 } 3319 3320 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)3321 public Builder setRepeatedField( 3322 com.google.protobuf.Descriptors.FieldDescriptor field, 3323 int index, 3324 java.lang.Object value) { 3325 return super.setRepeatedField(field, index, value); 3326 } 3327 3328 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3329 public Builder addRepeatedField( 3330 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 3331 return super.addRepeatedField(field, value); 3332 } 3333 3334 @java.lang.Override mergeFrom(com.google.protobuf.Message other)3335 public Builder mergeFrom(com.google.protobuf.Message other) { 3336 if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) { 3337 return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) other); 3338 } else { 3339 super.mergeFrom(other); 3340 return this; 3341 } 3342 } 3343 mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other)3344 public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other) { 3345 if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()) 3346 return this; 3347 if (other.getExpandGroups() != false) { 3348 setExpandGroups(other.getExpandGroups()); 3349 } 3350 if (other.getExpandRoles() != false) { 3351 setExpandRoles(other.getExpandRoles()); 3352 } 3353 if (other.getExpandResources() != false) { 3354 setExpandResources(other.getExpandResources()); 3355 } 3356 if (other.getOutputResourceEdges() != false) { 3357 setOutputResourceEdges(other.getOutputResourceEdges()); 3358 } 3359 if (other.getOutputGroupEdges() != false) { 3360 setOutputGroupEdges(other.getOutputGroupEdges()); 3361 } 3362 if (other.getAnalyzeServiceAccountImpersonation() != false) { 3363 setAnalyzeServiceAccountImpersonation(other.getAnalyzeServiceAccountImpersonation()); 3364 } 3365 this.mergeUnknownFields(other.getUnknownFields()); 3366 onChanged(); 3367 return this; 3368 } 3369 3370 @java.lang.Override isInitialized()3371 public final boolean isInitialized() { 3372 return true; 3373 } 3374 3375 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3376 public Builder mergeFrom( 3377 com.google.protobuf.CodedInputStream input, 3378 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3379 throws java.io.IOException { 3380 if (extensionRegistry == null) { 3381 throw new java.lang.NullPointerException(); 3382 } 3383 try { 3384 boolean done = false; 3385 while (!done) { 3386 int tag = input.readTag(); 3387 switch (tag) { 3388 case 0: 3389 done = true; 3390 break; 3391 case 8: 3392 { 3393 expandGroups_ = input.readBool(); 3394 bitField0_ |= 0x00000001; 3395 break; 3396 } // case 8 3397 case 16: 3398 { 3399 expandRoles_ = input.readBool(); 3400 bitField0_ |= 0x00000002; 3401 break; 3402 } // case 16 3403 case 24: 3404 { 3405 expandResources_ = input.readBool(); 3406 bitField0_ |= 0x00000004; 3407 break; 3408 } // case 24 3409 case 32: 3410 { 3411 outputResourceEdges_ = input.readBool(); 3412 bitField0_ |= 0x00000008; 3413 break; 3414 } // case 32 3415 case 40: 3416 { 3417 outputGroupEdges_ = input.readBool(); 3418 bitField0_ |= 0x00000010; 3419 break; 3420 } // case 40 3421 case 48: 3422 { 3423 analyzeServiceAccountImpersonation_ = input.readBool(); 3424 bitField0_ |= 0x00000020; 3425 break; 3426 } // case 48 3427 default: 3428 { 3429 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 3430 done = true; // was an endgroup tag 3431 } 3432 break; 3433 } // default: 3434 } // switch (tag) 3435 } // while (!done) 3436 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3437 throw e.unwrapIOException(); 3438 } finally { 3439 onChanged(); 3440 } // finally 3441 return this; 3442 } 3443 3444 private int bitField0_; 3445 3446 private boolean expandGroups_; 3447 /** 3448 * 3449 * 3450 * <pre> 3451 * Optional. If true, the identities section of the result will expand any 3452 * Google groups appearing in an IAM policy binding. 3453 * If 3454 * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector] 3455 * is specified, the identity in the result will be determined by the 3456 * selector, and this flag is not allowed to set. 3457 * If true, the default max expansion per group is 1000 for 3458 * AssetService.AnalyzeIamPolicy][]. 3459 * Default is false. 3460 * </pre> 3461 * 3462 * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 3463 * 3464 * @return The expandGroups. 3465 */ 3466 @java.lang.Override getExpandGroups()3467 public boolean getExpandGroups() { 3468 return expandGroups_; 3469 } 3470 /** 3471 * 3472 * 3473 * <pre> 3474 * Optional. If true, the identities section of the result will expand any 3475 * Google groups appearing in an IAM policy binding. 3476 * If 3477 * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector] 3478 * is specified, the identity in the result will be determined by the 3479 * selector, and this flag is not allowed to set. 3480 * If true, the default max expansion per group is 1000 for 3481 * AssetService.AnalyzeIamPolicy][]. 3482 * Default is false. 3483 * </pre> 3484 * 3485 * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 3486 * 3487 * @param value The expandGroups to set. 3488 * @return This builder for chaining. 3489 */ setExpandGroups(boolean value)3490 public Builder setExpandGroups(boolean value) { 3491 3492 expandGroups_ = value; 3493 bitField0_ |= 0x00000001; 3494 onChanged(); 3495 return this; 3496 } 3497 /** 3498 * 3499 * 3500 * <pre> 3501 * Optional. If true, the identities section of the result will expand any 3502 * Google groups appearing in an IAM policy binding. 3503 * If 3504 * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector] 3505 * is specified, the identity in the result will be determined by the 3506 * selector, and this flag is not allowed to set. 3507 * If true, the default max expansion per group is 1000 for 3508 * AssetService.AnalyzeIamPolicy][]. 3509 * Default is false. 3510 * </pre> 3511 * 3512 * <code>bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 3513 * 3514 * @return This builder for chaining. 3515 */ clearExpandGroups()3516 public Builder clearExpandGroups() { 3517 bitField0_ = (bitField0_ & ~0x00000001); 3518 expandGroups_ = false; 3519 onChanged(); 3520 return this; 3521 } 3522 3523 private boolean expandRoles_; 3524 /** 3525 * 3526 * 3527 * <pre> 3528 * Optional. If true, the access section of result will expand any roles 3529 * appearing in IAM policy bindings to include their permissions. 3530 * If 3531 * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector] 3532 * is specified, the access section of the result will be determined by the 3533 * selector, and this flag is not allowed to set. 3534 * Default is false. 3535 * </pre> 3536 * 3537 * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 3538 * 3539 * @return The expandRoles. 3540 */ 3541 @java.lang.Override getExpandRoles()3542 public boolean getExpandRoles() { 3543 return expandRoles_; 3544 } 3545 /** 3546 * 3547 * 3548 * <pre> 3549 * Optional. If true, the access section of result will expand any roles 3550 * appearing in IAM policy bindings to include their permissions. 3551 * If 3552 * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector] 3553 * is specified, the access section of the result will be determined by the 3554 * selector, and this flag is not allowed to set. 3555 * Default is false. 3556 * </pre> 3557 * 3558 * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 3559 * 3560 * @param value The expandRoles to set. 3561 * @return This builder for chaining. 3562 */ setExpandRoles(boolean value)3563 public Builder setExpandRoles(boolean value) { 3564 3565 expandRoles_ = value; 3566 bitField0_ |= 0x00000002; 3567 onChanged(); 3568 return this; 3569 } 3570 /** 3571 * 3572 * 3573 * <pre> 3574 * Optional. If true, the access section of result will expand any roles 3575 * appearing in IAM policy bindings to include their permissions. 3576 * If 3577 * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector] 3578 * is specified, the access section of the result will be determined by the 3579 * selector, and this flag is not allowed to set. 3580 * Default is false. 3581 * </pre> 3582 * 3583 * <code>bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 3584 * 3585 * @return This builder for chaining. 3586 */ clearExpandRoles()3587 public Builder clearExpandRoles() { 3588 bitField0_ = (bitField0_ & ~0x00000002); 3589 expandRoles_ = false; 3590 onChanged(); 3591 return this; 3592 } 3593 3594 private boolean expandResources_; 3595 /** 3596 * 3597 * 3598 * <pre> 3599 * Optional. If true and 3600 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 3601 * is not specified, the resource section of the result will expand any 3602 * resource attached to an IAM policy to include resources lower in the 3603 * resource hierarchy. 3604 * For example, if the request analyzes for which resources user A has 3605 * permission P, and the results include an IAM policy with P on a Google 3606 * Cloud folder, the results will also include resources in that folder with 3607 * permission P. 3608 * If true and 3609 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 3610 * is specified, the resource section of the result will expand the 3611 * specified resource to include resources lower in the resource hierarchy. 3612 * Only project or lower resources are supported. Folder and organization 3613 * resources cannot be used together with this option. 3614 * For example, if the request analyzes for which users have permission P on 3615 * a Google Cloud project with this option enabled, the results will include 3616 * all users who have permission P on that project or any lower resource. 3617 * If true, the default max expansion per resource is 1000 for 3618 * AssetService.AnalyzeIamPolicy][] and 100000 for 3619 * AssetService.AnalyzeIamPolicyLongrunning][]. 3620 * Default is false. 3621 * </pre> 3622 * 3623 * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 3624 * 3625 * @return The expandResources. 3626 */ 3627 @java.lang.Override getExpandResources()3628 public boolean getExpandResources() { 3629 return expandResources_; 3630 } 3631 /** 3632 * 3633 * 3634 * <pre> 3635 * Optional. If true and 3636 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 3637 * is not specified, the resource section of the result will expand any 3638 * resource attached to an IAM policy to include resources lower in the 3639 * resource hierarchy. 3640 * For example, if the request analyzes for which resources user A has 3641 * permission P, and the results include an IAM policy with P on a Google 3642 * Cloud folder, the results will also include resources in that folder with 3643 * permission P. 3644 * If true and 3645 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 3646 * is specified, the resource section of the result will expand the 3647 * specified resource to include resources lower in the resource hierarchy. 3648 * Only project or lower resources are supported. Folder and organization 3649 * resources cannot be used together with this option. 3650 * For example, if the request analyzes for which users have permission P on 3651 * a Google Cloud project with this option enabled, the results will include 3652 * all users who have permission P on that project or any lower resource. 3653 * If true, the default max expansion per resource is 1000 for 3654 * AssetService.AnalyzeIamPolicy][] and 100000 for 3655 * AssetService.AnalyzeIamPolicyLongrunning][]. 3656 * Default is false. 3657 * </pre> 3658 * 3659 * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 3660 * 3661 * @param value The expandResources to set. 3662 * @return This builder for chaining. 3663 */ setExpandResources(boolean value)3664 public Builder setExpandResources(boolean value) { 3665 3666 expandResources_ = value; 3667 bitField0_ |= 0x00000004; 3668 onChanged(); 3669 return this; 3670 } 3671 /** 3672 * 3673 * 3674 * <pre> 3675 * Optional. If true and 3676 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 3677 * is not specified, the resource section of the result will expand any 3678 * resource attached to an IAM policy to include resources lower in the 3679 * resource hierarchy. 3680 * For example, if the request analyzes for which resources user A has 3681 * permission P, and the results include an IAM policy with P on a Google 3682 * Cloud folder, the results will also include resources in that folder with 3683 * permission P. 3684 * If true and 3685 * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] 3686 * is specified, the resource section of the result will expand the 3687 * specified resource to include resources lower in the resource hierarchy. 3688 * Only project or lower resources are supported. Folder and organization 3689 * resources cannot be used together with this option. 3690 * For example, if the request analyzes for which users have permission P on 3691 * a Google Cloud project with this option enabled, the results will include 3692 * all users who have permission P on that project or any lower resource. 3693 * If true, the default max expansion per resource is 1000 for 3694 * AssetService.AnalyzeIamPolicy][] and 100000 for 3695 * AssetService.AnalyzeIamPolicyLongrunning][]. 3696 * Default is false. 3697 * </pre> 3698 * 3699 * <code>bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 3700 * 3701 * @return This builder for chaining. 3702 */ clearExpandResources()3703 public Builder clearExpandResources() { 3704 bitField0_ = (bitField0_ & ~0x00000004); 3705 expandResources_ = false; 3706 onChanged(); 3707 return this; 3708 } 3709 3710 private boolean outputResourceEdges_; 3711 /** 3712 * 3713 * 3714 * <pre> 3715 * Optional. If true, the result will output the relevant parent/child 3716 * relationships between resources. Default is false. 3717 * </pre> 3718 * 3719 * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 3720 * 3721 * @return The outputResourceEdges. 3722 */ 3723 @java.lang.Override getOutputResourceEdges()3724 public boolean getOutputResourceEdges() { 3725 return outputResourceEdges_; 3726 } 3727 /** 3728 * 3729 * 3730 * <pre> 3731 * Optional. If true, the result will output the relevant parent/child 3732 * relationships between resources. Default is false. 3733 * </pre> 3734 * 3735 * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 3736 * 3737 * @param value The outputResourceEdges to set. 3738 * @return This builder for chaining. 3739 */ setOutputResourceEdges(boolean value)3740 public Builder setOutputResourceEdges(boolean value) { 3741 3742 outputResourceEdges_ = value; 3743 bitField0_ |= 0x00000008; 3744 onChanged(); 3745 return this; 3746 } 3747 /** 3748 * 3749 * 3750 * <pre> 3751 * Optional. If true, the result will output the relevant parent/child 3752 * relationships between resources. Default is false. 3753 * </pre> 3754 * 3755 * <code>bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 3756 * 3757 * @return This builder for chaining. 3758 */ clearOutputResourceEdges()3759 public Builder clearOutputResourceEdges() { 3760 bitField0_ = (bitField0_ & ~0x00000008); 3761 outputResourceEdges_ = false; 3762 onChanged(); 3763 return this; 3764 } 3765 3766 private boolean outputGroupEdges_; 3767 /** 3768 * 3769 * 3770 * <pre> 3771 * Optional. If true, the result will output the relevant membership 3772 * relationships between groups and other groups, and between groups and 3773 * principals. Default is false. 3774 * </pre> 3775 * 3776 * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 3777 * 3778 * @return The outputGroupEdges. 3779 */ 3780 @java.lang.Override getOutputGroupEdges()3781 public boolean getOutputGroupEdges() { 3782 return outputGroupEdges_; 3783 } 3784 /** 3785 * 3786 * 3787 * <pre> 3788 * Optional. If true, the result will output the relevant membership 3789 * relationships between groups and other groups, and between groups and 3790 * principals. Default is false. 3791 * </pre> 3792 * 3793 * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 3794 * 3795 * @param value The outputGroupEdges to set. 3796 * @return This builder for chaining. 3797 */ setOutputGroupEdges(boolean value)3798 public Builder setOutputGroupEdges(boolean value) { 3799 3800 outputGroupEdges_ = value; 3801 bitField0_ |= 0x00000010; 3802 onChanged(); 3803 return this; 3804 } 3805 /** 3806 * 3807 * 3808 * <pre> 3809 * Optional. If true, the result will output the relevant membership 3810 * relationships between groups and other groups, and between groups and 3811 * principals. Default is false. 3812 * </pre> 3813 * 3814 * <code>bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 3815 * 3816 * @return This builder for chaining. 3817 */ clearOutputGroupEdges()3818 public Builder clearOutputGroupEdges() { 3819 bitField0_ = (bitField0_ & ~0x00000010); 3820 outputGroupEdges_ = false; 3821 onChanged(); 3822 return this; 3823 } 3824 3825 private boolean analyzeServiceAccountImpersonation_; 3826 /** 3827 * 3828 * 3829 * <pre> 3830 * Optional. If true, the response will include access analysis from 3831 * identities to resources via service account impersonation. This is a very 3832 * expensive operation, because many derived queries will be executed. We 3833 * highly recommend you use 3834 * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 3835 * RPC instead. 3836 * For example, if the request analyzes for which resources user A has 3837 * permission P, and there's an IAM policy states user A has 3838 * iam.serviceAccounts.getAccessToken permission to a service account SA, 3839 * and there's another IAM policy states service account SA has permission P 3840 * to a Google Cloud folder F, then user A potentially has access to the 3841 * Google Cloud folder F. And those advanced analysis results will be 3842 * included in 3843 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 3844 * Another example, if the request analyzes for who has 3845 * permission P to a Google Cloud folder F, and there's an IAM policy states 3846 * user A has iam.serviceAccounts.actAs permission to a service account SA, 3847 * and there's another IAM policy states service account SA has permission P 3848 * to the Google Cloud folder F, then user A potentially has access to the 3849 * Google Cloud folder F. And those advanced analysis results will be 3850 * included in 3851 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 3852 * Only the following permissions are considered in this analysis: 3853 * * `iam.serviceAccounts.actAs` 3854 * * `iam.serviceAccounts.signBlob` 3855 * * `iam.serviceAccounts.signJwt` 3856 * * `iam.serviceAccounts.getAccessToken` 3857 * * `iam.serviceAccounts.getOpenIdToken` 3858 * * `iam.serviceAccounts.implicitDelegation` 3859 * Default is false. 3860 * </pre> 3861 * 3862 * <code> 3863 * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; 3864 * </code> 3865 * 3866 * @return The analyzeServiceAccountImpersonation. 3867 */ 3868 @java.lang.Override getAnalyzeServiceAccountImpersonation()3869 public boolean getAnalyzeServiceAccountImpersonation() { 3870 return analyzeServiceAccountImpersonation_; 3871 } 3872 /** 3873 * 3874 * 3875 * <pre> 3876 * Optional. If true, the response will include access analysis from 3877 * identities to resources via service account impersonation. This is a very 3878 * expensive operation, because many derived queries will be executed. We 3879 * highly recommend you use 3880 * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 3881 * RPC instead. 3882 * For example, if the request analyzes for which resources user A has 3883 * permission P, and there's an IAM policy states user A has 3884 * iam.serviceAccounts.getAccessToken permission to a service account SA, 3885 * and there's another IAM policy states service account SA has permission P 3886 * to a Google Cloud folder F, then user A potentially has access to the 3887 * Google Cloud folder F. And those advanced analysis results will be 3888 * included in 3889 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 3890 * Another example, if the request analyzes for who has 3891 * permission P to a Google Cloud folder F, and there's an IAM policy states 3892 * user A has iam.serviceAccounts.actAs permission to a service account SA, 3893 * and there's another IAM policy states service account SA has permission P 3894 * to the Google Cloud folder F, then user A potentially has access to the 3895 * Google Cloud folder F. And those advanced analysis results will be 3896 * included in 3897 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 3898 * Only the following permissions are considered in this analysis: 3899 * * `iam.serviceAccounts.actAs` 3900 * * `iam.serviceAccounts.signBlob` 3901 * * `iam.serviceAccounts.signJwt` 3902 * * `iam.serviceAccounts.getAccessToken` 3903 * * `iam.serviceAccounts.getOpenIdToken` 3904 * * `iam.serviceAccounts.implicitDelegation` 3905 * Default is false. 3906 * </pre> 3907 * 3908 * <code> 3909 * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; 3910 * </code> 3911 * 3912 * @param value The analyzeServiceAccountImpersonation to set. 3913 * @return This builder for chaining. 3914 */ setAnalyzeServiceAccountImpersonation(boolean value)3915 public Builder setAnalyzeServiceAccountImpersonation(boolean value) { 3916 3917 analyzeServiceAccountImpersonation_ = value; 3918 bitField0_ |= 0x00000020; 3919 onChanged(); 3920 return this; 3921 } 3922 /** 3923 * 3924 * 3925 * <pre> 3926 * Optional. If true, the response will include access analysis from 3927 * identities to resources via service account impersonation. This is a very 3928 * expensive operation, because many derived queries will be executed. We 3929 * highly recommend you use 3930 * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 3931 * RPC instead. 3932 * For example, if the request analyzes for which resources user A has 3933 * permission P, and there's an IAM policy states user A has 3934 * iam.serviceAccounts.getAccessToken permission to a service account SA, 3935 * and there's another IAM policy states service account SA has permission P 3936 * to a Google Cloud folder F, then user A potentially has access to the 3937 * Google Cloud folder F. And those advanced analysis results will be 3938 * included in 3939 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 3940 * Another example, if the request analyzes for who has 3941 * permission P to a Google Cloud folder F, and there's an IAM policy states 3942 * user A has iam.serviceAccounts.actAs permission to a service account SA, 3943 * and there's another IAM policy states service account SA has permission P 3944 * to the Google Cloud folder F, then user A potentially has access to the 3945 * Google Cloud folder F. And those advanced analysis results will be 3946 * included in 3947 * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. 3948 * Only the following permissions are considered in this analysis: 3949 * * `iam.serviceAccounts.actAs` 3950 * * `iam.serviceAccounts.signBlob` 3951 * * `iam.serviceAccounts.signJwt` 3952 * * `iam.serviceAccounts.getAccessToken` 3953 * * `iam.serviceAccounts.getOpenIdToken` 3954 * * `iam.serviceAccounts.implicitDelegation` 3955 * Default is false. 3956 * </pre> 3957 * 3958 * <code> 3959 * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; 3960 * </code> 3961 * 3962 * @return This builder for chaining. 3963 */ clearAnalyzeServiceAccountImpersonation()3964 public Builder clearAnalyzeServiceAccountImpersonation() { 3965 bitField0_ = (bitField0_ & ~0x00000020); 3966 analyzeServiceAccountImpersonation_ = false; 3967 onChanged(); 3968 return this; 3969 } 3970 3971 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3972 public final Builder setUnknownFields( 3973 final com.google.protobuf.UnknownFieldSet unknownFields) { 3974 return super.setUnknownFields(unknownFields); 3975 } 3976 3977 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3978 public final Builder mergeUnknownFields( 3979 final com.google.protobuf.UnknownFieldSet unknownFields) { 3980 return super.mergeUnknownFields(unknownFields); 3981 } 3982 3983 // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) 3984 } 3985 3986 // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) 3987 private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options DEFAULT_INSTANCE; 3988 3989 static { 3990 DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options(); 3991 } 3992 getDefaultInstance()3993 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstance() { 3994 return DEFAULT_INSTANCE; 3995 } 3996 3997 private static final com.google.protobuf.Parser<Options> PARSER = 3998 new com.google.protobuf.AbstractParser<Options>() { 3999 @java.lang.Override 4000 public Options parsePartialFrom( 4001 com.google.protobuf.CodedInputStream input, 4002 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4003 throws com.google.protobuf.InvalidProtocolBufferException { 4004 Builder builder = newBuilder(); 4005 try { 4006 builder.mergeFrom(input, extensionRegistry); 4007 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4008 throw e.setUnfinishedMessage(builder.buildPartial()); 4009 } catch (com.google.protobuf.UninitializedMessageException e) { 4010 throw e.asInvalidProtocolBufferException() 4011 .setUnfinishedMessage(builder.buildPartial()); 4012 } catch (java.io.IOException e) { 4013 throw new com.google.protobuf.InvalidProtocolBufferException(e) 4014 .setUnfinishedMessage(builder.buildPartial()); 4015 } 4016 return builder.buildPartial(); 4017 } 4018 }; 4019 parser()4020 public static com.google.protobuf.Parser<Options> parser() { 4021 return PARSER; 4022 } 4023 4024 @java.lang.Override getParserForType()4025 public com.google.protobuf.Parser<Options> getParserForType() { 4026 return PARSER; 4027 } 4028 4029 @java.lang.Override getDefaultInstanceForType()4030 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstanceForType() { 4031 return DEFAULT_INSTANCE; 4032 } 4033 } 4034 4035 public interface ConditionContextOrBuilder 4036 extends 4037 // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) 4038 com.google.protobuf.MessageOrBuilder { 4039 4040 /** 4041 * 4042 * 4043 * <pre> 4044 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4045 * this value must not be earlier than the current time; otherwise, an 4046 * INVALID_ARGUMENT error will be returned. 4047 * </pre> 4048 * 4049 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4050 * 4051 * @return Whether the accessTime field is set. 4052 */ hasAccessTime()4053 boolean hasAccessTime(); 4054 /** 4055 * 4056 * 4057 * <pre> 4058 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4059 * this value must not be earlier than the current time; otherwise, an 4060 * INVALID_ARGUMENT error will be returned. 4061 * </pre> 4062 * 4063 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4064 * 4065 * @return The accessTime. 4066 */ getAccessTime()4067 com.google.protobuf.Timestamp getAccessTime(); 4068 /** 4069 * 4070 * 4071 * <pre> 4072 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4073 * this value must not be earlier than the current time; otherwise, an 4074 * INVALID_ARGUMENT error will be returned. 4075 * </pre> 4076 * 4077 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4078 */ getAccessTimeOrBuilder()4079 com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder(); 4080 4081 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.TimeContextCase getTimeContextCase()4082 getTimeContextCase(); 4083 } 4084 /** 4085 * 4086 * 4087 * <pre> 4088 * The IAM conditions context. 4089 * </pre> 4090 * 4091 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext} 4092 */ 4093 public static final class ConditionContext extends com.google.protobuf.GeneratedMessageV3 4094 implements 4095 // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) 4096 ConditionContextOrBuilder { 4097 private static final long serialVersionUID = 0L; 4098 // Use ConditionContext.newBuilder() to construct. ConditionContext(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)4099 private ConditionContext(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 4100 super(builder); 4101 } 4102 ConditionContext()4103 private ConditionContext() {} 4104 4105 @java.lang.Override 4106 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)4107 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 4108 return new ConditionContext(); 4109 } 4110 4111 @java.lang.Override getUnknownFields()4112 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 4113 return this.unknownFields; 4114 } 4115 getDescriptor()4116 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 4117 return com.google.cloud.asset.v1.AssetServiceProto 4118 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; 4119 } 4120 4121 @java.lang.Override 4122 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()4123 internalGetFieldAccessorTable() { 4124 return com.google.cloud.asset.v1.AssetServiceProto 4125 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable 4126 .ensureFieldAccessorsInitialized( 4127 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.class, 4128 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder.class); 4129 } 4130 4131 private int timeContextCase_ = 0; 4132 private java.lang.Object timeContext_; 4133 4134 public enum TimeContextCase 4135 implements 4136 com.google.protobuf.Internal.EnumLite, 4137 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 4138 ACCESS_TIME(1), 4139 TIMECONTEXT_NOT_SET(0); 4140 private final int value; 4141 TimeContextCase(int value)4142 private TimeContextCase(int value) { 4143 this.value = value; 4144 } 4145 /** 4146 * @param value The number of the enum to look for. 4147 * @return The enum associated with the given number. 4148 * @deprecated Use {@link #forNumber(int)} instead. 4149 */ 4150 @java.lang.Deprecated valueOf(int value)4151 public static TimeContextCase valueOf(int value) { 4152 return forNumber(value); 4153 } 4154 forNumber(int value)4155 public static TimeContextCase forNumber(int value) { 4156 switch (value) { 4157 case 1: 4158 return ACCESS_TIME; 4159 case 0: 4160 return TIMECONTEXT_NOT_SET; 4161 default: 4162 return null; 4163 } 4164 } 4165 getNumber()4166 public int getNumber() { 4167 return this.value; 4168 } 4169 }; 4170 getTimeContextCase()4171 public TimeContextCase getTimeContextCase() { 4172 return TimeContextCase.forNumber(timeContextCase_); 4173 } 4174 4175 public static final int ACCESS_TIME_FIELD_NUMBER = 1; 4176 /** 4177 * 4178 * 4179 * <pre> 4180 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4181 * this value must not be earlier than the current time; otherwise, an 4182 * INVALID_ARGUMENT error will be returned. 4183 * </pre> 4184 * 4185 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4186 * 4187 * @return Whether the accessTime field is set. 4188 */ 4189 @java.lang.Override hasAccessTime()4190 public boolean hasAccessTime() { 4191 return timeContextCase_ == 1; 4192 } 4193 /** 4194 * 4195 * 4196 * <pre> 4197 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4198 * this value must not be earlier than the current time; otherwise, an 4199 * INVALID_ARGUMENT error will be returned. 4200 * </pre> 4201 * 4202 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4203 * 4204 * @return The accessTime. 4205 */ 4206 @java.lang.Override getAccessTime()4207 public com.google.protobuf.Timestamp getAccessTime() { 4208 if (timeContextCase_ == 1) { 4209 return (com.google.protobuf.Timestamp) timeContext_; 4210 } 4211 return com.google.protobuf.Timestamp.getDefaultInstance(); 4212 } 4213 /** 4214 * 4215 * 4216 * <pre> 4217 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4218 * this value must not be earlier than the current time; otherwise, an 4219 * INVALID_ARGUMENT error will be returned. 4220 * </pre> 4221 * 4222 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4223 */ 4224 @java.lang.Override getAccessTimeOrBuilder()4225 public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() { 4226 if (timeContextCase_ == 1) { 4227 return (com.google.protobuf.Timestamp) timeContext_; 4228 } 4229 return com.google.protobuf.Timestamp.getDefaultInstance(); 4230 } 4231 4232 private byte memoizedIsInitialized = -1; 4233 4234 @java.lang.Override isInitialized()4235 public final boolean isInitialized() { 4236 byte isInitialized = memoizedIsInitialized; 4237 if (isInitialized == 1) return true; 4238 if (isInitialized == 0) return false; 4239 4240 memoizedIsInitialized = 1; 4241 return true; 4242 } 4243 4244 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)4245 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 4246 if (timeContextCase_ == 1) { 4247 output.writeMessage(1, (com.google.protobuf.Timestamp) timeContext_); 4248 } 4249 getUnknownFields().writeTo(output); 4250 } 4251 4252 @java.lang.Override getSerializedSize()4253 public int getSerializedSize() { 4254 int size = memoizedSize; 4255 if (size != -1) return size; 4256 4257 size = 0; 4258 if (timeContextCase_ == 1) { 4259 size += 4260 com.google.protobuf.CodedOutputStream.computeMessageSize( 4261 1, (com.google.protobuf.Timestamp) timeContext_); 4262 } 4263 size += getUnknownFields().getSerializedSize(); 4264 memoizedSize = size; 4265 return size; 4266 } 4267 4268 @java.lang.Override equals(final java.lang.Object obj)4269 public boolean equals(final java.lang.Object obj) { 4270 if (obj == this) { 4271 return true; 4272 } 4273 if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext)) { 4274 return super.equals(obj); 4275 } 4276 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other = 4277 (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) obj; 4278 4279 if (!getTimeContextCase().equals(other.getTimeContextCase())) return false; 4280 switch (timeContextCase_) { 4281 case 1: 4282 if (!getAccessTime().equals(other.getAccessTime())) return false; 4283 break; 4284 case 0: 4285 default: 4286 } 4287 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 4288 return true; 4289 } 4290 4291 @java.lang.Override hashCode()4292 public int hashCode() { 4293 if (memoizedHashCode != 0) { 4294 return memoizedHashCode; 4295 } 4296 int hash = 41; 4297 hash = (19 * hash) + getDescriptor().hashCode(); 4298 switch (timeContextCase_) { 4299 case 1: 4300 hash = (37 * hash) + ACCESS_TIME_FIELD_NUMBER; 4301 hash = (53 * hash) + getAccessTime().hashCode(); 4302 break; 4303 case 0: 4304 default: 4305 } 4306 hash = (29 * hash) + getUnknownFields().hashCode(); 4307 memoizedHashCode = hash; 4308 return hash; 4309 } 4310 parseFrom( java.nio.ByteBuffer data)4311 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4312 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 4313 return PARSER.parseFrom(data); 4314 } 4315 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4316 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4317 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4318 throws com.google.protobuf.InvalidProtocolBufferException { 4319 return PARSER.parseFrom(data, extensionRegistry); 4320 } 4321 parseFrom( com.google.protobuf.ByteString data)4322 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4323 com.google.protobuf.ByteString data) 4324 throws com.google.protobuf.InvalidProtocolBufferException { 4325 return PARSER.parseFrom(data); 4326 } 4327 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4328 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4329 com.google.protobuf.ByteString data, 4330 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4331 throws com.google.protobuf.InvalidProtocolBufferException { 4332 return PARSER.parseFrom(data, extensionRegistry); 4333 } 4334 parseFrom( byte[] data)4335 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4336 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 4337 return PARSER.parseFrom(data); 4338 } 4339 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4340 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4341 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4342 throws com.google.protobuf.InvalidProtocolBufferException { 4343 return PARSER.parseFrom(data, extensionRegistry); 4344 } 4345 parseFrom( java.io.InputStream input)4346 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4347 java.io.InputStream input) throws java.io.IOException { 4348 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 4349 } 4350 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4351 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4352 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4353 throws java.io.IOException { 4354 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 4355 PARSER, input, extensionRegistry); 4356 } 4357 4358 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseDelimitedFrom(java.io.InputStream input)4359 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { 4360 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 4361 } 4362 4363 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4364 parseDelimitedFrom( 4365 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4366 throws java.io.IOException { 4367 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 4368 PARSER, input, extensionRegistry); 4369 } 4370 parseFrom( com.google.protobuf.CodedInputStream input)4371 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4372 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 4373 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 4374 } 4375 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4376 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( 4377 com.google.protobuf.CodedInputStream input, 4378 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4379 throws java.io.IOException { 4380 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 4381 PARSER, input, extensionRegistry); 4382 } 4383 4384 @java.lang.Override newBuilderForType()4385 public Builder newBuilderForType() { 4386 return newBuilder(); 4387 } 4388 newBuilder()4389 public static Builder newBuilder() { 4390 return DEFAULT_INSTANCE.toBuilder(); 4391 } 4392 newBuilder( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext prototype)4393 public static Builder newBuilder( 4394 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext prototype) { 4395 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 4396 } 4397 4398 @java.lang.Override toBuilder()4399 public Builder toBuilder() { 4400 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 4401 } 4402 4403 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4404 protected Builder newBuilderForType( 4405 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 4406 Builder builder = new Builder(parent); 4407 return builder; 4408 } 4409 /** 4410 * 4411 * 4412 * <pre> 4413 * The IAM conditions context. 4414 * </pre> 4415 * 4416 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext} 4417 */ 4418 public static final class Builder 4419 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 4420 implements 4421 // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) 4422 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder { getDescriptor()4423 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 4424 return com.google.cloud.asset.v1.AssetServiceProto 4425 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; 4426 } 4427 4428 @java.lang.Override 4429 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()4430 internalGetFieldAccessorTable() { 4431 return com.google.cloud.asset.v1.AssetServiceProto 4432 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable 4433 .ensureFieldAccessorsInitialized( 4434 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.class, 4435 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder.class); 4436 } 4437 4438 // Construct using 4439 // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.newBuilder() Builder()4440 private Builder() {} 4441 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4442 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 4443 super(parent); 4444 } 4445 4446 @java.lang.Override clear()4447 public Builder clear() { 4448 super.clear(); 4449 bitField0_ = 0; 4450 if (accessTimeBuilder_ != null) { 4451 accessTimeBuilder_.clear(); 4452 } 4453 timeContextCase_ = 0; 4454 timeContext_ = null; 4455 return this; 4456 } 4457 4458 @java.lang.Override getDescriptorForType()4459 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 4460 return com.google.cloud.asset.v1.AssetServiceProto 4461 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; 4462 } 4463 4464 @java.lang.Override 4465 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getDefaultInstanceForType()4466 getDefaultInstanceForType() { 4467 return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 4468 .getDefaultInstance(); 4469 } 4470 4471 @java.lang.Override build()4472 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext build() { 4473 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result = buildPartial(); 4474 if (!result.isInitialized()) { 4475 throw newUninitializedMessageException(result); 4476 } 4477 return result; 4478 } 4479 4480 @java.lang.Override buildPartial()4481 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext buildPartial() { 4482 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result = 4483 new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext(this); 4484 if (bitField0_ != 0) { 4485 buildPartial0(result); 4486 } 4487 buildPartialOneofs(result); 4488 onBuilt(); 4489 return result; 4490 } 4491 buildPartial0( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result)4492 private void buildPartial0( 4493 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result) { 4494 int from_bitField0_ = bitField0_; 4495 } 4496 buildPartialOneofs( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result)4497 private void buildPartialOneofs( 4498 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result) { 4499 result.timeContextCase_ = timeContextCase_; 4500 result.timeContext_ = this.timeContext_; 4501 if (timeContextCase_ == 1 && accessTimeBuilder_ != null) { 4502 result.timeContext_ = accessTimeBuilder_.build(); 4503 } 4504 } 4505 4506 @java.lang.Override clone()4507 public Builder clone() { 4508 return super.clone(); 4509 } 4510 4511 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4512 public Builder setField( 4513 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 4514 return super.setField(field, value); 4515 } 4516 4517 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)4518 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 4519 return super.clearField(field); 4520 } 4521 4522 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)4523 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 4524 return super.clearOneof(oneof); 4525 } 4526 4527 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)4528 public Builder setRepeatedField( 4529 com.google.protobuf.Descriptors.FieldDescriptor field, 4530 int index, 4531 java.lang.Object value) { 4532 return super.setRepeatedField(field, index, value); 4533 } 4534 4535 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4536 public Builder addRepeatedField( 4537 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 4538 return super.addRepeatedField(field, value); 4539 } 4540 4541 @java.lang.Override mergeFrom(com.google.protobuf.Message other)4542 public Builder mergeFrom(com.google.protobuf.Message other) { 4543 if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) { 4544 return mergeFrom( 4545 (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) other); 4546 } else { 4547 super.mergeFrom(other); 4548 return this; 4549 } 4550 } 4551 mergeFrom( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other)4552 public Builder mergeFrom( 4553 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other) { 4554 if (other 4555 == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 4556 .getDefaultInstance()) return this; 4557 switch (other.getTimeContextCase()) { 4558 case ACCESS_TIME: 4559 { 4560 mergeAccessTime(other.getAccessTime()); 4561 break; 4562 } 4563 case TIMECONTEXT_NOT_SET: 4564 { 4565 break; 4566 } 4567 } 4568 this.mergeUnknownFields(other.getUnknownFields()); 4569 onChanged(); 4570 return this; 4571 } 4572 4573 @java.lang.Override isInitialized()4574 public final boolean isInitialized() { 4575 return true; 4576 } 4577 4578 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4579 public Builder mergeFrom( 4580 com.google.protobuf.CodedInputStream input, 4581 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4582 throws java.io.IOException { 4583 if (extensionRegistry == null) { 4584 throw new java.lang.NullPointerException(); 4585 } 4586 try { 4587 boolean done = false; 4588 while (!done) { 4589 int tag = input.readTag(); 4590 switch (tag) { 4591 case 0: 4592 done = true; 4593 break; 4594 case 10: 4595 { 4596 input.readMessage(getAccessTimeFieldBuilder().getBuilder(), extensionRegistry); 4597 timeContextCase_ = 1; 4598 break; 4599 } // case 10 4600 default: 4601 { 4602 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 4603 done = true; // was an endgroup tag 4604 } 4605 break; 4606 } // default: 4607 } // switch (tag) 4608 } // while (!done) 4609 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4610 throw e.unwrapIOException(); 4611 } finally { 4612 onChanged(); 4613 } // finally 4614 return this; 4615 } 4616 4617 private int timeContextCase_ = 0; 4618 private java.lang.Object timeContext_; 4619 getTimeContextCase()4620 public TimeContextCase getTimeContextCase() { 4621 return TimeContextCase.forNumber(timeContextCase_); 4622 } 4623 clearTimeContext()4624 public Builder clearTimeContext() { 4625 timeContextCase_ = 0; 4626 timeContext_ = null; 4627 onChanged(); 4628 return this; 4629 } 4630 4631 private int bitField0_; 4632 4633 private com.google.protobuf.SingleFieldBuilderV3< 4634 com.google.protobuf.Timestamp, 4635 com.google.protobuf.Timestamp.Builder, 4636 com.google.protobuf.TimestampOrBuilder> 4637 accessTimeBuilder_; 4638 /** 4639 * 4640 * 4641 * <pre> 4642 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4643 * this value must not be earlier than the current time; otherwise, an 4644 * INVALID_ARGUMENT error will be returned. 4645 * </pre> 4646 * 4647 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4648 * 4649 * @return Whether the accessTime field is set. 4650 */ 4651 @java.lang.Override hasAccessTime()4652 public boolean hasAccessTime() { 4653 return timeContextCase_ == 1; 4654 } 4655 /** 4656 * 4657 * 4658 * <pre> 4659 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4660 * this value must not be earlier than the current time; otherwise, an 4661 * INVALID_ARGUMENT error will be returned. 4662 * </pre> 4663 * 4664 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4665 * 4666 * @return The accessTime. 4667 */ 4668 @java.lang.Override getAccessTime()4669 public com.google.protobuf.Timestamp getAccessTime() { 4670 if (accessTimeBuilder_ == null) { 4671 if (timeContextCase_ == 1) { 4672 return (com.google.protobuf.Timestamp) timeContext_; 4673 } 4674 return com.google.protobuf.Timestamp.getDefaultInstance(); 4675 } else { 4676 if (timeContextCase_ == 1) { 4677 return accessTimeBuilder_.getMessage(); 4678 } 4679 return com.google.protobuf.Timestamp.getDefaultInstance(); 4680 } 4681 } 4682 /** 4683 * 4684 * 4685 * <pre> 4686 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4687 * this value must not be earlier than the current time; otherwise, an 4688 * INVALID_ARGUMENT error will be returned. 4689 * </pre> 4690 * 4691 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4692 */ setAccessTime(com.google.protobuf.Timestamp value)4693 public Builder setAccessTime(com.google.protobuf.Timestamp value) { 4694 if (accessTimeBuilder_ == null) { 4695 if (value == null) { 4696 throw new NullPointerException(); 4697 } 4698 timeContext_ = value; 4699 onChanged(); 4700 } else { 4701 accessTimeBuilder_.setMessage(value); 4702 } 4703 timeContextCase_ = 1; 4704 return this; 4705 } 4706 /** 4707 * 4708 * 4709 * <pre> 4710 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4711 * this value must not be earlier than the current time; otherwise, an 4712 * INVALID_ARGUMENT error will be returned. 4713 * </pre> 4714 * 4715 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4716 */ setAccessTime(com.google.protobuf.Timestamp.Builder builderForValue)4717 public Builder setAccessTime(com.google.protobuf.Timestamp.Builder builderForValue) { 4718 if (accessTimeBuilder_ == null) { 4719 timeContext_ = builderForValue.build(); 4720 onChanged(); 4721 } else { 4722 accessTimeBuilder_.setMessage(builderForValue.build()); 4723 } 4724 timeContextCase_ = 1; 4725 return this; 4726 } 4727 /** 4728 * 4729 * 4730 * <pre> 4731 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4732 * this value must not be earlier than the current time; otherwise, an 4733 * INVALID_ARGUMENT error will be returned. 4734 * </pre> 4735 * 4736 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4737 */ mergeAccessTime(com.google.protobuf.Timestamp value)4738 public Builder mergeAccessTime(com.google.protobuf.Timestamp value) { 4739 if (accessTimeBuilder_ == null) { 4740 if (timeContextCase_ == 1 4741 && timeContext_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 4742 timeContext_ = 4743 com.google.protobuf.Timestamp.newBuilder( 4744 (com.google.protobuf.Timestamp) timeContext_) 4745 .mergeFrom(value) 4746 .buildPartial(); 4747 } else { 4748 timeContext_ = value; 4749 } 4750 onChanged(); 4751 } else { 4752 if (timeContextCase_ == 1) { 4753 accessTimeBuilder_.mergeFrom(value); 4754 } else { 4755 accessTimeBuilder_.setMessage(value); 4756 } 4757 } 4758 timeContextCase_ = 1; 4759 return this; 4760 } 4761 /** 4762 * 4763 * 4764 * <pre> 4765 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4766 * this value must not be earlier than the current time; otherwise, an 4767 * INVALID_ARGUMENT error will be returned. 4768 * </pre> 4769 * 4770 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4771 */ clearAccessTime()4772 public Builder clearAccessTime() { 4773 if (accessTimeBuilder_ == null) { 4774 if (timeContextCase_ == 1) { 4775 timeContextCase_ = 0; 4776 timeContext_ = null; 4777 onChanged(); 4778 } 4779 } else { 4780 if (timeContextCase_ == 1) { 4781 timeContextCase_ = 0; 4782 timeContext_ = null; 4783 } 4784 accessTimeBuilder_.clear(); 4785 } 4786 return this; 4787 } 4788 /** 4789 * 4790 * 4791 * <pre> 4792 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4793 * this value must not be earlier than the current time; otherwise, an 4794 * INVALID_ARGUMENT error will be returned. 4795 * </pre> 4796 * 4797 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4798 */ getAccessTimeBuilder()4799 public com.google.protobuf.Timestamp.Builder getAccessTimeBuilder() { 4800 return getAccessTimeFieldBuilder().getBuilder(); 4801 } 4802 /** 4803 * 4804 * 4805 * <pre> 4806 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4807 * this value must not be earlier than the current time; otherwise, an 4808 * INVALID_ARGUMENT error will be returned. 4809 * </pre> 4810 * 4811 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4812 */ 4813 @java.lang.Override getAccessTimeOrBuilder()4814 public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() { 4815 if ((timeContextCase_ == 1) && (accessTimeBuilder_ != null)) { 4816 return accessTimeBuilder_.getMessageOrBuilder(); 4817 } else { 4818 if (timeContextCase_ == 1) { 4819 return (com.google.protobuf.Timestamp) timeContext_; 4820 } 4821 return com.google.protobuf.Timestamp.getDefaultInstance(); 4822 } 4823 } 4824 /** 4825 * 4826 * 4827 * <pre> 4828 * The hypothetical access timestamp to evaluate IAM conditions. Note that 4829 * this value must not be earlier than the current time; otherwise, an 4830 * INVALID_ARGUMENT error will be returned. 4831 * </pre> 4832 * 4833 * <code>.google.protobuf.Timestamp access_time = 1;</code> 4834 */ 4835 private com.google.protobuf.SingleFieldBuilderV3< 4836 com.google.protobuf.Timestamp, 4837 com.google.protobuf.Timestamp.Builder, 4838 com.google.protobuf.TimestampOrBuilder> getAccessTimeFieldBuilder()4839 getAccessTimeFieldBuilder() { 4840 if (accessTimeBuilder_ == null) { 4841 if (!(timeContextCase_ == 1)) { 4842 timeContext_ = com.google.protobuf.Timestamp.getDefaultInstance(); 4843 } 4844 accessTimeBuilder_ = 4845 new com.google.protobuf.SingleFieldBuilderV3< 4846 com.google.protobuf.Timestamp, 4847 com.google.protobuf.Timestamp.Builder, 4848 com.google.protobuf.TimestampOrBuilder>( 4849 (com.google.protobuf.Timestamp) timeContext_, getParentForChildren(), isClean()); 4850 timeContext_ = null; 4851 } 4852 timeContextCase_ = 1; 4853 onChanged(); 4854 return accessTimeBuilder_; 4855 } 4856 4857 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4858 public final Builder setUnknownFields( 4859 final com.google.protobuf.UnknownFieldSet unknownFields) { 4860 return super.setUnknownFields(unknownFields); 4861 } 4862 4863 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4864 public final Builder mergeUnknownFields( 4865 final com.google.protobuf.UnknownFieldSet unknownFields) { 4866 return super.mergeUnknownFields(unknownFields); 4867 } 4868 4869 // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) 4870 } 4871 4872 // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) 4873 private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 4874 DEFAULT_INSTANCE; 4875 4876 static { 4877 DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext(); 4878 } 4879 4880 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getDefaultInstance()4881 getDefaultInstance() { 4882 return DEFAULT_INSTANCE; 4883 } 4884 4885 private static final com.google.protobuf.Parser<ConditionContext> PARSER = 4886 new com.google.protobuf.AbstractParser<ConditionContext>() { 4887 @java.lang.Override 4888 public ConditionContext parsePartialFrom( 4889 com.google.protobuf.CodedInputStream input, 4890 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4891 throws com.google.protobuf.InvalidProtocolBufferException { 4892 Builder builder = newBuilder(); 4893 try { 4894 builder.mergeFrom(input, extensionRegistry); 4895 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4896 throw e.setUnfinishedMessage(builder.buildPartial()); 4897 } catch (com.google.protobuf.UninitializedMessageException e) { 4898 throw e.asInvalidProtocolBufferException() 4899 .setUnfinishedMessage(builder.buildPartial()); 4900 } catch (java.io.IOException e) { 4901 throw new com.google.protobuf.InvalidProtocolBufferException(e) 4902 .setUnfinishedMessage(builder.buildPartial()); 4903 } 4904 return builder.buildPartial(); 4905 } 4906 }; 4907 parser()4908 public static com.google.protobuf.Parser<ConditionContext> parser() { 4909 return PARSER; 4910 } 4911 4912 @java.lang.Override getParserForType()4913 public com.google.protobuf.Parser<ConditionContext> getParserForType() { 4914 return PARSER; 4915 } 4916 4917 @java.lang.Override 4918 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getDefaultInstanceForType()4919 getDefaultInstanceForType() { 4920 return DEFAULT_INSTANCE; 4921 } 4922 } 4923 4924 public static final int SCOPE_FIELD_NUMBER = 1; 4925 4926 @SuppressWarnings("serial") 4927 private volatile java.lang.Object scope_ = ""; 4928 /** 4929 * 4930 * 4931 * <pre> 4932 * Required. The relative name of the root asset. Only resources and IAM 4933 * policies within the scope will be analyzed. 4934 * This can only be an organization number (such as "organizations/123"), a 4935 * folder number (such as "folders/123"), a project ID (such as 4936 * "projects/my-project-id"), or a project number (such as "projects/12345"). 4937 * To know how to get organization id, visit [here 4938 * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). 4939 * To know how to get folder or project id, visit [here 4940 * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). 4941 * </pre> 4942 * 4943 * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code> 4944 * 4945 * @return The scope. 4946 */ 4947 @java.lang.Override getScope()4948 public java.lang.String getScope() { 4949 java.lang.Object ref = scope_; 4950 if (ref instanceof java.lang.String) { 4951 return (java.lang.String) ref; 4952 } else { 4953 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4954 java.lang.String s = bs.toStringUtf8(); 4955 scope_ = s; 4956 return s; 4957 } 4958 } 4959 /** 4960 * 4961 * 4962 * <pre> 4963 * Required. The relative name of the root asset. Only resources and IAM 4964 * policies within the scope will be analyzed. 4965 * This can only be an organization number (such as "organizations/123"), a 4966 * folder number (such as "folders/123"), a project ID (such as 4967 * "projects/my-project-id"), or a project number (such as "projects/12345"). 4968 * To know how to get organization id, visit [here 4969 * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). 4970 * To know how to get folder or project id, visit [here 4971 * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). 4972 * </pre> 4973 * 4974 * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code> 4975 * 4976 * @return The bytes for scope. 4977 */ 4978 @java.lang.Override getScopeBytes()4979 public com.google.protobuf.ByteString getScopeBytes() { 4980 java.lang.Object ref = scope_; 4981 if (ref instanceof java.lang.String) { 4982 com.google.protobuf.ByteString b = 4983 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4984 scope_ = b; 4985 return b; 4986 } else { 4987 return (com.google.protobuf.ByteString) ref; 4988 } 4989 } 4990 4991 public static final int RESOURCE_SELECTOR_FIELD_NUMBER = 2; 4992 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; 4993 /** 4994 * 4995 * 4996 * <pre> 4997 * Optional. Specifies a resource for analysis. 4998 * </pre> 4999 * 5000 * <code> 5001 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 5002 * </code> 5003 * 5004 * @return Whether the resourceSelector field is set. 5005 */ 5006 @java.lang.Override hasResourceSelector()5007 public boolean hasResourceSelector() { 5008 return resourceSelector_ != null; 5009 } 5010 /** 5011 * 5012 * 5013 * <pre> 5014 * Optional. Specifies a resource for analysis. 5015 * </pre> 5016 * 5017 * <code> 5018 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 5019 * </code> 5020 * 5021 * @return The resourceSelector. 5022 */ 5023 @java.lang.Override getResourceSelector()5024 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { 5025 return resourceSelector_ == null 5026 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() 5027 : resourceSelector_; 5028 } 5029 /** 5030 * 5031 * 5032 * <pre> 5033 * Optional. Specifies a resource for analysis. 5034 * </pre> 5035 * 5036 * <code> 5037 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 5038 * </code> 5039 */ 5040 @java.lang.Override 5041 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder getResourceSelectorOrBuilder()5042 getResourceSelectorOrBuilder() { 5043 return resourceSelector_ == null 5044 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() 5045 : resourceSelector_; 5046 } 5047 5048 public static final int IDENTITY_SELECTOR_FIELD_NUMBER = 3; 5049 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; 5050 /** 5051 * 5052 * 5053 * <pre> 5054 * Optional. Specifies an identity for analysis. 5055 * </pre> 5056 * 5057 * <code> 5058 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 5059 * </code> 5060 * 5061 * @return Whether the identitySelector field is set. 5062 */ 5063 @java.lang.Override hasIdentitySelector()5064 public boolean hasIdentitySelector() { 5065 return identitySelector_ != null; 5066 } 5067 /** 5068 * 5069 * 5070 * <pre> 5071 * Optional. Specifies an identity for analysis. 5072 * </pre> 5073 * 5074 * <code> 5075 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 5076 * </code> 5077 * 5078 * @return The identitySelector. 5079 */ 5080 @java.lang.Override getIdentitySelector()5081 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { 5082 return identitySelector_ == null 5083 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() 5084 : identitySelector_; 5085 } 5086 /** 5087 * 5088 * 5089 * <pre> 5090 * Optional. Specifies an identity for analysis. 5091 * </pre> 5092 * 5093 * <code> 5094 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 5095 * </code> 5096 */ 5097 @java.lang.Override 5098 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder getIdentitySelectorOrBuilder()5099 getIdentitySelectorOrBuilder() { 5100 return identitySelector_ == null 5101 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() 5102 : identitySelector_; 5103 } 5104 5105 public static final int ACCESS_SELECTOR_FIELD_NUMBER = 4; 5106 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; 5107 /** 5108 * 5109 * 5110 * <pre> 5111 * Optional. Specifies roles or permissions for analysis. This is optional. 5112 * </pre> 5113 * 5114 * <code> 5115 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 5116 * </code> 5117 * 5118 * @return Whether the accessSelector field is set. 5119 */ 5120 @java.lang.Override hasAccessSelector()5121 public boolean hasAccessSelector() { 5122 return accessSelector_ != null; 5123 } 5124 /** 5125 * 5126 * 5127 * <pre> 5128 * Optional. Specifies roles or permissions for analysis. This is optional. 5129 * </pre> 5130 * 5131 * <code> 5132 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 5133 * </code> 5134 * 5135 * @return The accessSelector. 5136 */ 5137 @java.lang.Override getAccessSelector()5138 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { 5139 return accessSelector_ == null 5140 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() 5141 : accessSelector_; 5142 } 5143 /** 5144 * 5145 * 5146 * <pre> 5147 * Optional. Specifies roles or permissions for analysis. This is optional. 5148 * </pre> 5149 * 5150 * <code> 5151 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 5152 * </code> 5153 */ 5154 @java.lang.Override 5155 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder getAccessSelectorOrBuilder()5156 getAccessSelectorOrBuilder() { 5157 return accessSelector_ == null 5158 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() 5159 : accessSelector_; 5160 } 5161 5162 public static final int OPTIONS_FIELD_NUMBER = 5; 5163 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_; 5164 /** 5165 * 5166 * 5167 * <pre> 5168 * Optional. The query options. 5169 * </pre> 5170 * 5171 * <code> 5172 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 5173 * </code> 5174 * 5175 * @return Whether the options field is set. 5176 */ 5177 @java.lang.Override hasOptions()5178 public boolean hasOptions() { 5179 return options_ != null; 5180 } 5181 /** 5182 * 5183 * 5184 * <pre> 5185 * Optional. The query options. 5186 * </pre> 5187 * 5188 * <code> 5189 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 5190 * </code> 5191 * 5192 * @return The options. 5193 */ 5194 @java.lang.Override getOptions()5195 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() { 5196 return options_ == null 5197 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() 5198 : options_; 5199 } 5200 /** 5201 * 5202 * 5203 * <pre> 5204 * Optional. The query options. 5205 * </pre> 5206 * 5207 * <code> 5208 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 5209 * </code> 5210 */ 5211 @java.lang.Override getOptionsOrBuilder()5212 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() { 5213 return options_ == null 5214 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() 5215 : options_; 5216 } 5217 5218 public static final int CONDITION_CONTEXT_FIELD_NUMBER = 6; 5219 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_; 5220 /** 5221 * 5222 * 5223 * <pre> 5224 * Optional. The hypothetical context for IAM conditions evaluation. 5225 * </pre> 5226 * 5227 * <code> 5228 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 5229 * </code> 5230 * 5231 * @return Whether the conditionContext field is set. 5232 */ 5233 @java.lang.Override hasConditionContext()5234 public boolean hasConditionContext() { 5235 return conditionContext_ != null; 5236 } 5237 /** 5238 * 5239 * 5240 * <pre> 5241 * Optional. The hypothetical context for IAM conditions evaluation. 5242 * </pre> 5243 * 5244 * <code> 5245 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 5246 * </code> 5247 * 5248 * @return The conditionContext. 5249 */ 5250 @java.lang.Override getConditionContext()5251 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() { 5252 return conditionContext_ == null 5253 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() 5254 : conditionContext_; 5255 } 5256 /** 5257 * 5258 * 5259 * <pre> 5260 * Optional. The hypothetical context for IAM conditions evaluation. 5261 * </pre> 5262 * 5263 * <code> 5264 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 5265 * </code> 5266 */ 5267 @java.lang.Override 5268 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder getConditionContextOrBuilder()5269 getConditionContextOrBuilder() { 5270 return conditionContext_ == null 5271 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() 5272 : conditionContext_; 5273 } 5274 5275 private byte memoizedIsInitialized = -1; 5276 5277 @java.lang.Override isInitialized()5278 public final boolean isInitialized() { 5279 byte isInitialized = memoizedIsInitialized; 5280 if (isInitialized == 1) return true; 5281 if (isInitialized == 0) return false; 5282 5283 memoizedIsInitialized = 1; 5284 return true; 5285 } 5286 5287 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)5288 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 5289 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { 5290 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); 5291 } 5292 if (resourceSelector_ != null) { 5293 output.writeMessage(2, getResourceSelector()); 5294 } 5295 if (identitySelector_ != null) { 5296 output.writeMessage(3, getIdentitySelector()); 5297 } 5298 if (accessSelector_ != null) { 5299 output.writeMessage(4, getAccessSelector()); 5300 } 5301 if (options_ != null) { 5302 output.writeMessage(5, getOptions()); 5303 } 5304 if (conditionContext_ != null) { 5305 output.writeMessage(6, getConditionContext()); 5306 } 5307 getUnknownFields().writeTo(output); 5308 } 5309 5310 @java.lang.Override getSerializedSize()5311 public int getSerializedSize() { 5312 int size = memoizedSize; 5313 if (size != -1) return size; 5314 5315 size = 0; 5316 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { 5317 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); 5318 } 5319 if (resourceSelector_ != null) { 5320 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResourceSelector()); 5321 } 5322 if (identitySelector_ != null) { 5323 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIdentitySelector()); 5324 } 5325 if (accessSelector_ != null) { 5326 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAccessSelector()); 5327 } 5328 if (options_ != null) { 5329 size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOptions()); 5330 } 5331 if (conditionContext_ != null) { 5332 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getConditionContext()); 5333 } 5334 size += getUnknownFields().getSerializedSize(); 5335 memoizedSize = size; 5336 return size; 5337 } 5338 5339 @java.lang.Override equals(final java.lang.Object obj)5340 public boolean equals(final java.lang.Object obj) { 5341 if (obj == this) { 5342 return true; 5343 } 5344 if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery)) { 5345 return super.equals(obj); 5346 } 5347 com.google.cloud.asset.v1.IamPolicyAnalysisQuery other = 5348 (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) obj; 5349 5350 if (!getScope().equals(other.getScope())) return false; 5351 if (hasResourceSelector() != other.hasResourceSelector()) return false; 5352 if (hasResourceSelector()) { 5353 if (!getResourceSelector().equals(other.getResourceSelector())) return false; 5354 } 5355 if (hasIdentitySelector() != other.hasIdentitySelector()) return false; 5356 if (hasIdentitySelector()) { 5357 if (!getIdentitySelector().equals(other.getIdentitySelector())) return false; 5358 } 5359 if (hasAccessSelector() != other.hasAccessSelector()) return false; 5360 if (hasAccessSelector()) { 5361 if (!getAccessSelector().equals(other.getAccessSelector())) return false; 5362 } 5363 if (hasOptions() != other.hasOptions()) return false; 5364 if (hasOptions()) { 5365 if (!getOptions().equals(other.getOptions())) return false; 5366 } 5367 if (hasConditionContext() != other.hasConditionContext()) return false; 5368 if (hasConditionContext()) { 5369 if (!getConditionContext().equals(other.getConditionContext())) return false; 5370 } 5371 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 5372 return true; 5373 } 5374 5375 @java.lang.Override hashCode()5376 public int hashCode() { 5377 if (memoizedHashCode != 0) { 5378 return memoizedHashCode; 5379 } 5380 int hash = 41; 5381 hash = (19 * hash) + getDescriptor().hashCode(); 5382 hash = (37 * hash) + SCOPE_FIELD_NUMBER; 5383 hash = (53 * hash) + getScope().hashCode(); 5384 if (hasResourceSelector()) { 5385 hash = (37 * hash) + RESOURCE_SELECTOR_FIELD_NUMBER; 5386 hash = (53 * hash) + getResourceSelector().hashCode(); 5387 } 5388 if (hasIdentitySelector()) { 5389 hash = (37 * hash) + IDENTITY_SELECTOR_FIELD_NUMBER; 5390 hash = (53 * hash) + getIdentitySelector().hashCode(); 5391 } 5392 if (hasAccessSelector()) { 5393 hash = (37 * hash) + ACCESS_SELECTOR_FIELD_NUMBER; 5394 hash = (53 * hash) + getAccessSelector().hashCode(); 5395 } 5396 if (hasOptions()) { 5397 hash = (37 * hash) + OPTIONS_FIELD_NUMBER; 5398 hash = (53 * hash) + getOptions().hashCode(); 5399 } 5400 if (hasConditionContext()) { 5401 hash = (37 * hash) + CONDITION_CONTEXT_FIELD_NUMBER; 5402 hash = (53 * hash) + getConditionContext().hashCode(); 5403 } 5404 hash = (29 * hash) + getUnknownFields().hashCode(); 5405 memoizedHashCode = hash; 5406 return hash; 5407 } 5408 parseFrom(java.nio.ByteBuffer data)5409 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom(java.nio.ByteBuffer data) 5410 throws com.google.protobuf.InvalidProtocolBufferException { 5411 return PARSER.parseFrom(data); 5412 } 5413 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5414 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( 5415 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5416 throws com.google.protobuf.InvalidProtocolBufferException { 5417 return PARSER.parseFrom(data, extensionRegistry); 5418 } 5419 parseFrom( com.google.protobuf.ByteString data)5420 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( 5421 com.google.protobuf.ByteString data) 5422 throws com.google.protobuf.InvalidProtocolBufferException { 5423 return PARSER.parseFrom(data); 5424 } 5425 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5426 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( 5427 com.google.protobuf.ByteString data, 5428 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5429 throws com.google.protobuf.InvalidProtocolBufferException { 5430 return PARSER.parseFrom(data, extensionRegistry); 5431 } 5432 parseFrom(byte[] data)5433 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom(byte[] data) 5434 throws com.google.protobuf.InvalidProtocolBufferException { 5435 return PARSER.parseFrom(data); 5436 } 5437 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5438 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( 5439 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5440 throws com.google.protobuf.InvalidProtocolBufferException { 5441 return PARSER.parseFrom(data, extensionRegistry); 5442 } 5443 parseFrom( java.io.InputStream input)5444 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( 5445 java.io.InputStream input) throws java.io.IOException { 5446 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 5447 } 5448 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5449 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( 5450 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5451 throws java.io.IOException { 5452 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 5453 PARSER, input, extensionRegistry); 5454 } 5455 parseDelimitedFrom( java.io.InputStream input)5456 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseDelimitedFrom( 5457 java.io.InputStream input) throws java.io.IOException { 5458 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 5459 } 5460 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5461 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseDelimitedFrom( 5462 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5463 throws java.io.IOException { 5464 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 5465 PARSER, input, extensionRegistry); 5466 } 5467 parseFrom( com.google.protobuf.CodedInputStream input)5468 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( 5469 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 5470 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 5471 } 5472 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5473 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( 5474 com.google.protobuf.CodedInputStream input, 5475 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5476 throws java.io.IOException { 5477 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 5478 PARSER, input, extensionRegistry); 5479 } 5480 5481 @java.lang.Override newBuilderForType()5482 public Builder newBuilderForType() { 5483 return newBuilder(); 5484 } 5485 newBuilder()5486 public static Builder newBuilder() { 5487 return DEFAULT_INSTANCE.toBuilder(); 5488 } 5489 newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery prototype)5490 public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery prototype) { 5491 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 5492 } 5493 5494 @java.lang.Override toBuilder()5495 public Builder toBuilder() { 5496 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 5497 } 5498 5499 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)5500 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 5501 Builder builder = new Builder(parent); 5502 return builder; 5503 } 5504 /** 5505 * 5506 * 5507 * <pre> 5508 * IAM policy analysis query message. 5509 * </pre> 5510 * 5511 * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} 5512 */ 5513 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 5514 implements 5515 // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery) 5516 com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder { getDescriptor()5517 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 5518 return com.google.cloud.asset.v1.AssetServiceProto 5519 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; 5520 } 5521 5522 @java.lang.Override 5523 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()5524 internalGetFieldAccessorTable() { 5525 return com.google.cloud.asset.v1.AssetServiceProto 5526 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable 5527 .ensureFieldAccessorsInitialized( 5528 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.class, 5529 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder.class); 5530 } 5531 5532 // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder() Builder()5533 private Builder() {} 5534 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)5535 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 5536 super(parent); 5537 } 5538 5539 @java.lang.Override clear()5540 public Builder clear() { 5541 super.clear(); 5542 bitField0_ = 0; 5543 scope_ = ""; 5544 resourceSelector_ = null; 5545 if (resourceSelectorBuilder_ != null) { 5546 resourceSelectorBuilder_.dispose(); 5547 resourceSelectorBuilder_ = null; 5548 } 5549 identitySelector_ = null; 5550 if (identitySelectorBuilder_ != null) { 5551 identitySelectorBuilder_.dispose(); 5552 identitySelectorBuilder_ = null; 5553 } 5554 accessSelector_ = null; 5555 if (accessSelectorBuilder_ != null) { 5556 accessSelectorBuilder_.dispose(); 5557 accessSelectorBuilder_ = null; 5558 } 5559 options_ = null; 5560 if (optionsBuilder_ != null) { 5561 optionsBuilder_.dispose(); 5562 optionsBuilder_ = null; 5563 } 5564 conditionContext_ = null; 5565 if (conditionContextBuilder_ != null) { 5566 conditionContextBuilder_.dispose(); 5567 conditionContextBuilder_ = null; 5568 } 5569 return this; 5570 } 5571 5572 @java.lang.Override getDescriptorForType()5573 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 5574 return com.google.cloud.asset.v1.AssetServiceProto 5575 .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; 5576 } 5577 5578 @java.lang.Override getDefaultInstanceForType()5579 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstanceForType() { 5580 return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); 5581 } 5582 5583 @java.lang.Override build()5584 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery build() { 5585 com.google.cloud.asset.v1.IamPolicyAnalysisQuery result = buildPartial(); 5586 if (!result.isInitialized()) { 5587 throw newUninitializedMessageException(result); 5588 } 5589 return result; 5590 } 5591 5592 @java.lang.Override buildPartial()5593 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery buildPartial() { 5594 com.google.cloud.asset.v1.IamPolicyAnalysisQuery result = 5595 new com.google.cloud.asset.v1.IamPolicyAnalysisQuery(this); 5596 if (bitField0_ != 0) { 5597 buildPartial0(result); 5598 } 5599 onBuilt(); 5600 return result; 5601 } 5602 buildPartial0(com.google.cloud.asset.v1.IamPolicyAnalysisQuery result)5603 private void buildPartial0(com.google.cloud.asset.v1.IamPolicyAnalysisQuery result) { 5604 int from_bitField0_ = bitField0_; 5605 if (((from_bitField0_ & 0x00000001) != 0)) { 5606 result.scope_ = scope_; 5607 } 5608 if (((from_bitField0_ & 0x00000002) != 0)) { 5609 result.resourceSelector_ = 5610 resourceSelectorBuilder_ == null ? resourceSelector_ : resourceSelectorBuilder_.build(); 5611 } 5612 if (((from_bitField0_ & 0x00000004) != 0)) { 5613 result.identitySelector_ = 5614 identitySelectorBuilder_ == null ? identitySelector_ : identitySelectorBuilder_.build(); 5615 } 5616 if (((from_bitField0_ & 0x00000008) != 0)) { 5617 result.accessSelector_ = 5618 accessSelectorBuilder_ == null ? accessSelector_ : accessSelectorBuilder_.build(); 5619 } 5620 if (((from_bitField0_ & 0x00000010) != 0)) { 5621 result.options_ = optionsBuilder_ == null ? options_ : optionsBuilder_.build(); 5622 } 5623 if (((from_bitField0_ & 0x00000020) != 0)) { 5624 result.conditionContext_ = 5625 conditionContextBuilder_ == null ? conditionContext_ : conditionContextBuilder_.build(); 5626 } 5627 } 5628 5629 @java.lang.Override clone()5630 public Builder clone() { 5631 return super.clone(); 5632 } 5633 5634 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)5635 public Builder setField( 5636 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 5637 return super.setField(field, value); 5638 } 5639 5640 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)5641 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 5642 return super.clearField(field); 5643 } 5644 5645 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)5646 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 5647 return super.clearOneof(oneof); 5648 } 5649 5650 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)5651 public Builder setRepeatedField( 5652 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 5653 return super.setRepeatedField(field, index, value); 5654 } 5655 5656 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)5657 public Builder addRepeatedField( 5658 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 5659 return super.addRepeatedField(field, value); 5660 } 5661 5662 @java.lang.Override mergeFrom(com.google.protobuf.Message other)5663 public Builder mergeFrom(com.google.protobuf.Message other) { 5664 if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery) { 5665 return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) other); 5666 } else { 5667 super.mergeFrom(other); 5668 return this; 5669 } 5670 } 5671 mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery other)5672 public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery other) { 5673 if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance()) 5674 return this; 5675 if (!other.getScope().isEmpty()) { 5676 scope_ = other.scope_; 5677 bitField0_ |= 0x00000001; 5678 onChanged(); 5679 } 5680 if (other.hasResourceSelector()) { 5681 mergeResourceSelector(other.getResourceSelector()); 5682 } 5683 if (other.hasIdentitySelector()) { 5684 mergeIdentitySelector(other.getIdentitySelector()); 5685 } 5686 if (other.hasAccessSelector()) { 5687 mergeAccessSelector(other.getAccessSelector()); 5688 } 5689 if (other.hasOptions()) { 5690 mergeOptions(other.getOptions()); 5691 } 5692 if (other.hasConditionContext()) { 5693 mergeConditionContext(other.getConditionContext()); 5694 } 5695 this.mergeUnknownFields(other.getUnknownFields()); 5696 onChanged(); 5697 return this; 5698 } 5699 5700 @java.lang.Override isInitialized()5701 public final boolean isInitialized() { 5702 return true; 5703 } 5704 5705 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5706 public Builder mergeFrom( 5707 com.google.protobuf.CodedInputStream input, 5708 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5709 throws java.io.IOException { 5710 if (extensionRegistry == null) { 5711 throw new java.lang.NullPointerException(); 5712 } 5713 try { 5714 boolean done = false; 5715 while (!done) { 5716 int tag = input.readTag(); 5717 switch (tag) { 5718 case 0: 5719 done = true; 5720 break; 5721 case 10: 5722 { 5723 scope_ = input.readStringRequireUtf8(); 5724 bitField0_ |= 0x00000001; 5725 break; 5726 } // case 10 5727 case 18: 5728 { 5729 input.readMessage( 5730 getResourceSelectorFieldBuilder().getBuilder(), extensionRegistry); 5731 bitField0_ |= 0x00000002; 5732 break; 5733 } // case 18 5734 case 26: 5735 { 5736 input.readMessage( 5737 getIdentitySelectorFieldBuilder().getBuilder(), extensionRegistry); 5738 bitField0_ |= 0x00000004; 5739 break; 5740 } // case 26 5741 case 34: 5742 { 5743 input.readMessage(getAccessSelectorFieldBuilder().getBuilder(), extensionRegistry); 5744 bitField0_ |= 0x00000008; 5745 break; 5746 } // case 34 5747 case 42: 5748 { 5749 input.readMessage(getOptionsFieldBuilder().getBuilder(), extensionRegistry); 5750 bitField0_ |= 0x00000010; 5751 break; 5752 } // case 42 5753 case 50: 5754 { 5755 input.readMessage( 5756 getConditionContextFieldBuilder().getBuilder(), extensionRegistry); 5757 bitField0_ |= 0x00000020; 5758 break; 5759 } // case 50 5760 default: 5761 { 5762 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 5763 done = true; // was an endgroup tag 5764 } 5765 break; 5766 } // default: 5767 } // switch (tag) 5768 } // while (!done) 5769 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 5770 throw e.unwrapIOException(); 5771 } finally { 5772 onChanged(); 5773 } // finally 5774 return this; 5775 } 5776 5777 private int bitField0_; 5778 5779 private java.lang.Object scope_ = ""; 5780 /** 5781 * 5782 * 5783 * <pre> 5784 * Required. The relative name of the root asset. Only resources and IAM 5785 * policies within the scope will be analyzed. 5786 * This can only be an organization number (such as "organizations/123"), a 5787 * folder number (such as "folders/123"), a project ID (such as 5788 * "projects/my-project-id"), or a project number (such as "projects/12345"). 5789 * To know how to get organization id, visit [here 5790 * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). 5791 * To know how to get folder or project id, visit [here 5792 * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). 5793 * </pre> 5794 * 5795 * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code> 5796 * 5797 * @return The scope. 5798 */ getScope()5799 public java.lang.String getScope() { 5800 java.lang.Object ref = scope_; 5801 if (!(ref instanceof java.lang.String)) { 5802 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 5803 java.lang.String s = bs.toStringUtf8(); 5804 scope_ = s; 5805 return s; 5806 } else { 5807 return (java.lang.String) ref; 5808 } 5809 } 5810 /** 5811 * 5812 * 5813 * <pre> 5814 * Required. The relative name of the root asset. Only resources and IAM 5815 * policies within the scope will be analyzed. 5816 * This can only be an organization number (such as "organizations/123"), a 5817 * folder number (such as "folders/123"), a project ID (such as 5818 * "projects/my-project-id"), or a project number (such as "projects/12345"). 5819 * To know how to get organization id, visit [here 5820 * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). 5821 * To know how to get folder or project id, visit [here 5822 * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). 5823 * </pre> 5824 * 5825 * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code> 5826 * 5827 * @return The bytes for scope. 5828 */ getScopeBytes()5829 public com.google.protobuf.ByteString getScopeBytes() { 5830 java.lang.Object ref = scope_; 5831 if (ref instanceof String) { 5832 com.google.protobuf.ByteString b = 5833 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 5834 scope_ = b; 5835 return b; 5836 } else { 5837 return (com.google.protobuf.ByteString) ref; 5838 } 5839 } 5840 /** 5841 * 5842 * 5843 * <pre> 5844 * Required. The relative name of the root asset. Only resources and IAM 5845 * policies within the scope will be analyzed. 5846 * This can only be an organization number (such as "organizations/123"), a 5847 * folder number (such as "folders/123"), a project ID (such as 5848 * "projects/my-project-id"), or a project number (such as "projects/12345"). 5849 * To know how to get organization id, visit [here 5850 * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). 5851 * To know how to get folder or project id, visit [here 5852 * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). 5853 * </pre> 5854 * 5855 * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code> 5856 * 5857 * @param value The scope to set. 5858 * @return This builder for chaining. 5859 */ setScope(java.lang.String value)5860 public Builder setScope(java.lang.String value) { 5861 if (value == null) { 5862 throw new NullPointerException(); 5863 } 5864 scope_ = value; 5865 bitField0_ |= 0x00000001; 5866 onChanged(); 5867 return this; 5868 } 5869 /** 5870 * 5871 * 5872 * <pre> 5873 * Required. The relative name of the root asset. Only resources and IAM 5874 * policies within the scope will be analyzed. 5875 * This can only be an organization number (such as "organizations/123"), a 5876 * folder number (such as "folders/123"), a project ID (such as 5877 * "projects/my-project-id"), or a project number (such as "projects/12345"). 5878 * To know how to get organization id, visit [here 5879 * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). 5880 * To know how to get folder or project id, visit [here 5881 * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). 5882 * </pre> 5883 * 5884 * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code> 5885 * 5886 * @return This builder for chaining. 5887 */ clearScope()5888 public Builder clearScope() { 5889 scope_ = getDefaultInstance().getScope(); 5890 bitField0_ = (bitField0_ & ~0x00000001); 5891 onChanged(); 5892 return this; 5893 } 5894 /** 5895 * 5896 * 5897 * <pre> 5898 * Required. The relative name of the root asset. Only resources and IAM 5899 * policies within the scope will be analyzed. 5900 * This can only be an organization number (such as "organizations/123"), a 5901 * folder number (such as "folders/123"), a project ID (such as 5902 * "projects/my-project-id"), or a project number (such as "projects/12345"). 5903 * To know how to get organization id, visit [here 5904 * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). 5905 * To know how to get folder or project id, visit [here 5906 * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). 5907 * </pre> 5908 * 5909 * <code>string scope = 1 [(.google.api.field_behavior) = REQUIRED];</code> 5910 * 5911 * @param value The bytes for scope to set. 5912 * @return This builder for chaining. 5913 */ setScopeBytes(com.google.protobuf.ByteString value)5914 public Builder setScopeBytes(com.google.protobuf.ByteString value) { 5915 if (value == null) { 5916 throw new NullPointerException(); 5917 } 5918 checkByteStringIsUtf8(value); 5919 scope_ = value; 5920 bitField0_ |= 0x00000001; 5921 onChanged(); 5922 return this; 5923 } 5924 5925 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; 5926 private com.google.protobuf.SingleFieldBuilderV3< 5927 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, 5928 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, 5929 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> 5930 resourceSelectorBuilder_; 5931 /** 5932 * 5933 * 5934 * <pre> 5935 * Optional. Specifies a resource for analysis. 5936 * </pre> 5937 * 5938 * <code> 5939 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 5940 * </code> 5941 * 5942 * @return Whether the resourceSelector field is set. 5943 */ hasResourceSelector()5944 public boolean hasResourceSelector() { 5945 return ((bitField0_ & 0x00000002) != 0); 5946 } 5947 /** 5948 * 5949 * 5950 * <pre> 5951 * Optional. Specifies a resource for analysis. 5952 * </pre> 5953 * 5954 * <code> 5955 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 5956 * </code> 5957 * 5958 * @return The resourceSelector. 5959 */ getResourceSelector()5960 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { 5961 if (resourceSelectorBuilder_ == null) { 5962 return resourceSelector_ == null 5963 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() 5964 : resourceSelector_; 5965 } else { 5966 return resourceSelectorBuilder_.getMessage(); 5967 } 5968 } 5969 /** 5970 * 5971 * 5972 * <pre> 5973 * Optional. Specifies a resource for analysis. 5974 * </pre> 5975 * 5976 * <code> 5977 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 5978 * </code> 5979 */ setResourceSelector( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value)5980 public Builder setResourceSelector( 5981 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) { 5982 if (resourceSelectorBuilder_ == null) { 5983 if (value == null) { 5984 throw new NullPointerException(); 5985 } 5986 resourceSelector_ = value; 5987 } else { 5988 resourceSelectorBuilder_.setMessage(value); 5989 } 5990 bitField0_ |= 0x00000002; 5991 onChanged(); 5992 return this; 5993 } 5994 /** 5995 * 5996 * 5997 * <pre> 5998 * Optional. Specifies a resource for analysis. 5999 * </pre> 6000 * 6001 * <code> 6002 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 6003 * </code> 6004 */ setResourceSelector( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder builderForValue)6005 public Builder setResourceSelector( 6006 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder builderForValue) { 6007 if (resourceSelectorBuilder_ == null) { 6008 resourceSelector_ = builderForValue.build(); 6009 } else { 6010 resourceSelectorBuilder_.setMessage(builderForValue.build()); 6011 } 6012 bitField0_ |= 0x00000002; 6013 onChanged(); 6014 return this; 6015 } 6016 /** 6017 * 6018 * 6019 * <pre> 6020 * Optional. Specifies a resource for analysis. 6021 * </pre> 6022 * 6023 * <code> 6024 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 6025 * </code> 6026 */ mergeResourceSelector( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value)6027 public Builder mergeResourceSelector( 6028 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) { 6029 if (resourceSelectorBuilder_ == null) { 6030 if (((bitField0_ & 0x00000002) != 0) 6031 && resourceSelector_ != null 6032 && resourceSelector_ 6033 != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 6034 .getDefaultInstance()) { 6035 getResourceSelectorBuilder().mergeFrom(value); 6036 } else { 6037 resourceSelector_ = value; 6038 } 6039 } else { 6040 resourceSelectorBuilder_.mergeFrom(value); 6041 } 6042 bitField0_ |= 0x00000002; 6043 onChanged(); 6044 return this; 6045 } 6046 /** 6047 * 6048 * 6049 * <pre> 6050 * Optional. Specifies a resource for analysis. 6051 * </pre> 6052 * 6053 * <code> 6054 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 6055 * </code> 6056 */ clearResourceSelector()6057 public Builder clearResourceSelector() { 6058 bitField0_ = (bitField0_ & ~0x00000002); 6059 resourceSelector_ = null; 6060 if (resourceSelectorBuilder_ != null) { 6061 resourceSelectorBuilder_.dispose(); 6062 resourceSelectorBuilder_ = null; 6063 } 6064 onChanged(); 6065 return this; 6066 } 6067 /** 6068 * 6069 * 6070 * <pre> 6071 * Optional. Specifies a resource for analysis. 6072 * </pre> 6073 * 6074 * <code> 6075 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 6076 * </code> 6077 */ 6078 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder getResourceSelectorBuilder()6079 getResourceSelectorBuilder() { 6080 bitField0_ |= 0x00000002; 6081 onChanged(); 6082 return getResourceSelectorFieldBuilder().getBuilder(); 6083 } 6084 /** 6085 * 6086 * 6087 * <pre> 6088 * Optional. Specifies a resource for analysis. 6089 * </pre> 6090 * 6091 * <code> 6092 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 6093 * </code> 6094 */ 6095 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder getResourceSelectorOrBuilder()6096 getResourceSelectorOrBuilder() { 6097 if (resourceSelectorBuilder_ != null) { 6098 return resourceSelectorBuilder_.getMessageOrBuilder(); 6099 } else { 6100 return resourceSelector_ == null 6101 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() 6102 : resourceSelector_; 6103 } 6104 } 6105 /** 6106 * 6107 * 6108 * <pre> 6109 * Optional. Specifies a resource for analysis. 6110 * </pre> 6111 * 6112 * <code> 6113 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; 6114 * </code> 6115 */ 6116 private com.google.protobuf.SingleFieldBuilderV3< 6117 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, 6118 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, 6119 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> getResourceSelectorFieldBuilder()6120 getResourceSelectorFieldBuilder() { 6121 if (resourceSelectorBuilder_ == null) { 6122 resourceSelectorBuilder_ = 6123 new com.google.protobuf.SingleFieldBuilderV3< 6124 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, 6125 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, 6126 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder>( 6127 getResourceSelector(), getParentForChildren(), isClean()); 6128 resourceSelector_ = null; 6129 } 6130 return resourceSelectorBuilder_; 6131 } 6132 6133 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; 6134 private com.google.protobuf.SingleFieldBuilderV3< 6135 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, 6136 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, 6137 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> 6138 identitySelectorBuilder_; 6139 /** 6140 * 6141 * 6142 * <pre> 6143 * Optional. Specifies an identity for analysis. 6144 * </pre> 6145 * 6146 * <code> 6147 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 6148 * </code> 6149 * 6150 * @return Whether the identitySelector field is set. 6151 */ hasIdentitySelector()6152 public boolean hasIdentitySelector() { 6153 return ((bitField0_ & 0x00000004) != 0); 6154 } 6155 /** 6156 * 6157 * 6158 * <pre> 6159 * Optional. Specifies an identity for analysis. 6160 * </pre> 6161 * 6162 * <code> 6163 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 6164 * </code> 6165 * 6166 * @return The identitySelector. 6167 */ getIdentitySelector()6168 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { 6169 if (identitySelectorBuilder_ == null) { 6170 return identitySelector_ == null 6171 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() 6172 : identitySelector_; 6173 } else { 6174 return identitySelectorBuilder_.getMessage(); 6175 } 6176 } 6177 /** 6178 * 6179 * 6180 * <pre> 6181 * Optional. Specifies an identity for analysis. 6182 * </pre> 6183 * 6184 * <code> 6185 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 6186 * </code> 6187 */ setIdentitySelector( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value)6188 public Builder setIdentitySelector( 6189 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) { 6190 if (identitySelectorBuilder_ == null) { 6191 if (value == null) { 6192 throw new NullPointerException(); 6193 } 6194 identitySelector_ = value; 6195 } else { 6196 identitySelectorBuilder_.setMessage(value); 6197 } 6198 bitField0_ |= 0x00000004; 6199 onChanged(); 6200 return this; 6201 } 6202 /** 6203 * 6204 * 6205 * <pre> 6206 * Optional. Specifies an identity for analysis. 6207 * </pre> 6208 * 6209 * <code> 6210 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 6211 * </code> 6212 */ setIdentitySelector( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder builderForValue)6213 public Builder setIdentitySelector( 6214 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder builderForValue) { 6215 if (identitySelectorBuilder_ == null) { 6216 identitySelector_ = builderForValue.build(); 6217 } else { 6218 identitySelectorBuilder_.setMessage(builderForValue.build()); 6219 } 6220 bitField0_ |= 0x00000004; 6221 onChanged(); 6222 return this; 6223 } 6224 /** 6225 * 6226 * 6227 * <pre> 6228 * Optional. Specifies an identity for analysis. 6229 * </pre> 6230 * 6231 * <code> 6232 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 6233 * </code> 6234 */ mergeIdentitySelector( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value)6235 public Builder mergeIdentitySelector( 6236 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) { 6237 if (identitySelectorBuilder_ == null) { 6238 if (((bitField0_ & 0x00000004) != 0) 6239 && identitySelector_ != null 6240 && identitySelector_ 6241 != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 6242 .getDefaultInstance()) { 6243 getIdentitySelectorBuilder().mergeFrom(value); 6244 } else { 6245 identitySelector_ = value; 6246 } 6247 } else { 6248 identitySelectorBuilder_.mergeFrom(value); 6249 } 6250 bitField0_ |= 0x00000004; 6251 onChanged(); 6252 return this; 6253 } 6254 /** 6255 * 6256 * 6257 * <pre> 6258 * Optional. Specifies an identity for analysis. 6259 * </pre> 6260 * 6261 * <code> 6262 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 6263 * </code> 6264 */ clearIdentitySelector()6265 public Builder clearIdentitySelector() { 6266 bitField0_ = (bitField0_ & ~0x00000004); 6267 identitySelector_ = null; 6268 if (identitySelectorBuilder_ != null) { 6269 identitySelectorBuilder_.dispose(); 6270 identitySelectorBuilder_ = null; 6271 } 6272 onChanged(); 6273 return this; 6274 } 6275 /** 6276 * 6277 * 6278 * <pre> 6279 * Optional. Specifies an identity for analysis. 6280 * </pre> 6281 * 6282 * <code> 6283 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 6284 * </code> 6285 */ 6286 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder getIdentitySelectorBuilder()6287 getIdentitySelectorBuilder() { 6288 bitField0_ |= 0x00000004; 6289 onChanged(); 6290 return getIdentitySelectorFieldBuilder().getBuilder(); 6291 } 6292 /** 6293 * 6294 * 6295 * <pre> 6296 * Optional. Specifies an identity for analysis. 6297 * </pre> 6298 * 6299 * <code> 6300 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 6301 * </code> 6302 */ 6303 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder getIdentitySelectorOrBuilder()6304 getIdentitySelectorOrBuilder() { 6305 if (identitySelectorBuilder_ != null) { 6306 return identitySelectorBuilder_.getMessageOrBuilder(); 6307 } else { 6308 return identitySelector_ == null 6309 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() 6310 : identitySelector_; 6311 } 6312 } 6313 /** 6314 * 6315 * 6316 * <pre> 6317 * Optional. Specifies an identity for analysis. 6318 * </pre> 6319 * 6320 * <code> 6321 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; 6322 * </code> 6323 */ 6324 private com.google.protobuf.SingleFieldBuilderV3< 6325 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, 6326 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, 6327 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> getIdentitySelectorFieldBuilder()6328 getIdentitySelectorFieldBuilder() { 6329 if (identitySelectorBuilder_ == null) { 6330 identitySelectorBuilder_ = 6331 new com.google.protobuf.SingleFieldBuilderV3< 6332 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, 6333 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, 6334 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder>( 6335 getIdentitySelector(), getParentForChildren(), isClean()); 6336 identitySelector_ = null; 6337 } 6338 return identitySelectorBuilder_; 6339 } 6340 6341 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; 6342 private com.google.protobuf.SingleFieldBuilderV3< 6343 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, 6344 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, 6345 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> 6346 accessSelectorBuilder_; 6347 /** 6348 * 6349 * 6350 * <pre> 6351 * Optional. Specifies roles or permissions for analysis. This is optional. 6352 * </pre> 6353 * 6354 * <code> 6355 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 6356 * </code> 6357 * 6358 * @return Whether the accessSelector field is set. 6359 */ hasAccessSelector()6360 public boolean hasAccessSelector() { 6361 return ((bitField0_ & 0x00000008) != 0); 6362 } 6363 /** 6364 * 6365 * 6366 * <pre> 6367 * Optional. Specifies roles or permissions for analysis. This is optional. 6368 * </pre> 6369 * 6370 * <code> 6371 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 6372 * </code> 6373 * 6374 * @return The accessSelector. 6375 */ getAccessSelector()6376 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { 6377 if (accessSelectorBuilder_ == null) { 6378 return accessSelector_ == null 6379 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() 6380 : accessSelector_; 6381 } else { 6382 return accessSelectorBuilder_.getMessage(); 6383 } 6384 } 6385 /** 6386 * 6387 * 6388 * <pre> 6389 * Optional. Specifies roles or permissions for analysis. This is optional. 6390 * </pre> 6391 * 6392 * <code> 6393 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 6394 * </code> 6395 */ setAccessSelector( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value)6396 public Builder setAccessSelector( 6397 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) { 6398 if (accessSelectorBuilder_ == null) { 6399 if (value == null) { 6400 throw new NullPointerException(); 6401 } 6402 accessSelector_ = value; 6403 } else { 6404 accessSelectorBuilder_.setMessage(value); 6405 } 6406 bitField0_ |= 0x00000008; 6407 onChanged(); 6408 return this; 6409 } 6410 /** 6411 * 6412 * 6413 * <pre> 6414 * Optional. Specifies roles or permissions for analysis. This is optional. 6415 * </pre> 6416 * 6417 * <code> 6418 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 6419 * </code> 6420 */ setAccessSelector( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder builderForValue)6421 public Builder setAccessSelector( 6422 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder builderForValue) { 6423 if (accessSelectorBuilder_ == null) { 6424 accessSelector_ = builderForValue.build(); 6425 } else { 6426 accessSelectorBuilder_.setMessage(builderForValue.build()); 6427 } 6428 bitField0_ |= 0x00000008; 6429 onChanged(); 6430 return this; 6431 } 6432 /** 6433 * 6434 * 6435 * <pre> 6436 * Optional. Specifies roles or permissions for analysis. This is optional. 6437 * </pre> 6438 * 6439 * <code> 6440 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 6441 * </code> 6442 */ mergeAccessSelector( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value)6443 public Builder mergeAccessSelector( 6444 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) { 6445 if (accessSelectorBuilder_ == null) { 6446 if (((bitField0_ & 0x00000008) != 0) 6447 && accessSelector_ != null 6448 && accessSelector_ 6449 != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 6450 .getDefaultInstance()) { 6451 getAccessSelectorBuilder().mergeFrom(value); 6452 } else { 6453 accessSelector_ = value; 6454 } 6455 } else { 6456 accessSelectorBuilder_.mergeFrom(value); 6457 } 6458 bitField0_ |= 0x00000008; 6459 onChanged(); 6460 return this; 6461 } 6462 /** 6463 * 6464 * 6465 * <pre> 6466 * Optional. Specifies roles or permissions for analysis. This is optional. 6467 * </pre> 6468 * 6469 * <code> 6470 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 6471 * </code> 6472 */ clearAccessSelector()6473 public Builder clearAccessSelector() { 6474 bitField0_ = (bitField0_ & ~0x00000008); 6475 accessSelector_ = null; 6476 if (accessSelectorBuilder_ != null) { 6477 accessSelectorBuilder_.dispose(); 6478 accessSelectorBuilder_ = null; 6479 } 6480 onChanged(); 6481 return this; 6482 } 6483 /** 6484 * 6485 * 6486 * <pre> 6487 * Optional. Specifies roles or permissions for analysis. This is optional. 6488 * </pre> 6489 * 6490 * <code> 6491 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 6492 * </code> 6493 */ 6494 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder getAccessSelectorBuilder()6495 getAccessSelectorBuilder() { 6496 bitField0_ |= 0x00000008; 6497 onChanged(); 6498 return getAccessSelectorFieldBuilder().getBuilder(); 6499 } 6500 /** 6501 * 6502 * 6503 * <pre> 6504 * Optional. Specifies roles or permissions for analysis. This is optional. 6505 * </pre> 6506 * 6507 * <code> 6508 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 6509 * </code> 6510 */ 6511 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder getAccessSelectorOrBuilder()6512 getAccessSelectorOrBuilder() { 6513 if (accessSelectorBuilder_ != null) { 6514 return accessSelectorBuilder_.getMessageOrBuilder(); 6515 } else { 6516 return accessSelector_ == null 6517 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() 6518 : accessSelector_; 6519 } 6520 } 6521 /** 6522 * 6523 * 6524 * <pre> 6525 * Optional. Specifies roles or permissions for analysis. This is optional. 6526 * </pre> 6527 * 6528 * <code> 6529 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; 6530 * </code> 6531 */ 6532 private com.google.protobuf.SingleFieldBuilderV3< 6533 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, 6534 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, 6535 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> getAccessSelectorFieldBuilder()6536 getAccessSelectorFieldBuilder() { 6537 if (accessSelectorBuilder_ == null) { 6538 accessSelectorBuilder_ = 6539 new com.google.protobuf.SingleFieldBuilderV3< 6540 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, 6541 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, 6542 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder>( 6543 getAccessSelector(), getParentForChildren(), isClean()); 6544 accessSelector_ = null; 6545 } 6546 return accessSelectorBuilder_; 6547 } 6548 6549 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_; 6550 private com.google.protobuf.SingleFieldBuilderV3< 6551 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, 6552 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, 6553 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder> 6554 optionsBuilder_; 6555 /** 6556 * 6557 * 6558 * <pre> 6559 * Optional. The query options. 6560 * </pre> 6561 * 6562 * <code> 6563 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 6564 * </code> 6565 * 6566 * @return Whether the options field is set. 6567 */ hasOptions()6568 public boolean hasOptions() { 6569 return ((bitField0_ & 0x00000010) != 0); 6570 } 6571 /** 6572 * 6573 * 6574 * <pre> 6575 * Optional. The query options. 6576 * </pre> 6577 * 6578 * <code> 6579 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 6580 * </code> 6581 * 6582 * @return The options. 6583 */ getOptions()6584 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() { 6585 if (optionsBuilder_ == null) { 6586 return options_ == null 6587 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() 6588 : options_; 6589 } else { 6590 return optionsBuilder_.getMessage(); 6591 } 6592 } 6593 /** 6594 * 6595 * 6596 * <pre> 6597 * Optional. The query options. 6598 * </pre> 6599 * 6600 * <code> 6601 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 6602 * </code> 6603 */ setOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value)6604 public Builder setOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) { 6605 if (optionsBuilder_ == null) { 6606 if (value == null) { 6607 throw new NullPointerException(); 6608 } 6609 options_ = value; 6610 } else { 6611 optionsBuilder_.setMessage(value); 6612 } 6613 bitField0_ |= 0x00000010; 6614 onChanged(); 6615 return this; 6616 } 6617 /** 6618 * 6619 * 6620 * <pre> 6621 * Optional. The query options. 6622 * </pre> 6623 * 6624 * <code> 6625 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 6626 * </code> 6627 */ setOptions( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder builderForValue)6628 public Builder setOptions( 6629 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder builderForValue) { 6630 if (optionsBuilder_ == null) { 6631 options_ = builderForValue.build(); 6632 } else { 6633 optionsBuilder_.setMessage(builderForValue.build()); 6634 } 6635 bitField0_ |= 0x00000010; 6636 onChanged(); 6637 return this; 6638 } 6639 /** 6640 * 6641 * 6642 * <pre> 6643 * Optional. The query options. 6644 * </pre> 6645 * 6646 * <code> 6647 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 6648 * </code> 6649 */ mergeOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value)6650 public Builder mergeOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) { 6651 if (optionsBuilder_ == null) { 6652 if (((bitField0_ & 0x00000010) != 0) 6653 && options_ != null 6654 && options_ 6655 != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()) { 6656 getOptionsBuilder().mergeFrom(value); 6657 } else { 6658 options_ = value; 6659 } 6660 } else { 6661 optionsBuilder_.mergeFrom(value); 6662 } 6663 bitField0_ |= 0x00000010; 6664 onChanged(); 6665 return this; 6666 } 6667 /** 6668 * 6669 * 6670 * <pre> 6671 * Optional. The query options. 6672 * </pre> 6673 * 6674 * <code> 6675 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 6676 * </code> 6677 */ clearOptions()6678 public Builder clearOptions() { 6679 bitField0_ = (bitField0_ & ~0x00000010); 6680 options_ = null; 6681 if (optionsBuilder_ != null) { 6682 optionsBuilder_.dispose(); 6683 optionsBuilder_ = null; 6684 } 6685 onChanged(); 6686 return this; 6687 } 6688 /** 6689 * 6690 * 6691 * <pre> 6692 * Optional. The query options. 6693 * </pre> 6694 * 6695 * <code> 6696 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 6697 * </code> 6698 */ getOptionsBuilder()6699 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder getOptionsBuilder() { 6700 bitField0_ |= 0x00000010; 6701 onChanged(); 6702 return getOptionsFieldBuilder().getBuilder(); 6703 } 6704 /** 6705 * 6706 * 6707 * <pre> 6708 * Optional. The query options. 6709 * </pre> 6710 * 6711 * <code> 6712 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 6713 * </code> 6714 */ getOptionsOrBuilder()6715 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() { 6716 if (optionsBuilder_ != null) { 6717 return optionsBuilder_.getMessageOrBuilder(); 6718 } else { 6719 return options_ == null 6720 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() 6721 : options_; 6722 } 6723 } 6724 /** 6725 * 6726 * 6727 * <pre> 6728 * Optional. The query options. 6729 * </pre> 6730 * 6731 * <code> 6732 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; 6733 * </code> 6734 */ 6735 private com.google.protobuf.SingleFieldBuilderV3< 6736 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, 6737 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, 6738 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder> getOptionsFieldBuilder()6739 getOptionsFieldBuilder() { 6740 if (optionsBuilder_ == null) { 6741 optionsBuilder_ = 6742 new com.google.protobuf.SingleFieldBuilderV3< 6743 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, 6744 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, 6745 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder>( 6746 getOptions(), getParentForChildren(), isClean()); 6747 options_ = null; 6748 } 6749 return optionsBuilder_; 6750 } 6751 6752 private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_; 6753 private com.google.protobuf.SingleFieldBuilderV3< 6754 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, 6755 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, 6756 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder> 6757 conditionContextBuilder_; 6758 /** 6759 * 6760 * 6761 * <pre> 6762 * Optional. The hypothetical context for IAM conditions evaluation. 6763 * </pre> 6764 * 6765 * <code> 6766 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 6767 * </code> 6768 * 6769 * @return Whether the conditionContext field is set. 6770 */ hasConditionContext()6771 public boolean hasConditionContext() { 6772 return ((bitField0_ & 0x00000020) != 0); 6773 } 6774 /** 6775 * 6776 * 6777 * <pre> 6778 * Optional. The hypothetical context for IAM conditions evaluation. 6779 * </pre> 6780 * 6781 * <code> 6782 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 6783 * </code> 6784 * 6785 * @return The conditionContext. 6786 */ getConditionContext()6787 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() { 6788 if (conditionContextBuilder_ == null) { 6789 return conditionContext_ == null 6790 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() 6791 : conditionContext_; 6792 } else { 6793 return conditionContextBuilder_.getMessage(); 6794 } 6795 } 6796 /** 6797 * 6798 * 6799 * <pre> 6800 * Optional. The hypothetical context for IAM conditions evaluation. 6801 * </pre> 6802 * 6803 * <code> 6804 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 6805 * </code> 6806 */ setConditionContext( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value)6807 public Builder setConditionContext( 6808 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) { 6809 if (conditionContextBuilder_ == null) { 6810 if (value == null) { 6811 throw new NullPointerException(); 6812 } 6813 conditionContext_ = value; 6814 } else { 6815 conditionContextBuilder_.setMessage(value); 6816 } 6817 bitField0_ |= 0x00000020; 6818 onChanged(); 6819 return this; 6820 } 6821 /** 6822 * 6823 * 6824 * <pre> 6825 * Optional. The hypothetical context for IAM conditions evaluation. 6826 * </pre> 6827 * 6828 * <code> 6829 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 6830 * </code> 6831 */ setConditionContext( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder builderForValue)6832 public Builder setConditionContext( 6833 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder builderForValue) { 6834 if (conditionContextBuilder_ == null) { 6835 conditionContext_ = builderForValue.build(); 6836 } else { 6837 conditionContextBuilder_.setMessage(builderForValue.build()); 6838 } 6839 bitField0_ |= 0x00000020; 6840 onChanged(); 6841 return this; 6842 } 6843 /** 6844 * 6845 * 6846 * <pre> 6847 * Optional. The hypothetical context for IAM conditions evaluation. 6848 * </pre> 6849 * 6850 * <code> 6851 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 6852 * </code> 6853 */ mergeConditionContext( com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value)6854 public Builder mergeConditionContext( 6855 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) { 6856 if (conditionContextBuilder_ == null) { 6857 if (((bitField0_ & 0x00000020) != 0) 6858 && conditionContext_ != null 6859 && conditionContext_ 6860 != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 6861 .getDefaultInstance()) { 6862 getConditionContextBuilder().mergeFrom(value); 6863 } else { 6864 conditionContext_ = value; 6865 } 6866 } else { 6867 conditionContextBuilder_.mergeFrom(value); 6868 } 6869 bitField0_ |= 0x00000020; 6870 onChanged(); 6871 return this; 6872 } 6873 /** 6874 * 6875 * 6876 * <pre> 6877 * Optional. The hypothetical context for IAM conditions evaluation. 6878 * </pre> 6879 * 6880 * <code> 6881 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 6882 * </code> 6883 */ clearConditionContext()6884 public Builder clearConditionContext() { 6885 bitField0_ = (bitField0_ & ~0x00000020); 6886 conditionContext_ = null; 6887 if (conditionContextBuilder_ != null) { 6888 conditionContextBuilder_.dispose(); 6889 conditionContextBuilder_ = null; 6890 } 6891 onChanged(); 6892 return this; 6893 } 6894 /** 6895 * 6896 * 6897 * <pre> 6898 * Optional. The hypothetical context for IAM conditions evaluation. 6899 * </pre> 6900 * 6901 * <code> 6902 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 6903 * </code> 6904 */ 6905 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder getConditionContextBuilder()6906 getConditionContextBuilder() { 6907 bitField0_ |= 0x00000020; 6908 onChanged(); 6909 return getConditionContextFieldBuilder().getBuilder(); 6910 } 6911 /** 6912 * 6913 * 6914 * <pre> 6915 * Optional. The hypothetical context for IAM conditions evaluation. 6916 * </pre> 6917 * 6918 * <code> 6919 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 6920 * </code> 6921 */ 6922 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder getConditionContextOrBuilder()6923 getConditionContextOrBuilder() { 6924 if (conditionContextBuilder_ != null) { 6925 return conditionContextBuilder_.getMessageOrBuilder(); 6926 } else { 6927 return conditionContext_ == null 6928 ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() 6929 : conditionContext_; 6930 } 6931 } 6932 /** 6933 * 6934 * 6935 * <pre> 6936 * Optional. The hypothetical context for IAM conditions evaluation. 6937 * </pre> 6938 * 6939 * <code> 6940 * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; 6941 * </code> 6942 */ 6943 private com.google.protobuf.SingleFieldBuilderV3< 6944 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, 6945 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, 6946 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder> getConditionContextFieldBuilder()6947 getConditionContextFieldBuilder() { 6948 if (conditionContextBuilder_ == null) { 6949 conditionContextBuilder_ = 6950 new com.google.protobuf.SingleFieldBuilderV3< 6951 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, 6952 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, 6953 com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder>( 6954 getConditionContext(), getParentForChildren(), isClean()); 6955 conditionContext_ = null; 6956 } 6957 return conditionContextBuilder_; 6958 } 6959 6960 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)6961 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 6962 return super.setUnknownFields(unknownFields); 6963 } 6964 6965 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)6966 public final Builder mergeUnknownFields( 6967 final com.google.protobuf.UnknownFieldSet unknownFields) { 6968 return super.mergeUnknownFields(unknownFields); 6969 } 6970 6971 // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery) 6972 } 6973 6974 // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery) 6975 private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery DEFAULT_INSTANCE; 6976 6977 static { 6978 DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery(); 6979 } 6980 getDefaultInstance()6981 public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstance() { 6982 return DEFAULT_INSTANCE; 6983 } 6984 6985 private static final com.google.protobuf.Parser<IamPolicyAnalysisQuery> PARSER = 6986 new com.google.protobuf.AbstractParser<IamPolicyAnalysisQuery>() { 6987 @java.lang.Override 6988 public IamPolicyAnalysisQuery parsePartialFrom( 6989 com.google.protobuf.CodedInputStream input, 6990 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 6991 throws com.google.protobuf.InvalidProtocolBufferException { 6992 Builder builder = newBuilder(); 6993 try { 6994 builder.mergeFrom(input, extensionRegistry); 6995 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 6996 throw e.setUnfinishedMessage(builder.buildPartial()); 6997 } catch (com.google.protobuf.UninitializedMessageException e) { 6998 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 6999 } catch (java.io.IOException e) { 7000 throw new com.google.protobuf.InvalidProtocolBufferException(e) 7001 .setUnfinishedMessage(builder.buildPartial()); 7002 } 7003 return builder.buildPartial(); 7004 } 7005 }; 7006 parser()7007 public static com.google.protobuf.Parser<IamPolicyAnalysisQuery> parser() { 7008 return PARSER; 7009 } 7010 7011 @java.lang.Override getParserForType()7012 public com.google.protobuf.Parser<IamPolicyAnalysisQuery> getParserForType() { 7013 return PARSER; 7014 } 7015 7016 @java.lang.Override getDefaultInstanceForType()7017 public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstanceForType() { 7018 return DEFAULT_INSTANCE; 7019 } 7020 } 7021