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