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 * Precise location of the finding within a document, record, image, or metadata 26 * container. 27 * </pre> 28 * 29 * Protobuf type {@code google.privacy.dlp.v2.ContentLocation} 30 */ 31 public final class ContentLocation extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ContentLocation) 34 ContentLocationOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use ContentLocation.newBuilder() to construct. ContentLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private ContentLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 ContentLocation()41 private ContentLocation() { 42 containerName_ = ""; 43 containerVersion_ = ""; 44 } 45 46 @java.lang.Override 47 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)48 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 49 return new ContentLocation(); 50 } 51 52 @java.lang.Override getUnknownFields()53 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 54 return this.unknownFields; 55 } 56 getDescriptor()57 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 58 return com.google.privacy.dlp.v2.DlpProto 59 .internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; 60 } 61 62 @java.lang.Override 63 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()64 internalGetFieldAccessorTable() { 65 return com.google.privacy.dlp.v2.DlpProto 66 .internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable 67 .ensureFieldAccessorsInitialized( 68 com.google.privacy.dlp.v2.ContentLocation.class, 69 com.google.privacy.dlp.v2.ContentLocation.Builder.class); 70 } 71 72 private int locationCase_ = 0; 73 private java.lang.Object location_; 74 75 public enum LocationCase 76 implements 77 com.google.protobuf.Internal.EnumLite, 78 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 79 RECORD_LOCATION(2), 80 IMAGE_LOCATION(3), 81 DOCUMENT_LOCATION(5), 82 METADATA_LOCATION(8), 83 LOCATION_NOT_SET(0); 84 private final int value; 85 LocationCase(int value)86 private LocationCase(int value) { 87 this.value = value; 88 } 89 /** 90 * @param value The number of the enum to look for. 91 * @return The enum associated with the given number. 92 * @deprecated Use {@link #forNumber(int)} instead. 93 */ 94 @java.lang.Deprecated valueOf(int value)95 public static LocationCase valueOf(int value) { 96 return forNumber(value); 97 } 98 forNumber(int value)99 public static LocationCase forNumber(int value) { 100 switch (value) { 101 case 2: 102 return RECORD_LOCATION; 103 case 3: 104 return IMAGE_LOCATION; 105 case 5: 106 return DOCUMENT_LOCATION; 107 case 8: 108 return METADATA_LOCATION; 109 case 0: 110 return LOCATION_NOT_SET; 111 default: 112 return null; 113 } 114 } 115 getNumber()116 public int getNumber() { 117 return this.value; 118 } 119 }; 120 getLocationCase()121 public LocationCase getLocationCase() { 122 return LocationCase.forNumber(locationCase_); 123 } 124 125 public static final int CONTAINER_NAME_FIELD_NUMBER = 1; 126 127 @SuppressWarnings("serial") 128 private volatile java.lang.Object containerName_ = ""; 129 /** 130 * 131 * 132 * <pre> 133 * Name of the container where the finding is located. 134 * The top level name is the source file name or table name. Names of some 135 * common storage containers are formatted as follows: 136 * * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` 137 * * Cloud Storage files: `gs://{bucket}/{path}` 138 * * Datastore namespace: {namespace} 139 * Nested names could be absent if the embedded object has no string 140 * identifier (for example, an image contained within a document). 141 * </pre> 142 * 143 * <code>string container_name = 1;</code> 144 * 145 * @return The containerName. 146 */ 147 @java.lang.Override getContainerName()148 public java.lang.String getContainerName() { 149 java.lang.Object ref = containerName_; 150 if (ref instanceof java.lang.String) { 151 return (java.lang.String) ref; 152 } else { 153 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 154 java.lang.String s = bs.toStringUtf8(); 155 containerName_ = s; 156 return s; 157 } 158 } 159 /** 160 * 161 * 162 * <pre> 163 * Name of the container where the finding is located. 164 * The top level name is the source file name or table name. Names of some 165 * common storage containers are formatted as follows: 166 * * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` 167 * * Cloud Storage files: `gs://{bucket}/{path}` 168 * * Datastore namespace: {namespace} 169 * Nested names could be absent if the embedded object has no string 170 * identifier (for example, an image contained within a document). 171 * </pre> 172 * 173 * <code>string container_name = 1;</code> 174 * 175 * @return The bytes for containerName. 176 */ 177 @java.lang.Override getContainerNameBytes()178 public com.google.protobuf.ByteString getContainerNameBytes() { 179 java.lang.Object ref = containerName_; 180 if (ref instanceof java.lang.String) { 181 com.google.protobuf.ByteString b = 182 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 183 containerName_ = b; 184 return b; 185 } else { 186 return (com.google.protobuf.ByteString) ref; 187 } 188 } 189 190 public static final int RECORD_LOCATION_FIELD_NUMBER = 2; 191 /** 192 * 193 * 194 * <pre> 195 * Location within a row or record of a database table. 196 * </pre> 197 * 198 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 199 * 200 * @return Whether the recordLocation field is set. 201 */ 202 @java.lang.Override hasRecordLocation()203 public boolean hasRecordLocation() { 204 return locationCase_ == 2; 205 } 206 /** 207 * 208 * 209 * <pre> 210 * Location within a row or record of a database table. 211 * </pre> 212 * 213 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 214 * 215 * @return The recordLocation. 216 */ 217 @java.lang.Override getRecordLocation()218 public com.google.privacy.dlp.v2.RecordLocation getRecordLocation() { 219 if (locationCase_ == 2) { 220 return (com.google.privacy.dlp.v2.RecordLocation) location_; 221 } 222 return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); 223 } 224 /** 225 * 226 * 227 * <pre> 228 * Location within a row or record of a database table. 229 * </pre> 230 * 231 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 232 */ 233 @java.lang.Override getRecordLocationOrBuilder()234 public com.google.privacy.dlp.v2.RecordLocationOrBuilder getRecordLocationOrBuilder() { 235 if (locationCase_ == 2) { 236 return (com.google.privacy.dlp.v2.RecordLocation) location_; 237 } 238 return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); 239 } 240 241 public static final int IMAGE_LOCATION_FIELD_NUMBER = 3; 242 /** 243 * 244 * 245 * <pre> 246 * Location within an image's pixels. 247 * </pre> 248 * 249 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 250 * 251 * @return Whether the imageLocation field is set. 252 */ 253 @java.lang.Override hasImageLocation()254 public boolean hasImageLocation() { 255 return locationCase_ == 3; 256 } 257 /** 258 * 259 * 260 * <pre> 261 * Location within an image's pixels. 262 * </pre> 263 * 264 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 265 * 266 * @return The imageLocation. 267 */ 268 @java.lang.Override getImageLocation()269 public com.google.privacy.dlp.v2.ImageLocation getImageLocation() { 270 if (locationCase_ == 3) { 271 return (com.google.privacy.dlp.v2.ImageLocation) location_; 272 } 273 return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); 274 } 275 /** 276 * 277 * 278 * <pre> 279 * Location within an image's pixels. 280 * </pre> 281 * 282 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 283 */ 284 @java.lang.Override getImageLocationOrBuilder()285 public com.google.privacy.dlp.v2.ImageLocationOrBuilder getImageLocationOrBuilder() { 286 if (locationCase_ == 3) { 287 return (com.google.privacy.dlp.v2.ImageLocation) location_; 288 } 289 return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); 290 } 291 292 public static final int DOCUMENT_LOCATION_FIELD_NUMBER = 5; 293 /** 294 * 295 * 296 * <pre> 297 * Location data for document files. 298 * </pre> 299 * 300 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 301 * 302 * @return Whether the documentLocation field is set. 303 */ 304 @java.lang.Override hasDocumentLocation()305 public boolean hasDocumentLocation() { 306 return locationCase_ == 5; 307 } 308 /** 309 * 310 * 311 * <pre> 312 * Location data for document files. 313 * </pre> 314 * 315 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 316 * 317 * @return The documentLocation. 318 */ 319 @java.lang.Override getDocumentLocation()320 public com.google.privacy.dlp.v2.DocumentLocation getDocumentLocation() { 321 if (locationCase_ == 5) { 322 return (com.google.privacy.dlp.v2.DocumentLocation) location_; 323 } 324 return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); 325 } 326 /** 327 * 328 * 329 * <pre> 330 * Location data for document files. 331 * </pre> 332 * 333 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 334 */ 335 @java.lang.Override getDocumentLocationOrBuilder()336 public com.google.privacy.dlp.v2.DocumentLocationOrBuilder getDocumentLocationOrBuilder() { 337 if (locationCase_ == 5) { 338 return (com.google.privacy.dlp.v2.DocumentLocation) location_; 339 } 340 return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); 341 } 342 343 public static final int METADATA_LOCATION_FIELD_NUMBER = 8; 344 /** 345 * 346 * 347 * <pre> 348 * Location within the metadata for inspected content. 349 * </pre> 350 * 351 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 352 * 353 * @return Whether the metadataLocation field is set. 354 */ 355 @java.lang.Override hasMetadataLocation()356 public boolean hasMetadataLocation() { 357 return locationCase_ == 8; 358 } 359 /** 360 * 361 * 362 * <pre> 363 * Location within the metadata for inspected content. 364 * </pre> 365 * 366 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 367 * 368 * @return The metadataLocation. 369 */ 370 @java.lang.Override getMetadataLocation()371 public com.google.privacy.dlp.v2.MetadataLocation getMetadataLocation() { 372 if (locationCase_ == 8) { 373 return (com.google.privacy.dlp.v2.MetadataLocation) location_; 374 } 375 return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); 376 } 377 /** 378 * 379 * 380 * <pre> 381 * Location within the metadata for inspected content. 382 * </pre> 383 * 384 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 385 */ 386 @java.lang.Override getMetadataLocationOrBuilder()387 public com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOrBuilder() { 388 if (locationCase_ == 8) { 389 return (com.google.privacy.dlp.v2.MetadataLocation) location_; 390 } 391 return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); 392 } 393 394 public static final int CONTAINER_TIMESTAMP_FIELD_NUMBER = 6; 395 private com.google.protobuf.Timestamp containerTimestamp_; 396 /** 397 * 398 * 399 * <pre> 400 * Finding container modification timestamp, if applicable. For Cloud Storage, 401 * this field contains the last file modification timestamp. For a BigQuery 402 * table, this field contains the last_modified_time property. For Datastore, 403 * this field isn't populated. 404 * </pre> 405 * 406 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 407 * 408 * @return Whether the containerTimestamp field is set. 409 */ 410 @java.lang.Override hasContainerTimestamp()411 public boolean hasContainerTimestamp() { 412 return containerTimestamp_ != null; 413 } 414 /** 415 * 416 * 417 * <pre> 418 * Finding container modification timestamp, if applicable. For Cloud Storage, 419 * this field contains the last file modification timestamp. For a BigQuery 420 * table, this field contains the last_modified_time property. For Datastore, 421 * this field isn't populated. 422 * </pre> 423 * 424 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 425 * 426 * @return The containerTimestamp. 427 */ 428 @java.lang.Override getContainerTimestamp()429 public com.google.protobuf.Timestamp getContainerTimestamp() { 430 return containerTimestamp_ == null 431 ? com.google.protobuf.Timestamp.getDefaultInstance() 432 : containerTimestamp_; 433 } 434 /** 435 * 436 * 437 * <pre> 438 * Finding container modification timestamp, if applicable. For Cloud Storage, 439 * this field contains the last file modification timestamp. For a BigQuery 440 * table, this field contains the last_modified_time property. For Datastore, 441 * this field isn't populated. 442 * </pre> 443 * 444 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 445 */ 446 @java.lang.Override getContainerTimestampOrBuilder()447 public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { 448 return containerTimestamp_ == null 449 ? com.google.protobuf.Timestamp.getDefaultInstance() 450 : containerTimestamp_; 451 } 452 453 public static final int CONTAINER_VERSION_FIELD_NUMBER = 7; 454 455 @SuppressWarnings("serial") 456 private volatile java.lang.Object containerVersion_ = ""; 457 /** 458 * 459 * 460 * <pre> 461 * Finding container version, if available 462 * ("generation" for Cloud Storage). 463 * </pre> 464 * 465 * <code>string container_version = 7;</code> 466 * 467 * @return The containerVersion. 468 */ 469 @java.lang.Override getContainerVersion()470 public java.lang.String getContainerVersion() { 471 java.lang.Object ref = containerVersion_; 472 if (ref instanceof java.lang.String) { 473 return (java.lang.String) ref; 474 } else { 475 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 476 java.lang.String s = bs.toStringUtf8(); 477 containerVersion_ = s; 478 return s; 479 } 480 } 481 /** 482 * 483 * 484 * <pre> 485 * Finding container version, if available 486 * ("generation" for Cloud Storage). 487 * </pre> 488 * 489 * <code>string container_version = 7;</code> 490 * 491 * @return The bytes for containerVersion. 492 */ 493 @java.lang.Override getContainerVersionBytes()494 public com.google.protobuf.ByteString getContainerVersionBytes() { 495 java.lang.Object ref = containerVersion_; 496 if (ref instanceof java.lang.String) { 497 com.google.protobuf.ByteString b = 498 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 499 containerVersion_ = b; 500 return b; 501 } else { 502 return (com.google.protobuf.ByteString) ref; 503 } 504 } 505 506 private byte memoizedIsInitialized = -1; 507 508 @java.lang.Override isInitialized()509 public final boolean isInitialized() { 510 byte isInitialized = memoizedIsInitialized; 511 if (isInitialized == 1) return true; 512 if (isInitialized == 0) return false; 513 514 memoizedIsInitialized = 1; 515 return true; 516 } 517 518 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)519 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 520 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerName_)) { 521 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containerName_); 522 } 523 if (locationCase_ == 2) { 524 output.writeMessage(2, (com.google.privacy.dlp.v2.RecordLocation) location_); 525 } 526 if (locationCase_ == 3) { 527 output.writeMessage(3, (com.google.privacy.dlp.v2.ImageLocation) location_); 528 } 529 if (locationCase_ == 5) { 530 output.writeMessage(5, (com.google.privacy.dlp.v2.DocumentLocation) location_); 531 } 532 if (containerTimestamp_ != null) { 533 output.writeMessage(6, getContainerTimestamp()); 534 } 535 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerVersion_)) { 536 com.google.protobuf.GeneratedMessageV3.writeString(output, 7, containerVersion_); 537 } 538 if (locationCase_ == 8) { 539 output.writeMessage(8, (com.google.privacy.dlp.v2.MetadataLocation) location_); 540 } 541 getUnknownFields().writeTo(output); 542 } 543 544 @java.lang.Override getSerializedSize()545 public int getSerializedSize() { 546 int size = memoizedSize; 547 if (size != -1) return size; 548 549 size = 0; 550 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerName_)) { 551 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containerName_); 552 } 553 if (locationCase_ == 2) { 554 size += 555 com.google.protobuf.CodedOutputStream.computeMessageSize( 556 2, (com.google.privacy.dlp.v2.RecordLocation) location_); 557 } 558 if (locationCase_ == 3) { 559 size += 560 com.google.protobuf.CodedOutputStream.computeMessageSize( 561 3, (com.google.privacy.dlp.v2.ImageLocation) location_); 562 } 563 if (locationCase_ == 5) { 564 size += 565 com.google.protobuf.CodedOutputStream.computeMessageSize( 566 5, (com.google.privacy.dlp.v2.DocumentLocation) location_); 567 } 568 if (containerTimestamp_ != null) { 569 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getContainerTimestamp()); 570 } 571 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerVersion_)) { 572 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, containerVersion_); 573 } 574 if (locationCase_ == 8) { 575 size += 576 com.google.protobuf.CodedOutputStream.computeMessageSize( 577 8, (com.google.privacy.dlp.v2.MetadataLocation) location_); 578 } 579 size += getUnknownFields().getSerializedSize(); 580 memoizedSize = size; 581 return size; 582 } 583 584 @java.lang.Override equals(final java.lang.Object obj)585 public boolean equals(final java.lang.Object obj) { 586 if (obj == this) { 587 return true; 588 } 589 if (!(obj instanceof com.google.privacy.dlp.v2.ContentLocation)) { 590 return super.equals(obj); 591 } 592 com.google.privacy.dlp.v2.ContentLocation other = 593 (com.google.privacy.dlp.v2.ContentLocation) obj; 594 595 if (!getContainerName().equals(other.getContainerName())) return false; 596 if (hasContainerTimestamp() != other.hasContainerTimestamp()) return false; 597 if (hasContainerTimestamp()) { 598 if (!getContainerTimestamp().equals(other.getContainerTimestamp())) return false; 599 } 600 if (!getContainerVersion().equals(other.getContainerVersion())) return false; 601 if (!getLocationCase().equals(other.getLocationCase())) return false; 602 switch (locationCase_) { 603 case 2: 604 if (!getRecordLocation().equals(other.getRecordLocation())) return false; 605 break; 606 case 3: 607 if (!getImageLocation().equals(other.getImageLocation())) return false; 608 break; 609 case 5: 610 if (!getDocumentLocation().equals(other.getDocumentLocation())) return false; 611 break; 612 case 8: 613 if (!getMetadataLocation().equals(other.getMetadataLocation())) return false; 614 break; 615 case 0: 616 default: 617 } 618 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 619 return true; 620 } 621 622 @java.lang.Override hashCode()623 public int hashCode() { 624 if (memoizedHashCode != 0) { 625 return memoizedHashCode; 626 } 627 int hash = 41; 628 hash = (19 * hash) + getDescriptor().hashCode(); 629 hash = (37 * hash) + CONTAINER_NAME_FIELD_NUMBER; 630 hash = (53 * hash) + getContainerName().hashCode(); 631 if (hasContainerTimestamp()) { 632 hash = (37 * hash) + CONTAINER_TIMESTAMP_FIELD_NUMBER; 633 hash = (53 * hash) + getContainerTimestamp().hashCode(); 634 } 635 hash = (37 * hash) + CONTAINER_VERSION_FIELD_NUMBER; 636 hash = (53 * hash) + getContainerVersion().hashCode(); 637 switch (locationCase_) { 638 case 2: 639 hash = (37 * hash) + RECORD_LOCATION_FIELD_NUMBER; 640 hash = (53 * hash) + getRecordLocation().hashCode(); 641 break; 642 case 3: 643 hash = (37 * hash) + IMAGE_LOCATION_FIELD_NUMBER; 644 hash = (53 * hash) + getImageLocation().hashCode(); 645 break; 646 case 5: 647 hash = (37 * hash) + DOCUMENT_LOCATION_FIELD_NUMBER; 648 hash = (53 * hash) + getDocumentLocation().hashCode(); 649 break; 650 case 8: 651 hash = (37 * hash) + METADATA_LOCATION_FIELD_NUMBER; 652 hash = (53 * hash) + getMetadataLocation().hashCode(); 653 break; 654 case 0: 655 default: 656 } 657 hash = (29 * hash) + getUnknownFields().hashCode(); 658 memoizedHashCode = hash; 659 return hash; 660 } 661 parseFrom(java.nio.ByteBuffer data)662 public static com.google.privacy.dlp.v2.ContentLocation parseFrom(java.nio.ByteBuffer data) 663 throws com.google.protobuf.InvalidProtocolBufferException { 664 return PARSER.parseFrom(data); 665 } 666 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)667 public static com.google.privacy.dlp.v2.ContentLocation parseFrom( 668 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 669 throws com.google.protobuf.InvalidProtocolBufferException { 670 return PARSER.parseFrom(data, extensionRegistry); 671 } 672 parseFrom( com.google.protobuf.ByteString data)673 public static com.google.privacy.dlp.v2.ContentLocation parseFrom( 674 com.google.protobuf.ByteString data) 675 throws com.google.protobuf.InvalidProtocolBufferException { 676 return PARSER.parseFrom(data); 677 } 678 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)679 public static com.google.privacy.dlp.v2.ContentLocation parseFrom( 680 com.google.protobuf.ByteString data, 681 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 682 throws com.google.protobuf.InvalidProtocolBufferException { 683 return PARSER.parseFrom(data, extensionRegistry); 684 } 685 parseFrom(byte[] data)686 public static com.google.privacy.dlp.v2.ContentLocation parseFrom(byte[] data) 687 throws com.google.protobuf.InvalidProtocolBufferException { 688 return PARSER.parseFrom(data); 689 } 690 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)691 public static com.google.privacy.dlp.v2.ContentLocation parseFrom( 692 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 693 throws com.google.protobuf.InvalidProtocolBufferException { 694 return PARSER.parseFrom(data, extensionRegistry); 695 } 696 parseFrom(java.io.InputStream input)697 public static com.google.privacy.dlp.v2.ContentLocation parseFrom(java.io.InputStream input) 698 throws java.io.IOException { 699 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 700 } 701 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)702 public static com.google.privacy.dlp.v2.ContentLocation parseFrom( 703 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 704 throws java.io.IOException { 705 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 706 PARSER, input, extensionRegistry); 707 } 708 parseDelimitedFrom( java.io.InputStream input)709 public static com.google.privacy.dlp.v2.ContentLocation parseDelimitedFrom( 710 java.io.InputStream input) throws java.io.IOException { 711 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 712 } 713 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)714 public static com.google.privacy.dlp.v2.ContentLocation parseDelimitedFrom( 715 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 716 throws java.io.IOException { 717 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 718 PARSER, input, extensionRegistry); 719 } 720 parseFrom( com.google.protobuf.CodedInputStream input)721 public static com.google.privacy.dlp.v2.ContentLocation parseFrom( 722 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 723 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 724 } 725 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)726 public static com.google.privacy.dlp.v2.ContentLocation parseFrom( 727 com.google.protobuf.CodedInputStream input, 728 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 729 throws java.io.IOException { 730 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 731 PARSER, input, extensionRegistry); 732 } 733 734 @java.lang.Override newBuilderForType()735 public Builder newBuilderForType() { 736 return newBuilder(); 737 } 738 newBuilder()739 public static Builder newBuilder() { 740 return DEFAULT_INSTANCE.toBuilder(); 741 } 742 newBuilder(com.google.privacy.dlp.v2.ContentLocation prototype)743 public static Builder newBuilder(com.google.privacy.dlp.v2.ContentLocation prototype) { 744 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 745 } 746 747 @java.lang.Override toBuilder()748 public Builder toBuilder() { 749 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 750 } 751 752 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)753 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 754 Builder builder = new Builder(parent); 755 return builder; 756 } 757 /** 758 * 759 * 760 * <pre> 761 * Precise location of the finding within a document, record, image, or metadata 762 * container. 763 * </pre> 764 * 765 * Protobuf type {@code google.privacy.dlp.v2.ContentLocation} 766 */ 767 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 768 implements 769 // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ContentLocation) 770 com.google.privacy.dlp.v2.ContentLocationOrBuilder { getDescriptor()771 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 772 return com.google.privacy.dlp.v2.DlpProto 773 .internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; 774 } 775 776 @java.lang.Override 777 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()778 internalGetFieldAccessorTable() { 779 return com.google.privacy.dlp.v2.DlpProto 780 .internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable 781 .ensureFieldAccessorsInitialized( 782 com.google.privacy.dlp.v2.ContentLocation.class, 783 com.google.privacy.dlp.v2.ContentLocation.Builder.class); 784 } 785 786 // Construct using com.google.privacy.dlp.v2.ContentLocation.newBuilder() Builder()787 private Builder() {} 788 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)789 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 790 super(parent); 791 } 792 793 @java.lang.Override clear()794 public Builder clear() { 795 super.clear(); 796 bitField0_ = 0; 797 containerName_ = ""; 798 if (recordLocationBuilder_ != null) { 799 recordLocationBuilder_.clear(); 800 } 801 if (imageLocationBuilder_ != null) { 802 imageLocationBuilder_.clear(); 803 } 804 if (documentLocationBuilder_ != null) { 805 documentLocationBuilder_.clear(); 806 } 807 if (metadataLocationBuilder_ != null) { 808 metadataLocationBuilder_.clear(); 809 } 810 containerTimestamp_ = null; 811 if (containerTimestampBuilder_ != null) { 812 containerTimestampBuilder_.dispose(); 813 containerTimestampBuilder_ = null; 814 } 815 containerVersion_ = ""; 816 locationCase_ = 0; 817 location_ = null; 818 return this; 819 } 820 821 @java.lang.Override getDescriptorForType()822 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 823 return com.google.privacy.dlp.v2.DlpProto 824 .internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; 825 } 826 827 @java.lang.Override getDefaultInstanceForType()828 public com.google.privacy.dlp.v2.ContentLocation getDefaultInstanceForType() { 829 return com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance(); 830 } 831 832 @java.lang.Override build()833 public com.google.privacy.dlp.v2.ContentLocation build() { 834 com.google.privacy.dlp.v2.ContentLocation result = buildPartial(); 835 if (!result.isInitialized()) { 836 throw newUninitializedMessageException(result); 837 } 838 return result; 839 } 840 841 @java.lang.Override buildPartial()842 public com.google.privacy.dlp.v2.ContentLocation buildPartial() { 843 com.google.privacy.dlp.v2.ContentLocation result = 844 new com.google.privacy.dlp.v2.ContentLocation(this); 845 if (bitField0_ != 0) { 846 buildPartial0(result); 847 } 848 buildPartialOneofs(result); 849 onBuilt(); 850 return result; 851 } 852 buildPartial0(com.google.privacy.dlp.v2.ContentLocation result)853 private void buildPartial0(com.google.privacy.dlp.v2.ContentLocation result) { 854 int from_bitField0_ = bitField0_; 855 if (((from_bitField0_ & 0x00000001) != 0)) { 856 result.containerName_ = containerName_; 857 } 858 if (((from_bitField0_ & 0x00000020) != 0)) { 859 result.containerTimestamp_ = 860 containerTimestampBuilder_ == null 861 ? containerTimestamp_ 862 : containerTimestampBuilder_.build(); 863 } 864 if (((from_bitField0_ & 0x00000040) != 0)) { 865 result.containerVersion_ = containerVersion_; 866 } 867 } 868 buildPartialOneofs(com.google.privacy.dlp.v2.ContentLocation result)869 private void buildPartialOneofs(com.google.privacy.dlp.v2.ContentLocation result) { 870 result.locationCase_ = locationCase_; 871 result.location_ = this.location_; 872 if (locationCase_ == 2 && recordLocationBuilder_ != null) { 873 result.location_ = recordLocationBuilder_.build(); 874 } 875 if (locationCase_ == 3 && imageLocationBuilder_ != null) { 876 result.location_ = imageLocationBuilder_.build(); 877 } 878 if (locationCase_ == 5 && documentLocationBuilder_ != null) { 879 result.location_ = documentLocationBuilder_.build(); 880 } 881 if (locationCase_ == 8 && metadataLocationBuilder_ != null) { 882 result.location_ = metadataLocationBuilder_.build(); 883 } 884 } 885 886 @java.lang.Override clone()887 public Builder clone() { 888 return super.clone(); 889 } 890 891 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)892 public Builder setField( 893 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 894 return super.setField(field, value); 895 } 896 897 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)898 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 899 return super.clearField(field); 900 } 901 902 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)903 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 904 return super.clearOneof(oneof); 905 } 906 907 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)908 public Builder setRepeatedField( 909 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 910 return super.setRepeatedField(field, index, value); 911 } 912 913 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)914 public Builder addRepeatedField( 915 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 916 return super.addRepeatedField(field, value); 917 } 918 919 @java.lang.Override mergeFrom(com.google.protobuf.Message other)920 public Builder mergeFrom(com.google.protobuf.Message other) { 921 if (other instanceof com.google.privacy.dlp.v2.ContentLocation) { 922 return mergeFrom((com.google.privacy.dlp.v2.ContentLocation) other); 923 } else { 924 super.mergeFrom(other); 925 return this; 926 } 927 } 928 mergeFrom(com.google.privacy.dlp.v2.ContentLocation other)929 public Builder mergeFrom(com.google.privacy.dlp.v2.ContentLocation other) { 930 if (other == com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance()) return this; 931 if (!other.getContainerName().isEmpty()) { 932 containerName_ = other.containerName_; 933 bitField0_ |= 0x00000001; 934 onChanged(); 935 } 936 if (other.hasContainerTimestamp()) { 937 mergeContainerTimestamp(other.getContainerTimestamp()); 938 } 939 if (!other.getContainerVersion().isEmpty()) { 940 containerVersion_ = other.containerVersion_; 941 bitField0_ |= 0x00000040; 942 onChanged(); 943 } 944 switch (other.getLocationCase()) { 945 case RECORD_LOCATION: 946 { 947 mergeRecordLocation(other.getRecordLocation()); 948 break; 949 } 950 case IMAGE_LOCATION: 951 { 952 mergeImageLocation(other.getImageLocation()); 953 break; 954 } 955 case DOCUMENT_LOCATION: 956 { 957 mergeDocumentLocation(other.getDocumentLocation()); 958 break; 959 } 960 case METADATA_LOCATION: 961 { 962 mergeMetadataLocation(other.getMetadataLocation()); 963 break; 964 } 965 case LOCATION_NOT_SET: 966 { 967 break; 968 } 969 } 970 this.mergeUnknownFields(other.getUnknownFields()); 971 onChanged(); 972 return this; 973 } 974 975 @java.lang.Override isInitialized()976 public final boolean isInitialized() { 977 return true; 978 } 979 980 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)981 public Builder mergeFrom( 982 com.google.protobuf.CodedInputStream input, 983 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 984 throws java.io.IOException { 985 if (extensionRegistry == null) { 986 throw new java.lang.NullPointerException(); 987 } 988 try { 989 boolean done = false; 990 while (!done) { 991 int tag = input.readTag(); 992 switch (tag) { 993 case 0: 994 done = true; 995 break; 996 case 10: 997 { 998 containerName_ = input.readStringRequireUtf8(); 999 bitField0_ |= 0x00000001; 1000 break; 1001 } // case 10 1002 case 18: 1003 { 1004 input.readMessage(getRecordLocationFieldBuilder().getBuilder(), extensionRegistry); 1005 locationCase_ = 2; 1006 break; 1007 } // case 18 1008 case 26: 1009 { 1010 input.readMessage(getImageLocationFieldBuilder().getBuilder(), extensionRegistry); 1011 locationCase_ = 3; 1012 break; 1013 } // case 26 1014 case 42: 1015 { 1016 input.readMessage( 1017 getDocumentLocationFieldBuilder().getBuilder(), extensionRegistry); 1018 locationCase_ = 5; 1019 break; 1020 } // case 42 1021 case 50: 1022 { 1023 input.readMessage( 1024 getContainerTimestampFieldBuilder().getBuilder(), extensionRegistry); 1025 bitField0_ |= 0x00000020; 1026 break; 1027 } // case 50 1028 case 58: 1029 { 1030 containerVersion_ = input.readStringRequireUtf8(); 1031 bitField0_ |= 0x00000040; 1032 break; 1033 } // case 58 1034 case 66: 1035 { 1036 input.readMessage( 1037 getMetadataLocationFieldBuilder().getBuilder(), extensionRegistry); 1038 locationCase_ = 8; 1039 break; 1040 } // case 66 1041 default: 1042 { 1043 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1044 done = true; // was an endgroup tag 1045 } 1046 break; 1047 } // default: 1048 } // switch (tag) 1049 } // while (!done) 1050 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1051 throw e.unwrapIOException(); 1052 } finally { 1053 onChanged(); 1054 } // finally 1055 return this; 1056 } 1057 1058 private int locationCase_ = 0; 1059 private java.lang.Object location_; 1060 getLocationCase()1061 public LocationCase getLocationCase() { 1062 return LocationCase.forNumber(locationCase_); 1063 } 1064 clearLocation()1065 public Builder clearLocation() { 1066 locationCase_ = 0; 1067 location_ = null; 1068 onChanged(); 1069 return this; 1070 } 1071 1072 private int bitField0_; 1073 1074 private java.lang.Object containerName_ = ""; 1075 /** 1076 * 1077 * 1078 * <pre> 1079 * Name of the container where the finding is located. 1080 * The top level name is the source file name or table name. Names of some 1081 * common storage containers are formatted as follows: 1082 * * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` 1083 * * Cloud Storage files: `gs://{bucket}/{path}` 1084 * * Datastore namespace: {namespace} 1085 * Nested names could be absent if the embedded object has no string 1086 * identifier (for example, an image contained within a document). 1087 * </pre> 1088 * 1089 * <code>string container_name = 1;</code> 1090 * 1091 * @return The containerName. 1092 */ getContainerName()1093 public java.lang.String getContainerName() { 1094 java.lang.Object ref = containerName_; 1095 if (!(ref instanceof java.lang.String)) { 1096 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1097 java.lang.String s = bs.toStringUtf8(); 1098 containerName_ = s; 1099 return s; 1100 } else { 1101 return (java.lang.String) ref; 1102 } 1103 } 1104 /** 1105 * 1106 * 1107 * <pre> 1108 * Name of the container where the finding is located. 1109 * The top level name is the source file name or table name. Names of some 1110 * common storage containers are formatted as follows: 1111 * * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` 1112 * * Cloud Storage files: `gs://{bucket}/{path}` 1113 * * Datastore namespace: {namespace} 1114 * Nested names could be absent if the embedded object has no string 1115 * identifier (for example, an image contained within a document). 1116 * </pre> 1117 * 1118 * <code>string container_name = 1;</code> 1119 * 1120 * @return The bytes for containerName. 1121 */ getContainerNameBytes()1122 public com.google.protobuf.ByteString getContainerNameBytes() { 1123 java.lang.Object ref = containerName_; 1124 if (ref instanceof String) { 1125 com.google.protobuf.ByteString b = 1126 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1127 containerName_ = b; 1128 return b; 1129 } else { 1130 return (com.google.protobuf.ByteString) ref; 1131 } 1132 } 1133 /** 1134 * 1135 * 1136 * <pre> 1137 * Name of the container where the finding is located. 1138 * The top level name is the source file name or table name. Names of some 1139 * common storage containers are formatted as follows: 1140 * * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` 1141 * * Cloud Storage files: `gs://{bucket}/{path}` 1142 * * Datastore namespace: {namespace} 1143 * Nested names could be absent if the embedded object has no string 1144 * identifier (for example, an image contained within a document). 1145 * </pre> 1146 * 1147 * <code>string container_name = 1;</code> 1148 * 1149 * @param value The containerName to set. 1150 * @return This builder for chaining. 1151 */ setContainerName(java.lang.String value)1152 public Builder setContainerName(java.lang.String value) { 1153 if (value == null) { 1154 throw new NullPointerException(); 1155 } 1156 containerName_ = value; 1157 bitField0_ |= 0x00000001; 1158 onChanged(); 1159 return this; 1160 } 1161 /** 1162 * 1163 * 1164 * <pre> 1165 * Name of the container where the finding is located. 1166 * The top level name is the source file name or table name. Names of some 1167 * common storage containers are formatted as follows: 1168 * * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` 1169 * * Cloud Storage files: `gs://{bucket}/{path}` 1170 * * Datastore namespace: {namespace} 1171 * Nested names could be absent if the embedded object has no string 1172 * identifier (for example, an image contained within a document). 1173 * </pre> 1174 * 1175 * <code>string container_name = 1;</code> 1176 * 1177 * @return This builder for chaining. 1178 */ clearContainerName()1179 public Builder clearContainerName() { 1180 containerName_ = getDefaultInstance().getContainerName(); 1181 bitField0_ = (bitField0_ & ~0x00000001); 1182 onChanged(); 1183 return this; 1184 } 1185 /** 1186 * 1187 * 1188 * <pre> 1189 * Name of the container where the finding is located. 1190 * The top level name is the source file name or table name. Names of some 1191 * common storage containers are formatted as follows: 1192 * * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` 1193 * * Cloud Storage files: `gs://{bucket}/{path}` 1194 * * Datastore namespace: {namespace} 1195 * Nested names could be absent if the embedded object has no string 1196 * identifier (for example, an image contained within a document). 1197 * </pre> 1198 * 1199 * <code>string container_name = 1;</code> 1200 * 1201 * @param value The bytes for containerName to set. 1202 * @return This builder for chaining. 1203 */ setContainerNameBytes(com.google.protobuf.ByteString value)1204 public Builder setContainerNameBytes(com.google.protobuf.ByteString value) { 1205 if (value == null) { 1206 throw new NullPointerException(); 1207 } 1208 checkByteStringIsUtf8(value); 1209 containerName_ = value; 1210 bitField0_ |= 0x00000001; 1211 onChanged(); 1212 return this; 1213 } 1214 1215 private com.google.protobuf.SingleFieldBuilderV3< 1216 com.google.privacy.dlp.v2.RecordLocation, 1217 com.google.privacy.dlp.v2.RecordLocation.Builder, 1218 com.google.privacy.dlp.v2.RecordLocationOrBuilder> 1219 recordLocationBuilder_; 1220 /** 1221 * 1222 * 1223 * <pre> 1224 * Location within a row or record of a database table. 1225 * </pre> 1226 * 1227 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 1228 * 1229 * @return Whether the recordLocation field is set. 1230 */ 1231 @java.lang.Override hasRecordLocation()1232 public boolean hasRecordLocation() { 1233 return locationCase_ == 2; 1234 } 1235 /** 1236 * 1237 * 1238 * <pre> 1239 * Location within a row or record of a database table. 1240 * </pre> 1241 * 1242 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 1243 * 1244 * @return The recordLocation. 1245 */ 1246 @java.lang.Override getRecordLocation()1247 public com.google.privacy.dlp.v2.RecordLocation getRecordLocation() { 1248 if (recordLocationBuilder_ == null) { 1249 if (locationCase_ == 2) { 1250 return (com.google.privacy.dlp.v2.RecordLocation) location_; 1251 } 1252 return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); 1253 } else { 1254 if (locationCase_ == 2) { 1255 return recordLocationBuilder_.getMessage(); 1256 } 1257 return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); 1258 } 1259 } 1260 /** 1261 * 1262 * 1263 * <pre> 1264 * Location within a row or record of a database table. 1265 * </pre> 1266 * 1267 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 1268 */ setRecordLocation(com.google.privacy.dlp.v2.RecordLocation value)1269 public Builder setRecordLocation(com.google.privacy.dlp.v2.RecordLocation value) { 1270 if (recordLocationBuilder_ == null) { 1271 if (value == null) { 1272 throw new NullPointerException(); 1273 } 1274 location_ = value; 1275 onChanged(); 1276 } else { 1277 recordLocationBuilder_.setMessage(value); 1278 } 1279 locationCase_ = 2; 1280 return this; 1281 } 1282 /** 1283 * 1284 * 1285 * <pre> 1286 * Location within a row or record of a database table. 1287 * </pre> 1288 * 1289 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 1290 */ setRecordLocation( com.google.privacy.dlp.v2.RecordLocation.Builder builderForValue)1291 public Builder setRecordLocation( 1292 com.google.privacy.dlp.v2.RecordLocation.Builder builderForValue) { 1293 if (recordLocationBuilder_ == null) { 1294 location_ = builderForValue.build(); 1295 onChanged(); 1296 } else { 1297 recordLocationBuilder_.setMessage(builderForValue.build()); 1298 } 1299 locationCase_ = 2; 1300 return this; 1301 } 1302 /** 1303 * 1304 * 1305 * <pre> 1306 * Location within a row or record of a database table. 1307 * </pre> 1308 * 1309 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 1310 */ mergeRecordLocation(com.google.privacy.dlp.v2.RecordLocation value)1311 public Builder mergeRecordLocation(com.google.privacy.dlp.v2.RecordLocation value) { 1312 if (recordLocationBuilder_ == null) { 1313 if (locationCase_ == 2 1314 && location_ != com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance()) { 1315 location_ = 1316 com.google.privacy.dlp.v2.RecordLocation.newBuilder( 1317 (com.google.privacy.dlp.v2.RecordLocation) location_) 1318 .mergeFrom(value) 1319 .buildPartial(); 1320 } else { 1321 location_ = value; 1322 } 1323 onChanged(); 1324 } else { 1325 if (locationCase_ == 2) { 1326 recordLocationBuilder_.mergeFrom(value); 1327 } else { 1328 recordLocationBuilder_.setMessage(value); 1329 } 1330 } 1331 locationCase_ = 2; 1332 return this; 1333 } 1334 /** 1335 * 1336 * 1337 * <pre> 1338 * Location within a row or record of a database table. 1339 * </pre> 1340 * 1341 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 1342 */ clearRecordLocation()1343 public Builder clearRecordLocation() { 1344 if (recordLocationBuilder_ == null) { 1345 if (locationCase_ == 2) { 1346 locationCase_ = 0; 1347 location_ = null; 1348 onChanged(); 1349 } 1350 } else { 1351 if (locationCase_ == 2) { 1352 locationCase_ = 0; 1353 location_ = null; 1354 } 1355 recordLocationBuilder_.clear(); 1356 } 1357 return this; 1358 } 1359 /** 1360 * 1361 * 1362 * <pre> 1363 * Location within a row or record of a database table. 1364 * </pre> 1365 * 1366 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 1367 */ getRecordLocationBuilder()1368 public com.google.privacy.dlp.v2.RecordLocation.Builder getRecordLocationBuilder() { 1369 return getRecordLocationFieldBuilder().getBuilder(); 1370 } 1371 /** 1372 * 1373 * 1374 * <pre> 1375 * Location within a row or record of a database table. 1376 * </pre> 1377 * 1378 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 1379 */ 1380 @java.lang.Override getRecordLocationOrBuilder()1381 public com.google.privacy.dlp.v2.RecordLocationOrBuilder getRecordLocationOrBuilder() { 1382 if ((locationCase_ == 2) && (recordLocationBuilder_ != null)) { 1383 return recordLocationBuilder_.getMessageOrBuilder(); 1384 } else { 1385 if (locationCase_ == 2) { 1386 return (com.google.privacy.dlp.v2.RecordLocation) location_; 1387 } 1388 return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); 1389 } 1390 } 1391 /** 1392 * 1393 * 1394 * <pre> 1395 * Location within a row or record of a database table. 1396 * </pre> 1397 * 1398 * <code>.google.privacy.dlp.v2.RecordLocation record_location = 2;</code> 1399 */ 1400 private com.google.protobuf.SingleFieldBuilderV3< 1401 com.google.privacy.dlp.v2.RecordLocation, 1402 com.google.privacy.dlp.v2.RecordLocation.Builder, 1403 com.google.privacy.dlp.v2.RecordLocationOrBuilder> getRecordLocationFieldBuilder()1404 getRecordLocationFieldBuilder() { 1405 if (recordLocationBuilder_ == null) { 1406 if (!(locationCase_ == 2)) { 1407 location_ = com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); 1408 } 1409 recordLocationBuilder_ = 1410 new com.google.protobuf.SingleFieldBuilderV3< 1411 com.google.privacy.dlp.v2.RecordLocation, 1412 com.google.privacy.dlp.v2.RecordLocation.Builder, 1413 com.google.privacy.dlp.v2.RecordLocationOrBuilder>( 1414 (com.google.privacy.dlp.v2.RecordLocation) location_, 1415 getParentForChildren(), 1416 isClean()); 1417 location_ = null; 1418 } 1419 locationCase_ = 2; 1420 onChanged(); 1421 return recordLocationBuilder_; 1422 } 1423 1424 private com.google.protobuf.SingleFieldBuilderV3< 1425 com.google.privacy.dlp.v2.ImageLocation, 1426 com.google.privacy.dlp.v2.ImageLocation.Builder, 1427 com.google.privacy.dlp.v2.ImageLocationOrBuilder> 1428 imageLocationBuilder_; 1429 /** 1430 * 1431 * 1432 * <pre> 1433 * Location within an image's pixels. 1434 * </pre> 1435 * 1436 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 1437 * 1438 * @return Whether the imageLocation field is set. 1439 */ 1440 @java.lang.Override hasImageLocation()1441 public boolean hasImageLocation() { 1442 return locationCase_ == 3; 1443 } 1444 /** 1445 * 1446 * 1447 * <pre> 1448 * Location within an image's pixels. 1449 * </pre> 1450 * 1451 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 1452 * 1453 * @return The imageLocation. 1454 */ 1455 @java.lang.Override getImageLocation()1456 public com.google.privacy.dlp.v2.ImageLocation getImageLocation() { 1457 if (imageLocationBuilder_ == null) { 1458 if (locationCase_ == 3) { 1459 return (com.google.privacy.dlp.v2.ImageLocation) location_; 1460 } 1461 return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); 1462 } else { 1463 if (locationCase_ == 3) { 1464 return imageLocationBuilder_.getMessage(); 1465 } 1466 return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); 1467 } 1468 } 1469 /** 1470 * 1471 * 1472 * <pre> 1473 * Location within an image's pixels. 1474 * </pre> 1475 * 1476 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 1477 */ setImageLocation(com.google.privacy.dlp.v2.ImageLocation value)1478 public Builder setImageLocation(com.google.privacy.dlp.v2.ImageLocation value) { 1479 if (imageLocationBuilder_ == null) { 1480 if (value == null) { 1481 throw new NullPointerException(); 1482 } 1483 location_ = value; 1484 onChanged(); 1485 } else { 1486 imageLocationBuilder_.setMessage(value); 1487 } 1488 locationCase_ = 3; 1489 return this; 1490 } 1491 /** 1492 * 1493 * 1494 * <pre> 1495 * Location within an image's pixels. 1496 * </pre> 1497 * 1498 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 1499 */ setImageLocation( com.google.privacy.dlp.v2.ImageLocation.Builder builderForValue)1500 public Builder setImageLocation( 1501 com.google.privacy.dlp.v2.ImageLocation.Builder builderForValue) { 1502 if (imageLocationBuilder_ == null) { 1503 location_ = builderForValue.build(); 1504 onChanged(); 1505 } else { 1506 imageLocationBuilder_.setMessage(builderForValue.build()); 1507 } 1508 locationCase_ = 3; 1509 return this; 1510 } 1511 /** 1512 * 1513 * 1514 * <pre> 1515 * Location within an image's pixels. 1516 * </pre> 1517 * 1518 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 1519 */ mergeImageLocation(com.google.privacy.dlp.v2.ImageLocation value)1520 public Builder mergeImageLocation(com.google.privacy.dlp.v2.ImageLocation value) { 1521 if (imageLocationBuilder_ == null) { 1522 if (locationCase_ == 3 1523 && location_ != com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance()) { 1524 location_ = 1525 com.google.privacy.dlp.v2.ImageLocation.newBuilder( 1526 (com.google.privacy.dlp.v2.ImageLocation) location_) 1527 .mergeFrom(value) 1528 .buildPartial(); 1529 } else { 1530 location_ = value; 1531 } 1532 onChanged(); 1533 } else { 1534 if (locationCase_ == 3) { 1535 imageLocationBuilder_.mergeFrom(value); 1536 } else { 1537 imageLocationBuilder_.setMessage(value); 1538 } 1539 } 1540 locationCase_ = 3; 1541 return this; 1542 } 1543 /** 1544 * 1545 * 1546 * <pre> 1547 * Location within an image's pixels. 1548 * </pre> 1549 * 1550 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 1551 */ clearImageLocation()1552 public Builder clearImageLocation() { 1553 if (imageLocationBuilder_ == null) { 1554 if (locationCase_ == 3) { 1555 locationCase_ = 0; 1556 location_ = null; 1557 onChanged(); 1558 } 1559 } else { 1560 if (locationCase_ == 3) { 1561 locationCase_ = 0; 1562 location_ = null; 1563 } 1564 imageLocationBuilder_.clear(); 1565 } 1566 return this; 1567 } 1568 /** 1569 * 1570 * 1571 * <pre> 1572 * Location within an image's pixels. 1573 * </pre> 1574 * 1575 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 1576 */ getImageLocationBuilder()1577 public com.google.privacy.dlp.v2.ImageLocation.Builder getImageLocationBuilder() { 1578 return getImageLocationFieldBuilder().getBuilder(); 1579 } 1580 /** 1581 * 1582 * 1583 * <pre> 1584 * Location within an image's pixels. 1585 * </pre> 1586 * 1587 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 1588 */ 1589 @java.lang.Override getImageLocationOrBuilder()1590 public com.google.privacy.dlp.v2.ImageLocationOrBuilder getImageLocationOrBuilder() { 1591 if ((locationCase_ == 3) && (imageLocationBuilder_ != null)) { 1592 return imageLocationBuilder_.getMessageOrBuilder(); 1593 } else { 1594 if (locationCase_ == 3) { 1595 return (com.google.privacy.dlp.v2.ImageLocation) location_; 1596 } 1597 return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); 1598 } 1599 } 1600 /** 1601 * 1602 * 1603 * <pre> 1604 * Location within an image's pixels. 1605 * </pre> 1606 * 1607 * <code>.google.privacy.dlp.v2.ImageLocation image_location = 3;</code> 1608 */ 1609 private com.google.protobuf.SingleFieldBuilderV3< 1610 com.google.privacy.dlp.v2.ImageLocation, 1611 com.google.privacy.dlp.v2.ImageLocation.Builder, 1612 com.google.privacy.dlp.v2.ImageLocationOrBuilder> getImageLocationFieldBuilder()1613 getImageLocationFieldBuilder() { 1614 if (imageLocationBuilder_ == null) { 1615 if (!(locationCase_ == 3)) { 1616 location_ = com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); 1617 } 1618 imageLocationBuilder_ = 1619 new com.google.protobuf.SingleFieldBuilderV3< 1620 com.google.privacy.dlp.v2.ImageLocation, 1621 com.google.privacy.dlp.v2.ImageLocation.Builder, 1622 com.google.privacy.dlp.v2.ImageLocationOrBuilder>( 1623 (com.google.privacy.dlp.v2.ImageLocation) location_, 1624 getParentForChildren(), 1625 isClean()); 1626 location_ = null; 1627 } 1628 locationCase_ = 3; 1629 onChanged(); 1630 return imageLocationBuilder_; 1631 } 1632 1633 private com.google.protobuf.SingleFieldBuilderV3< 1634 com.google.privacy.dlp.v2.DocumentLocation, 1635 com.google.privacy.dlp.v2.DocumentLocation.Builder, 1636 com.google.privacy.dlp.v2.DocumentLocationOrBuilder> 1637 documentLocationBuilder_; 1638 /** 1639 * 1640 * 1641 * <pre> 1642 * Location data for document files. 1643 * </pre> 1644 * 1645 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 1646 * 1647 * @return Whether the documentLocation field is set. 1648 */ 1649 @java.lang.Override hasDocumentLocation()1650 public boolean hasDocumentLocation() { 1651 return locationCase_ == 5; 1652 } 1653 /** 1654 * 1655 * 1656 * <pre> 1657 * Location data for document files. 1658 * </pre> 1659 * 1660 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 1661 * 1662 * @return The documentLocation. 1663 */ 1664 @java.lang.Override getDocumentLocation()1665 public com.google.privacy.dlp.v2.DocumentLocation getDocumentLocation() { 1666 if (documentLocationBuilder_ == null) { 1667 if (locationCase_ == 5) { 1668 return (com.google.privacy.dlp.v2.DocumentLocation) location_; 1669 } 1670 return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); 1671 } else { 1672 if (locationCase_ == 5) { 1673 return documentLocationBuilder_.getMessage(); 1674 } 1675 return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); 1676 } 1677 } 1678 /** 1679 * 1680 * 1681 * <pre> 1682 * Location data for document files. 1683 * </pre> 1684 * 1685 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 1686 */ setDocumentLocation(com.google.privacy.dlp.v2.DocumentLocation value)1687 public Builder setDocumentLocation(com.google.privacy.dlp.v2.DocumentLocation value) { 1688 if (documentLocationBuilder_ == null) { 1689 if (value == null) { 1690 throw new NullPointerException(); 1691 } 1692 location_ = value; 1693 onChanged(); 1694 } else { 1695 documentLocationBuilder_.setMessage(value); 1696 } 1697 locationCase_ = 5; 1698 return this; 1699 } 1700 /** 1701 * 1702 * 1703 * <pre> 1704 * Location data for document files. 1705 * </pre> 1706 * 1707 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 1708 */ setDocumentLocation( com.google.privacy.dlp.v2.DocumentLocation.Builder builderForValue)1709 public Builder setDocumentLocation( 1710 com.google.privacy.dlp.v2.DocumentLocation.Builder builderForValue) { 1711 if (documentLocationBuilder_ == null) { 1712 location_ = builderForValue.build(); 1713 onChanged(); 1714 } else { 1715 documentLocationBuilder_.setMessage(builderForValue.build()); 1716 } 1717 locationCase_ = 5; 1718 return this; 1719 } 1720 /** 1721 * 1722 * 1723 * <pre> 1724 * Location data for document files. 1725 * </pre> 1726 * 1727 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 1728 */ mergeDocumentLocation(com.google.privacy.dlp.v2.DocumentLocation value)1729 public Builder mergeDocumentLocation(com.google.privacy.dlp.v2.DocumentLocation value) { 1730 if (documentLocationBuilder_ == null) { 1731 if (locationCase_ == 5 1732 && location_ != com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance()) { 1733 location_ = 1734 com.google.privacy.dlp.v2.DocumentLocation.newBuilder( 1735 (com.google.privacy.dlp.v2.DocumentLocation) location_) 1736 .mergeFrom(value) 1737 .buildPartial(); 1738 } else { 1739 location_ = value; 1740 } 1741 onChanged(); 1742 } else { 1743 if (locationCase_ == 5) { 1744 documentLocationBuilder_.mergeFrom(value); 1745 } else { 1746 documentLocationBuilder_.setMessage(value); 1747 } 1748 } 1749 locationCase_ = 5; 1750 return this; 1751 } 1752 /** 1753 * 1754 * 1755 * <pre> 1756 * Location data for document files. 1757 * </pre> 1758 * 1759 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 1760 */ clearDocumentLocation()1761 public Builder clearDocumentLocation() { 1762 if (documentLocationBuilder_ == null) { 1763 if (locationCase_ == 5) { 1764 locationCase_ = 0; 1765 location_ = null; 1766 onChanged(); 1767 } 1768 } else { 1769 if (locationCase_ == 5) { 1770 locationCase_ = 0; 1771 location_ = null; 1772 } 1773 documentLocationBuilder_.clear(); 1774 } 1775 return this; 1776 } 1777 /** 1778 * 1779 * 1780 * <pre> 1781 * Location data for document files. 1782 * </pre> 1783 * 1784 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 1785 */ getDocumentLocationBuilder()1786 public com.google.privacy.dlp.v2.DocumentLocation.Builder getDocumentLocationBuilder() { 1787 return getDocumentLocationFieldBuilder().getBuilder(); 1788 } 1789 /** 1790 * 1791 * 1792 * <pre> 1793 * Location data for document files. 1794 * </pre> 1795 * 1796 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 1797 */ 1798 @java.lang.Override getDocumentLocationOrBuilder()1799 public com.google.privacy.dlp.v2.DocumentLocationOrBuilder getDocumentLocationOrBuilder() { 1800 if ((locationCase_ == 5) && (documentLocationBuilder_ != null)) { 1801 return documentLocationBuilder_.getMessageOrBuilder(); 1802 } else { 1803 if (locationCase_ == 5) { 1804 return (com.google.privacy.dlp.v2.DocumentLocation) location_; 1805 } 1806 return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); 1807 } 1808 } 1809 /** 1810 * 1811 * 1812 * <pre> 1813 * Location data for document files. 1814 * </pre> 1815 * 1816 * <code>.google.privacy.dlp.v2.DocumentLocation document_location = 5;</code> 1817 */ 1818 private com.google.protobuf.SingleFieldBuilderV3< 1819 com.google.privacy.dlp.v2.DocumentLocation, 1820 com.google.privacy.dlp.v2.DocumentLocation.Builder, 1821 com.google.privacy.dlp.v2.DocumentLocationOrBuilder> getDocumentLocationFieldBuilder()1822 getDocumentLocationFieldBuilder() { 1823 if (documentLocationBuilder_ == null) { 1824 if (!(locationCase_ == 5)) { 1825 location_ = com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); 1826 } 1827 documentLocationBuilder_ = 1828 new com.google.protobuf.SingleFieldBuilderV3< 1829 com.google.privacy.dlp.v2.DocumentLocation, 1830 com.google.privacy.dlp.v2.DocumentLocation.Builder, 1831 com.google.privacy.dlp.v2.DocumentLocationOrBuilder>( 1832 (com.google.privacy.dlp.v2.DocumentLocation) location_, 1833 getParentForChildren(), 1834 isClean()); 1835 location_ = null; 1836 } 1837 locationCase_ = 5; 1838 onChanged(); 1839 return documentLocationBuilder_; 1840 } 1841 1842 private com.google.protobuf.SingleFieldBuilderV3< 1843 com.google.privacy.dlp.v2.MetadataLocation, 1844 com.google.privacy.dlp.v2.MetadataLocation.Builder, 1845 com.google.privacy.dlp.v2.MetadataLocationOrBuilder> 1846 metadataLocationBuilder_; 1847 /** 1848 * 1849 * 1850 * <pre> 1851 * Location within the metadata for inspected content. 1852 * </pre> 1853 * 1854 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 1855 * 1856 * @return Whether the metadataLocation field is set. 1857 */ 1858 @java.lang.Override hasMetadataLocation()1859 public boolean hasMetadataLocation() { 1860 return locationCase_ == 8; 1861 } 1862 /** 1863 * 1864 * 1865 * <pre> 1866 * Location within the metadata for inspected content. 1867 * </pre> 1868 * 1869 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 1870 * 1871 * @return The metadataLocation. 1872 */ 1873 @java.lang.Override getMetadataLocation()1874 public com.google.privacy.dlp.v2.MetadataLocation getMetadataLocation() { 1875 if (metadataLocationBuilder_ == null) { 1876 if (locationCase_ == 8) { 1877 return (com.google.privacy.dlp.v2.MetadataLocation) location_; 1878 } 1879 return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); 1880 } else { 1881 if (locationCase_ == 8) { 1882 return metadataLocationBuilder_.getMessage(); 1883 } 1884 return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); 1885 } 1886 } 1887 /** 1888 * 1889 * 1890 * <pre> 1891 * Location within the metadata for inspected content. 1892 * </pre> 1893 * 1894 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 1895 */ setMetadataLocation(com.google.privacy.dlp.v2.MetadataLocation value)1896 public Builder setMetadataLocation(com.google.privacy.dlp.v2.MetadataLocation value) { 1897 if (metadataLocationBuilder_ == null) { 1898 if (value == null) { 1899 throw new NullPointerException(); 1900 } 1901 location_ = value; 1902 onChanged(); 1903 } else { 1904 metadataLocationBuilder_.setMessage(value); 1905 } 1906 locationCase_ = 8; 1907 return this; 1908 } 1909 /** 1910 * 1911 * 1912 * <pre> 1913 * Location within the metadata for inspected content. 1914 * </pre> 1915 * 1916 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 1917 */ setMetadataLocation( com.google.privacy.dlp.v2.MetadataLocation.Builder builderForValue)1918 public Builder setMetadataLocation( 1919 com.google.privacy.dlp.v2.MetadataLocation.Builder builderForValue) { 1920 if (metadataLocationBuilder_ == null) { 1921 location_ = builderForValue.build(); 1922 onChanged(); 1923 } else { 1924 metadataLocationBuilder_.setMessage(builderForValue.build()); 1925 } 1926 locationCase_ = 8; 1927 return this; 1928 } 1929 /** 1930 * 1931 * 1932 * <pre> 1933 * Location within the metadata for inspected content. 1934 * </pre> 1935 * 1936 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 1937 */ mergeMetadataLocation(com.google.privacy.dlp.v2.MetadataLocation value)1938 public Builder mergeMetadataLocation(com.google.privacy.dlp.v2.MetadataLocation value) { 1939 if (metadataLocationBuilder_ == null) { 1940 if (locationCase_ == 8 1941 && location_ != com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance()) { 1942 location_ = 1943 com.google.privacy.dlp.v2.MetadataLocation.newBuilder( 1944 (com.google.privacy.dlp.v2.MetadataLocation) location_) 1945 .mergeFrom(value) 1946 .buildPartial(); 1947 } else { 1948 location_ = value; 1949 } 1950 onChanged(); 1951 } else { 1952 if (locationCase_ == 8) { 1953 metadataLocationBuilder_.mergeFrom(value); 1954 } else { 1955 metadataLocationBuilder_.setMessage(value); 1956 } 1957 } 1958 locationCase_ = 8; 1959 return this; 1960 } 1961 /** 1962 * 1963 * 1964 * <pre> 1965 * Location within the metadata for inspected content. 1966 * </pre> 1967 * 1968 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 1969 */ clearMetadataLocation()1970 public Builder clearMetadataLocation() { 1971 if (metadataLocationBuilder_ == null) { 1972 if (locationCase_ == 8) { 1973 locationCase_ = 0; 1974 location_ = null; 1975 onChanged(); 1976 } 1977 } else { 1978 if (locationCase_ == 8) { 1979 locationCase_ = 0; 1980 location_ = null; 1981 } 1982 metadataLocationBuilder_.clear(); 1983 } 1984 return this; 1985 } 1986 /** 1987 * 1988 * 1989 * <pre> 1990 * Location within the metadata for inspected content. 1991 * </pre> 1992 * 1993 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 1994 */ getMetadataLocationBuilder()1995 public com.google.privacy.dlp.v2.MetadataLocation.Builder getMetadataLocationBuilder() { 1996 return getMetadataLocationFieldBuilder().getBuilder(); 1997 } 1998 /** 1999 * 2000 * 2001 * <pre> 2002 * Location within the metadata for inspected content. 2003 * </pre> 2004 * 2005 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 2006 */ 2007 @java.lang.Override getMetadataLocationOrBuilder()2008 public com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOrBuilder() { 2009 if ((locationCase_ == 8) && (metadataLocationBuilder_ != null)) { 2010 return metadataLocationBuilder_.getMessageOrBuilder(); 2011 } else { 2012 if (locationCase_ == 8) { 2013 return (com.google.privacy.dlp.v2.MetadataLocation) location_; 2014 } 2015 return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); 2016 } 2017 } 2018 /** 2019 * 2020 * 2021 * <pre> 2022 * Location within the metadata for inspected content. 2023 * </pre> 2024 * 2025 * <code>.google.privacy.dlp.v2.MetadataLocation metadata_location = 8;</code> 2026 */ 2027 private com.google.protobuf.SingleFieldBuilderV3< 2028 com.google.privacy.dlp.v2.MetadataLocation, 2029 com.google.privacy.dlp.v2.MetadataLocation.Builder, 2030 com.google.privacy.dlp.v2.MetadataLocationOrBuilder> getMetadataLocationFieldBuilder()2031 getMetadataLocationFieldBuilder() { 2032 if (metadataLocationBuilder_ == null) { 2033 if (!(locationCase_ == 8)) { 2034 location_ = com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); 2035 } 2036 metadataLocationBuilder_ = 2037 new com.google.protobuf.SingleFieldBuilderV3< 2038 com.google.privacy.dlp.v2.MetadataLocation, 2039 com.google.privacy.dlp.v2.MetadataLocation.Builder, 2040 com.google.privacy.dlp.v2.MetadataLocationOrBuilder>( 2041 (com.google.privacy.dlp.v2.MetadataLocation) location_, 2042 getParentForChildren(), 2043 isClean()); 2044 location_ = null; 2045 } 2046 locationCase_ = 8; 2047 onChanged(); 2048 return metadataLocationBuilder_; 2049 } 2050 2051 private com.google.protobuf.Timestamp containerTimestamp_; 2052 private com.google.protobuf.SingleFieldBuilderV3< 2053 com.google.protobuf.Timestamp, 2054 com.google.protobuf.Timestamp.Builder, 2055 com.google.protobuf.TimestampOrBuilder> 2056 containerTimestampBuilder_; 2057 /** 2058 * 2059 * 2060 * <pre> 2061 * Finding container modification timestamp, if applicable. For Cloud Storage, 2062 * this field contains the last file modification timestamp. For a BigQuery 2063 * table, this field contains the last_modified_time property. For Datastore, 2064 * this field isn't populated. 2065 * </pre> 2066 * 2067 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 2068 * 2069 * @return Whether the containerTimestamp field is set. 2070 */ hasContainerTimestamp()2071 public boolean hasContainerTimestamp() { 2072 return ((bitField0_ & 0x00000020) != 0); 2073 } 2074 /** 2075 * 2076 * 2077 * <pre> 2078 * Finding container modification timestamp, if applicable. For Cloud Storage, 2079 * this field contains the last file modification timestamp. For a BigQuery 2080 * table, this field contains the last_modified_time property. For Datastore, 2081 * this field isn't populated. 2082 * </pre> 2083 * 2084 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 2085 * 2086 * @return The containerTimestamp. 2087 */ getContainerTimestamp()2088 public com.google.protobuf.Timestamp getContainerTimestamp() { 2089 if (containerTimestampBuilder_ == null) { 2090 return containerTimestamp_ == null 2091 ? com.google.protobuf.Timestamp.getDefaultInstance() 2092 : containerTimestamp_; 2093 } else { 2094 return containerTimestampBuilder_.getMessage(); 2095 } 2096 } 2097 /** 2098 * 2099 * 2100 * <pre> 2101 * Finding container modification timestamp, if applicable. For Cloud Storage, 2102 * this field contains the last file modification timestamp. For a BigQuery 2103 * table, this field contains the last_modified_time property. For Datastore, 2104 * this field isn't populated. 2105 * </pre> 2106 * 2107 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 2108 */ setContainerTimestamp(com.google.protobuf.Timestamp value)2109 public Builder setContainerTimestamp(com.google.protobuf.Timestamp value) { 2110 if (containerTimestampBuilder_ == null) { 2111 if (value == null) { 2112 throw new NullPointerException(); 2113 } 2114 containerTimestamp_ = value; 2115 } else { 2116 containerTimestampBuilder_.setMessage(value); 2117 } 2118 bitField0_ |= 0x00000020; 2119 onChanged(); 2120 return this; 2121 } 2122 /** 2123 * 2124 * 2125 * <pre> 2126 * Finding container modification timestamp, if applicable. For Cloud Storage, 2127 * this field contains the last file modification timestamp. For a BigQuery 2128 * table, this field contains the last_modified_time property. For Datastore, 2129 * this field isn't populated. 2130 * </pre> 2131 * 2132 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 2133 */ setContainerTimestamp(com.google.protobuf.Timestamp.Builder builderForValue)2134 public Builder setContainerTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { 2135 if (containerTimestampBuilder_ == null) { 2136 containerTimestamp_ = builderForValue.build(); 2137 } else { 2138 containerTimestampBuilder_.setMessage(builderForValue.build()); 2139 } 2140 bitField0_ |= 0x00000020; 2141 onChanged(); 2142 return this; 2143 } 2144 /** 2145 * 2146 * 2147 * <pre> 2148 * Finding container modification timestamp, if applicable. For Cloud Storage, 2149 * this field contains the last file modification timestamp. For a BigQuery 2150 * table, this field contains the last_modified_time property. For Datastore, 2151 * this field isn't populated. 2152 * </pre> 2153 * 2154 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 2155 */ mergeContainerTimestamp(com.google.protobuf.Timestamp value)2156 public Builder mergeContainerTimestamp(com.google.protobuf.Timestamp value) { 2157 if (containerTimestampBuilder_ == null) { 2158 if (((bitField0_ & 0x00000020) != 0) 2159 && containerTimestamp_ != null 2160 && containerTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 2161 getContainerTimestampBuilder().mergeFrom(value); 2162 } else { 2163 containerTimestamp_ = value; 2164 } 2165 } else { 2166 containerTimestampBuilder_.mergeFrom(value); 2167 } 2168 bitField0_ |= 0x00000020; 2169 onChanged(); 2170 return this; 2171 } 2172 /** 2173 * 2174 * 2175 * <pre> 2176 * Finding container modification timestamp, if applicable. For Cloud Storage, 2177 * this field contains the last file modification timestamp. For a BigQuery 2178 * table, this field contains the last_modified_time property. For Datastore, 2179 * this field isn't populated. 2180 * </pre> 2181 * 2182 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 2183 */ clearContainerTimestamp()2184 public Builder clearContainerTimestamp() { 2185 bitField0_ = (bitField0_ & ~0x00000020); 2186 containerTimestamp_ = null; 2187 if (containerTimestampBuilder_ != null) { 2188 containerTimestampBuilder_.dispose(); 2189 containerTimestampBuilder_ = null; 2190 } 2191 onChanged(); 2192 return this; 2193 } 2194 /** 2195 * 2196 * 2197 * <pre> 2198 * Finding container modification timestamp, if applicable. For Cloud Storage, 2199 * this field contains the last file modification timestamp. For a BigQuery 2200 * table, this field contains the last_modified_time property. For Datastore, 2201 * this field isn't populated. 2202 * </pre> 2203 * 2204 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 2205 */ getContainerTimestampBuilder()2206 public com.google.protobuf.Timestamp.Builder getContainerTimestampBuilder() { 2207 bitField0_ |= 0x00000020; 2208 onChanged(); 2209 return getContainerTimestampFieldBuilder().getBuilder(); 2210 } 2211 /** 2212 * 2213 * 2214 * <pre> 2215 * Finding container modification timestamp, if applicable. For Cloud Storage, 2216 * this field contains the last file modification timestamp. For a BigQuery 2217 * table, this field contains the last_modified_time property. For Datastore, 2218 * this field isn't populated. 2219 * </pre> 2220 * 2221 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 2222 */ getContainerTimestampOrBuilder()2223 public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { 2224 if (containerTimestampBuilder_ != null) { 2225 return containerTimestampBuilder_.getMessageOrBuilder(); 2226 } else { 2227 return containerTimestamp_ == null 2228 ? com.google.protobuf.Timestamp.getDefaultInstance() 2229 : containerTimestamp_; 2230 } 2231 } 2232 /** 2233 * 2234 * 2235 * <pre> 2236 * Finding container modification timestamp, if applicable. For Cloud Storage, 2237 * this field contains the last file modification timestamp. For a BigQuery 2238 * table, this field contains the last_modified_time property. For Datastore, 2239 * this field isn't populated. 2240 * </pre> 2241 * 2242 * <code>.google.protobuf.Timestamp container_timestamp = 6;</code> 2243 */ 2244 private com.google.protobuf.SingleFieldBuilderV3< 2245 com.google.protobuf.Timestamp, 2246 com.google.protobuf.Timestamp.Builder, 2247 com.google.protobuf.TimestampOrBuilder> getContainerTimestampFieldBuilder()2248 getContainerTimestampFieldBuilder() { 2249 if (containerTimestampBuilder_ == null) { 2250 containerTimestampBuilder_ = 2251 new com.google.protobuf.SingleFieldBuilderV3< 2252 com.google.protobuf.Timestamp, 2253 com.google.protobuf.Timestamp.Builder, 2254 com.google.protobuf.TimestampOrBuilder>( 2255 getContainerTimestamp(), getParentForChildren(), isClean()); 2256 containerTimestamp_ = null; 2257 } 2258 return containerTimestampBuilder_; 2259 } 2260 2261 private java.lang.Object containerVersion_ = ""; 2262 /** 2263 * 2264 * 2265 * <pre> 2266 * Finding container version, if available 2267 * ("generation" for Cloud Storage). 2268 * </pre> 2269 * 2270 * <code>string container_version = 7;</code> 2271 * 2272 * @return The containerVersion. 2273 */ getContainerVersion()2274 public java.lang.String getContainerVersion() { 2275 java.lang.Object ref = containerVersion_; 2276 if (!(ref instanceof java.lang.String)) { 2277 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2278 java.lang.String s = bs.toStringUtf8(); 2279 containerVersion_ = s; 2280 return s; 2281 } else { 2282 return (java.lang.String) ref; 2283 } 2284 } 2285 /** 2286 * 2287 * 2288 * <pre> 2289 * Finding container version, if available 2290 * ("generation" for Cloud Storage). 2291 * </pre> 2292 * 2293 * <code>string container_version = 7;</code> 2294 * 2295 * @return The bytes for containerVersion. 2296 */ getContainerVersionBytes()2297 public com.google.protobuf.ByteString getContainerVersionBytes() { 2298 java.lang.Object ref = containerVersion_; 2299 if (ref instanceof String) { 2300 com.google.protobuf.ByteString b = 2301 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2302 containerVersion_ = b; 2303 return b; 2304 } else { 2305 return (com.google.protobuf.ByteString) ref; 2306 } 2307 } 2308 /** 2309 * 2310 * 2311 * <pre> 2312 * Finding container version, if available 2313 * ("generation" for Cloud Storage). 2314 * </pre> 2315 * 2316 * <code>string container_version = 7;</code> 2317 * 2318 * @param value The containerVersion to set. 2319 * @return This builder for chaining. 2320 */ setContainerVersion(java.lang.String value)2321 public Builder setContainerVersion(java.lang.String value) { 2322 if (value == null) { 2323 throw new NullPointerException(); 2324 } 2325 containerVersion_ = value; 2326 bitField0_ |= 0x00000040; 2327 onChanged(); 2328 return this; 2329 } 2330 /** 2331 * 2332 * 2333 * <pre> 2334 * Finding container version, if available 2335 * ("generation" for Cloud Storage). 2336 * </pre> 2337 * 2338 * <code>string container_version = 7;</code> 2339 * 2340 * @return This builder for chaining. 2341 */ clearContainerVersion()2342 public Builder clearContainerVersion() { 2343 containerVersion_ = getDefaultInstance().getContainerVersion(); 2344 bitField0_ = (bitField0_ & ~0x00000040); 2345 onChanged(); 2346 return this; 2347 } 2348 /** 2349 * 2350 * 2351 * <pre> 2352 * Finding container version, if available 2353 * ("generation" for Cloud Storage). 2354 * </pre> 2355 * 2356 * <code>string container_version = 7;</code> 2357 * 2358 * @param value The bytes for containerVersion to set. 2359 * @return This builder for chaining. 2360 */ setContainerVersionBytes(com.google.protobuf.ByteString value)2361 public Builder setContainerVersionBytes(com.google.protobuf.ByteString value) { 2362 if (value == null) { 2363 throw new NullPointerException(); 2364 } 2365 checkByteStringIsUtf8(value); 2366 containerVersion_ = value; 2367 bitField0_ |= 0x00000040; 2368 onChanged(); 2369 return this; 2370 } 2371 2372 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2373 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2374 return super.setUnknownFields(unknownFields); 2375 } 2376 2377 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2378 public final Builder mergeUnknownFields( 2379 final com.google.protobuf.UnknownFieldSet unknownFields) { 2380 return super.mergeUnknownFields(unknownFields); 2381 } 2382 2383 // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ContentLocation) 2384 } 2385 2386 // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ContentLocation) 2387 private static final com.google.privacy.dlp.v2.ContentLocation DEFAULT_INSTANCE; 2388 2389 static { 2390 DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ContentLocation(); 2391 } 2392 getDefaultInstance()2393 public static com.google.privacy.dlp.v2.ContentLocation getDefaultInstance() { 2394 return DEFAULT_INSTANCE; 2395 } 2396 2397 private static final com.google.protobuf.Parser<ContentLocation> PARSER = 2398 new com.google.protobuf.AbstractParser<ContentLocation>() { 2399 @java.lang.Override 2400 public ContentLocation parsePartialFrom( 2401 com.google.protobuf.CodedInputStream input, 2402 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2403 throws com.google.protobuf.InvalidProtocolBufferException { 2404 Builder builder = newBuilder(); 2405 try { 2406 builder.mergeFrom(input, extensionRegistry); 2407 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2408 throw e.setUnfinishedMessage(builder.buildPartial()); 2409 } catch (com.google.protobuf.UninitializedMessageException e) { 2410 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2411 } catch (java.io.IOException e) { 2412 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2413 .setUnfinishedMessage(builder.buildPartial()); 2414 } 2415 return builder.buildPartial(); 2416 } 2417 }; 2418 parser()2419 public static com.google.protobuf.Parser<ContentLocation> parser() { 2420 return PARSER; 2421 } 2422 2423 @java.lang.Override getParserForType()2424 public com.google.protobuf.Parser<ContentLocation> getParserForType() { 2425 return PARSER; 2426 } 2427 2428 @java.lang.Override getDefaultInstanceForType()2429 public com.google.privacy.dlp.v2.ContentLocation getDefaultInstanceForType() { 2430 return DEFAULT_INSTANCE; 2431 } 2432 } 2433