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 * Configuration for a custom dictionary created from a data source of any size 26 * up to the maximum size defined in the 27 * [limits](https://cloud.google.com/dlp/limits) page. The artifacts of 28 * dictionary creation are stored in the specified Cloud Storage 29 * location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries 30 * that satisfy the size requirements. 31 * </pre> 32 * 33 * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryConfig} 34 */ 35 public final class LargeCustomDictionaryConfig extends com.google.protobuf.GeneratedMessageV3 36 implements 37 // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.LargeCustomDictionaryConfig) 38 LargeCustomDictionaryConfigOrBuilder { 39 private static final long serialVersionUID = 0L; 40 // Use LargeCustomDictionaryConfig.newBuilder() to construct. LargeCustomDictionaryConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)41 private LargeCustomDictionaryConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 42 super(builder); 43 } 44 LargeCustomDictionaryConfig()45 private LargeCustomDictionaryConfig() {} 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new LargeCustomDictionaryConfig(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.privacy.dlp.v2.DlpProto 60 .internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.privacy.dlp.v2.DlpProto 67 .internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.class, 70 com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder.class); 71 } 72 73 private int sourceCase_ = 0; 74 private java.lang.Object source_; 75 76 public enum SourceCase 77 implements 78 com.google.protobuf.Internal.EnumLite, 79 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 80 CLOUD_STORAGE_FILE_SET(2), 81 BIG_QUERY_FIELD(3), 82 SOURCE_NOT_SET(0); 83 private final int value; 84 SourceCase(int value)85 private SourceCase(int value) { 86 this.value = value; 87 } 88 /** 89 * @param value The number of the enum to look for. 90 * @return The enum associated with the given number. 91 * @deprecated Use {@link #forNumber(int)} instead. 92 */ 93 @java.lang.Deprecated valueOf(int value)94 public static SourceCase valueOf(int value) { 95 return forNumber(value); 96 } 97 forNumber(int value)98 public static SourceCase forNumber(int value) { 99 switch (value) { 100 case 2: 101 return CLOUD_STORAGE_FILE_SET; 102 case 3: 103 return BIG_QUERY_FIELD; 104 case 0: 105 return SOURCE_NOT_SET; 106 default: 107 return null; 108 } 109 } 110 getNumber()111 public int getNumber() { 112 return this.value; 113 } 114 }; 115 getSourceCase()116 public SourceCase getSourceCase() { 117 return SourceCase.forNumber(sourceCase_); 118 } 119 120 public static final int OUTPUT_PATH_FIELD_NUMBER = 1; 121 private com.google.privacy.dlp.v2.CloudStoragePath outputPath_; 122 /** 123 * 124 * 125 * <pre> 126 * Location to store dictionary artifacts in Cloud Storage. These files 127 * will only be accessible by project owners and the DLP API. If any of these 128 * artifacts are modified, the dictionary is considered invalid and can no 129 * longer be used. 130 * </pre> 131 * 132 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 133 * 134 * @return Whether the outputPath field is set. 135 */ 136 @java.lang.Override hasOutputPath()137 public boolean hasOutputPath() { 138 return outputPath_ != null; 139 } 140 /** 141 * 142 * 143 * <pre> 144 * Location to store dictionary artifacts in Cloud Storage. These files 145 * will only be accessible by project owners and the DLP API. If any of these 146 * artifacts are modified, the dictionary is considered invalid and can no 147 * longer be used. 148 * </pre> 149 * 150 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 151 * 152 * @return The outputPath. 153 */ 154 @java.lang.Override getOutputPath()155 public com.google.privacy.dlp.v2.CloudStoragePath getOutputPath() { 156 return outputPath_ == null 157 ? com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() 158 : outputPath_; 159 } 160 /** 161 * 162 * 163 * <pre> 164 * Location to store dictionary artifacts in Cloud Storage. These files 165 * will only be accessible by project owners and the DLP API. If any of these 166 * artifacts are modified, the dictionary is considered invalid and can no 167 * longer be used. 168 * </pre> 169 * 170 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 171 */ 172 @java.lang.Override getOutputPathOrBuilder()173 public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getOutputPathOrBuilder() { 174 return outputPath_ == null 175 ? com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() 176 : outputPath_; 177 } 178 179 public static final int CLOUD_STORAGE_FILE_SET_FIELD_NUMBER = 2; 180 /** 181 * 182 * 183 * <pre> 184 * Set of files containing newline-delimited lists of dictionary phrases. 185 * </pre> 186 * 187 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 188 * 189 * @return Whether the cloudStorageFileSet field is set. 190 */ 191 @java.lang.Override hasCloudStorageFileSet()192 public boolean hasCloudStorageFileSet() { 193 return sourceCase_ == 2; 194 } 195 /** 196 * 197 * 198 * <pre> 199 * Set of files containing newline-delimited lists of dictionary phrases. 200 * </pre> 201 * 202 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 203 * 204 * @return The cloudStorageFileSet. 205 */ 206 @java.lang.Override getCloudStorageFileSet()207 public com.google.privacy.dlp.v2.CloudStorageFileSet getCloudStorageFileSet() { 208 if (sourceCase_ == 2) { 209 return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; 210 } 211 return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); 212 } 213 /** 214 * 215 * 216 * <pre> 217 * Set of files containing newline-delimited lists of dictionary phrases. 218 * </pre> 219 * 220 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 221 */ 222 @java.lang.Override getCloudStorageFileSetOrBuilder()223 public com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder getCloudStorageFileSetOrBuilder() { 224 if (sourceCase_ == 2) { 225 return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; 226 } 227 return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); 228 } 229 230 public static final int BIG_QUERY_FIELD_FIELD_NUMBER = 3; 231 /** 232 * 233 * 234 * <pre> 235 * Field in a BigQuery table where each cell represents a dictionary phrase. 236 * </pre> 237 * 238 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 239 * 240 * @return Whether the bigQueryField field is set. 241 */ 242 @java.lang.Override hasBigQueryField()243 public boolean hasBigQueryField() { 244 return sourceCase_ == 3; 245 } 246 /** 247 * 248 * 249 * <pre> 250 * Field in a BigQuery table where each cell represents a dictionary phrase. 251 * </pre> 252 * 253 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 254 * 255 * @return The bigQueryField. 256 */ 257 @java.lang.Override getBigQueryField()258 public com.google.privacy.dlp.v2.BigQueryField getBigQueryField() { 259 if (sourceCase_ == 3) { 260 return (com.google.privacy.dlp.v2.BigQueryField) source_; 261 } 262 return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); 263 } 264 /** 265 * 266 * 267 * <pre> 268 * Field in a BigQuery table where each cell represents a dictionary phrase. 269 * </pre> 270 * 271 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 272 */ 273 @java.lang.Override getBigQueryFieldOrBuilder()274 public com.google.privacy.dlp.v2.BigQueryFieldOrBuilder getBigQueryFieldOrBuilder() { 275 if (sourceCase_ == 3) { 276 return (com.google.privacy.dlp.v2.BigQueryField) source_; 277 } 278 return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); 279 } 280 281 private byte memoizedIsInitialized = -1; 282 283 @java.lang.Override isInitialized()284 public final boolean isInitialized() { 285 byte isInitialized = memoizedIsInitialized; 286 if (isInitialized == 1) return true; 287 if (isInitialized == 0) return false; 288 289 memoizedIsInitialized = 1; 290 return true; 291 } 292 293 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)294 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 295 if (outputPath_ != null) { 296 output.writeMessage(1, getOutputPath()); 297 } 298 if (sourceCase_ == 2) { 299 output.writeMessage(2, (com.google.privacy.dlp.v2.CloudStorageFileSet) source_); 300 } 301 if (sourceCase_ == 3) { 302 output.writeMessage(3, (com.google.privacy.dlp.v2.BigQueryField) source_); 303 } 304 getUnknownFields().writeTo(output); 305 } 306 307 @java.lang.Override getSerializedSize()308 public int getSerializedSize() { 309 int size = memoizedSize; 310 if (size != -1) return size; 311 312 size = 0; 313 if (outputPath_ != null) { 314 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOutputPath()); 315 } 316 if (sourceCase_ == 2) { 317 size += 318 com.google.protobuf.CodedOutputStream.computeMessageSize( 319 2, (com.google.privacy.dlp.v2.CloudStorageFileSet) source_); 320 } 321 if (sourceCase_ == 3) { 322 size += 323 com.google.protobuf.CodedOutputStream.computeMessageSize( 324 3, (com.google.privacy.dlp.v2.BigQueryField) source_); 325 } 326 size += getUnknownFields().getSerializedSize(); 327 memoizedSize = size; 328 return size; 329 } 330 331 @java.lang.Override equals(final java.lang.Object obj)332 public boolean equals(final java.lang.Object obj) { 333 if (obj == this) { 334 return true; 335 } 336 if (!(obj instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryConfig)) { 337 return super.equals(obj); 338 } 339 com.google.privacy.dlp.v2.LargeCustomDictionaryConfig other = 340 (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) obj; 341 342 if (hasOutputPath() != other.hasOutputPath()) return false; 343 if (hasOutputPath()) { 344 if (!getOutputPath().equals(other.getOutputPath())) return false; 345 } 346 if (!getSourceCase().equals(other.getSourceCase())) return false; 347 switch (sourceCase_) { 348 case 2: 349 if (!getCloudStorageFileSet().equals(other.getCloudStorageFileSet())) return false; 350 break; 351 case 3: 352 if (!getBigQueryField().equals(other.getBigQueryField())) return false; 353 break; 354 case 0: 355 default: 356 } 357 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 358 return true; 359 } 360 361 @java.lang.Override hashCode()362 public int hashCode() { 363 if (memoizedHashCode != 0) { 364 return memoizedHashCode; 365 } 366 int hash = 41; 367 hash = (19 * hash) + getDescriptor().hashCode(); 368 if (hasOutputPath()) { 369 hash = (37 * hash) + OUTPUT_PATH_FIELD_NUMBER; 370 hash = (53 * hash) + getOutputPath().hashCode(); 371 } 372 switch (sourceCase_) { 373 case 2: 374 hash = (37 * hash) + CLOUD_STORAGE_FILE_SET_FIELD_NUMBER; 375 hash = (53 * hash) + getCloudStorageFileSet().hashCode(); 376 break; 377 case 3: 378 hash = (37 * hash) + BIG_QUERY_FIELD_FIELD_NUMBER; 379 hash = (53 * hash) + getBigQueryField().hashCode(); 380 break; 381 case 0: 382 default: 383 } 384 hash = (29 * hash) + getUnknownFields().hashCode(); 385 memoizedHashCode = hash; 386 return hash; 387 } 388 parseFrom( java.nio.ByteBuffer data)389 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( 390 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 391 return PARSER.parseFrom(data); 392 } 393 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)394 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( 395 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 396 throws com.google.protobuf.InvalidProtocolBufferException { 397 return PARSER.parseFrom(data, extensionRegistry); 398 } 399 parseFrom( com.google.protobuf.ByteString data)400 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( 401 com.google.protobuf.ByteString data) 402 throws com.google.protobuf.InvalidProtocolBufferException { 403 return PARSER.parseFrom(data); 404 } 405 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)406 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( 407 com.google.protobuf.ByteString data, 408 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 409 throws com.google.protobuf.InvalidProtocolBufferException { 410 return PARSER.parseFrom(data, extensionRegistry); 411 } 412 parseFrom(byte[] data)413 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom(byte[] data) 414 throws com.google.protobuf.InvalidProtocolBufferException { 415 return PARSER.parseFrom(data); 416 } 417 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)418 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( 419 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 420 throws com.google.protobuf.InvalidProtocolBufferException { 421 return PARSER.parseFrom(data, extensionRegistry); 422 } 423 parseFrom( java.io.InputStream input)424 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( 425 java.io.InputStream input) throws java.io.IOException { 426 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 427 } 428 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)429 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( 430 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 431 throws java.io.IOException { 432 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 433 PARSER, input, extensionRegistry); 434 } 435 parseDelimitedFrom( java.io.InputStream input)436 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseDelimitedFrom( 437 java.io.InputStream input) throws java.io.IOException { 438 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 439 } 440 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)441 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseDelimitedFrom( 442 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 443 throws java.io.IOException { 444 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 445 PARSER, input, extensionRegistry); 446 } 447 parseFrom( com.google.protobuf.CodedInputStream input)448 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( 449 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 450 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 451 } 452 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)453 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( 454 com.google.protobuf.CodedInputStream input, 455 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 456 throws java.io.IOException { 457 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 458 PARSER, input, extensionRegistry); 459 } 460 461 @java.lang.Override newBuilderForType()462 public Builder newBuilderForType() { 463 return newBuilder(); 464 } 465 newBuilder()466 public static Builder newBuilder() { 467 return DEFAULT_INSTANCE.toBuilder(); 468 } 469 newBuilder( com.google.privacy.dlp.v2.LargeCustomDictionaryConfig prototype)470 public static Builder newBuilder( 471 com.google.privacy.dlp.v2.LargeCustomDictionaryConfig prototype) { 472 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 473 } 474 475 @java.lang.Override toBuilder()476 public Builder toBuilder() { 477 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 478 } 479 480 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)481 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 482 Builder builder = new Builder(parent); 483 return builder; 484 } 485 /** 486 * 487 * 488 * <pre> 489 * Configuration for a custom dictionary created from a data source of any size 490 * up to the maximum size defined in the 491 * [limits](https://cloud.google.com/dlp/limits) page. The artifacts of 492 * dictionary creation are stored in the specified Cloud Storage 493 * location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries 494 * that satisfy the size requirements. 495 * </pre> 496 * 497 * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryConfig} 498 */ 499 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 500 implements 501 // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.LargeCustomDictionaryConfig) 502 com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder { getDescriptor()503 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 504 return com.google.privacy.dlp.v2.DlpProto 505 .internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; 506 } 507 508 @java.lang.Override 509 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()510 internalGetFieldAccessorTable() { 511 return com.google.privacy.dlp.v2.DlpProto 512 .internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable 513 .ensureFieldAccessorsInitialized( 514 com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.class, 515 com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder.class); 516 } 517 518 // Construct using com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.newBuilder() Builder()519 private Builder() {} 520 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)521 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 522 super(parent); 523 } 524 525 @java.lang.Override clear()526 public Builder clear() { 527 super.clear(); 528 bitField0_ = 0; 529 outputPath_ = null; 530 if (outputPathBuilder_ != null) { 531 outputPathBuilder_.dispose(); 532 outputPathBuilder_ = null; 533 } 534 if (cloudStorageFileSetBuilder_ != null) { 535 cloudStorageFileSetBuilder_.clear(); 536 } 537 if (bigQueryFieldBuilder_ != null) { 538 bigQueryFieldBuilder_.clear(); 539 } 540 sourceCase_ = 0; 541 source_ = null; 542 return this; 543 } 544 545 @java.lang.Override getDescriptorForType()546 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 547 return com.google.privacy.dlp.v2.DlpProto 548 .internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; 549 } 550 551 @java.lang.Override getDefaultInstanceForType()552 public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getDefaultInstanceForType() { 553 return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); 554 } 555 556 @java.lang.Override build()557 public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig build() { 558 com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result = buildPartial(); 559 if (!result.isInitialized()) { 560 throw newUninitializedMessageException(result); 561 } 562 return result; 563 } 564 565 @java.lang.Override buildPartial()566 public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig buildPartial() { 567 com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result = 568 new com.google.privacy.dlp.v2.LargeCustomDictionaryConfig(this); 569 if (bitField0_ != 0) { 570 buildPartial0(result); 571 } 572 buildPartialOneofs(result); 573 onBuilt(); 574 return result; 575 } 576 buildPartial0(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result)577 private void buildPartial0(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result) { 578 int from_bitField0_ = bitField0_; 579 if (((from_bitField0_ & 0x00000001) != 0)) { 580 result.outputPath_ = outputPathBuilder_ == null ? outputPath_ : outputPathBuilder_.build(); 581 } 582 } 583 buildPartialOneofs(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result)584 private void buildPartialOneofs(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result) { 585 result.sourceCase_ = sourceCase_; 586 result.source_ = this.source_; 587 if (sourceCase_ == 2 && cloudStorageFileSetBuilder_ != null) { 588 result.source_ = cloudStorageFileSetBuilder_.build(); 589 } 590 if (sourceCase_ == 3 && bigQueryFieldBuilder_ != null) { 591 result.source_ = bigQueryFieldBuilder_.build(); 592 } 593 } 594 595 @java.lang.Override clone()596 public Builder clone() { 597 return super.clone(); 598 } 599 600 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)601 public Builder setField( 602 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 603 return super.setField(field, value); 604 } 605 606 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)607 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 608 return super.clearField(field); 609 } 610 611 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)612 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 613 return super.clearOneof(oneof); 614 } 615 616 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)617 public Builder setRepeatedField( 618 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 619 return super.setRepeatedField(field, index, value); 620 } 621 622 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)623 public Builder addRepeatedField( 624 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 625 return super.addRepeatedField(field, value); 626 } 627 628 @java.lang.Override mergeFrom(com.google.protobuf.Message other)629 public Builder mergeFrom(com.google.protobuf.Message other) { 630 if (other instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) { 631 return mergeFrom((com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) other); 632 } else { 633 super.mergeFrom(other); 634 return this; 635 } 636 } 637 mergeFrom(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig other)638 public Builder mergeFrom(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig other) { 639 if (other == com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance()) 640 return this; 641 if (other.hasOutputPath()) { 642 mergeOutputPath(other.getOutputPath()); 643 } 644 switch (other.getSourceCase()) { 645 case CLOUD_STORAGE_FILE_SET: 646 { 647 mergeCloudStorageFileSet(other.getCloudStorageFileSet()); 648 break; 649 } 650 case BIG_QUERY_FIELD: 651 { 652 mergeBigQueryField(other.getBigQueryField()); 653 break; 654 } 655 case SOURCE_NOT_SET: 656 { 657 break; 658 } 659 } 660 this.mergeUnknownFields(other.getUnknownFields()); 661 onChanged(); 662 return this; 663 } 664 665 @java.lang.Override isInitialized()666 public final boolean isInitialized() { 667 return true; 668 } 669 670 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)671 public Builder mergeFrom( 672 com.google.protobuf.CodedInputStream input, 673 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 674 throws java.io.IOException { 675 if (extensionRegistry == null) { 676 throw new java.lang.NullPointerException(); 677 } 678 try { 679 boolean done = false; 680 while (!done) { 681 int tag = input.readTag(); 682 switch (tag) { 683 case 0: 684 done = true; 685 break; 686 case 10: 687 { 688 input.readMessage(getOutputPathFieldBuilder().getBuilder(), extensionRegistry); 689 bitField0_ |= 0x00000001; 690 break; 691 } // case 10 692 case 18: 693 { 694 input.readMessage( 695 getCloudStorageFileSetFieldBuilder().getBuilder(), extensionRegistry); 696 sourceCase_ = 2; 697 break; 698 } // case 18 699 case 26: 700 { 701 input.readMessage(getBigQueryFieldFieldBuilder().getBuilder(), extensionRegistry); 702 sourceCase_ = 3; 703 break; 704 } // case 26 705 default: 706 { 707 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 708 done = true; // was an endgroup tag 709 } 710 break; 711 } // default: 712 } // switch (tag) 713 } // while (!done) 714 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 715 throw e.unwrapIOException(); 716 } finally { 717 onChanged(); 718 } // finally 719 return this; 720 } 721 722 private int sourceCase_ = 0; 723 private java.lang.Object source_; 724 getSourceCase()725 public SourceCase getSourceCase() { 726 return SourceCase.forNumber(sourceCase_); 727 } 728 clearSource()729 public Builder clearSource() { 730 sourceCase_ = 0; 731 source_ = null; 732 onChanged(); 733 return this; 734 } 735 736 private int bitField0_; 737 738 private com.google.privacy.dlp.v2.CloudStoragePath outputPath_; 739 private com.google.protobuf.SingleFieldBuilderV3< 740 com.google.privacy.dlp.v2.CloudStoragePath, 741 com.google.privacy.dlp.v2.CloudStoragePath.Builder, 742 com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> 743 outputPathBuilder_; 744 /** 745 * 746 * 747 * <pre> 748 * Location to store dictionary artifacts in Cloud Storage. These files 749 * will only be accessible by project owners and the DLP API. If any of these 750 * artifacts are modified, the dictionary is considered invalid and can no 751 * longer be used. 752 * </pre> 753 * 754 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 755 * 756 * @return Whether the outputPath field is set. 757 */ hasOutputPath()758 public boolean hasOutputPath() { 759 return ((bitField0_ & 0x00000001) != 0); 760 } 761 /** 762 * 763 * 764 * <pre> 765 * Location to store dictionary artifacts in Cloud Storage. These files 766 * will only be accessible by project owners and the DLP API. If any of these 767 * artifacts are modified, the dictionary is considered invalid and can no 768 * longer be used. 769 * </pre> 770 * 771 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 772 * 773 * @return The outputPath. 774 */ getOutputPath()775 public com.google.privacy.dlp.v2.CloudStoragePath getOutputPath() { 776 if (outputPathBuilder_ == null) { 777 return outputPath_ == null 778 ? com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() 779 : outputPath_; 780 } else { 781 return outputPathBuilder_.getMessage(); 782 } 783 } 784 /** 785 * 786 * 787 * <pre> 788 * Location to store dictionary artifacts in Cloud Storage. These files 789 * will only be accessible by project owners and the DLP API. If any of these 790 * artifacts are modified, the dictionary is considered invalid and can no 791 * longer be used. 792 * </pre> 793 * 794 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 795 */ setOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value)796 public Builder setOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value) { 797 if (outputPathBuilder_ == null) { 798 if (value == null) { 799 throw new NullPointerException(); 800 } 801 outputPath_ = value; 802 } else { 803 outputPathBuilder_.setMessage(value); 804 } 805 bitField0_ |= 0x00000001; 806 onChanged(); 807 return this; 808 } 809 /** 810 * 811 * 812 * <pre> 813 * Location to store dictionary artifacts in Cloud Storage. These files 814 * will only be accessible by project owners and the DLP API. If any of these 815 * artifacts are modified, the dictionary is considered invalid and can no 816 * longer be used. 817 * </pre> 818 * 819 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 820 */ setOutputPath( com.google.privacy.dlp.v2.CloudStoragePath.Builder builderForValue)821 public Builder setOutputPath( 822 com.google.privacy.dlp.v2.CloudStoragePath.Builder builderForValue) { 823 if (outputPathBuilder_ == null) { 824 outputPath_ = builderForValue.build(); 825 } else { 826 outputPathBuilder_.setMessage(builderForValue.build()); 827 } 828 bitField0_ |= 0x00000001; 829 onChanged(); 830 return this; 831 } 832 /** 833 * 834 * 835 * <pre> 836 * Location to store dictionary artifacts in Cloud Storage. These files 837 * will only be accessible by project owners and the DLP API. If any of these 838 * artifacts are modified, the dictionary is considered invalid and can no 839 * longer be used. 840 * </pre> 841 * 842 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 843 */ mergeOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value)844 public Builder mergeOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value) { 845 if (outputPathBuilder_ == null) { 846 if (((bitField0_ & 0x00000001) != 0) 847 && outputPath_ != null 848 && outputPath_ != com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance()) { 849 getOutputPathBuilder().mergeFrom(value); 850 } else { 851 outputPath_ = value; 852 } 853 } else { 854 outputPathBuilder_.mergeFrom(value); 855 } 856 bitField0_ |= 0x00000001; 857 onChanged(); 858 return this; 859 } 860 /** 861 * 862 * 863 * <pre> 864 * Location to store dictionary artifacts in Cloud Storage. These files 865 * will only be accessible by project owners and the DLP API. If any of these 866 * artifacts are modified, the dictionary is considered invalid and can no 867 * longer be used. 868 * </pre> 869 * 870 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 871 */ clearOutputPath()872 public Builder clearOutputPath() { 873 bitField0_ = (bitField0_ & ~0x00000001); 874 outputPath_ = null; 875 if (outputPathBuilder_ != null) { 876 outputPathBuilder_.dispose(); 877 outputPathBuilder_ = null; 878 } 879 onChanged(); 880 return this; 881 } 882 /** 883 * 884 * 885 * <pre> 886 * Location to store dictionary artifacts in Cloud Storage. These files 887 * will only be accessible by project owners and the DLP API. If any of these 888 * artifacts are modified, the dictionary is considered invalid and can no 889 * longer be used. 890 * </pre> 891 * 892 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 893 */ getOutputPathBuilder()894 public com.google.privacy.dlp.v2.CloudStoragePath.Builder getOutputPathBuilder() { 895 bitField0_ |= 0x00000001; 896 onChanged(); 897 return getOutputPathFieldBuilder().getBuilder(); 898 } 899 /** 900 * 901 * 902 * <pre> 903 * Location to store dictionary artifacts in Cloud Storage. These files 904 * will only be accessible by project owners and the DLP API. If any of these 905 * artifacts are modified, the dictionary is considered invalid and can no 906 * longer be used. 907 * </pre> 908 * 909 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 910 */ getOutputPathOrBuilder()911 public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getOutputPathOrBuilder() { 912 if (outputPathBuilder_ != null) { 913 return outputPathBuilder_.getMessageOrBuilder(); 914 } else { 915 return outputPath_ == null 916 ? com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() 917 : outputPath_; 918 } 919 } 920 /** 921 * 922 * 923 * <pre> 924 * Location to store dictionary artifacts in Cloud Storage. These files 925 * will only be accessible by project owners and the DLP API. If any of these 926 * artifacts are modified, the dictionary is considered invalid and can no 927 * longer be used. 928 * </pre> 929 * 930 * <code>.google.privacy.dlp.v2.CloudStoragePath output_path = 1;</code> 931 */ 932 private com.google.protobuf.SingleFieldBuilderV3< 933 com.google.privacy.dlp.v2.CloudStoragePath, 934 com.google.privacy.dlp.v2.CloudStoragePath.Builder, 935 com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> getOutputPathFieldBuilder()936 getOutputPathFieldBuilder() { 937 if (outputPathBuilder_ == null) { 938 outputPathBuilder_ = 939 new com.google.protobuf.SingleFieldBuilderV3< 940 com.google.privacy.dlp.v2.CloudStoragePath, 941 com.google.privacy.dlp.v2.CloudStoragePath.Builder, 942 com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>( 943 getOutputPath(), getParentForChildren(), isClean()); 944 outputPath_ = null; 945 } 946 return outputPathBuilder_; 947 } 948 949 private com.google.protobuf.SingleFieldBuilderV3< 950 com.google.privacy.dlp.v2.CloudStorageFileSet, 951 com.google.privacy.dlp.v2.CloudStorageFileSet.Builder, 952 com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder> 953 cloudStorageFileSetBuilder_; 954 /** 955 * 956 * 957 * <pre> 958 * Set of files containing newline-delimited lists of dictionary phrases. 959 * </pre> 960 * 961 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 962 * 963 * @return Whether the cloudStorageFileSet field is set. 964 */ 965 @java.lang.Override hasCloudStorageFileSet()966 public boolean hasCloudStorageFileSet() { 967 return sourceCase_ == 2; 968 } 969 /** 970 * 971 * 972 * <pre> 973 * Set of files containing newline-delimited lists of dictionary phrases. 974 * </pre> 975 * 976 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 977 * 978 * @return The cloudStorageFileSet. 979 */ 980 @java.lang.Override getCloudStorageFileSet()981 public com.google.privacy.dlp.v2.CloudStorageFileSet getCloudStorageFileSet() { 982 if (cloudStorageFileSetBuilder_ == null) { 983 if (sourceCase_ == 2) { 984 return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; 985 } 986 return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); 987 } else { 988 if (sourceCase_ == 2) { 989 return cloudStorageFileSetBuilder_.getMessage(); 990 } 991 return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); 992 } 993 } 994 /** 995 * 996 * 997 * <pre> 998 * Set of files containing newline-delimited lists of dictionary phrases. 999 * </pre> 1000 * 1001 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 1002 */ setCloudStorageFileSet(com.google.privacy.dlp.v2.CloudStorageFileSet value)1003 public Builder setCloudStorageFileSet(com.google.privacy.dlp.v2.CloudStorageFileSet value) { 1004 if (cloudStorageFileSetBuilder_ == null) { 1005 if (value == null) { 1006 throw new NullPointerException(); 1007 } 1008 source_ = value; 1009 onChanged(); 1010 } else { 1011 cloudStorageFileSetBuilder_.setMessage(value); 1012 } 1013 sourceCase_ = 2; 1014 return this; 1015 } 1016 /** 1017 * 1018 * 1019 * <pre> 1020 * Set of files containing newline-delimited lists of dictionary phrases. 1021 * </pre> 1022 * 1023 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 1024 */ setCloudStorageFileSet( com.google.privacy.dlp.v2.CloudStorageFileSet.Builder builderForValue)1025 public Builder setCloudStorageFileSet( 1026 com.google.privacy.dlp.v2.CloudStorageFileSet.Builder builderForValue) { 1027 if (cloudStorageFileSetBuilder_ == null) { 1028 source_ = builderForValue.build(); 1029 onChanged(); 1030 } else { 1031 cloudStorageFileSetBuilder_.setMessage(builderForValue.build()); 1032 } 1033 sourceCase_ = 2; 1034 return this; 1035 } 1036 /** 1037 * 1038 * 1039 * <pre> 1040 * Set of files containing newline-delimited lists of dictionary phrases. 1041 * </pre> 1042 * 1043 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 1044 */ mergeCloudStorageFileSet(com.google.privacy.dlp.v2.CloudStorageFileSet value)1045 public Builder mergeCloudStorageFileSet(com.google.privacy.dlp.v2.CloudStorageFileSet value) { 1046 if (cloudStorageFileSetBuilder_ == null) { 1047 if (sourceCase_ == 2 1048 && source_ != com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance()) { 1049 source_ = 1050 com.google.privacy.dlp.v2.CloudStorageFileSet.newBuilder( 1051 (com.google.privacy.dlp.v2.CloudStorageFileSet) source_) 1052 .mergeFrom(value) 1053 .buildPartial(); 1054 } else { 1055 source_ = value; 1056 } 1057 onChanged(); 1058 } else { 1059 if (sourceCase_ == 2) { 1060 cloudStorageFileSetBuilder_.mergeFrom(value); 1061 } else { 1062 cloudStorageFileSetBuilder_.setMessage(value); 1063 } 1064 } 1065 sourceCase_ = 2; 1066 return this; 1067 } 1068 /** 1069 * 1070 * 1071 * <pre> 1072 * Set of files containing newline-delimited lists of dictionary phrases. 1073 * </pre> 1074 * 1075 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 1076 */ clearCloudStorageFileSet()1077 public Builder clearCloudStorageFileSet() { 1078 if (cloudStorageFileSetBuilder_ == null) { 1079 if (sourceCase_ == 2) { 1080 sourceCase_ = 0; 1081 source_ = null; 1082 onChanged(); 1083 } 1084 } else { 1085 if (sourceCase_ == 2) { 1086 sourceCase_ = 0; 1087 source_ = null; 1088 } 1089 cloudStorageFileSetBuilder_.clear(); 1090 } 1091 return this; 1092 } 1093 /** 1094 * 1095 * 1096 * <pre> 1097 * Set of files containing newline-delimited lists of dictionary phrases. 1098 * </pre> 1099 * 1100 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 1101 */ getCloudStorageFileSetBuilder()1102 public com.google.privacy.dlp.v2.CloudStorageFileSet.Builder getCloudStorageFileSetBuilder() { 1103 return getCloudStorageFileSetFieldBuilder().getBuilder(); 1104 } 1105 /** 1106 * 1107 * 1108 * <pre> 1109 * Set of files containing newline-delimited lists of dictionary phrases. 1110 * </pre> 1111 * 1112 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 1113 */ 1114 @java.lang.Override 1115 public com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder getCloudStorageFileSetOrBuilder()1116 getCloudStorageFileSetOrBuilder() { 1117 if ((sourceCase_ == 2) && (cloudStorageFileSetBuilder_ != null)) { 1118 return cloudStorageFileSetBuilder_.getMessageOrBuilder(); 1119 } else { 1120 if (sourceCase_ == 2) { 1121 return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; 1122 } 1123 return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); 1124 } 1125 } 1126 /** 1127 * 1128 * 1129 * <pre> 1130 * Set of files containing newline-delimited lists of dictionary phrases. 1131 * </pre> 1132 * 1133 * <code>.google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2;</code> 1134 */ 1135 private com.google.protobuf.SingleFieldBuilderV3< 1136 com.google.privacy.dlp.v2.CloudStorageFileSet, 1137 com.google.privacy.dlp.v2.CloudStorageFileSet.Builder, 1138 com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder> getCloudStorageFileSetFieldBuilder()1139 getCloudStorageFileSetFieldBuilder() { 1140 if (cloudStorageFileSetBuilder_ == null) { 1141 if (!(sourceCase_ == 2)) { 1142 source_ = com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); 1143 } 1144 cloudStorageFileSetBuilder_ = 1145 new com.google.protobuf.SingleFieldBuilderV3< 1146 com.google.privacy.dlp.v2.CloudStorageFileSet, 1147 com.google.privacy.dlp.v2.CloudStorageFileSet.Builder, 1148 com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder>( 1149 (com.google.privacy.dlp.v2.CloudStorageFileSet) source_, 1150 getParentForChildren(), 1151 isClean()); 1152 source_ = null; 1153 } 1154 sourceCase_ = 2; 1155 onChanged(); 1156 return cloudStorageFileSetBuilder_; 1157 } 1158 1159 private com.google.protobuf.SingleFieldBuilderV3< 1160 com.google.privacy.dlp.v2.BigQueryField, 1161 com.google.privacy.dlp.v2.BigQueryField.Builder, 1162 com.google.privacy.dlp.v2.BigQueryFieldOrBuilder> 1163 bigQueryFieldBuilder_; 1164 /** 1165 * 1166 * 1167 * <pre> 1168 * Field in a BigQuery table where each cell represents a dictionary phrase. 1169 * </pre> 1170 * 1171 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 1172 * 1173 * @return Whether the bigQueryField field is set. 1174 */ 1175 @java.lang.Override hasBigQueryField()1176 public boolean hasBigQueryField() { 1177 return sourceCase_ == 3; 1178 } 1179 /** 1180 * 1181 * 1182 * <pre> 1183 * Field in a BigQuery table where each cell represents a dictionary phrase. 1184 * </pre> 1185 * 1186 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 1187 * 1188 * @return The bigQueryField. 1189 */ 1190 @java.lang.Override getBigQueryField()1191 public com.google.privacy.dlp.v2.BigQueryField getBigQueryField() { 1192 if (bigQueryFieldBuilder_ == null) { 1193 if (sourceCase_ == 3) { 1194 return (com.google.privacy.dlp.v2.BigQueryField) source_; 1195 } 1196 return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); 1197 } else { 1198 if (sourceCase_ == 3) { 1199 return bigQueryFieldBuilder_.getMessage(); 1200 } 1201 return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); 1202 } 1203 } 1204 /** 1205 * 1206 * 1207 * <pre> 1208 * Field in a BigQuery table where each cell represents a dictionary phrase. 1209 * </pre> 1210 * 1211 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 1212 */ setBigQueryField(com.google.privacy.dlp.v2.BigQueryField value)1213 public Builder setBigQueryField(com.google.privacy.dlp.v2.BigQueryField value) { 1214 if (bigQueryFieldBuilder_ == null) { 1215 if (value == null) { 1216 throw new NullPointerException(); 1217 } 1218 source_ = value; 1219 onChanged(); 1220 } else { 1221 bigQueryFieldBuilder_.setMessage(value); 1222 } 1223 sourceCase_ = 3; 1224 return this; 1225 } 1226 /** 1227 * 1228 * 1229 * <pre> 1230 * Field in a BigQuery table where each cell represents a dictionary phrase. 1231 * </pre> 1232 * 1233 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 1234 */ setBigQueryField( com.google.privacy.dlp.v2.BigQueryField.Builder builderForValue)1235 public Builder setBigQueryField( 1236 com.google.privacy.dlp.v2.BigQueryField.Builder builderForValue) { 1237 if (bigQueryFieldBuilder_ == null) { 1238 source_ = builderForValue.build(); 1239 onChanged(); 1240 } else { 1241 bigQueryFieldBuilder_.setMessage(builderForValue.build()); 1242 } 1243 sourceCase_ = 3; 1244 return this; 1245 } 1246 /** 1247 * 1248 * 1249 * <pre> 1250 * Field in a BigQuery table where each cell represents a dictionary phrase. 1251 * </pre> 1252 * 1253 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 1254 */ mergeBigQueryField(com.google.privacy.dlp.v2.BigQueryField value)1255 public Builder mergeBigQueryField(com.google.privacy.dlp.v2.BigQueryField value) { 1256 if (bigQueryFieldBuilder_ == null) { 1257 if (sourceCase_ == 3 1258 && source_ != com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance()) { 1259 source_ = 1260 com.google.privacy.dlp.v2.BigQueryField.newBuilder( 1261 (com.google.privacy.dlp.v2.BigQueryField) source_) 1262 .mergeFrom(value) 1263 .buildPartial(); 1264 } else { 1265 source_ = value; 1266 } 1267 onChanged(); 1268 } else { 1269 if (sourceCase_ == 3) { 1270 bigQueryFieldBuilder_.mergeFrom(value); 1271 } else { 1272 bigQueryFieldBuilder_.setMessage(value); 1273 } 1274 } 1275 sourceCase_ = 3; 1276 return this; 1277 } 1278 /** 1279 * 1280 * 1281 * <pre> 1282 * Field in a BigQuery table where each cell represents a dictionary phrase. 1283 * </pre> 1284 * 1285 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 1286 */ clearBigQueryField()1287 public Builder clearBigQueryField() { 1288 if (bigQueryFieldBuilder_ == null) { 1289 if (sourceCase_ == 3) { 1290 sourceCase_ = 0; 1291 source_ = null; 1292 onChanged(); 1293 } 1294 } else { 1295 if (sourceCase_ == 3) { 1296 sourceCase_ = 0; 1297 source_ = null; 1298 } 1299 bigQueryFieldBuilder_.clear(); 1300 } 1301 return this; 1302 } 1303 /** 1304 * 1305 * 1306 * <pre> 1307 * Field in a BigQuery table where each cell represents a dictionary phrase. 1308 * </pre> 1309 * 1310 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 1311 */ getBigQueryFieldBuilder()1312 public com.google.privacy.dlp.v2.BigQueryField.Builder getBigQueryFieldBuilder() { 1313 return getBigQueryFieldFieldBuilder().getBuilder(); 1314 } 1315 /** 1316 * 1317 * 1318 * <pre> 1319 * Field in a BigQuery table where each cell represents a dictionary phrase. 1320 * </pre> 1321 * 1322 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 1323 */ 1324 @java.lang.Override getBigQueryFieldOrBuilder()1325 public com.google.privacy.dlp.v2.BigQueryFieldOrBuilder getBigQueryFieldOrBuilder() { 1326 if ((sourceCase_ == 3) && (bigQueryFieldBuilder_ != null)) { 1327 return bigQueryFieldBuilder_.getMessageOrBuilder(); 1328 } else { 1329 if (sourceCase_ == 3) { 1330 return (com.google.privacy.dlp.v2.BigQueryField) source_; 1331 } 1332 return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); 1333 } 1334 } 1335 /** 1336 * 1337 * 1338 * <pre> 1339 * Field in a BigQuery table where each cell represents a dictionary phrase. 1340 * </pre> 1341 * 1342 * <code>.google.privacy.dlp.v2.BigQueryField big_query_field = 3;</code> 1343 */ 1344 private com.google.protobuf.SingleFieldBuilderV3< 1345 com.google.privacy.dlp.v2.BigQueryField, 1346 com.google.privacy.dlp.v2.BigQueryField.Builder, 1347 com.google.privacy.dlp.v2.BigQueryFieldOrBuilder> getBigQueryFieldFieldBuilder()1348 getBigQueryFieldFieldBuilder() { 1349 if (bigQueryFieldBuilder_ == null) { 1350 if (!(sourceCase_ == 3)) { 1351 source_ = com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); 1352 } 1353 bigQueryFieldBuilder_ = 1354 new com.google.protobuf.SingleFieldBuilderV3< 1355 com.google.privacy.dlp.v2.BigQueryField, 1356 com.google.privacy.dlp.v2.BigQueryField.Builder, 1357 com.google.privacy.dlp.v2.BigQueryFieldOrBuilder>( 1358 (com.google.privacy.dlp.v2.BigQueryField) source_, 1359 getParentForChildren(), 1360 isClean()); 1361 source_ = null; 1362 } 1363 sourceCase_ = 3; 1364 onChanged(); 1365 return bigQueryFieldBuilder_; 1366 } 1367 1368 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1369 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1370 return super.setUnknownFields(unknownFields); 1371 } 1372 1373 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1374 public final Builder mergeUnknownFields( 1375 final com.google.protobuf.UnknownFieldSet unknownFields) { 1376 return super.mergeUnknownFields(unknownFields); 1377 } 1378 1379 // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.LargeCustomDictionaryConfig) 1380 } 1381 1382 // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.LargeCustomDictionaryConfig) 1383 private static final com.google.privacy.dlp.v2.LargeCustomDictionaryConfig DEFAULT_INSTANCE; 1384 1385 static { 1386 DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.LargeCustomDictionaryConfig(); 1387 } 1388 getDefaultInstance()1389 public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getDefaultInstance() { 1390 return DEFAULT_INSTANCE; 1391 } 1392 1393 private static final com.google.protobuf.Parser<LargeCustomDictionaryConfig> PARSER = 1394 new com.google.protobuf.AbstractParser<LargeCustomDictionaryConfig>() { 1395 @java.lang.Override 1396 public LargeCustomDictionaryConfig parsePartialFrom( 1397 com.google.protobuf.CodedInputStream input, 1398 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1399 throws com.google.protobuf.InvalidProtocolBufferException { 1400 Builder builder = newBuilder(); 1401 try { 1402 builder.mergeFrom(input, extensionRegistry); 1403 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1404 throw e.setUnfinishedMessage(builder.buildPartial()); 1405 } catch (com.google.protobuf.UninitializedMessageException e) { 1406 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1407 } catch (java.io.IOException e) { 1408 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1409 .setUnfinishedMessage(builder.buildPartial()); 1410 } 1411 return builder.buildPartial(); 1412 } 1413 }; 1414 parser()1415 public static com.google.protobuf.Parser<LargeCustomDictionaryConfig> parser() { 1416 return PARSER; 1417 } 1418 1419 @java.lang.Override getParserForType()1420 public com.google.protobuf.Parser<LargeCustomDictionaryConfig> getParserForType() { 1421 return PARSER; 1422 } 1423 1424 @java.lang.Override getDefaultInstanceForType()1425 public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getDefaultInstanceForType() { 1426 return DEFAULT_INSTANCE; 1427 } 1428 } 1429