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