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/privacy/dlp/v2/dlp.proto 18 19 package com.google.privacy.dlp.v2; 20 21 /** 22 * 23 * 24 * <pre> 25 * Location of the finding within an image. 26 * </pre> 27 * 28 * Protobuf type {@code google.privacy.dlp.v2.ImageLocation} 29 */ 30 public final class ImageLocation extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageLocation) 33 ImageLocationOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ImageLocation.newBuilder() to construct. ImageLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ImageLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ImageLocation()40 private ImageLocation() { 41 boundingBoxes_ = java.util.Collections.emptyList(); 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new ImageLocation(); 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.privacy.dlp.v2.DlpProto 57 .internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.privacy.dlp.v2.DlpProto 64 .internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.privacy.dlp.v2.ImageLocation.class, 67 com.google.privacy.dlp.v2.ImageLocation.Builder.class); 68 } 69 70 public static final int BOUNDING_BOXES_FIELD_NUMBER = 1; 71 72 @SuppressWarnings("serial") 73 private java.util.List<com.google.privacy.dlp.v2.BoundingBox> boundingBoxes_; 74 /** 75 * 76 * 77 * <pre> 78 * Bounding boxes locating the pixels within the image containing the finding. 79 * </pre> 80 * 81 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 82 */ 83 @java.lang.Override getBoundingBoxesList()84 public java.util.List<com.google.privacy.dlp.v2.BoundingBox> getBoundingBoxesList() { 85 return boundingBoxes_; 86 } 87 /** 88 * 89 * 90 * <pre> 91 * Bounding boxes locating the pixels within the image containing the finding. 92 * </pre> 93 * 94 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 95 */ 96 @java.lang.Override 97 public java.util.List<? extends com.google.privacy.dlp.v2.BoundingBoxOrBuilder> getBoundingBoxesOrBuilderList()98 getBoundingBoxesOrBuilderList() { 99 return boundingBoxes_; 100 } 101 /** 102 * 103 * 104 * <pre> 105 * Bounding boxes locating the pixels within the image containing the finding. 106 * </pre> 107 * 108 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 109 */ 110 @java.lang.Override getBoundingBoxesCount()111 public int getBoundingBoxesCount() { 112 return boundingBoxes_.size(); 113 } 114 /** 115 * 116 * 117 * <pre> 118 * Bounding boxes locating the pixels within the image containing the finding. 119 * </pre> 120 * 121 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 122 */ 123 @java.lang.Override getBoundingBoxes(int index)124 public com.google.privacy.dlp.v2.BoundingBox getBoundingBoxes(int index) { 125 return boundingBoxes_.get(index); 126 } 127 /** 128 * 129 * 130 * <pre> 131 * Bounding boxes locating the pixels within the image containing the finding. 132 * </pre> 133 * 134 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 135 */ 136 @java.lang.Override getBoundingBoxesOrBuilder(int index)137 public com.google.privacy.dlp.v2.BoundingBoxOrBuilder getBoundingBoxesOrBuilder(int index) { 138 return boundingBoxes_.get(index); 139 } 140 141 private byte memoizedIsInitialized = -1; 142 143 @java.lang.Override isInitialized()144 public final boolean isInitialized() { 145 byte isInitialized = memoizedIsInitialized; 146 if (isInitialized == 1) return true; 147 if (isInitialized == 0) return false; 148 149 memoizedIsInitialized = 1; 150 return true; 151 } 152 153 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)154 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 155 for (int i = 0; i < boundingBoxes_.size(); i++) { 156 output.writeMessage(1, boundingBoxes_.get(i)); 157 } 158 getUnknownFields().writeTo(output); 159 } 160 161 @java.lang.Override getSerializedSize()162 public int getSerializedSize() { 163 int size = memoizedSize; 164 if (size != -1) return size; 165 166 size = 0; 167 for (int i = 0; i < boundingBoxes_.size(); i++) { 168 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, boundingBoxes_.get(i)); 169 } 170 size += getUnknownFields().getSerializedSize(); 171 memoizedSize = size; 172 return size; 173 } 174 175 @java.lang.Override equals(final java.lang.Object obj)176 public boolean equals(final java.lang.Object obj) { 177 if (obj == this) { 178 return true; 179 } 180 if (!(obj instanceof com.google.privacy.dlp.v2.ImageLocation)) { 181 return super.equals(obj); 182 } 183 com.google.privacy.dlp.v2.ImageLocation other = (com.google.privacy.dlp.v2.ImageLocation) obj; 184 185 if (!getBoundingBoxesList().equals(other.getBoundingBoxesList())) return false; 186 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 187 return true; 188 } 189 190 @java.lang.Override hashCode()191 public int hashCode() { 192 if (memoizedHashCode != 0) { 193 return memoizedHashCode; 194 } 195 int hash = 41; 196 hash = (19 * hash) + getDescriptor().hashCode(); 197 if (getBoundingBoxesCount() > 0) { 198 hash = (37 * hash) + BOUNDING_BOXES_FIELD_NUMBER; 199 hash = (53 * hash) + getBoundingBoxesList().hashCode(); 200 } 201 hash = (29 * hash) + getUnknownFields().hashCode(); 202 memoizedHashCode = hash; 203 return hash; 204 } 205 parseFrom(java.nio.ByteBuffer data)206 public static com.google.privacy.dlp.v2.ImageLocation parseFrom(java.nio.ByteBuffer data) 207 throws com.google.protobuf.InvalidProtocolBufferException { 208 return PARSER.parseFrom(data); 209 } 210 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)211 public static com.google.privacy.dlp.v2.ImageLocation parseFrom( 212 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 213 throws com.google.protobuf.InvalidProtocolBufferException { 214 return PARSER.parseFrom(data, extensionRegistry); 215 } 216 parseFrom( com.google.protobuf.ByteString data)217 public static com.google.privacy.dlp.v2.ImageLocation parseFrom( 218 com.google.protobuf.ByteString data) 219 throws com.google.protobuf.InvalidProtocolBufferException { 220 return PARSER.parseFrom(data); 221 } 222 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)223 public static com.google.privacy.dlp.v2.ImageLocation parseFrom( 224 com.google.protobuf.ByteString data, 225 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 226 throws com.google.protobuf.InvalidProtocolBufferException { 227 return PARSER.parseFrom(data, extensionRegistry); 228 } 229 parseFrom(byte[] data)230 public static com.google.privacy.dlp.v2.ImageLocation parseFrom(byte[] data) 231 throws com.google.protobuf.InvalidProtocolBufferException { 232 return PARSER.parseFrom(data); 233 } 234 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)235 public static com.google.privacy.dlp.v2.ImageLocation parseFrom( 236 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 237 throws com.google.protobuf.InvalidProtocolBufferException { 238 return PARSER.parseFrom(data, extensionRegistry); 239 } 240 parseFrom(java.io.InputStream input)241 public static com.google.privacy.dlp.v2.ImageLocation parseFrom(java.io.InputStream input) 242 throws java.io.IOException { 243 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 244 } 245 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)246 public static com.google.privacy.dlp.v2.ImageLocation parseFrom( 247 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 248 throws java.io.IOException { 249 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 250 PARSER, input, extensionRegistry); 251 } 252 parseDelimitedFrom( java.io.InputStream input)253 public static com.google.privacy.dlp.v2.ImageLocation parseDelimitedFrom( 254 java.io.InputStream input) throws java.io.IOException { 255 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 256 } 257 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)258 public static com.google.privacy.dlp.v2.ImageLocation parseDelimitedFrom( 259 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 260 throws java.io.IOException { 261 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 262 PARSER, input, extensionRegistry); 263 } 264 parseFrom( com.google.protobuf.CodedInputStream input)265 public static com.google.privacy.dlp.v2.ImageLocation parseFrom( 266 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 267 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 268 } 269 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)270 public static com.google.privacy.dlp.v2.ImageLocation parseFrom( 271 com.google.protobuf.CodedInputStream input, 272 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 273 throws java.io.IOException { 274 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 275 PARSER, input, extensionRegistry); 276 } 277 278 @java.lang.Override newBuilderForType()279 public Builder newBuilderForType() { 280 return newBuilder(); 281 } 282 newBuilder()283 public static Builder newBuilder() { 284 return DEFAULT_INSTANCE.toBuilder(); 285 } 286 newBuilder(com.google.privacy.dlp.v2.ImageLocation prototype)287 public static Builder newBuilder(com.google.privacy.dlp.v2.ImageLocation prototype) { 288 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 289 } 290 291 @java.lang.Override toBuilder()292 public Builder toBuilder() { 293 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 294 } 295 296 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)297 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 298 Builder builder = new Builder(parent); 299 return builder; 300 } 301 /** 302 * 303 * 304 * <pre> 305 * Location of the finding within an image. 306 * </pre> 307 * 308 * Protobuf type {@code google.privacy.dlp.v2.ImageLocation} 309 */ 310 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 311 implements 312 // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageLocation) 313 com.google.privacy.dlp.v2.ImageLocationOrBuilder { getDescriptor()314 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 315 return com.google.privacy.dlp.v2.DlpProto 316 .internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; 317 } 318 319 @java.lang.Override 320 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()321 internalGetFieldAccessorTable() { 322 return com.google.privacy.dlp.v2.DlpProto 323 .internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable 324 .ensureFieldAccessorsInitialized( 325 com.google.privacy.dlp.v2.ImageLocation.class, 326 com.google.privacy.dlp.v2.ImageLocation.Builder.class); 327 } 328 329 // Construct using com.google.privacy.dlp.v2.ImageLocation.newBuilder() Builder()330 private Builder() {} 331 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)332 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 333 super(parent); 334 } 335 336 @java.lang.Override clear()337 public Builder clear() { 338 super.clear(); 339 bitField0_ = 0; 340 if (boundingBoxesBuilder_ == null) { 341 boundingBoxes_ = java.util.Collections.emptyList(); 342 } else { 343 boundingBoxes_ = null; 344 boundingBoxesBuilder_.clear(); 345 } 346 bitField0_ = (bitField0_ & ~0x00000001); 347 return this; 348 } 349 350 @java.lang.Override getDescriptorForType()351 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 352 return com.google.privacy.dlp.v2.DlpProto 353 .internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; 354 } 355 356 @java.lang.Override getDefaultInstanceForType()357 public com.google.privacy.dlp.v2.ImageLocation getDefaultInstanceForType() { 358 return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); 359 } 360 361 @java.lang.Override build()362 public com.google.privacy.dlp.v2.ImageLocation build() { 363 com.google.privacy.dlp.v2.ImageLocation result = buildPartial(); 364 if (!result.isInitialized()) { 365 throw newUninitializedMessageException(result); 366 } 367 return result; 368 } 369 370 @java.lang.Override buildPartial()371 public com.google.privacy.dlp.v2.ImageLocation buildPartial() { 372 com.google.privacy.dlp.v2.ImageLocation result = 373 new com.google.privacy.dlp.v2.ImageLocation(this); 374 buildPartialRepeatedFields(result); 375 if (bitField0_ != 0) { 376 buildPartial0(result); 377 } 378 onBuilt(); 379 return result; 380 } 381 buildPartialRepeatedFields(com.google.privacy.dlp.v2.ImageLocation result)382 private void buildPartialRepeatedFields(com.google.privacy.dlp.v2.ImageLocation result) { 383 if (boundingBoxesBuilder_ == null) { 384 if (((bitField0_ & 0x00000001) != 0)) { 385 boundingBoxes_ = java.util.Collections.unmodifiableList(boundingBoxes_); 386 bitField0_ = (bitField0_ & ~0x00000001); 387 } 388 result.boundingBoxes_ = boundingBoxes_; 389 } else { 390 result.boundingBoxes_ = boundingBoxesBuilder_.build(); 391 } 392 } 393 buildPartial0(com.google.privacy.dlp.v2.ImageLocation result)394 private void buildPartial0(com.google.privacy.dlp.v2.ImageLocation result) { 395 int from_bitField0_ = bitField0_; 396 } 397 398 @java.lang.Override clone()399 public Builder clone() { 400 return super.clone(); 401 } 402 403 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)404 public Builder setField( 405 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 406 return super.setField(field, value); 407 } 408 409 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)410 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 411 return super.clearField(field); 412 } 413 414 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)415 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 416 return super.clearOneof(oneof); 417 } 418 419 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)420 public Builder setRepeatedField( 421 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 422 return super.setRepeatedField(field, index, value); 423 } 424 425 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)426 public Builder addRepeatedField( 427 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 428 return super.addRepeatedField(field, value); 429 } 430 431 @java.lang.Override mergeFrom(com.google.protobuf.Message other)432 public Builder mergeFrom(com.google.protobuf.Message other) { 433 if (other instanceof com.google.privacy.dlp.v2.ImageLocation) { 434 return mergeFrom((com.google.privacy.dlp.v2.ImageLocation) other); 435 } else { 436 super.mergeFrom(other); 437 return this; 438 } 439 } 440 mergeFrom(com.google.privacy.dlp.v2.ImageLocation other)441 public Builder mergeFrom(com.google.privacy.dlp.v2.ImageLocation other) { 442 if (other == com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance()) return this; 443 if (boundingBoxesBuilder_ == null) { 444 if (!other.boundingBoxes_.isEmpty()) { 445 if (boundingBoxes_.isEmpty()) { 446 boundingBoxes_ = other.boundingBoxes_; 447 bitField0_ = (bitField0_ & ~0x00000001); 448 } else { 449 ensureBoundingBoxesIsMutable(); 450 boundingBoxes_.addAll(other.boundingBoxes_); 451 } 452 onChanged(); 453 } 454 } else { 455 if (!other.boundingBoxes_.isEmpty()) { 456 if (boundingBoxesBuilder_.isEmpty()) { 457 boundingBoxesBuilder_.dispose(); 458 boundingBoxesBuilder_ = null; 459 boundingBoxes_ = other.boundingBoxes_; 460 bitField0_ = (bitField0_ & ~0x00000001); 461 boundingBoxesBuilder_ = 462 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 463 ? getBoundingBoxesFieldBuilder() 464 : null; 465 } else { 466 boundingBoxesBuilder_.addAllMessages(other.boundingBoxes_); 467 } 468 } 469 } 470 this.mergeUnknownFields(other.getUnknownFields()); 471 onChanged(); 472 return this; 473 } 474 475 @java.lang.Override isInitialized()476 public final boolean isInitialized() { 477 return true; 478 } 479 480 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)481 public Builder mergeFrom( 482 com.google.protobuf.CodedInputStream input, 483 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 484 throws java.io.IOException { 485 if (extensionRegistry == null) { 486 throw new java.lang.NullPointerException(); 487 } 488 try { 489 boolean done = false; 490 while (!done) { 491 int tag = input.readTag(); 492 switch (tag) { 493 case 0: 494 done = true; 495 break; 496 case 10: 497 { 498 com.google.privacy.dlp.v2.BoundingBox m = 499 input.readMessage( 500 com.google.privacy.dlp.v2.BoundingBox.parser(), extensionRegistry); 501 if (boundingBoxesBuilder_ == null) { 502 ensureBoundingBoxesIsMutable(); 503 boundingBoxes_.add(m); 504 } else { 505 boundingBoxesBuilder_.addMessage(m); 506 } 507 break; 508 } // case 10 509 default: 510 { 511 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 512 done = true; // was an endgroup tag 513 } 514 break; 515 } // default: 516 } // switch (tag) 517 } // while (!done) 518 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 519 throw e.unwrapIOException(); 520 } finally { 521 onChanged(); 522 } // finally 523 return this; 524 } 525 526 private int bitField0_; 527 528 private java.util.List<com.google.privacy.dlp.v2.BoundingBox> boundingBoxes_ = 529 java.util.Collections.emptyList(); 530 ensureBoundingBoxesIsMutable()531 private void ensureBoundingBoxesIsMutable() { 532 if (!((bitField0_ & 0x00000001) != 0)) { 533 boundingBoxes_ = 534 new java.util.ArrayList<com.google.privacy.dlp.v2.BoundingBox>(boundingBoxes_); 535 bitField0_ |= 0x00000001; 536 } 537 } 538 539 private com.google.protobuf.RepeatedFieldBuilderV3< 540 com.google.privacy.dlp.v2.BoundingBox, 541 com.google.privacy.dlp.v2.BoundingBox.Builder, 542 com.google.privacy.dlp.v2.BoundingBoxOrBuilder> 543 boundingBoxesBuilder_; 544 545 /** 546 * 547 * 548 * <pre> 549 * Bounding boxes locating the pixels within the image containing the finding. 550 * </pre> 551 * 552 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 553 */ getBoundingBoxesList()554 public java.util.List<com.google.privacy.dlp.v2.BoundingBox> getBoundingBoxesList() { 555 if (boundingBoxesBuilder_ == null) { 556 return java.util.Collections.unmodifiableList(boundingBoxes_); 557 } else { 558 return boundingBoxesBuilder_.getMessageList(); 559 } 560 } 561 /** 562 * 563 * 564 * <pre> 565 * Bounding boxes locating the pixels within the image containing the finding. 566 * </pre> 567 * 568 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 569 */ getBoundingBoxesCount()570 public int getBoundingBoxesCount() { 571 if (boundingBoxesBuilder_ == null) { 572 return boundingBoxes_.size(); 573 } else { 574 return boundingBoxesBuilder_.getCount(); 575 } 576 } 577 /** 578 * 579 * 580 * <pre> 581 * Bounding boxes locating the pixels within the image containing the finding. 582 * </pre> 583 * 584 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 585 */ getBoundingBoxes(int index)586 public com.google.privacy.dlp.v2.BoundingBox getBoundingBoxes(int index) { 587 if (boundingBoxesBuilder_ == null) { 588 return boundingBoxes_.get(index); 589 } else { 590 return boundingBoxesBuilder_.getMessage(index); 591 } 592 } 593 /** 594 * 595 * 596 * <pre> 597 * Bounding boxes locating the pixels within the image containing the finding. 598 * </pre> 599 * 600 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 601 */ setBoundingBoxes(int index, com.google.privacy.dlp.v2.BoundingBox value)602 public Builder setBoundingBoxes(int index, com.google.privacy.dlp.v2.BoundingBox value) { 603 if (boundingBoxesBuilder_ == null) { 604 if (value == null) { 605 throw new NullPointerException(); 606 } 607 ensureBoundingBoxesIsMutable(); 608 boundingBoxes_.set(index, value); 609 onChanged(); 610 } else { 611 boundingBoxesBuilder_.setMessage(index, value); 612 } 613 return this; 614 } 615 /** 616 * 617 * 618 * <pre> 619 * Bounding boxes locating the pixels within the image containing the finding. 620 * </pre> 621 * 622 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 623 */ setBoundingBoxes( int index, com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue)624 public Builder setBoundingBoxes( 625 int index, com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue) { 626 if (boundingBoxesBuilder_ == null) { 627 ensureBoundingBoxesIsMutable(); 628 boundingBoxes_.set(index, builderForValue.build()); 629 onChanged(); 630 } else { 631 boundingBoxesBuilder_.setMessage(index, builderForValue.build()); 632 } 633 return this; 634 } 635 /** 636 * 637 * 638 * <pre> 639 * Bounding boxes locating the pixels within the image containing the finding. 640 * </pre> 641 * 642 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 643 */ addBoundingBoxes(com.google.privacy.dlp.v2.BoundingBox value)644 public Builder addBoundingBoxes(com.google.privacy.dlp.v2.BoundingBox value) { 645 if (boundingBoxesBuilder_ == null) { 646 if (value == null) { 647 throw new NullPointerException(); 648 } 649 ensureBoundingBoxesIsMutable(); 650 boundingBoxes_.add(value); 651 onChanged(); 652 } else { 653 boundingBoxesBuilder_.addMessage(value); 654 } 655 return this; 656 } 657 /** 658 * 659 * 660 * <pre> 661 * Bounding boxes locating the pixels within the image containing the finding. 662 * </pre> 663 * 664 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 665 */ addBoundingBoxes(int index, com.google.privacy.dlp.v2.BoundingBox value)666 public Builder addBoundingBoxes(int index, com.google.privacy.dlp.v2.BoundingBox value) { 667 if (boundingBoxesBuilder_ == null) { 668 if (value == null) { 669 throw new NullPointerException(); 670 } 671 ensureBoundingBoxesIsMutable(); 672 boundingBoxes_.add(index, value); 673 onChanged(); 674 } else { 675 boundingBoxesBuilder_.addMessage(index, value); 676 } 677 return this; 678 } 679 /** 680 * 681 * 682 * <pre> 683 * Bounding boxes locating the pixels within the image containing the finding. 684 * </pre> 685 * 686 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 687 */ addBoundingBoxes(com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue)688 public Builder addBoundingBoxes(com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue) { 689 if (boundingBoxesBuilder_ == null) { 690 ensureBoundingBoxesIsMutable(); 691 boundingBoxes_.add(builderForValue.build()); 692 onChanged(); 693 } else { 694 boundingBoxesBuilder_.addMessage(builderForValue.build()); 695 } 696 return this; 697 } 698 /** 699 * 700 * 701 * <pre> 702 * Bounding boxes locating the pixels within the image containing the finding. 703 * </pre> 704 * 705 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 706 */ addBoundingBoxes( int index, com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue)707 public Builder addBoundingBoxes( 708 int index, com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue) { 709 if (boundingBoxesBuilder_ == null) { 710 ensureBoundingBoxesIsMutable(); 711 boundingBoxes_.add(index, builderForValue.build()); 712 onChanged(); 713 } else { 714 boundingBoxesBuilder_.addMessage(index, builderForValue.build()); 715 } 716 return this; 717 } 718 /** 719 * 720 * 721 * <pre> 722 * Bounding boxes locating the pixels within the image containing the finding. 723 * </pre> 724 * 725 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 726 */ addAllBoundingBoxes( java.lang.Iterable<? extends com.google.privacy.dlp.v2.BoundingBox> values)727 public Builder addAllBoundingBoxes( 728 java.lang.Iterable<? extends com.google.privacy.dlp.v2.BoundingBox> values) { 729 if (boundingBoxesBuilder_ == null) { 730 ensureBoundingBoxesIsMutable(); 731 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, boundingBoxes_); 732 onChanged(); 733 } else { 734 boundingBoxesBuilder_.addAllMessages(values); 735 } 736 return this; 737 } 738 /** 739 * 740 * 741 * <pre> 742 * Bounding boxes locating the pixels within the image containing the finding. 743 * </pre> 744 * 745 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 746 */ clearBoundingBoxes()747 public Builder clearBoundingBoxes() { 748 if (boundingBoxesBuilder_ == null) { 749 boundingBoxes_ = java.util.Collections.emptyList(); 750 bitField0_ = (bitField0_ & ~0x00000001); 751 onChanged(); 752 } else { 753 boundingBoxesBuilder_.clear(); 754 } 755 return this; 756 } 757 /** 758 * 759 * 760 * <pre> 761 * Bounding boxes locating the pixels within the image containing the finding. 762 * </pre> 763 * 764 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 765 */ removeBoundingBoxes(int index)766 public Builder removeBoundingBoxes(int index) { 767 if (boundingBoxesBuilder_ == null) { 768 ensureBoundingBoxesIsMutable(); 769 boundingBoxes_.remove(index); 770 onChanged(); 771 } else { 772 boundingBoxesBuilder_.remove(index); 773 } 774 return this; 775 } 776 /** 777 * 778 * 779 * <pre> 780 * Bounding boxes locating the pixels within the image containing the finding. 781 * </pre> 782 * 783 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 784 */ getBoundingBoxesBuilder(int index)785 public com.google.privacy.dlp.v2.BoundingBox.Builder getBoundingBoxesBuilder(int index) { 786 return getBoundingBoxesFieldBuilder().getBuilder(index); 787 } 788 /** 789 * 790 * 791 * <pre> 792 * Bounding boxes locating the pixels within the image containing the finding. 793 * </pre> 794 * 795 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 796 */ getBoundingBoxesOrBuilder(int index)797 public com.google.privacy.dlp.v2.BoundingBoxOrBuilder getBoundingBoxesOrBuilder(int index) { 798 if (boundingBoxesBuilder_ == null) { 799 return boundingBoxes_.get(index); 800 } else { 801 return boundingBoxesBuilder_.getMessageOrBuilder(index); 802 } 803 } 804 /** 805 * 806 * 807 * <pre> 808 * Bounding boxes locating the pixels within the image containing the finding. 809 * </pre> 810 * 811 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 812 */ 813 public java.util.List<? extends com.google.privacy.dlp.v2.BoundingBoxOrBuilder> getBoundingBoxesOrBuilderList()814 getBoundingBoxesOrBuilderList() { 815 if (boundingBoxesBuilder_ != null) { 816 return boundingBoxesBuilder_.getMessageOrBuilderList(); 817 } else { 818 return java.util.Collections.unmodifiableList(boundingBoxes_); 819 } 820 } 821 /** 822 * 823 * 824 * <pre> 825 * Bounding boxes locating the pixels within the image containing the finding. 826 * </pre> 827 * 828 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 829 */ addBoundingBoxesBuilder()830 public com.google.privacy.dlp.v2.BoundingBox.Builder addBoundingBoxesBuilder() { 831 return getBoundingBoxesFieldBuilder() 832 .addBuilder(com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance()); 833 } 834 /** 835 * 836 * 837 * <pre> 838 * Bounding boxes locating the pixels within the image containing the finding. 839 * </pre> 840 * 841 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 842 */ addBoundingBoxesBuilder(int index)843 public com.google.privacy.dlp.v2.BoundingBox.Builder addBoundingBoxesBuilder(int index) { 844 return getBoundingBoxesFieldBuilder() 845 .addBuilder(index, com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance()); 846 } 847 /** 848 * 849 * 850 * <pre> 851 * Bounding boxes locating the pixels within the image containing the finding. 852 * </pre> 853 * 854 * <code>repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1;</code> 855 */ 856 public java.util.List<com.google.privacy.dlp.v2.BoundingBox.Builder> getBoundingBoxesBuilderList()857 getBoundingBoxesBuilderList() { 858 return getBoundingBoxesFieldBuilder().getBuilderList(); 859 } 860 861 private com.google.protobuf.RepeatedFieldBuilderV3< 862 com.google.privacy.dlp.v2.BoundingBox, 863 com.google.privacy.dlp.v2.BoundingBox.Builder, 864 com.google.privacy.dlp.v2.BoundingBoxOrBuilder> getBoundingBoxesFieldBuilder()865 getBoundingBoxesFieldBuilder() { 866 if (boundingBoxesBuilder_ == null) { 867 boundingBoxesBuilder_ = 868 new com.google.protobuf.RepeatedFieldBuilderV3< 869 com.google.privacy.dlp.v2.BoundingBox, 870 com.google.privacy.dlp.v2.BoundingBox.Builder, 871 com.google.privacy.dlp.v2.BoundingBoxOrBuilder>( 872 boundingBoxes_, 873 ((bitField0_ & 0x00000001) != 0), 874 getParentForChildren(), 875 isClean()); 876 boundingBoxes_ = null; 877 } 878 return boundingBoxesBuilder_; 879 } 880 881 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)882 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 883 return super.setUnknownFields(unknownFields); 884 } 885 886 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)887 public final Builder mergeUnknownFields( 888 final com.google.protobuf.UnknownFieldSet unknownFields) { 889 return super.mergeUnknownFields(unknownFields); 890 } 891 892 // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageLocation) 893 } 894 895 // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageLocation) 896 private static final com.google.privacy.dlp.v2.ImageLocation DEFAULT_INSTANCE; 897 898 static { 899 DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageLocation(); 900 } 901 getDefaultInstance()902 public static com.google.privacy.dlp.v2.ImageLocation getDefaultInstance() { 903 return DEFAULT_INSTANCE; 904 } 905 906 private static final com.google.protobuf.Parser<ImageLocation> PARSER = 907 new com.google.protobuf.AbstractParser<ImageLocation>() { 908 @java.lang.Override 909 public ImageLocation parsePartialFrom( 910 com.google.protobuf.CodedInputStream input, 911 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 912 throws com.google.protobuf.InvalidProtocolBufferException { 913 Builder builder = newBuilder(); 914 try { 915 builder.mergeFrom(input, extensionRegistry); 916 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 917 throw e.setUnfinishedMessage(builder.buildPartial()); 918 } catch (com.google.protobuf.UninitializedMessageException e) { 919 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 920 } catch (java.io.IOException e) { 921 throw new com.google.protobuf.InvalidProtocolBufferException(e) 922 .setUnfinishedMessage(builder.buildPartial()); 923 } 924 return builder.buildPartial(); 925 } 926 }; 927 parser()928 public static com.google.protobuf.Parser<ImageLocation> parser() { 929 return PARSER; 930 } 931 932 @java.lang.Override getParserForType()933 public com.google.protobuf.Parser<ImageLocation> getParserForType() { 934 return PARSER; 935 } 936 937 @java.lang.Override getDefaultInstanceForType()938 public com.google.privacy.dlp.v2.ImageLocation getDefaultInstanceForType() { 939 return DEFAULT_INSTANCE; 940 } 941 } 942