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