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 * Specifies the location of the finding. 26 * </pre> 27 * 28 * Protobuf type {@code google.privacy.dlp.v2.Location} 29 */ 30 public final class Location extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Location) 33 LocationOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Location.newBuilder() to construct. Location(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Location(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Location()40 private Location() { 41 contentLocations_ = 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 Location(); 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_Location_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_Location_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.privacy.dlp.v2.Location.class, 67 com.google.privacy.dlp.v2.Location.Builder.class); 68 } 69 70 public static final int BYTE_RANGE_FIELD_NUMBER = 1; 71 private com.google.privacy.dlp.v2.Range byteRange_; 72 /** 73 * 74 * 75 * <pre> 76 * Zero-based byte offsets delimiting the finding. 77 * These are relative to the finding's containing element. 78 * Note that when the content is not textual, this references 79 * the UTF-8 encoded textual representation of the content. 80 * Omitted if content is an image. 81 * </pre> 82 * 83 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 84 * 85 * @return Whether the byteRange field is set. 86 */ 87 @java.lang.Override hasByteRange()88 public boolean hasByteRange() { 89 return byteRange_ != null; 90 } 91 /** 92 * 93 * 94 * <pre> 95 * Zero-based byte offsets delimiting the finding. 96 * These are relative to the finding's containing element. 97 * Note that when the content is not textual, this references 98 * the UTF-8 encoded textual representation of the content. 99 * Omitted if content is an image. 100 * </pre> 101 * 102 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 103 * 104 * @return The byteRange. 105 */ 106 @java.lang.Override getByteRange()107 public com.google.privacy.dlp.v2.Range getByteRange() { 108 return byteRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : byteRange_; 109 } 110 /** 111 * 112 * 113 * <pre> 114 * Zero-based byte offsets delimiting the finding. 115 * These are relative to the finding's containing element. 116 * Note that when the content is not textual, this references 117 * the UTF-8 encoded textual representation of the content. 118 * Omitted if content is an image. 119 * </pre> 120 * 121 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 122 */ 123 @java.lang.Override getByteRangeOrBuilder()124 public com.google.privacy.dlp.v2.RangeOrBuilder getByteRangeOrBuilder() { 125 return byteRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : byteRange_; 126 } 127 128 public static final int CODEPOINT_RANGE_FIELD_NUMBER = 2; 129 private com.google.privacy.dlp.v2.Range codepointRange_; 130 /** 131 * 132 * 133 * <pre> 134 * Unicode character offsets delimiting the finding. 135 * These are relative to the finding's containing element. 136 * Provided when the content is text. 137 * </pre> 138 * 139 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 140 * 141 * @return Whether the codepointRange field is set. 142 */ 143 @java.lang.Override hasCodepointRange()144 public boolean hasCodepointRange() { 145 return codepointRange_ != null; 146 } 147 /** 148 * 149 * 150 * <pre> 151 * Unicode character offsets delimiting the finding. 152 * These are relative to the finding's containing element. 153 * Provided when the content is text. 154 * </pre> 155 * 156 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 157 * 158 * @return The codepointRange. 159 */ 160 @java.lang.Override getCodepointRange()161 public com.google.privacy.dlp.v2.Range getCodepointRange() { 162 return codepointRange_ == null 163 ? com.google.privacy.dlp.v2.Range.getDefaultInstance() 164 : codepointRange_; 165 } 166 /** 167 * 168 * 169 * <pre> 170 * Unicode character offsets delimiting the finding. 171 * These are relative to the finding's containing element. 172 * Provided when the content is text. 173 * </pre> 174 * 175 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 176 */ 177 @java.lang.Override getCodepointRangeOrBuilder()178 public com.google.privacy.dlp.v2.RangeOrBuilder getCodepointRangeOrBuilder() { 179 return codepointRange_ == null 180 ? com.google.privacy.dlp.v2.Range.getDefaultInstance() 181 : codepointRange_; 182 } 183 184 public static final int CONTENT_LOCATIONS_FIELD_NUMBER = 7; 185 186 @SuppressWarnings("serial") 187 private java.util.List<com.google.privacy.dlp.v2.ContentLocation> contentLocations_; 188 /** 189 * 190 * 191 * <pre> 192 * List of nested objects pointing to the precise location of the finding 193 * within the file or record. 194 * </pre> 195 * 196 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 197 */ 198 @java.lang.Override getContentLocationsList()199 public java.util.List<com.google.privacy.dlp.v2.ContentLocation> getContentLocationsList() { 200 return contentLocations_; 201 } 202 /** 203 * 204 * 205 * <pre> 206 * List of nested objects pointing to the precise location of the finding 207 * within the file or record. 208 * </pre> 209 * 210 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 211 */ 212 @java.lang.Override 213 public java.util.List<? extends com.google.privacy.dlp.v2.ContentLocationOrBuilder> getContentLocationsOrBuilderList()214 getContentLocationsOrBuilderList() { 215 return contentLocations_; 216 } 217 /** 218 * 219 * 220 * <pre> 221 * List of nested objects pointing to the precise location of the finding 222 * within the file or record. 223 * </pre> 224 * 225 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 226 */ 227 @java.lang.Override getContentLocationsCount()228 public int getContentLocationsCount() { 229 return contentLocations_.size(); 230 } 231 /** 232 * 233 * 234 * <pre> 235 * List of nested objects pointing to the precise location of the finding 236 * within the file or record. 237 * </pre> 238 * 239 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 240 */ 241 @java.lang.Override getContentLocations(int index)242 public com.google.privacy.dlp.v2.ContentLocation getContentLocations(int index) { 243 return contentLocations_.get(index); 244 } 245 /** 246 * 247 * 248 * <pre> 249 * List of nested objects pointing to the precise location of the finding 250 * within the file or record. 251 * </pre> 252 * 253 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 254 */ 255 @java.lang.Override getContentLocationsOrBuilder( int index)256 public com.google.privacy.dlp.v2.ContentLocationOrBuilder getContentLocationsOrBuilder( 257 int index) { 258 return contentLocations_.get(index); 259 } 260 261 public static final int CONTAINER_FIELD_NUMBER = 8; 262 private com.google.privacy.dlp.v2.Container container_; 263 /** 264 * 265 * 266 * <pre> 267 * Information about the container where this finding occurred, if available. 268 * </pre> 269 * 270 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 271 * 272 * @return Whether the container field is set. 273 */ 274 @java.lang.Override hasContainer()275 public boolean hasContainer() { 276 return container_ != null; 277 } 278 /** 279 * 280 * 281 * <pre> 282 * Information about the container where this finding occurred, if available. 283 * </pre> 284 * 285 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 286 * 287 * @return The container. 288 */ 289 @java.lang.Override getContainer()290 public com.google.privacy.dlp.v2.Container getContainer() { 291 return container_ == null 292 ? com.google.privacy.dlp.v2.Container.getDefaultInstance() 293 : container_; 294 } 295 /** 296 * 297 * 298 * <pre> 299 * Information about the container where this finding occurred, if available. 300 * </pre> 301 * 302 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 303 */ 304 @java.lang.Override getContainerOrBuilder()305 public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerOrBuilder() { 306 return container_ == null 307 ? com.google.privacy.dlp.v2.Container.getDefaultInstance() 308 : container_; 309 } 310 311 private byte memoizedIsInitialized = -1; 312 313 @java.lang.Override isInitialized()314 public final boolean isInitialized() { 315 byte isInitialized = memoizedIsInitialized; 316 if (isInitialized == 1) return true; 317 if (isInitialized == 0) return false; 318 319 memoizedIsInitialized = 1; 320 return true; 321 } 322 323 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)324 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 325 if (byteRange_ != null) { 326 output.writeMessage(1, getByteRange()); 327 } 328 if (codepointRange_ != null) { 329 output.writeMessage(2, getCodepointRange()); 330 } 331 for (int i = 0; i < contentLocations_.size(); i++) { 332 output.writeMessage(7, contentLocations_.get(i)); 333 } 334 if (container_ != null) { 335 output.writeMessage(8, getContainer()); 336 } 337 getUnknownFields().writeTo(output); 338 } 339 340 @java.lang.Override getSerializedSize()341 public int getSerializedSize() { 342 int size = memoizedSize; 343 if (size != -1) return size; 344 345 size = 0; 346 if (byteRange_ != null) { 347 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getByteRange()); 348 } 349 if (codepointRange_ != null) { 350 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCodepointRange()); 351 } 352 for (int i = 0; i < contentLocations_.size(); i++) { 353 size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, contentLocations_.get(i)); 354 } 355 if (container_ != null) { 356 size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getContainer()); 357 } 358 size += getUnknownFields().getSerializedSize(); 359 memoizedSize = size; 360 return size; 361 } 362 363 @java.lang.Override equals(final java.lang.Object obj)364 public boolean equals(final java.lang.Object obj) { 365 if (obj == this) { 366 return true; 367 } 368 if (!(obj instanceof com.google.privacy.dlp.v2.Location)) { 369 return super.equals(obj); 370 } 371 com.google.privacy.dlp.v2.Location other = (com.google.privacy.dlp.v2.Location) obj; 372 373 if (hasByteRange() != other.hasByteRange()) return false; 374 if (hasByteRange()) { 375 if (!getByteRange().equals(other.getByteRange())) return false; 376 } 377 if (hasCodepointRange() != other.hasCodepointRange()) return false; 378 if (hasCodepointRange()) { 379 if (!getCodepointRange().equals(other.getCodepointRange())) return false; 380 } 381 if (!getContentLocationsList().equals(other.getContentLocationsList())) return false; 382 if (hasContainer() != other.hasContainer()) return false; 383 if (hasContainer()) { 384 if (!getContainer().equals(other.getContainer())) return false; 385 } 386 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 387 return true; 388 } 389 390 @java.lang.Override hashCode()391 public int hashCode() { 392 if (memoizedHashCode != 0) { 393 return memoizedHashCode; 394 } 395 int hash = 41; 396 hash = (19 * hash) + getDescriptor().hashCode(); 397 if (hasByteRange()) { 398 hash = (37 * hash) + BYTE_RANGE_FIELD_NUMBER; 399 hash = (53 * hash) + getByteRange().hashCode(); 400 } 401 if (hasCodepointRange()) { 402 hash = (37 * hash) + CODEPOINT_RANGE_FIELD_NUMBER; 403 hash = (53 * hash) + getCodepointRange().hashCode(); 404 } 405 if (getContentLocationsCount() > 0) { 406 hash = (37 * hash) + CONTENT_LOCATIONS_FIELD_NUMBER; 407 hash = (53 * hash) + getContentLocationsList().hashCode(); 408 } 409 if (hasContainer()) { 410 hash = (37 * hash) + CONTAINER_FIELD_NUMBER; 411 hash = (53 * hash) + getContainer().hashCode(); 412 } 413 hash = (29 * hash) + getUnknownFields().hashCode(); 414 memoizedHashCode = hash; 415 return hash; 416 } 417 parseFrom(java.nio.ByteBuffer data)418 public static com.google.privacy.dlp.v2.Location parseFrom(java.nio.ByteBuffer data) 419 throws com.google.protobuf.InvalidProtocolBufferException { 420 return PARSER.parseFrom(data); 421 } 422 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)423 public static com.google.privacy.dlp.v2.Location parseFrom( 424 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 425 throws com.google.protobuf.InvalidProtocolBufferException { 426 return PARSER.parseFrom(data, extensionRegistry); 427 } 428 parseFrom(com.google.protobuf.ByteString data)429 public static com.google.privacy.dlp.v2.Location parseFrom(com.google.protobuf.ByteString data) 430 throws com.google.protobuf.InvalidProtocolBufferException { 431 return PARSER.parseFrom(data); 432 } 433 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)434 public static com.google.privacy.dlp.v2.Location parseFrom( 435 com.google.protobuf.ByteString data, 436 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 437 throws com.google.protobuf.InvalidProtocolBufferException { 438 return PARSER.parseFrom(data, extensionRegistry); 439 } 440 parseFrom(byte[] data)441 public static com.google.privacy.dlp.v2.Location parseFrom(byte[] data) 442 throws com.google.protobuf.InvalidProtocolBufferException { 443 return PARSER.parseFrom(data); 444 } 445 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)446 public static com.google.privacy.dlp.v2.Location parseFrom( 447 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 448 throws com.google.protobuf.InvalidProtocolBufferException { 449 return PARSER.parseFrom(data, extensionRegistry); 450 } 451 parseFrom(java.io.InputStream input)452 public static com.google.privacy.dlp.v2.Location parseFrom(java.io.InputStream input) 453 throws java.io.IOException { 454 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 455 } 456 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)457 public static com.google.privacy.dlp.v2.Location parseFrom( 458 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 459 throws java.io.IOException { 460 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 461 PARSER, input, extensionRegistry); 462 } 463 parseDelimitedFrom(java.io.InputStream input)464 public static com.google.privacy.dlp.v2.Location parseDelimitedFrom(java.io.InputStream input) 465 throws java.io.IOException { 466 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 467 } 468 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)469 public static com.google.privacy.dlp.v2.Location parseDelimitedFrom( 470 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 471 throws java.io.IOException { 472 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 473 PARSER, input, extensionRegistry); 474 } 475 parseFrom( com.google.protobuf.CodedInputStream input)476 public static com.google.privacy.dlp.v2.Location parseFrom( 477 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 478 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 479 } 480 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)481 public static com.google.privacy.dlp.v2.Location parseFrom( 482 com.google.protobuf.CodedInputStream input, 483 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 484 throws java.io.IOException { 485 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 486 PARSER, input, extensionRegistry); 487 } 488 489 @java.lang.Override newBuilderForType()490 public Builder newBuilderForType() { 491 return newBuilder(); 492 } 493 newBuilder()494 public static Builder newBuilder() { 495 return DEFAULT_INSTANCE.toBuilder(); 496 } 497 newBuilder(com.google.privacy.dlp.v2.Location prototype)498 public static Builder newBuilder(com.google.privacy.dlp.v2.Location prototype) { 499 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 500 } 501 502 @java.lang.Override toBuilder()503 public Builder toBuilder() { 504 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 505 } 506 507 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)508 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 509 Builder builder = new Builder(parent); 510 return builder; 511 } 512 /** 513 * 514 * 515 * <pre> 516 * Specifies the location of the finding. 517 * </pre> 518 * 519 * Protobuf type {@code google.privacy.dlp.v2.Location} 520 */ 521 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 522 implements 523 // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Location) 524 com.google.privacy.dlp.v2.LocationOrBuilder { getDescriptor()525 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 526 return com.google.privacy.dlp.v2.DlpProto 527 .internal_static_google_privacy_dlp_v2_Location_descriptor; 528 } 529 530 @java.lang.Override 531 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()532 internalGetFieldAccessorTable() { 533 return com.google.privacy.dlp.v2.DlpProto 534 .internal_static_google_privacy_dlp_v2_Location_fieldAccessorTable 535 .ensureFieldAccessorsInitialized( 536 com.google.privacy.dlp.v2.Location.class, 537 com.google.privacy.dlp.v2.Location.Builder.class); 538 } 539 540 // Construct using com.google.privacy.dlp.v2.Location.newBuilder() Builder()541 private Builder() {} 542 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)543 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 544 super(parent); 545 } 546 547 @java.lang.Override clear()548 public Builder clear() { 549 super.clear(); 550 bitField0_ = 0; 551 byteRange_ = null; 552 if (byteRangeBuilder_ != null) { 553 byteRangeBuilder_.dispose(); 554 byteRangeBuilder_ = null; 555 } 556 codepointRange_ = null; 557 if (codepointRangeBuilder_ != null) { 558 codepointRangeBuilder_.dispose(); 559 codepointRangeBuilder_ = null; 560 } 561 if (contentLocationsBuilder_ == null) { 562 contentLocations_ = java.util.Collections.emptyList(); 563 } else { 564 contentLocations_ = null; 565 contentLocationsBuilder_.clear(); 566 } 567 bitField0_ = (bitField0_ & ~0x00000004); 568 container_ = null; 569 if (containerBuilder_ != null) { 570 containerBuilder_.dispose(); 571 containerBuilder_ = null; 572 } 573 return this; 574 } 575 576 @java.lang.Override getDescriptorForType()577 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 578 return com.google.privacy.dlp.v2.DlpProto 579 .internal_static_google_privacy_dlp_v2_Location_descriptor; 580 } 581 582 @java.lang.Override getDefaultInstanceForType()583 public com.google.privacy.dlp.v2.Location getDefaultInstanceForType() { 584 return com.google.privacy.dlp.v2.Location.getDefaultInstance(); 585 } 586 587 @java.lang.Override build()588 public com.google.privacy.dlp.v2.Location build() { 589 com.google.privacy.dlp.v2.Location result = buildPartial(); 590 if (!result.isInitialized()) { 591 throw newUninitializedMessageException(result); 592 } 593 return result; 594 } 595 596 @java.lang.Override buildPartial()597 public com.google.privacy.dlp.v2.Location buildPartial() { 598 com.google.privacy.dlp.v2.Location result = new com.google.privacy.dlp.v2.Location(this); 599 buildPartialRepeatedFields(result); 600 if (bitField0_ != 0) { 601 buildPartial0(result); 602 } 603 onBuilt(); 604 return result; 605 } 606 buildPartialRepeatedFields(com.google.privacy.dlp.v2.Location result)607 private void buildPartialRepeatedFields(com.google.privacy.dlp.v2.Location result) { 608 if (contentLocationsBuilder_ == null) { 609 if (((bitField0_ & 0x00000004) != 0)) { 610 contentLocations_ = java.util.Collections.unmodifiableList(contentLocations_); 611 bitField0_ = (bitField0_ & ~0x00000004); 612 } 613 result.contentLocations_ = contentLocations_; 614 } else { 615 result.contentLocations_ = contentLocationsBuilder_.build(); 616 } 617 } 618 buildPartial0(com.google.privacy.dlp.v2.Location result)619 private void buildPartial0(com.google.privacy.dlp.v2.Location result) { 620 int from_bitField0_ = bitField0_; 621 if (((from_bitField0_ & 0x00000001) != 0)) { 622 result.byteRange_ = byteRangeBuilder_ == null ? byteRange_ : byteRangeBuilder_.build(); 623 } 624 if (((from_bitField0_ & 0x00000002) != 0)) { 625 result.codepointRange_ = 626 codepointRangeBuilder_ == null ? codepointRange_ : codepointRangeBuilder_.build(); 627 } 628 if (((from_bitField0_ & 0x00000008) != 0)) { 629 result.container_ = containerBuilder_ == null ? container_ : containerBuilder_.build(); 630 } 631 } 632 633 @java.lang.Override clone()634 public Builder clone() { 635 return super.clone(); 636 } 637 638 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)639 public Builder setField( 640 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 641 return super.setField(field, value); 642 } 643 644 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)645 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 646 return super.clearField(field); 647 } 648 649 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)650 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 651 return super.clearOneof(oneof); 652 } 653 654 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)655 public Builder setRepeatedField( 656 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 657 return super.setRepeatedField(field, index, value); 658 } 659 660 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)661 public Builder addRepeatedField( 662 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 663 return super.addRepeatedField(field, value); 664 } 665 666 @java.lang.Override mergeFrom(com.google.protobuf.Message other)667 public Builder mergeFrom(com.google.protobuf.Message other) { 668 if (other instanceof com.google.privacy.dlp.v2.Location) { 669 return mergeFrom((com.google.privacy.dlp.v2.Location) other); 670 } else { 671 super.mergeFrom(other); 672 return this; 673 } 674 } 675 mergeFrom(com.google.privacy.dlp.v2.Location other)676 public Builder mergeFrom(com.google.privacy.dlp.v2.Location other) { 677 if (other == com.google.privacy.dlp.v2.Location.getDefaultInstance()) return this; 678 if (other.hasByteRange()) { 679 mergeByteRange(other.getByteRange()); 680 } 681 if (other.hasCodepointRange()) { 682 mergeCodepointRange(other.getCodepointRange()); 683 } 684 if (contentLocationsBuilder_ == null) { 685 if (!other.contentLocations_.isEmpty()) { 686 if (contentLocations_.isEmpty()) { 687 contentLocations_ = other.contentLocations_; 688 bitField0_ = (bitField0_ & ~0x00000004); 689 } else { 690 ensureContentLocationsIsMutable(); 691 contentLocations_.addAll(other.contentLocations_); 692 } 693 onChanged(); 694 } 695 } else { 696 if (!other.contentLocations_.isEmpty()) { 697 if (contentLocationsBuilder_.isEmpty()) { 698 contentLocationsBuilder_.dispose(); 699 contentLocationsBuilder_ = null; 700 contentLocations_ = other.contentLocations_; 701 bitField0_ = (bitField0_ & ~0x00000004); 702 contentLocationsBuilder_ = 703 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 704 ? getContentLocationsFieldBuilder() 705 : null; 706 } else { 707 contentLocationsBuilder_.addAllMessages(other.contentLocations_); 708 } 709 } 710 } 711 if (other.hasContainer()) { 712 mergeContainer(other.getContainer()); 713 } 714 this.mergeUnknownFields(other.getUnknownFields()); 715 onChanged(); 716 return this; 717 } 718 719 @java.lang.Override isInitialized()720 public final boolean isInitialized() { 721 return true; 722 } 723 724 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)725 public Builder mergeFrom( 726 com.google.protobuf.CodedInputStream input, 727 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 728 throws java.io.IOException { 729 if (extensionRegistry == null) { 730 throw new java.lang.NullPointerException(); 731 } 732 try { 733 boolean done = false; 734 while (!done) { 735 int tag = input.readTag(); 736 switch (tag) { 737 case 0: 738 done = true; 739 break; 740 case 10: 741 { 742 input.readMessage(getByteRangeFieldBuilder().getBuilder(), extensionRegistry); 743 bitField0_ |= 0x00000001; 744 break; 745 } // case 10 746 case 18: 747 { 748 input.readMessage(getCodepointRangeFieldBuilder().getBuilder(), extensionRegistry); 749 bitField0_ |= 0x00000002; 750 break; 751 } // case 18 752 case 58: 753 { 754 com.google.privacy.dlp.v2.ContentLocation m = 755 input.readMessage( 756 com.google.privacy.dlp.v2.ContentLocation.parser(), extensionRegistry); 757 if (contentLocationsBuilder_ == null) { 758 ensureContentLocationsIsMutable(); 759 contentLocations_.add(m); 760 } else { 761 contentLocationsBuilder_.addMessage(m); 762 } 763 break; 764 } // case 58 765 case 66: 766 { 767 input.readMessage(getContainerFieldBuilder().getBuilder(), extensionRegistry); 768 bitField0_ |= 0x00000008; 769 break; 770 } // case 66 771 default: 772 { 773 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 774 done = true; // was an endgroup tag 775 } 776 break; 777 } // default: 778 } // switch (tag) 779 } // while (!done) 780 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 781 throw e.unwrapIOException(); 782 } finally { 783 onChanged(); 784 } // finally 785 return this; 786 } 787 788 private int bitField0_; 789 790 private com.google.privacy.dlp.v2.Range byteRange_; 791 private com.google.protobuf.SingleFieldBuilderV3< 792 com.google.privacy.dlp.v2.Range, 793 com.google.privacy.dlp.v2.Range.Builder, 794 com.google.privacy.dlp.v2.RangeOrBuilder> 795 byteRangeBuilder_; 796 /** 797 * 798 * 799 * <pre> 800 * Zero-based byte offsets delimiting the finding. 801 * These are relative to the finding's containing element. 802 * Note that when the content is not textual, this references 803 * the UTF-8 encoded textual representation of the content. 804 * Omitted if content is an image. 805 * </pre> 806 * 807 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 808 * 809 * @return Whether the byteRange field is set. 810 */ hasByteRange()811 public boolean hasByteRange() { 812 return ((bitField0_ & 0x00000001) != 0); 813 } 814 /** 815 * 816 * 817 * <pre> 818 * Zero-based byte offsets delimiting the finding. 819 * These are relative to the finding's containing element. 820 * Note that when the content is not textual, this references 821 * the UTF-8 encoded textual representation of the content. 822 * Omitted if content is an image. 823 * </pre> 824 * 825 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 826 * 827 * @return The byteRange. 828 */ getByteRange()829 public com.google.privacy.dlp.v2.Range getByteRange() { 830 if (byteRangeBuilder_ == null) { 831 return byteRange_ == null 832 ? com.google.privacy.dlp.v2.Range.getDefaultInstance() 833 : byteRange_; 834 } else { 835 return byteRangeBuilder_.getMessage(); 836 } 837 } 838 /** 839 * 840 * 841 * <pre> 842 * Zero-based byte offsets delimiting the finding. 843 * These are relative to the finding's containing element. 844 * Note that when the content is not textual, this references 845 * the UTF-8 encoded textual representation of the content. 846 * Omitted if content is an image. 847 * </pre> 848 * 849 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 850 */ setByteRange(com.google.privacy.dlp.v2.Range value)851 public Builder setByteRange(com.google.privacy.dlp.v2.Range value) { 852 if (byteRangeBuilder_ == null) { 853 if (value == null) { 854 throw new NullPointerException(); 855 } 856 byteRange_ = value; 857 } else { 858 byteRangeBuilder_.setMessage(value); 859 } 860 bitField0_ |= 0x00000001; 861 onChanged(); 862 return this; 863 } 864 /** 865 * 866 * 867 * <pre> 868 * Zero-based byte offsets delimiting the finding. 869 * These are relative to the finding's containing element. 870 * Note that when the content is not textual, this references 871 * the UTF-8 encoded textual representation of the content. 872 * Omitted if content is an image. 873 * </pre> 874 * 875 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 876 */ setByteRange(com.google.privacy.dlp.v2.Range.Builder builderForValue)877 public Builder setByteRange(com.google.privacy.dlp.v2.Range.Builder builderForValue) { 878 if (byteRangeBuilder_ == null) { 879 byteRange_ = builderForValue.build(); 880 } else { 881 byteRangeBuilder_.setMessage(builderForValue.build()); 882 } 883 bitField0_ |= 0x00000001; 884 onChanged(); 885 return this; 886 } 887 /** 888 * 889 * 890 * <pre> 891 * Zero-based byte offsets delimiting the finding. 892 * These are relative to the finding's containing element. 893 * Note that when the content is not textual, this references 894 * the UTF-8 encoded textual representation of the content. 895 * Omitted if content is an image. 896 * </pre> 897 * 898 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 899 */ mergeByteRange(com.google.privacy.dlp.v2.Range value)900 public Builder mergeByteRange(com.google.privacy.dlp.v2.Range value) { 901 if (byteRangeBuilder_ == null) { 902 if (((bitField0_ & 0x00000001) != 0) 903 && byteRange_ != null 904 && byteRange_ != com.google.privacy.dlp.v2.Range.getDefaultInstance()) { 905 getByteRangeBuilder().mergeFrom(value); 906 } else { 907 byteRange_ = value; 908 } 909 } else { 910 byteRangeBuilder_.mergeFrom(value); 911 } 912 bitField0_ |= 0x00000001; 913 onChanged(); 914 return this; 915 } 916 /** 917 * 918 * 919 * <pre> 920 * Zero-based byte offsets delimiting the finding. 921 * These are relative to the finding's containing element. 922 * Note that when the content is not textual, this references 923 * the UTF-8 encoded textual representation of the content. 924 * Omitted if content is an image. 925 * </pre> 926 * 927 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 928 */ clearByteRange()929 public Builder clearByteRange() { 930 bitField0_ = (bitField0_ & ~0x00000001); 931 byteRange_ = null; 932 if (byteRangeBuilder_ != null) { 933 byteRangeBuilder_.dispose(); 934 byteRangeBuilder_ = null; 935 } 936 onChanged(); 937 return this; 938 } 939 /** 940 * 941 * 942 * <pre> 943 * Zero-based byte offsets delimiting the finding. 944 * These are relative to the finding's containing element. 945 * Note that when the content is not textual, this references 946 * the UTF-8 encoded textual representation of the content. 947 * Omitted if content is an image. 948 * </pre> 949 * 950 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 951 */ getByteRangeBuilder()952 public com.google.privacy.dlp.v2.Range.Builder getByteRangeBuilder() { 953 bitField0_ |= 0x00000001; 954 onChanged(); 955 return getByteRangeFieldBuilder().getBuilder(); 956 } 957 /** 958 * 959 * 960 * <pre> 961 * Zero-based byte offsets delimiting the finding. 962 * These are relative to the finding's containing element. 963 * Note that when the content is not textual, this references 964 * the UTF-8 encoded textual representation of the content. 965 * Omitted if content is an image. 966 * </pre> 967 * 968 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 969 */ getByteRangeOrBuilder()970 public com.google.privacy.dlp.v2.RangeOrBuilder getByteRangeOrBuilder() { 971 if (byteRangeBuilder_ != null) { 972 return byteRangeBuilder_.getMessageOrBuilder(); 973 } else { 974 return byteRange_ == null 975 ? com.google.privacy.dlp.v2.Range.getDefaultInstance() 976 : byteRange_; 977 } 978 } 979 /** 980 * 981 * 982 * <pre> 983 * Zero-based byte offsets delimiting the finding. 984 * These are relative to the finding's containing element. 985 * Note that when the content is not textual, this references 986 * the UTF-8 encoded textual representation of the content. 987 * Omitted if content is an image. 988 * </pre> 989 * 990 * <code>.google.privacy.dlp.v2.Range byte_range = 1;</code> 991 */ 992 private com.google.protobuf.SingleFieldBuilderV3< 993 com.google.privacy.dlp.v2.Range, 994 com.google.privacy.dlp.v2.Range.Builder, 995 com.google.privacy.dlp.v2.RangeOrBuilder> getByteRangeFieldBuilder()996 getByteRangeFieldBuilder() { 997 if (byteRangeBuilder_ == null) { 998 byteRangeBuilder_ = 999 new com.google.protobuf.SingleFieldBuilderV3< 1000 com.google.privacy.dlp.v2.Range, 1001 com.google.privacy.dlp.v2.Range.Builder, 1002 com.google.privacy.dlp.v2.RangeOrBuilder>( 1003 getByteRange(), getParentForChildren(), isClean()); 1004 byteRange_ = null; 1005 } 1006 return byteRangeBuilder_; 1007 } 1008 1009 private com.google.privacy.dlp.v2.Range codepointRange_; 1010 private com.google.protobuf.SingleFieldBuilderV3< 1011 com.google.privacy.dlp.v2.Range, 1012 com.google.privacy.dlp.v2.Range.Builder, 1013 com.google.privacy.dlp.v2.RangeOrBuilder> 1014 codepointRangeBuilder_; 1015 /** 1016 * 1017 * 1018 * <pre> 1019 * Unicode character offsets delimiting the finding. 1020 * These are relative to the finding's containing element. 1021 * Provided when the content is text. 1022 * </pre> 1023 * 1024 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 1025 * 1026 * @return Whether the codepointRange field is set. 1027 */ hasCodepointRange()1028 public boolean hasCodepointRange() { 1029 return ((bitField0_ & 0x00000002) != 0); 1030 } 1031 /** 1032 * 1033 * 1034 * <pre> 1035 * Unicode character offsets delimiting the finding. 1036 * These are relative to the finding's containing element. 1037 * Provided when the content is text. 1038 * </pre> 1039 * 1040 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 1041 * 1042 * @return The codepointRange. 1043 */ getCodepointRange()1044 public com.google.privacy.dlp.v2.Range getCodepointRange() { 1045 if (codepointRangeBuilder_ == null) { 1046 return codepointRange_ == null 1047 ? com.google.privacy.dlp.v2.Range.getDefaultInstance() 1048 : codepointRange_; 1049 } else { 1050 return codepointRangeBuilder_.getMessage(); 1051 } 1052 } 1053 /** 1054 * 1055 * 1056 * <pre> 1057 * Unicode character offsets delimiting the finding. 1058 * These are relative to the finding's containing element. 1059 * Provided when the content is text. 1060 * </pre> 1061 * 1062 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 1063 */ setCodepointRange(com.google.privacy.dlp.v2.Range value)1064 public Builder setCodepointRange(com.google.privacy.dlp.v2.Range value) { 1065 if (codepointRangeBuilder_ == null) { 1066 if (value == null) { 1067 throw new NullPointerException(); 1068 } 1069 codepointRange_ = value; 1070 } else { 1071 codepointRangeBuilder_.setMessage(value); 1072 } 1073 bitField0_ |= 0x00000002; 1074 onChanged(); 1075 return this; 1076 } 1077 /** 1078 * 1079 * 1080 * <pre> 1081 * Unicode character offsets delimiting the finding. 1082 * These are relative to the finding's containing element. 1083 * Provided when the content is text. 1084 * </pre> 1085 * 1086 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 1087 */ setCodepointRange(com.google.privacy.dlp.v2.Range.Builder builderForValue)1088 public Builder setCodepointRange(com.google.privacy.dlp.v2.Range.Builder builderForValue) { 1089 if (codepointRangeBuilder_ == null) { 1090 codepointRange_ = builderForValue.build(); 1091 } else { 1092 codepointRangeBuilder_.setMessage(builderForValue.build()); 1093 } 1094 bitField0_ |= 0x00000002; 1095 onChanged(); 1096 return this; 1097 } 1098 /** 1099 * 1100 * 1101 * <pre> 1102 * Unicode character offsets delimiting the finding. 1103 * These are relative to the finding's containing element. 1104 * Provided when the content is text. 1105 * </pre> 1106 * 1107 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 1108 */ mergeCodepointRange(com.google.privacy.dlp.v2.Range value)1109 public Builder mergeCodepointRange(com.google.privacy.dlp.v2.Range value) { 1110 if (codepointRangeBuilder_ == null) { 1111 if (((bitField0_ & 0x00000002) != 0) 1112 && codepointRange_ != null 1113 && codepointRange_ != com.google.privacy.dlp.v2.Range.getDefaultInstance()) { 1114 getCodepointRangeBuilder().mergeFrom(value); 1115 } else { 1116 codepointRange_ = value; 1117 } 1118 } else { 1119 codepointRangeBuilder_.mergeFrom(value); 1120 } 1121 bitField0_ |= 0x00000002; 1122 onChanged(); 1123 return this; 1124 } 1125 /** 1126 * 1127 * 1128 * <pre> 1129 * Unicode character offsets delimiting the finding. 1130 * These are relative to the finding's containing element. 1131 * Provided when the content is text. 1132 * </pre> 1133 * 1134 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 1135 */ clearCodepointRange()1136 public Builder clearCodepointRange() { 1137 bitField0_ = (bitField0_ & ~0x00000002); 1138 codepointRange_ = null; 1139 if (codepointRangeBuilder_ != null) { 1140 codepointRangeBuilder_.dispose(); 1141 codepointRangeBuilder_ = null; 1142 } 1143 onChanged(); 1144 return this; 1145 } 1146 /** 1147 * 1148 * 1149 * <pre> 1150 * Unicode character offsets delimiting the finding. 1151 * These are relative to the finding's containing element. 1152 * Provided when the content is text. 1153 * </pre> 1154 * 1155 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 1156 */ getCodepointRangeBuilder()1157 public com.google.privacy.dlp.v2.Range.Builder getCodepointRangeBuilder() { 1158 bitField0_ |= 0x00000002; 1159 onChanged(); 1160 return getCodepointRangeFieldBuilder().getBuilder(); 1161 } 1162 /** 1163 * 1164 * 1165 * <pre> 1166 * Unicode character offsets delimiting the finding. 1167 * These are relative to the finding's containing element. 1168 * Provided when the content is text. 1169 * </pre> 1170 * 1171 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 1172 */ getCodepointRangeOrBuilder()1173 public com.google.privacy.dlp.v2.RangeOrBuilder getCodepointRangeOrBuilder() { 1174 if (codepointRangeBuilder_ != null) { 1175 return codepointRangeBuilder_.getMessageOrBuilder(); 1176 } else { 1177 return codepointRange_ == null 1178 ? com.google.privacy.dlp.v2.Range.getDefaultInstance() 1179 : codepointRange_; 1180 } 1181 } 1182 /** 1183 * 1184 * 1185 * <pre> 1186 * Unicode character offsets delimiting the finding. 1187 * These are relative to the finding's containing element. 1188 * Provided when the content is text. 1189 * </pre> 1190 * 1191 * <code>.google.privacy.dlp.v2.Range codepoint_range = 2;</code> 1192 */ 1193 private com.google.protobuf.SingleFieldBuilderV3< 1194 com.google.privacy.dlp.v2.Range, 1195 com.google.privacy.dlp.v2.Range.Builder, 1196 com.google.privacy.dlp.v2.RangeOrBuilder> getCodepointRangeFieldBuilder()1197 getCodepointRangeFieldBuilder() { 1198 if (codepointRangeBuilder_ == null) { 1199 codepointRangeBuilder_ = 1200 new com.google.protobuf.SingleFieldBuilderV3< 1201 com.google.privacy.dlp.v2.Range, 1202 com.google.privacy.dlp.v2.Range.Builder, 1203 com.google.privacy.dlp.v2.RangeOrBuilder>( 1204 getCodepointRange(), getParentForChildren(), isClean()); 1205 codepointRange_ = null; 1206 } 1207 return codepointRangeBuilder_; 1208 } 1209 1210 private java.util.List<com.google.privacy.dlp.v2.ContentLocation> contentLocations_ = 1211 java.util.Collections.emptyList(); 1212 ensureContentLocationsIsMutable()1213 private void ensureContentLocationsIsMutable() { 1214 if (!((bitField0_ & 0x00000004) != 0)) { 1215 contentLocations_ = 1216 new java.util.ArrayList<com.google.privacy.dlp.v2.ContentLocation>(contentLocations_); 1217 bitField0_ |= 0x00000004; 1218 } 1219 } 1220 1221 private com.google.protobuf.RepeatedFieldBuilderV3< 1222 com.google.privacy.dlp.v2.ContentLocation, 1223 com.google.privacy.dlp.v2.ContentLocation.Builder, 1224 com.google.privacy.dlp.v2.ContentLocationOrBuilder> 1225 contentLocationsBuilder_; 1226 1227 /** 1228 * 1229 * 1230 * <pre> 1231 * List of nested objects pointing to the precise location of the finding 1232 * within the file or record. 1233 * </pre> 1234 * 1235 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1236 */ getContentLocationsList()1237 public java.util.List<com.google.privacy.dlp.v2.ContentLocation> getContentLocationsList() { 1238 if (contentLocationsBuilder_ == null) { 1239 return java.util.Collections.unmodifiableList(contentLocations_); 1240 } else { 1241 return contentLocationsBuilder_.getMessageList(); 1242 } 1243 } 1244 /** 1245 * 1246 * 1247 * <pre> 1248 * List of nested objects pointing to the precise location of the finding 1249 * within the file or record. 1250 * </pre> 1251 * 1252 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1253 */ getContentLocationsCount()1254 public int getContentLocationsCount() { 1255 if (contentLocationsBuilder_ == null) { 1256 return contentLocations_.size(); 1257 } else { 1258 return contentLocationsBuilder_.getCount(); 1259 } 1260 } 1261 /** 1262 * 1263 * 1264 * <pre> 1265 * List of nested objects pointing to the precise location of the finding 1266 * within the file or record. 1267 * </pre> 1268 * 1269 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1270 */ getContentLocations(int index)1271 public com.google.privacy.dlp.v2.ContentLocation getContentLocations(int index) { 1272 if (contentLocationsBuilder_ == null) { 1273 return contentLocations_.get(index); 1274 } else { 1275 return contentLocationsBuilder_.getMessage(index); 1276 } 1277 } 1278 /** 1279 * 1280 * 1281 * <pre> 1282 * List of nested objects pointing to the precise location of the finding 1283 * within the file or record. 1284 * </pre> 1285 * 1286 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1287 */ setContentLocations(int index, com.google.privacy.dlp.v2.ContentLocation value)1288 public Builder setContentLocations(int index, com.google.privacy.dlp.v2.ContentLocation value) { 1289 if (contentLocationsBuilder_ == null) { 1290 if (value == null) { 1291 throw new NullPointerException(); 1292 } 1293 ensureContentLocationsIsMutable(); 1294 contentLocations_.set(index, value); 1295 onChanged(); 1296 } else { 1297 contentLocationsBuilder_.setMessage(index, value); 1298 } 1299 return this; 1300 } 1301 /** 1302 * 1303 * 1304 * <pre> 1305 * List of nested objects pointing to the precise location of the finding 1306 * within the file or record. 1307 * </pre> 1308 * 1309 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1310 */ setContentLocations( int index, com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue)1311 public Builder setContentLocations( 1312 int index, com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue) { 1313 if (contentLocationsBuilder_ == null) { 1314 ensureContentLocationsIsMutable(); 1315 contentLocations_.set(index, builderForValue.build()); 1316 onChanged(); 1317 } else { 1318 contentLocationsBuilder_.setMessage(index, builderForValue.build()); 1319 } 1320 return this; 1321 } 1322 /** 1323 * 1324 * 1325 * <pre> 1326 * List of nested objects pointing to the precise location of the finding 1327 * within the file or record. 1328 * </pre> 1329 * 1330 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1331 */ addContentLocations(com.google.privacy.dlp.v2.ContentLocation value)1332 public Builder addContentLocations(com.google.privacy.dlp.v2.ContentLocation value) { 1333 if (contentLocationsBuilder_ == null) { 1334 if (value == null) { 1335 throw new NullPointerException(); 1336 } 1337 ensureContentLocationsIsMutable(); 1338 contentLocations_.add(value); 1339 onChanged(); 1340 } else { 1341 contentLocationsBuilder_.addMessage(value); 1342 } 1343 return this; 1344 } 1345 /** 1346 * 1347 * 1348 * <pre> 1349 * List of nested objects pointing to the precise location of the finding 1350 * within the file or record. 1351 * </pre> 1352 * 1353 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1354 */ addContentLocations(int index, com.google.privacy.dlp.v2.ContentLocation value)1355 public Builder addContentLocations(int index, com.google.privacy.dlp.v2.ContentLocation value) { 1356 if (contentLocationsBuilder_ == null) { 1357 if (value == null) { 1358 throw new NullPointerException(); 1359 } 1360 ensureContentLocationsIsMutable(); 1361 contentLocations_.add(index, value); 1362 onChanged(); 1363 } else { 1364 contentLocationsBuilder_.addMessage(index, value); 1365 } 1366 return this; 1367 } 1368 /** 1369 * 1370 * 1371 * <pre> 1372 * List of nested objects pointing to the precise location of the finding 1373 * within the file or record. 1374 * </pre> 1375 * 1376 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1377 */ addContentLocations( com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue)1378 public Builder addContentLocations( 1379 com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue) { 1380 if (contentLocationsBuilder_ == null) { 1381 ensureContentLocationsIsMutable(); 1382 contentLocations_.add(builderForValue.build()); 1383 onChanged(); 1384 } else { 1385 contentLocationsBuilder_.addMessage(builderForValue.build()); 1386 } 1387 return this; 1388 } 1389 /** 1390 * 1391 * 1392 * <pre> 1393 * List of nested objects pointing to the precise location of the finding 1394 * within the file or record. 1395 * </pre> 1396 * 1397 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1398 */ addContentLocations( int index, com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue)1399 public Builder addContentLocations( 1400 int index, com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue) { 1401 if (contentLocationsBuilder_ == null) { 1402 ensureContentLocationsIsMutable(); 1403 contentLocations_.add(index, builderForValue.build()); 1404 onChanged(); 1405 } else { 1406 contentLocationsBuilder_.addMessage(index, builderForValue.build()); 1407 } 1408 return this; 1409 } 1410 /** 1411 * 1412 * 1413 * <pre> 1414 * List of nested objects pointing to the precise location of the finding 1415 * within the file or record. 1416 * </pre> 1417 * 1418 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1419 */ addAllContentLocations( java.lang.Iterable<? extends com.google.privacy.dlp.v2.ContentLocation> values)1420 public Builder addAllContentLocations( 1421 java.lang.Iterable<? extends com.google.privacy.dlp.v2.ContentLocation> values) { 1422 if (contentLocationsBuilder_ == null) { 1423 ensureContentLocationsIsMutable(); 1424 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contentLocations_); 1425 onChanged(); 1426 } else { 1427 contentLocationsBuilder_.addAllMessages(values); 1428 } 1429 return this; 1430 } 1431 /** 1432 * 1433 * 1434 * <pre> 1435 * List of nested objects pointing to the precise location of the finding 1436 * within the file or record. 1437 * </pre> 1438 * 1439 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1440 */ clearContentLocations()1441 public Builder clearContentLocations() { 1442 if (contentLocationsBuilder_ == null) { 1443 contentLocations_ = java.util.Collections.emptyList(); 1444 bitField0_ = (bitField0_ & ~0x00000004); 1445 onChanged(); 1446 } else { 1447 contentLocationsBuilder_.clear(); 1448 } 1449 return this; 1450 } 1451 /** 1452 * 1453 * 1454 * <pre> 1455 * List of nested objects pointing to the precise location of the finding 1456 * within the file or record. 1457 * </pre> 1458 * 1459 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1460 */ removeContentLocations(int index)1461 public Builder removeContentLocations(int index) { 1462 if (contentLocationsBuilder_ == null) { 1463 ensureContentLocationsIsMutable(); 1464 contentLocations_.remove(index); 1465 onChanged(); 1466 } else { 1467 contentLocationsBuilder_.remove(index); 1468 } 1469 return this; 1470 } 1471 /** 1472 * 1473 * 1474 * <pre> 1475 * List of nested objects pointing to the precise location of the finding 1476 * within the file or record. 1477 * </pre> 1478 * 1479 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1480 */ getContentLocationsBuilder(int index)1481 public com.google.privacy.dlp.v2.ContentLocation.Builder getContentLocationsBuilder(int index) { 1482 return getContentLocationsFieldBuilder().getBuilder(index); 1483 } 1484 /** 1485 * 1486 * 1487 * <pre> 1488 * List of nested objects pointing to the precise location of the finding 1489 * within the file or record. 1490 * </pre> 1491 * 1492 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1493 */ getContentLocationsOrBuilder( int index)1494 public com.google.privacy.dlp.v2.ContentLocationOrBuilder getContentLocationsOrBuilder( 1495 int index) { 1496 if (contentLocationsBuilder_ == null) { 1497 return contentLocations_.get(index); 1498 } else { 1499 return contentLocationsBuilder_.getMessageOrBuilder(index); 1500 } 1501 } 1502 /** 1503 * 1504 * 1505 * <pre> 1506 * List of nested objects pointing to the precise location of the finding 1507 * within the file or record. 1508 * </pre> 1509 * 1510 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1511 */ 1512 public java.util.List<? extends com.google.privacy.dlp.v2.ContentLocationOrBuilder> getContentLocationsOrBuilderList()1513 getContentLocationsOrBuilderList() { 1514 if (contentLocationsBuilder_ != null) { 1515 return contentLocationsBuilder_.getMessageOrBuilderList(); 1516 } else { 1517 return java.util.Collections.unmodifiableList(contentLocations_); 1518 } 1519 } 1520 /** 1521 * 1522 * 1523 * <pre> 1524 * List of nested objects pointing to the precise location of the finding 1525 * within the file or record. 1526 * </pre> 1527 * 1528 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1529 */ addContentLocationsBuilder()1530 public com.google.privacy.dlp.v2.ContentLocation.Builder addContentLocationsBuilder() { 1531 return getContentLocationsFieldBuilder() 1532 .addBuilder(com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance()); 1533 } 1534 /** 1535 * 1536 * 1537 * <pre> 1538 * List of nested objects pointing to the precise location of the finding 1539 * within the file or record. 1540 * </pre> 1541 * 1542 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1543 */ addContentLocationsBuilder(int index)1544 public com.google.privacy.dlp.v2.ContentLocation.Builder addContentLocationsBuilder(int index) { 1545 return getContentLocationsFieldBuilder() 1546 .addBuilder(index, com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance()); 1547 } 1548 /** 1549 * 1550 * 1551 * <pre> 1552 * List of nested objects pointing to the precise location of the finding 1553 * within the file or record. 1554 * </pre> 1555 * 1556 * <code>repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7;</code> 1557 */ 1558 public java.util.List<com.google.privacy.dlp.v2.ContentLocation.Builder> getContentLocationsBuilderList()1559 getContentLocationsBuilderList() { 1560 return getContentLocationsFieldBuilder().getBuilderList(); 1561 } 1562 1563 private com.google.protobuf.RepeatedFieldBuilderV3< 1564 com.google.privacy.dlp.v2.ContentLocation, 1565 com.google.privacy.dlp.v2.ContentLocation.Builder, 1566 com.google.privacy.dlp.v2.ContentLocationOrBuilder> getContentLocationsFieldBuilder()1567 getContentLocationsFieldBuilder() { 1568 if (contentLocationsBuilder_ == null) { 1569 contentLocationsBuilder_ = 1570 new com.google.protobuf.RepeatedFieldBuilderV3< 1571 com.google.privacy.dlp.v2.ContentLocation, 1572 com.google.privacy.dlp.v2.ContentLocation.Builder, 1573 com.google.privacy.dlp.v2.ContentLocationOrBuilder>( 1574 contentLocations_, 1575 ((bitField0_ & 0x00000004) != 0), 1576 getParentForChildren(), 1577 isClean()); 1578 contentLocations_ = null; 1579 } 1580 return contentLocationsBuilder_; 1581 } 1582 1583 private com.google.privacy.dlp.v2.Container container_; 1584 private com.google.protobuf.SingleFieldBuilderV3< 1585 com.google.privacy.dlp.v2.Container, 1586 com.google.privacy.dlp.v2.Container.Builder, 1587 com.google.privacy.dlp.v2.ContainerOrBuilder> 1588 containerBuilder_; 1589 /** 1590 * 1591 * 1592 * <pre> 1593 * Information about the container where this finding occurred, if available. 1594 * </pre> 1595 * 1596 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 1597 * 1598 * @return Whether the container field is set. 1599 */ hasContainer()1600 public boolean hasContainer() { 1601 return ((bitField0_ & 0x00000008) != 0); 1602 } 1603 /** 1604 * 1605 * 1606 * <pre> 1607 * Information about the container where this finding occurred, if available. 1608 * </pre> 1609 * 1610 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 1611 * 1612 * @return The container. 1613 */ getContainer()1614 public com.google.privacy.dlp.v2.Container getContainer() { 1615 if (containerBuilder_ == null) { 1616 return container_ == null 1617 ? com.google.privacy.dlp.v2.Container.getDefaultInstance() 1618 : container_; 1619 } else { 1620 return containerBuilder_.getMessage(); 1621 } 1622 } 1623 /** 1624 * 1625 * 1626 * <pre> 1627 * Information about the container where this finding occurred, if available. 1628 * </pre> 1629 * 1630 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 1631 */ setContainer(com.google.privacy.dlp.v2.Container value)1632 public Builder setContainer(com.google.privacy.dlp.v2.Container value) { 1633 if (containerBuilder_ == null) { 1634 if (value == null) { 1635 throw new NullPointerException(); 1636 } 1637 container_ = value; 1638 } else { 1639 containerBuilder_.setMessage(value); 1640 } 1641 bitField0_ |= 0x00000008; 1642 onChanged(); 1643 return this; 1644 } 1645 /** 1646 * 1647 * 1648 * <pre> 1649 * Information about the container where this finding occurred, if available. 1650 * </pre> 1651 * 1652 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 1653 */ setContainer(com.google.privacy.dlp.v2.Container.Builder builderForValue)1654 public Builder setContainer(com.google.privacy.dlp.v2.Container.Builder builderForValue) { 1655 if (containerBuilder_ == null) { 1656 container_ = builderForValue.build(); 1657 } else { 1658 containerBuilder_.setMessage(builderForValue.build()); 1659 } 1660 bitField0_ |= 0x00000008; 1661 onChanged(); 1662 return this; 1663 } 1664 /** 1665 * 1666 * 1667 * <pre> 1668 * Information about the container where this finding occurred, if available. 1669 * </pre> 1670 * 1671 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 1672 */ mergeContainer(com.google.privacy.dlp.v2.Container value)1673 public Builder mergeContainer(com.google.privacy.dlp.v2.Container value) { 1674 if (containerBuilder_ == null) { 1675 if (((bitField0_ & 0x00000008) != 0) 1676 && container_ != null 1677 && container_ != com.google.privacy.dlp.v2.Container.getDefaultInstance()) { 1678 getContainerBuilder().mergeFrom(value); 1679 } else { 1680 container_ = value; 1681 } 1682 } else { 1683 containerBuilder_.mergeFrom(value); 1684 } 1685 bitField0_ |= 0x00000008; 1686 onChanged(); 1687 return this; 1688 } 1689 /** 1690 * 1691 * 1692 * <pre> 1693 * Information about the container where this finding occurred, if available. 1694 * </pre> 1695 * 1696 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 1697 */ clearContainer()1698 public Builder clearContainer() { 1699 bitField0_ = (bitField0_ & ~0x00000008); 1700 container_ = null; 1701 if (containerBuilder_ != null) { 1702 containerBuilder_.dispose(); 1703 containerBuilder_ = null; 1704 } 1705 onChanged(); 1706 return this; 1707 } 1708 /** 1709 * 1710 * 1711 * <pre> 1712 * Information about the container where this finding occurred, if available. 1713 * </pre> 1714 * 1715 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 1716 */ getContainerBuilder()1717 public com.google.privacy.dlp.v2.Container.Builder getContainerBuilder() { 1718 bitField0_ |= 0x00000008; 1719 onChanged(); 1720 return getContainerFieldBuilder().getBuilder(); 1721 } 1722 /** 1723 * 1724 * 1725 * <pre> 1726 * Information about the container where this finding occurred, if available. 1727 * </pre> 1728 * 1729 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 1730 */ getContainerOrBuilder()1731 public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerOrBuilder() { 1732 if (containerBuilder_ != null) { 1733 return containerBuilder_.getMessageOrBuilder(); 1734 } else { 1735 return container_ == null 1736 ? com.google.privacy.dlp.v2.Container.getDefaultInstance() 1737 : container_; 1738 } 1739 } 1740 /** 1741 * 1742 * 1743 * <pre> 1744 * Information about the container where this finding occurred, if available. 1745 * </pre> 1746 * 1747 * <code>.google.privacy.dlp.v2.Container container = 8;</code> 1748 */ 1749 private com.google.protobuf.SingleFieldBuilderV3< 1750 com.google.privacy.dlp.v2.Container, 1751 com.google.privacy.dlp.v2.Container.Builder, 1752 com.google.privacy.dlp.v2.ContainerOrBuilder> getContainerFieldBuilder()1753 getContainerFieldBuilder() { 1754 if (containerBuilder_ == null) { 1755 containerBuilder_ = 1756 new com.google.protobuf.SingleFieldBuilderV3< 1757 com.google.privacy.dlp.v2.Container, 1758 com.google.privacy.dlp.v2.Container.Builder, 1759 com.google.privacy.dlp.v2.ContainerOrBuilder>( 1760 getContainer(), getParentForChildren(), isClean()); 1761 container_ = null; 1762 } 1763 return containerBuilder_; 1764 } 1765 1766 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1767 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1768 return super.setUnknownFields(unknownFields); 1769 } 1770 1771 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1772 public final Builder mergeUnknownFields( 1773 final com.google.protobuf.UnknownFieldSet unknownFields) { 1774 return super.mergeUnknownFields(unknownFields); 1775 } 1776 1777 // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Location) 1778 } 1779 1780 // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Location) 1781 private static final com.google.privacy.dlp.v2.Location DEFAULT_INSTANCE; 1782 1783 static { 1784 DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Location(); 1785 } 1786 getDefaultInstance()1787 public static com.google.privacy.dlp.v2.Location getDefaultInstance() { 1788 return DEFAULT_INSTANCE; 1789 } 1790 1791 private static final com.google.protobuf.Parser<Location> PARSER = 1792 new com.google.protobuf.AbstractParser<Location>() { 1793 @java.lang.Override 1794 public Location parsePartialFrom( 1795 com.google.protobuf.CodedInputStream input, 1796 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1797 throws com.google.protobuf.InvalidProtocolBufferException { 1798 Builder builder = newBuilder(); 1799 try { 1800 builder.mergeFrom(input, extensionRegistry); 1801 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1802 throw e.setUnfinishedMessage(builder.buildPartial()); 1803 } catch (com.google.protobuf.UninitializedMessageException e) { 1804 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1805 } catch (java.io.IOException e) { 1806 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1807 .setUnfinishedMessage(builder.buildPartial()); 1808 } 1809 return builder.buildPartial(); 1810 } 1811 }; 1812 parser()1813 public static com.google.protobuf.Parser<Location> parser() { 1814 return PARSER; 1815 } 1816 1817 @java.lang.Override getParserForType()1818 public com.google.protobuf.Parser<Location> getParserForType() { 1819 return PARSER; 1820 } 1821 1822 @java.lang.Override getDefaultInstanceForType()1823 public com.google.privacy.dlp.v2.Location getDefaultInstanceForType() { 1824 return DEFAULT_INSTANCE; 1825 } 1826 } 1827