1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/privacy/dlp/v2/dlp.proto 18 19 package com.google.privacy.dlp.v2; 20 21 /** 22 * 23 * 24 * <pre> 25 * Configuration description of the scanning process. 26 * When used with redactContent only info_types and min_likelihood are currently 27 * used. 28 * </pre> 29 * 30 * Protobuf type {@code google.privacy.dlp.v2.InspectConfig} 31 */ 32 public final class InspectConfig extends com.google.protobuf.GeneratedMessageV3 33 implements 34 // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectConfig) 35 InspectConfigOrBuilder { 36 private static final long serialVersionUID = 0L; 37 // Use InspectConfig.newBuilder() to construct. InspectConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38 private InspectConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 39 super(builder); 40 } 41 InspectConfig()42 private InspectConfig() { 43 infoTypes_ = java.util.Collections.emptyList(); 44 minLikelihood_ = 0; 45 customInfoTypes_ = java.util.Collections.emptyList(); 46 contentOptions_ = java.util.Collections.emptyList(); 47 ruleSet_ = java.util.Collections.emptyList(); 48 } 49 50 @java.lang.Override 51 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)52 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 53 return new InspectConfig(); 54 } 55 56 @java.lang.Override getUnknownFields()57 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 58 return this.unknownFields; 59 } 60 getDescriptor()61 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 62 return com.google.privacy.dlp.v2.DlpProto 63 .internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; 64 } 65 66 @java.lang.Override 67 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()68 internalGetFieldAccessorTable() { 69 return com.google.privacy.dlp.v2.DlpProto 70 .internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable 71 .ensureFieldAccessorsInitialized( 72 com.google.privacy.dlp.v2.InspectConfig.class, 73 com.google.privacy.dlp.v2.InspectConfig.Builder.class); 74 } 75 76 public interface FindingLimitsOrBuilder 77 extends 78 // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectConfig.FindingLimits) 79 com.google.protobuf.MessageOrBuilder { 80 81 /** 82 * 83 * 84 * <pre> 85 * Max number of findings that will be returned for each item scanned. 86 * When set within `InspectJobConfig`, 87 * the maximum returned is 2000 regardless if this is set higher. 88 * When set within `InspectContentRequest`, this field is ignored. 89 * </pre> 90 * 91 * <code>int32 max_findings_per_item = 1;</code> 92 * 93 * @return The maxFindingsPerItem. 94 */ getMaxFindingsPerItem()95 int getMaxFindingsPerItem(); 96 97 /** 98 * 99 * 100 * <pre> 101 * Max number of findings that will be returned per request/job. 102 * When set within `InspectContentRequest`, the maximum returned is 2000 103 * regardless if this is set higher. 104 * </pre> 105 * 106 * <code>int32 max_findings_per_request = 2;</code> 107 * 108 * @return The maxFindingsPerRequest. 109 */ getMaxFindingsPerRequest()110 int getMaxFindingsPerRequest(); 111 112 /** 113 * 114 * 115 * <pre> 116 * Configuration of findings limit given for specified infoTypes. 117 * </pre> 118 * 119 * <code> 120 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 121 * </code> 122 */ 123 java.util.List<com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit> getMaxFindingsPerInfoTypeList()124 getMaxFindingsPerInfoTypeList(); 125 /** 126 * 127 * 128 * <pre> 129 * Configuration of findings limit given for specified infoTypes. 130 * </pre> 131 * 132 * <code> 133 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 134 * </code> 135 */ getMaxFindingsPerInfoType( int index)136 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType( 137 int index); 138 /** 139 * 140 * 141 * <pre> 142 * Configuration of findings limit given for specified infoTypes. 143 * </pre> 144 * 145 * <code> 146 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 147 * </code> 148 */ getMaxFindingsPerInfoTypeCount()149 int getMaxFindingsPerInfoTypeCount(); 150 /** 151 * 152 * 153 * <pre> 154 * Configuration of findings limit given for specified infoTypes. 155 * </pre> 156 * 157 * <code> 158 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 159 * </code> 160 */ 161 java.util.List< 162 ? extends com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder> getMaxFindingsPerInfoTypeOrBuilderList()163 getMaxFindingsPerInfoTypeOrBuilderList(); 164 /** 165 * 166 * 167 * <pre> 168 * Configuration of findings limit given for specified infoTypes. 169 * </pre> 170 * 171 * <code> 172 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 173 * </code> 174 */ 175 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder getMaxFindingsPerInfoTypeOrBuilder(int index)176 getMaxFindingsPerInfoTypeOrBuilder(int index); 177 } 178 /** 179 * 180 * 181 * <pre> 182 * Configuration to control the number of findings returned for inspection. 183 * This is not used for de-identification or data profiling. 184 * When redacting sensitive data from images, finding limits don't apply. They 185 * can cause unexpected or inconsistent results, where only some data is 186 * redacted. Don't include finding limits in 187 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 188 * requests. Otherwise, Cloud DLP returns an error. 189 * </pre> 190 * 191 * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits} 192 */ 193 public static final class FindingLimits extends com.google.protobuf.GeneratedMessageV3 194 implements 195 // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits) 196 FindingLimitsOrBuilder { 197 private static final long serialVersionUID = 0L; 198 // Use FindingLimits.newBuilder() to construct. FindingLimits(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)199 private FindingLimits(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 200 super(builder); 201 } 202 FindingLimits()203 private FindingLimits() { 204 maxFindingsPerInfoType_ = java.util.Collections.emptyList(); 205 } 206 207 @java.lang.Override 208 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)209 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 210 return new FindingLimits(); 211 } 212 213 @java.lang.Override getUnknownFields()214 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 215 return this.unknownFields; 216 } 217 getDescriptor()218 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 219 return com.google.privacy.dlp.v2.DlpProto 220 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; 221 } 222 223 @java.lang.Override 224 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()225 internalGetFieldAccessorTable() { 226 return com.google.privacy.dlp.v2.DlpProto 227 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable 228 .ensureFieldAccessorsInitialized( 229 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.class, 230 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder.class); 231 } 232 233 public interface InfoTypeLimitOrBuilder 234 extends 235 // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) 236 com.google.protobuf.MessageOrBuilder { 237 238 /** 239 * 240 * 241 * <pre> 242 * Type of information the findings limit applies to. Only one limit per 243 * info_type should be provided. If InfoTypeLimit does not have an 244 * info_type, the DLP API applies the limit against all info_types that 245 * are found but not specified in another InfoTypeLimit. 246 * </pre> 247 * 248 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 249 * 250 * @return Whether the infoType field is set. 251 */ hasInfoType()252 boolean hasInfoType(); 253 /** 254 * 255 * 256 * <pre> 257 * Type of information the findings limit applies to. Only one limit per 258 * info_type should be provided. If InfoTypeLimit does not have an 259 * info_type, the DLP API applies the limit against all info_types that 260 * are found but not specified in another InfoTypeLimit. 261 * </pre> 262 * 263 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 264 * 265 * @return The infoType. 266 */ getInfoType()267 com.google.privacy.dlp.v2.InfoType getInfoType(); 268 /** 269 * 270 * 271 * <pre> 272 * Type of information the findings limit applies to. Only one limit per 273 * info_type should be provided. If InfoTypeLimit does not have an 274 * info_type, the DLP API applies the limit against all info_types that 275 * are found but not specified in another InfoTypeLimit. 276 * </pre> 277 * 278 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 279 */ getInfoTypeOrBuilder()280 com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); 281 282 /** 283 * 284 * 285 * <pre> 286 * Max findings limit for the given infoType. 287 * </pre> 288 * 289 * <code>int32 max_findings = 2;</code> 290 * 291 * @return The maxFindings. 292 */ getMaxFindings()293 int getMaxFindings(); 294 } 295 /** 296 * 297 * 298 * <pre> 299 * Max findings configuration per infoType, per content item or long 300 * running DlpJob. 301 * </pre> 302 * 303 * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} 304 */ 305 public static final class InfoTypeLimit extends com.google.protobuf.GeneratedMessageV3 306 implements 307 // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) 308 InfoTypeLimitOrBuilder { 309 private static final long serialVersionUID = 0L; 310 // Use InfoTypeLimit.newBuilder() to construct. InfoTypeLimit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)311 private InfoTypeLimit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 312 super(builder); 313 } 314 InfoTypeLimit()315 private InfoTypeLimit() {} 316 317 @java.lang.Override 318 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)319 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 320 return new InfoTypeLimit(); 321 } 322 323 @java.lang.Override getUnknownFields()324 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 325 return this.unknownFields; 326 } 327 getDescriptor()328 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 329 return com.google.privacy.dlp.v2.DlpProto 330 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; 331 } 332 333 @java.lang.Override 334 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()335 internalGetFieldAccessorTable() { 336 return com.google.privacy.dlp.v2.DlpProto 337 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable 338 .ensureFieldAccessorsInitialized( 339 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.class, 340 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder.class); 341 } 342 343 public static final int INFO_TYPE_FIELD_NUMBER = 1; 344 private com.google.privacy.dlp.v2.InfoType infoType_; 345 /** 346 * 347 * 348 * <pre> 349 * Type of information the findings limit applies to. Only one limit per 350 * info_type should be provided. If InfoTypeLimit does not have an 351 * info_type, the DLP API applies the limit against all info_types that 352 * are found but not specified in another InfoTypeLimit. 353 * </pre> 354 * 355 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 356 * 357 * @return Whether the infoType field is set. 358 */ 359 @java.lang.Override hasInfoType()360 public boolean hasInfoType() { 361 return infoType_ != null; 362 } 363 /** 364 * 365 * 366 * <pre> 367 * Type of information the findings limit applies to. Only one limit per 368 * info_type should be provided. If InfoTypeLimit does not have an 369 * info_type, the DLP API applies the limit against all info_types that 370 * are found but not specified in another InfoTypeLimit. 371 * </pre> 372 * 373 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 374 * 375 * @return The infoType. 376 */ 377 @java.lang.Override getInfoType()378 public com.google.privacy.dlp.v2.InfoType getInfoType() { 379 return infoType_ == null 380 ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() 381 : infoType_; 382 } 383 /** 384 * 385 * 386 * <pre> 387 * Type of information the findings limit applies to. Only one limit per 388 * info_type should be provided. If InfoTypeLimit does not have an 389 * info_type, the DLP API applies the limit against all info_types that 390 * are found but not specified in another InfoTypeLimit. 391 * </pre> 392 * 393 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 394 */ 395 @java.lang.Override getInfoTypeOrBuilder()396 public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { 397 return infoType_ == null 398 ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() 399 : infoType_; 400 } 401 402 public static final int MAX_FINDINGS_FIELD_NUMBER = 2; 403 private int maxFindings_ = 0; 404 /** 405 * 406 * 407 * <pre> 408 * Max findings limit for the given infoType. 409 * </pre> 410 * 411 * <code>int32 max_findings = 2;</code> 412 * 413 * @return The maxFindings. 414 */ 415 @java.lang.Override getMaxFindings()416 public int getMaxFindings() { 417 return maxFindings_; 418 } 419 420 private byte memoizedIsInitialized = -1; 421 422 @java.lang.Override isInitialized()423 public final boolean isInitialized() { 424 byte isInitialized = memoizedIsInitialized; 425 if (isInitialized == 1) return true; 426 if (isInitialized == 0) return false; 427 428 memoizedIsInitialized = 1; 429 return true; 430 } 431 432 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)433 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 434 if (infoType_ != null) { 435 output.writeMessage(1, getInfoType()); 436 } 437 if (maxFindings_ != 0) { 438 output.writeInt32(2, maxFindings_); 439 } 440 getUnknownFields().writeTo(output); 441 } 442 443 @java.lang.Override getSerializedSize()444 public int getSerializedSize() { 445 int size = memoizedSize; 446 if (size != -1) return size; 447 448 size = 0; 449 if (infoType_ != null) { 450 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInfoType()); 451 } 452 if (maxFindings_ != 0) { 453 size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxFindings_); 454 } 455 size += getUnknownFields().getSerializedSize(); 456 memoizedSize = size; 457 return size; 458 } 459 460 @java.lang.Override equals(final java.lang.Object obj)461 public boolean equals(final java.lang.Object obj) { 462 if (obj == this) { 463 return true; 464 } 465 if (!(obj instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit)) { 466 return super.equals(obj); 467 } 468 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit other = 469 (com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) obj; 470 471 if (hasInfoType() != other.hasInfoType()) return false; 472 if (hasInfoType()) { 473 if (!getInfoType().equals(other.getInfoType())) return false; 474 } 475 if (getMaxFindings() != other.getMaxFindings()) return false; 476 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 477 return true; 478 } 479 480 @java.lang.Override hashCode()481 public int hashCode() { 482 if (memoizedHashCode != 0) { 483 return memoizedHashCode; 484 } 485 int hash = 41; 486 hash = (19 * hash) + getDescriptor().hashCode(); 487 if (hasInfoType()) { 488 hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; 489 hash = (53 * hash) + getInfoType().hashCode(); 490 } 491 hash = (37 * hash) + MAX_FINDINGS_FIELD_NUMBER; 492 hash = (53 * hash) + getMaxFindings(); 493 hash = (29 * hash) + getUnknownFields().hashCode(); 494 memoizedHashCode = hash; 495 return hash; 496 } 497 parseFrom( java.nio.ByteBuffer data)498 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 499 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 500 return PARSER.parseFrom(data); 501 } 502 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)503 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 504 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 505 throws com.google.protobuf.InvalidProtocolBufferException { 506 return PARSER.parseFrom(data, extensionRegistry); 507 } 508 parseFrom( com.google.protobuf.ByteString data)509 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 510 com.google.protobuf.ByteString data) 511 throws com.google.protobuf.InvalidProtocolBufferException { 512 return PARSER.parseFrom(data); 513 } 514 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)515 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 516 com.google.protobuf.ByteString data, 517 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 518 throws com.google.protobuf.InvalidProtocolBufferException { 519 return PARSER.parseFrom(data, extensionRegistry); 520 } 521 parseFrom( byte[] data)522 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 523 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 524 return PARSER.parseFrom(data); 525 } 526 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)527 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 528 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 529 throws com.google.protobuf.InvalidProtocolBufferException { 530 return PARSER.parseFrom(data, extensionRegistry); 531 } 532 parseFrom( java.io.InputStream input)533 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 534 java.io.InputStream input) throws java.io.IOException { 535 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 536 } 537 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)538 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 539 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 540 throws java.io.IOException { 541 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 542 PARSER, input, extensionRegistry); 543 } 544 545 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseDelimitedFrom(java.io.InputStream input)546 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { 547 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 548 } 549 550 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)551 parseDelimitedFrom( 552 java.io.InputStream input, 553 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 554 throws java.io.IOException { 555 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 556 PARSER, input, extensionRegistry); 557 } 558 parseFrom( com.google.protobuf.CodedInputStream input)559 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 560 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 561 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 562 } 563 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)564 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( 565 com.google.protobuf.CodedInputStream input, 566 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 567 throws java.io.IOException { 568 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 569 PARSER, input, extensionRegistry); 570 } 571 572 @java.lang.Override newBuilderForType()573 public Builder newBuilderForType() { 574 return newBuilder(); 575 } 576 newBuilder()577 public static Builder newBuilder() { 578 return DEFAULT_INSTANCE.toBuilder(); 579 } 580 newBuilder( com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit prototype)581 public static Builder newBuilder( 582 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit prototype) { 583 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 584 } 585 586 @java.lang.Override toBuilder()587 public Builder toBuilder() { 588 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 589 } 590 591 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)592 protected Builder newBuilderForType( 593 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 594 Builder builder = new Builder(parent); 595 return builder; 596 } 597 /** 598 * 599 * 600 * <pre> 601 * Max findings configuration per infoType, per content item or long 602 * running DlpJob. 603 * </pre> 604 * 605 * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} 606 */ 607 public static final class Builder 608 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 609 implements 610 // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) 611 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder { getDescriptor()612 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 613 return com.google.privacy.dlp.v2.DlpProto 614 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; 615 } 616 617 @java.lang.Override 618 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()619 internalGetFieldAccessorTable() { 620 return com.google.privacy.dlp.v2.DlpProto 621 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable 622 .ensureFieldAccessorsInitialized( 623 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.class, 624 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder 625 .class); 626 } 627 628 // Construct using 629 // com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.newBuilder() Builder()630 private Builder() {} 631 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)632 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 633 super(parent); 634 } 635 636 @java.lang.Override clear()637 public Builder clear() { 638 super.clear(); 639 bitField0_ = 0; 640 infoType_ = null; 641 if (infoTypeBuilder_ != null) { 642 infoTypeBuilder_.dispose(); 643 infoTypeBuilder_ = null; 644 } 645 maxFindings_ = 0; 646 return this; 647 } 648 649 @java.lang.Override getDescriptorForType()650 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 651 return com.google.privacy.dlp.v2.DlpProto 652 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; 653 } 654 655 @java.lang.Override 656 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getDefaultInstanceForType()657 getDefaultInstanceForType() { 658 return com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit 659 .getDefaultInstance(); 660 } 661 662 @java.lang.Override build()663 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit build() { 664 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit result = 665 buildPartial(); 666 if (!result.isInitialized()) { 667 throw newUninitializedMessageException(result); 668 } 669 return result; 670 } 671 672 @java.lang.Override buildPartial()673 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit buildPartial() { 674 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit result = 675 new com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit(this); 676 if (bitField0_ != 0) { 677 buildPartial0(result); 678 } 679 onBuilt(); 680 return result; 681 } 682 buildPartial0( com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit result)683 private void buildPartial0( 684 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit result) { 685 int from_bitField0_ = bitField0_; 686 if (((from_bitField0_ & 0x00000001) != 0)) { 687 result.infoType_ = infoTypeBuilder_ == null ? infoType_ : infoTypeBuilder_.build(); 688 } 689 if (((from_bitField0_ & 0x00000002) != 0)) { 690 result.maxFindings_ = maxFindings_; 691 } 692 } 693 694 @java.lang.Override clone()695 public Builder clone() { 696 return super.clone(); 697 } 698 699 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)700 public Builder setField( 701 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 702 return super.setField(field, value); 703 } 704 705 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)706 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 707 return super.clearField(field); 708 } 709 710 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)711 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 712 return super.clearOneof(oneof); 713 } 714 715 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)716 public Builder setRepeatedField( 717 com.google.protobuf.Descriptors.FieldDescriptor field, 718 int index, 719 java.lang.Object value) { 720 return super.setRepeatedField(field, index, value); 721 } 722 723 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)724 public Builder addRepeatedField( 725 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 726 return super.addRepeatedField(field, value); 727 } 728 729 @java.lang.Override mergeFrom(com.google.protobuf.Message other)730 public Builder mergeFrom(com.google.protobuf.Message other) { 731 if (other 732 instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) { 733 return mergeFrom( 734 (com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) other); 735 } else { 736 super.mergeFrom(other); 737 return this; 738 } 739 } 740 mergeFrom( com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit other)741 public Builder mergeFrom( 742 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit other) { 743 if (other 744 == com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit 745 .getDefaultInstance()) return this; 746 if (other.hasInfoType()) { 747 mergeInfoType(other.getInfoType()); 748 } 749 if (other.getMaxFindings() != 0) { 750 setMaxFindings(other.getMaxFindings()); 751 } 752 this.mergeUnknownFields(other.getUnknownFields()); 753 onChanged(); 754 return this; 755 } 756 757 @java.lang.Override isInitialized()758 public final boolean isInitialized() { 759 return true; 760 } 761 762 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)763 public Builder mergeFrom( 764 com.google.protobuf.CodedInputStream input, 765 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 766 throws java.io.IOException { 767 if (extensionRegistry == null) { 768 throw new java.lang.NullPointerException(); 769 } 770 try { 771 boolean done = false; 772 while (!done) { 773 int tag = input.readTag(); 774 switch (tag) { 775 case 0: 776 done = true; 777 break; 778 case 10: 779 { 780 input.readMessage(getInfoTypeFieldBuilder().getBuilder(), extensionRegistry); 781 bitField0_ |= 0x00000001; 782 break; 783 } // case 10 784 case 16: 785 { 786 maxFindings_ = input.readInt32(); 787 bitField0_ |= 0x00000002; 788 break; 789 } // case 16 790 default: 791 { 792 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 793 done = true; // was an endgroup tag 794 } 795 break; 796 } // default: 797 } // switch (tag) 798 } // while (!done) 799 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 800 throw e.unwrapIOException(); 801 } finally { 802 onChanged(); 803 } // finally 804 return this; 805 } 806 807 private int bitField0_; 808 809 private com.google.privacy.dlp.v2.InfoType infoType_; 810 private com.google.protobuf.SingleFieldBuilderV3< 811 com.google.privacy.dlp.v2.InfoType, 812 com.google.privacy.dlp.v2.InfoType.Builder, 813 com.google.privacy.dlp.v2.InfoTypeOrBuilder> 814 infoTypeBuilder_; 815 /** 816 * 817 * 818 * <pre> 819 * Type of information the findings limit applies to. Only one limit per 820 * info_type should be provided. If InfoTypeLimit does not have an 821 * info_type, the DLP API applies the limit against all info_types that 822 * are found but not specified in another InfoTypeLimit. 823 * </pre> 824 * 825 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 826 * 827 * @return Whether the infoType field is set. 828 */ hasInfoType()829 public boolean hasInfoType() { 830 return ((bitField0_ & 0x00000001) != 0); 831 } 832 /** 833 * 834 * 835 * <pre> 836 * Type of information the findings limit applies to. Only one limit per 837 * info_type should be provided. If InfoTypeLimit does not have an 838 * info_type, the DLP API applies the limit against all info_types that 839 * are found but not specified in another InfoTypeLimit. 840 * </pre> 841 * 842 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 843 * 844 * @return The infoType. 845 */ getInfoType()846 public com.google.privacy.dlp.v2.InfoType getInfoType() { 847 if (infoTypeBuilder_ == null) { 848 return infoType_ == null 849 ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() 850 : infoType_; 851 } else { 852 return infoTypeBuilder_.getMessage(); 853 } 854 } 855 /** 856 * 857 * 858 * <pre> 859 * Type of information the findings limit applies to. Only one limit per 860 * info_type should be provided. If InfoTypeLimit does not have an 861 * info_type, the DLP API applies the limit against all info_types that 862 * are found but not specified in another InfoTypeLimit. 863 * </pre> 864 * 865 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 866 */ setInfoType(com.google.privacy.dlp.v2.InfoType value)867 public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { 868 if (infoTypeBuilder_ == null) { 869 if (value == null) { 870 throw new NullPointerException(); 871 } 872 infoType_ = value; 873 } else { 874 infoTypeBuilder_.setMessage(value); 875 } 876 bitField0_ |= 0x00000001; 877 onChanged(); 878 return this; 879 } 880 /** 881 * 882 * 883 * <pre> 884 * Type of information the findings limit applies to. Only one limit per 885 * info_type should be provided. If InfoTypeLimit does not have an 886 * info_type, the DLP API applies the limit against all info_types that 887 * are found but not specified in another InfoTypeLimit. 888 * </pre> 889 * 890 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 891 */ setInfoType(com.google.privacy.dlp.v2.InfoType.Builder builderForValue)892 public Builder setInfoType(com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { 893 if (infoTypeBuilder_ == null) { 894 infoType_ = builderForValue.build(); 895 } else { 896 infoTypeBuilder_.setMessage(builderForValue.build()); 897 } 898 bitField0_ |= 0x00000001; 899 onChanged(); 900 return this; 901 } 902 /** 903 * 904 * 905 * <pre> 906 * Type of information the findings limit applies to. Only one limit per 907 * info_type should be provided. If InfoTypeLimit does not have an 908 * info_type, the DLP API applies the limit against all info_types that 909 * are found but not specified in another InfoTypeLimit. 910 * </pre> 911 * 912 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 913 */ mergeInfoType(com.google.privacy.dlp.v2.InfoType value)914 public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { 915 if (infoTypeBuilder_ == null) { 916 if (((bitField0_ & 0x00000001) != 0) 917 && infoType_ != null 918 && infoType_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) { 919 getInfoTypeBuilder().mergeFrom(value); 920 } else { 921 infoType_ = value; 922 } 923 } else { 924 infoTypeBuilder_.mergeFrom(value); 925 } 926 bitField0_ |= 0x00000001; 927 onChanged(); 928 return this; 929 } 930 /** 931 * 932 * 933 * <pre> 934 * Type of information the findings limit applies to. Only one limit per 935 * info_type should be provided. If InfoTypeLimit does not have an 936 * info_type, the DLP API applies the limit against all info_types that 937 * are found but not specified in another InfoTypeLimit. 938 * </pre> 939 * 940 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 941 */ clearInfoType()942 public Builder clearInfoType() { 943 bitField0_ = (bitField0_ & ~0x00000001); 944 infoType_ = null; 945 if (infoTypeBuilder_ != null) { 946 infoTypeBuilder_.dispose(); 947 infoTypeBuilder_ = null; 948 } 949 onChanged(); 950 return this; 951 } 952 /** 953 * 954 * 955 * <pre> 956 * Type of information the findings limit applies to. Only one limit per 957 * info_type should be provided. If InfoTypeLimit does not have an 958 * info_type, the DLP API applies the limit against all info_types that 959 * are found but not specified in another InfoTypeLimit. 960 * </pre> 961 * 962 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 963 */ getInfoTypeBuilder()964 public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { 965 bitField0_ |= 0x00000001; 966 onChanged(); 967 return getInfoTypeFieldBuilder().getBuilder(); 968 } 969 /** 970 * 971 * 972 * <pre> 973 * Type of information the findings limit applies to. Only one limit per 974 * info_type should be provided. If InfoTypeLimit does not have an 975 * info_type, the DLP API applies the limit against all info_types that 976 * are found but not specified in another InfoTypeLimit. 977 * </pre> 978 * 979 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 980 */ getInfoTypeOrBuilder()981 public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { 982 if (infoTypeBuilder_ != null) { 983 return infoTypeBuilder_.getMessageOrBuilder(); 984 } else { 985 return infoType_ == null 986 ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() 987 : infoType_; 988 } 989 } 990 /** 991 * 992 * 993 * <pre> 994 * Type of information the findings limit applies to. Only one limit per 995 * info_type should be provided. If InfoTypeLimit does not have an 996 * info_type, the DLP API applies the limit against all info_types that 997 * are found but not specified in another InfoTypeLimit. 998 * </pre> 999 * 1000 * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code> 1001 */ 1002 private com.google.protobuf.SingleFieldBuilderV3< 1003 com.google.privacy.dlp.v2.InfoType, 1004 com.google.privacy.dlp.v2.InfoType.Builder, 1005 com.google.privacy.dlp.v2.InfoTypeOrBuilder> getInfoTypeFieldBuilder()1006 getInfoTypeFieldBuilder() { 1007 if (infoTypeBuilder_ == null) { 1008 infoTypeBuilder_ = 1009 new com.google.protobuf.SingleFieldBuilderV3< 1010 com.google.privacy.dlp.v2.InfoType, 1011 com.google.privacy.dlp.v2.InfoType.Builder, 1012 com.google.privacy.dlp.v2.InfoTypeOrBuilder>( 1013 getInfoType(), getParentForChildren(), isClean()); 1014 infoType_ = null; 1015 } 1016 return infoTypeBuilder_; 1017 } 1018 1019 private int maxFindings_; 1020 /** 1021 * 1022 * 1023 * <pre> 1024 * Max findings limit for the given infoType. 1025 * </pre> 1026 * 1027 * <code>int32 max_findings = 2;</code> 1028 * 1029 * @return The maxFindings. 1030 */ 1031 @java.lang.Override getMaxFindings()1032 public int getMaxFindings() { 1033 return maxFindings_; 1034 } 1035 /** 1036 * 1037 * 1038 * <pre> 1039 * Max findings limit for the given infoType. 1040 * </pre> 1041 * 1042 * <code>int32 max_findings = 2;</code> 1043 * 1044 * @param value The maxFindings to set. 1045 * @return This builder for chaining. 1046 */ setMaxFindings(int value)1047 public Builder setMaxFindings(int value) { 1048 1049 maxFindings_ = value; 1050 bitField0_ |= 0x00000002; 1051 onChanged(); 1052 return this; 1053 } 1054 /** 1055 * 1056 * 1057 * <pre> 1058 * Max findings limit for the given infoType. 1059 * </pre> 1060 * 1061 * <code>int32 max_findings = 2;</code> 1062 * 1063 * @return This builder for chaining. 1064 */ clearMaxFindings()1065 public Builder clearMaxFindings() { 1066 bitField0_ = (bitField0_ & ~0x00000002); 1067 maxFindings_ = 0; 1068 onChanged(); 1069 return this; 1070 } 1071 1072 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1073 public final Builder setUnknownFields( 1074 final com.google.protobuf.UnknownFieldSet unknownFields) { 1075 return super.setUnknownFields(unknownFields); 1076 } 1077 1078 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1079 public final Builder mergeUnknownFields( 1080 final com.google.protobuf.UnknownFieldSet unknownFields) { 1081 return super.mergeUnknownFields(unknownFields); 1082 } 1083 1084 // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) 1085 } 1086 1087 // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) 1088 private static final com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit 1089 DEFAULT_INSTANCE; 1090 1091 static { 1092 DEFAULT_INSTANCE = 1093 new com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit(); 1094 } 1095 1096 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getDefaultInstance()1097 getDefaultInstance() { 1098 return DEFAULT_INSTANCE; 1099 } 1100 1101 private static final com.google.protobuf.Parser<InfoTypeLimit> PARSER = 1102 new com.google.protobuf.AbstractParser<InfoTypeLimit>() { 1103 @java.lang.Override 1104 public InfoTypeLimit parsePartialFrom( 1105 com.google.protobuf.CodedInputStream input, 1106 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1107 throws com.google.protobuf.InvalidProtocolBufferException { 1108 Builder builder = newBuilder(); 1109 try { 1110 builder.mergeFrom(input, extensionRegistry); 1111 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1112 throw e.setUnfinishedMessage(builder.buildPartial()); 1113 } catch (com.google.protobuf.UninitializedMessageException e) { 1114 throw e.asInvalidProtocolBufferException() 1115 .setUnfinishedMessage(builder.buildPartial()); 1116 } catch (java.io.IOException e) { 1117 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1118 .setUnfinishedMessage(builder.buildPartial()); 1119 } 1120 return builder.buildPartial(); 1121 } 1122 }; 1123 parser()1124 public static com.google.protobuf.Parser<InfoTypeLimit> parser() { 1125 return PARSER; 1126 } 1127 1128 @java.lang.Override getParserForType()1129 public com.google.protobuf.Parser<InfoTypeLimit> getParserForType() { 1130 return PARSER; 1131 } 1132 1133 @java.lang.Override 1134 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getDefaultInstanceForType()1135 getDefaultInstanceForType() { 1136 return DEFAULT_INSTANCE; 1137 } 1138 } 1139 1140 public static final int MAX_FINDINGS_PER_ITEM_FIELD_NUMBER = 1; 1141 private int maxFindingsPerItem_ = 0; 1142 /** 1143 * 1144 * 1145 * <pre> 1146 * Max number of findings that will be returned for each item scanned. 1147 * When set within `InspectJobConfig`, 1148 * the maximum returned is 2000 regardless if this is set higher. 1149 * When set within `InspectContentRequest`, this field is ignored. 1150 * </pre> 1151 * 1152 * <code>int32 max_findings_per_item = 1;</code> 1153 * 1154 * @return The maxFindingsPerItem. 1155 */ 1156 @java.lang.Override getMaxFindingsPerItem()1157 public int getMaxFindingsPerItem() { 1158 return maxFindingsPerItem_; 1159 } 1160 1161 public static final int MAX_FINDINGS_PER_REQUEST_FIELD_NUMBER = 2; 1162 private int maxFindingsPerRequest_ = 0; 1163 /** 1164 * 1165 * 1166 * <pre> 1167 * Max number of findings that will be returned per request/job. 1168 * When set within `InspectContentRequest`, the maximum returned is 2000 1169 * regardless if this is set higher. 1170 * </pre> 1171 * 1172 * <code>int32 max_findings_per_request = 2;</code> 1173 * 1174 * @return The maxFindingsPerRequest. 1175 */ 1176 @java.lang.Override getMaxFindingsPerRequest()1177 public int getMaxFindingsPerRequest() { 1178 return maxFindingsPerRequest_; 1179 } 1180 1181 public static final int MAX_FINDINGS_PER_INFO_TYPE_FIELD_NUMBER = 3; 1182 1183 @SuppressWarnings("serial") 1184 private java.util.List<com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit> 1185 maxFindingsPerInfoType_; 1186 /** 1187 * 1188 * 1189 * <pre> 1190 * Configuration of findings limit given for specified infoTypes. 1191 * </pre> 1192 * 1193 * <code> 1194 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1195 * </code> 1196 */ 1197 @java.lang.Override 1198 public java.util.List<com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit> getMaxFindingsPerInfoTypeList()1199 getMaxFindingsPerInfoTypeList() { 1200 return maxFindingsPerInfoType_; 1201 } 1202 /** 1203 * 1204 * 1205 * <pre> 1206 * Configuration of findings limit given for specified infoTypes. 1207 * </pre> 1208 * 1209 * <code> 1210 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1211 * </code> 1212 */ 1213 @java.lang.Override 1214 public java.util.List< 1215 ? extends com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder> getMaxFindingsPerInfoTypeOrBuilderList()1216 getMaxFindingsPerInfoTypeOrBuilderList() { 1217 return maxFindingsPerInfoType_; 1218 } 1219 /** 1220 * 1221 * 1222 * <pre> 1223 * Configuration of findings limit given for specified infoTypes. 1224 * </pre> 1225 * 1226 * <code> 1227 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1228 * </code> 1229 */ 1230 @java.lang.Override getMaxFindingsPerInfoTypeCount()1231 public int getMaxFindingsPerInfoTypeCount() { 1232 return maxFindingsPerInfoType_.size(); 1233 } 1234 /** 1235 * 1236 * 1237 * <pre> 1238 * Configuration of findings limit given for specified infoTypes. 1239 * </pre> 1240 * 1241 * <code> 1242 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1243 * </code> 1244 */ 1245 @java.lang.Override 1246 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType(int index)1247 getMaxFindingsPerInfoType(int index) { 1248 return maxFindingsPerInfoType_.get(index); 1249 } 1250 /** 1251 * 1252 * 1253 * <pre> 1254 * Configuration of findings limit given for specified infoTypes. 1255 * </pre> 1256 * 1257 * <code> 1258 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1259 * </code> 1260 */ 1261 @java.lang.Override 1262 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder getMaxFindingsPerInfoTypeOrBuilder(int index)1263 getMaxFindingsPerInfoTypeOrBuilder(int index) { 1264 return maxFindingsPerInfoType_.get(index); 1265 } 1266 1267 private byte memoizedIsInitialized = -1; 1268 1269 @java.lang.Override isInitialized()1270 public final boolean isInitialized() { 1271 byte isInitialized = memoizedIsInitialized; 1272 if (isInitialized == 1) return true; 1273 if (isInitialized == 0) return false; 1274 1275 memoizedIsInitialized = 1; 1276 return true; 1277 } 1278 1279 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1280 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1281 if (maxFindingsPerItem_ != 0) { 1282 output.writeInt32(1, maxFindingsPerItem_); 1283 } 1284 if (maxFindingsPerRequest_ != 0) { 1285 output.writeInt32(2, maxFindingsPerRequest_); 1286 } 1287 for (int i = 0; i < maxFindingsPerInfoType_.size(); i++) { 1288 output.writeMessage(3, maxFindingsPerInfoType_.get(i)); 1289 } 1290 getUnknownFields().writeTo(output); 1291 } 1292 1293 @java.lang.Override getSerializedSize()1294 public int getSerializedSize() { 1295 int size = memoizedSize; 1296 if (size != -1) return size; 1297 1298 size = 0; 1299 if (maxFindingsPerItem_ != 0) { 1300 size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxFindingsPerItem_); 1301 } 1302 if (maxFindingsPerRequest_ != 0) { 1303 size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxFindingsPerRequest_); 1304 } 1305 for (int i = 0; i < maxFindingsPerInfoType_.size(); i++) { 1306 size += 1307 com.google.protobuf.CodedOutputStream.computeMessageSize( 1308 3, maxFindingsPerInfoType_.get(i)); 1309 } 1310 size += getUnknownFields().getSerializedSize(); 1311 memoizedSize = size; 1312 return size; 1313 } 1314 1315 @java.lang.Override equals(final java.lang.Object obj)1316 public boolean equals(final java.lang.Object obj) { 1317 if (obj == this) { 1318 return true; 1319 } 1320 if (!(obj instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits)) { 1321 return super.equals(obj); 1322 } 1323 com.google.privacy.dlp.v2.InspectConfig.FindingLimits other = 1324 (com.google.privacy.dlp.v2.InspectConfig.FindingLimits) obj; 1325 1326 if (getMaxFindingsPerItem() != other.getMaxFindingsPerItem()) return false; 1327 if (getMaxFindingsPerRequest() != other.getMaxFindingsPerRequest()) return false; 1328 if (!getMaxFindingsPerInfoTypeList().equals(other.getMaxFindingsPerInfoTypeList())) 1329 return false; 1330 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1331 return true; 1332 } 1333 1334 @java.lang.Override hashCode()1335 public int hashCode() { 1336 if (memoizedHashCode != 0) { 1337 return memoizedHashCode; 1338 } 1339 int hash = 41; 1340 hash = (19 * hash) + getDescriptor().hashCode(); 1341 hash = (37 * hash) + MAX_FINDINGS_PER_ITEM_FIELD_NUMBER; 1342 hash = (53 * hash) + getMaxFindingsPerItem(); 1343 hash = (37 * hash) + MAX_FINDINGS_PER_REQUEST_FIELD_NUMBER; 1344 hash = (53 * hash) + getMaxFindingsPerRequest(); 1345 if (getMaxFindingsPerInfoTypeCount() > 0) { 1346 hash = (37 * hash) + MAX_FINDINGS_PER_INFO_TYPE_FIELD_NUMBER; 1347 hash = (53 * hash) + getMaxFindingsPerInfoTypeList().hashCode(); 1348 } 1349 hash = (29 * hash) + getUnknownFields().hashCode(); 1350 memoizedHashCode = hash; 1351 return hash; 1352 } 1353 parseFrom( java.nio.ByteBuffer data)1354 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( 1355 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 1356 return PARSER.parseFrom(data); 1357 } 1358 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1359 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( 1360 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1361 throws com.google.protobuf.InvalidProtocolBufferException { 1362 return PARSER.parseFrom(data, extensionRegistry); 1363 } 1364 parseFrom( com.google.protobuf.ByteString data)1365 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( 1366 com.google.protobuf.ByteString data) 1367 throws com.google.protobuf.InvalidProtocolBufferException { 1368 return PARSER.parseFrom(data); 1369 } 1370 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1371 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( 1372 com.google.protobuf.ByteString data, 1373 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1374 throws com.google.protobuf.InvalidProtocolBufferException { 1375 return PARSER.parseFrom(data, extensionRegistry); 1376 } 1377 parseFrom(byte[] data)1378 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom(byte[] data) 1379 throws com.google.protobuf.InvalidProtocolBufferException { 1380 return PARSER.parseFrom(data); 1381 } 1382 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1383 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( 1384 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1385 throws com.google.protobuf.InvalidProtocolBufferException { 1386 return PARSER.parseFrom(data, extensionRegistry); 1387 } 1388 parseFrom( java.io.InputStream input)1389 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( 1390 java.io.InputStream input) throws java.io.IOException { 1391 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1392 } 1393 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1394 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( 1395 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1396 throws java.io.IOException { 1397 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1398 PARSER, input, extensionRegistry); 1399 } 1400 parseDelimitedFrom( java.io.InputStream input)1401 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseDelimitedFrom( 1402 java.io.InputStream input) throws java.io.IOException { 1403 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1404 } 1405 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1406 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseDelimitedFrom( 1407 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1408 throws java.io.IOException { 1409 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1410 PARSER, input, extensionRegistry); 1411 } 1412 parseFrom( com.google.protobuf.CodedInputStream input)1413 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( 1414 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1415 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1416 } 1417 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1418 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( 1419 com.google.protobuf.CodedInputStream input, 1420 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1421 throws java.io.IOException { 1422 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1423 PARSER, input, extensionRegistry); 1424 } 1425 1426 @java.lang.Override newBuilderForType()1427 public Builder newBuilderForType() { 1428 return newBuilder(); 1429 } 1430 newBuilder()1431 public static Builder newBuilder() { 1432 return DEFAULT_INSTANCE.toBuilder(); 1433 } 1434 newBuilder( com.google.privacy.dlp.v2.InspectConfig.FindingLimits prototype)1435 public static Builder newBuilder( 1436 com.google.privacy.dlp.v2.InspectConfig.FindingLimits prototype) { 1437 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1438 } 1439 1440 @java.lang.Override toBuilder()1441 public Builder toBuilder() { 1442 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1443 } 1444 1445 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1446 protected Builder newBuilderForType( 1447 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1448 Builder builder = new Builder(parent); 1449 return builder; 1450 } 1451 /** 1452 * 1453 * 1454 * <pre> 1455 * Configuration to control the number of findings returned for inspection. 1456 * This is not used for de-identification or data profiling. 1457 * When redacting sensitive data from images, finding limits don't apply. They 1458 * can cause unexpected or inconsistent results, where only some data is 1459 * redacted. Don't include finding limits in 1460 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 1461 * requests. Otherwise, Cloud DLP returns an error. 1462 * </pre> 1463 * 1464 * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits} 1465 */ 1466 public static final class Builder 1467 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1468 implements 1469 // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits) 1470 com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder { getDescriptor()1471 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1472 return com.google.privacy.dlp.v2.DlpProto 1473 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; 1474 } 1475 1476 @java.lang.Override 1477 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1478 internalGetFieldAccessorTable() { 1479 return com.google.privacy.dlp.v2.DlpProto 1480 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable 1481 .ensureFieldAccessorsInitialized( 1482 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.class, 1483 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder.class); 1484 } 1485 1486 // Construct using com.google.privacy.dlp.v2.InspectConfig.FindingLimits.newBuilder() Builder()1487 private Builder() {} 1488 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1489 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1490 super(parent); 1491 } 1492 1493 @java.lang.Override clear()1494 public Builder clear() { 1495 super.clear(); 1496 bitField0_ = 0; 1497 maxFindingsPerItem_ = 0; 1498 maxFindingsPerRequest_ = 0; 1499 if (maxFindingsPerInfoTypeBuilder_ == null) { 1500 maxFindingsPerInfoType_ = java.util.Collections.emptyList(); 1501 } else { 1502 maxFindingsPerInfoType_ = null; 1503 maxFindingsPerInfoTypeBuilder_.clear(); 1504 } 1505 bitField0_ = (bitField0_ & ~0x00000004); 1506 return this; 1507 } 1508 1509 @java.lang.Override getDescriptorForType()1510 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1511 return com.google.privacy.dlp.v2.DlpProto 1512 .internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; 1513 } 1514 1515 @java.lang.Override getDefaultInstanceForType()1516 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstanceForType() { 1517 return com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance(); 1518 } 1519 1520 @java.lang.Override build()1521 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits build() { 1522 com.google.privacy.dlp.v2.InspectConfig.FindingLimits result = buildPartial(); 1523 if (!result.isInitialized()) { 1524 throw newUninitializedMessageException(result); 1525 } 1526 return result; 1527 } 1528 1529 @java.lang.Override buildPartial()1530 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits buildPartial() { 1531 com.google.privacy.dlp.v2.InspectConfig.FindingLimits result = 1532 new com.google.privacy.dlp.v2.InspectConfig.FindingLimits(this); 1533 buildPartialRepeatedFields(result); 1534 if (bitField0_ != 0) { 1535 buildPartial0(result); 1536 } 1537 onBuilt(); 1538 return result; 1539 } 1540 buildPartialRepeatedFields( com.google.privacy.dlp.v2.InspectConfig.FindingLimits result)1541 private void buildPartialRepeatedFields( 1542 com.google.privacy.dlp.v2.InspectConfig.FindingLimits result) { 1543 if (maxFindingsPerInfoTypeBuilder_ == null) { 1544 if (((bitField0_ & 0x00000004) != 0)) { 1545 maxFindingsPerInfoType_ = 1546 java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); 1547 bitField0_ = (bitField0_ & ~0x00000004); 1548 } 1549 result.maxFindingsPerInfoType_ = maxFindingsPerInfoType_; 1550 } else { 1551 result.maxFindingsPerInfoType_ = maxFindingsPerInfoTypeBuilder_.build(); 1552 } 1553 } 1554 buildPartial0(com.google.privacy.dlp.v2.InspectConfig.FindingLimits result)1555 private void buildPartial0(com.google.privacy.dlp.v2.InspectConfig.FindingLimits result) { 1556 int from_bitField0_ = bitField0_; 1557 if (((from_bitField0_ & 0x00000001) != 0)) { 1558 result.maxFindingsPerItem_ = maxFindingsPerItem_; 1559 } 1560 if (((from_bitField0_ & 0x00000002) != 0)) { 1561 result.maxFindingsPerRequest_ = maxFindingsPerRequest_; 1562 } 1563 } 1564 1565 @java.lang.Override clone()1566 public Builder clone() { 1567 return super.clone(); 1568 } 1569 1570 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1571 public Builder setField( 1572 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1573 return super.setField(field, value); 1574 } 1575 1576 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1577 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1578 return super.clearField(field); 1579 } 1580 1581 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1582 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1583 return super.clearOneof(oneof); 1584 } 1585 1586 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1587 public Builder setRepeatedField( 1588 com.google.protobuf.Descriptors.FieldDescriptor field, 1589 int index, 1590 java.lang.Object value) { 1591 return super.setRepeatedField(field, index, value); 1592 } 1593 1594 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1595 public Builder addRepeatedField( 1596 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1597 return super.addRepeatedField(field, value); 1598 } 1599 1600 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1601 public Builder mergeFrom(com.google.protobuf.Message other) { 1602 if (other instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits) { 1603 return mergeFrom((com.google.privacy.dlp.v2.InspectConfig.FindingLimits) other); 1604 } else { 1605 super.mergeFrom(other); 1606 return this; 1607 } 1608 } 1609 mergeFrom(com.google.privacy.dlp.v2.InspectConfig.FindingLimits other)1610 public Builder mergeFrom(com.google.privacy.dlp.v2.InspectConfig.FindingLimits other) { 1611 if (other == com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance()) 1612 return this; 1613 if (other.getMaxFindingsPerItem() != 0) { 1614 setMaxFindingsPerItem(other.getMaxFindingsPerItem()); 1615 } 1616 if (other.getMaxFindingsPerRequest() != 0) { 1617 setMaxFindingsPerRequest(other.getMaxFindingsPerRequest()); 1618 } 1619 if (maxFindingsPerInfoTypeBuilder_ == null) { 1620 if (!other.maxFindingsPerInfoType_.isEmpty()) { 1621 if (maxFindingsPerInfoType_.isEmpty()) { 1622 maxFindingsPerInfoType_ = other.maxFindingsPerInfoType_; 1623 bitField0_ = (bitField0_ & ~0x00000004); 1624 } else { 1625 ensureMaxFindingsPerInfoTypeIsMutable(); 1626 maxFindingsPerInfoType_.addAll(other.maxFindingsPerInfoType_); 1627 } 1628 onChanged(); 1629 } 1630 } else { 1631 if (!other.maxFindingsPerInfoType_.isEmpty()) { 1632 if (maxFindingsPerInfoTypeBuilder_.isEmpty()) { 1633 maxFindingsPerInfoTypeBuilder_.dispose(); 1634 maxFindingsPerInfoTypeBuilder_ = null; 1635 maxFindingsPerInfoType_ = other.maxFindingsPerInfoType_; 1636 bitField0_ = (bitField0_ & ~0x00000004); 1637 maxFindingsPerInfoTypeBuilder_ = 1638 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1639 ? getMaxFindingsPerInfoTypeFieldBuilder() 1640 : null; 1641 } else { 1642 maxFindingsPerInfoTypeBuilder_.addAllMessages(other.maxFindingsPerInfoType_); 1643 } 1644 } 1645 } 1646 this.mergeUnknownFields(other.getUnknownFields()); 1647 onChanged(); 1648 return this; 1649 } 1650 1651 @java.lang.Override isInitialized()1652 public final boolean isInitialized() { 1653 return true; 1654 } 1655 1656 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1657 public Builder mergeFrom( 1658 com.google.protobuf.CodedInputStream input, 1659 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1660 throws java.io.IOException { 1661 if (extensionRegistry == null) { 1662 throw new java.lang.NullPointerException(); 1663 } 1664 try { 1665 boolean done = false; 1666 while (!done) { 1667 int tag = input.readTag(); 1668 switch (tag) { 1669 case 0: 1670 done = true; 1671 break; 1672 case 8: 1673 { 1674 maxFindingsPerItem_ = input.readInt32(); 1675 bitField0_ |= 0x00000001; 1676 break; 1677 } // case 8 1678 case 16: 1679 { 1680 maxFindingsPerRequest_ = input.readInt32(); 1681 bitField0_ |= 0x00000002; 1682 break; 1683 } // case 16 1684 case 26: 1685 { 1686 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit m = 1687 input.readMessage( 1688 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit 1689 .parser(), 1690 extensionRegistry); 1691 if (maxFindingsPerInfoTypeBuilder_ == null) { 1692 ensureMaxFindingsPerInfoTypeIsMutable(); 1693 maxFindingsPerInfoType_.add(m); 1694 } else { 1695 maxFindingsPerInfoTypeBuilder_.addMessage(m); 1696 } 1697 break; 1698 } // case 26 1699 default: 1700 { 1701 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1702 done = true; // was an endgroup tag 1703 } 1704 break; 1705 } // default: 1706 } // switch (tag) 1707 } // while (!done) 1708 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1709 throw e.unwrapIOException(); 1710 } finally { 1711 onChanged(); 1712 } // finally 1713 return this; 1714 } 1715 1716 private int bitField0_; 1717 1718 private int maxFindingsPerItem_; 1719 /** 1720 * 1721 * 1722 * <pre> 1723 * Max number of findings that will be returned for each item scanned. 1724 * When set within `InspectJobConfig`, 1725 * the maximum returned is 2000 regardless if this is set higher. 1726 * When set within `InspectContentRequest`, this field is ignored. 1727 * </pre> 1728 * 1729 * <code>int32 max_findings_per_item = 1;</code> 1730 * 1731 * @return The maxFindingsPerItem. 1732 */ 1733 @java.lang.Override getMaxFindingsPerItem()1734 public int getMaxFindingsPerItem() { 1735 return maxFindingsPerItem_; 1736 } 1737 /** 1738 * 1739 * 1740 * <pre> 1741 * Max number of findings that will be returned for each item scanned. 1742 * When set within `InspectJobConfig`, 1743 * the maximum returned is 2000 regardless if this is set higher. 1744 * When set within `InspectContentRequest`, this field is ignored. 1745 * </pre> 1746 * 1747 * <code>int32 max_findings_per_item = 1;</code> 1748 * 1749 * @param value The maxFindingsPerItem to set. 1750 * @return This builder for chaining. 1751 */ setMaxFindingsPerItem(int value)1752 public Builder setMaxFindingsPerItem(int value) { 1753 1754 maxFindingsPerItem_ = value; 1755 bitField0_ |= 0x00000001; 1756 onChanged(); 1757 return this; 1758 } 1759 /** 1760 * 1761 * 1762 * <pre> 1763 * Max number of findings that will be returned for each item scanned. 1764 * When set within `InspectJobConfig`, 1765 * the maximum returned is 2000 regardless if this is set higher. 1766 * When set within `InspectContentRequest`, this field is ignored. 1767 * </pre> 1768 * 1769 * <code>int32 max_findings_per_item = 1;</code> 1770 * 1771 * @return This builder for chaining. 1772 */ clearMaxFindingsPerItem()1773 public Builder clearMaxFindingsPerItem() { 1774 bitField0_ = (bitField0_ & ~0x00000001); 1775 maxFindingsPerItem_ = 0; 1776 onChanged(); 1777 return this; 1778 } 1779 1780 private int maxFindingsPerRequest_; 1781 /** 1782 * 1783 * 1784 * <pre> 1785 * Max number of findings that will be returned per request/job. 1786 * When set within `InspectContentRequest`, the maximum returned is 2000 1787 * regardless if this is set higher. 1788 * </pre> 1789 * 1790 * <code>int32 max_findings_per_request = 2;</code> 1791 * 1792 * @return The maxFindingsPerRequest. 1793 */ 1794 @java.lang.Override getMaxFindingsPerRequest()1795 public int getMaxFindingsPerRequest() { 1796 return maxFindingsPerRequest_; 1797 } 1798 /** 1799 * 1800 * 1801 * <pre> 1802 * Max number of findings that will be returned per request/job. 1803 * When set within `InspectContentRequest`, the maximum returned is 2000 1804 * regardless if this is set higher. 1805 * </pre> 1806 * 1807 * <code>int32 max_findings_per_request = 2;</code> 1808 * 1809 * @param value The maxFindingsPerRequest to set. 1810 * @return This builder for chaining. 1811 */ setMaxFindingsPerRequest(int value)1812 public Builder setMaxFindingsPerRequest(int value) { 1813 1814 maxFindingsPerRequest_ = value; 1815 bitField0_ |= 0x00000002; 1816 onChanged(); 1817 return this; 1818 } 1819 /** 1820 * 1821 * 1822 * <pre> 1823 * Max number of findings that will be returned per request/job. 1824 * When set within `InspectContentRequest`, the maximum returned is 2000 1825 * regardless if this is set higher. 1826 * </pre> 1827 * 1828 * <code>int32 max_findings_per_request = 2;</code> 1829 * 1830 * @return This builder for chaining. 1831 */ clearMaxFindingsPerRequest()1832 public Builder clearMaxFindingsPerRequest() { 1833 bitField0_ = (bitField0_ & ~0x00000002); 1834 maxFindingsPerRequest_ = 0; 1835 onChanged(); 1836 return this; 1837 } 1838 1839 private java.util.List<com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit> 1840 maxFindingsPerInfoType_ = java.util.Collections.emptyList(); 1841 ensureMaxFindingsPerInfoTypeIsMutable()1842 private void ensureMaxFindingsPerInfoTypeIsMutable() { 1843 if (!((bitField0_ & 0x00000004) != 0)) { 1844 maxFindingsPerInfoType_ = 1845 new java.util.ArrayList< 1846 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit>( 1847 maxFindingsPerInfoType_); 1848 bitField0_ |= 0x00000004; 1849 } 1850 } 1851 1852 private com.google.protobuf.RepeatedFieldBuilderV3< 1853 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, 1854 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder, 1855 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder> 1856 maxFindingsPerInfoTypeBuilder_; 1857 1858 /** 1859 * 1860 * 1861 * <pre> 1862 * Configuration of findings limit given for specified infoTypes. 1863 * </pre> 1864 * 1865 * <code> 1866 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1867 * </code> 1868 */ 1869 public java.util.List<com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit> getMaxFindingsPerInfoTypeList()1870 getMaxFindingsPerInfoTypeList() { 1871 if (maxFindingsPerInfoTypeBuilder_ == null) { 1872 return java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); 1873 } else { 1874 return maxFindingsPerInfoTypeBuilder_.getMessageList(); 1875 } 1876 } 1877 /** 1878 * 1879 * 1880 * <pre> 1881 * Configuration of findings limit given for specified infoTypes. 1882 * </pre> 1883 * 1884 * <code> 1885 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1886 * </code> 1887 */ getMaxFindingsPerInfoTypeCount()1888 public int getMaxFindingsPerInfoTypeCount() { 1889 if (maxFindingsPerInfoTypeBuilder_ == null) { 1890 return maxFindingsPerInfoType_.size(); 1891 } else { 1892 return maxFindingsPerInfoTypeBuilder_.getCount(); 1893 } 1894 } 1895 /** 1896 * 1897 * 1898 * <pre> 1899 * Configuration of findings limit given for specified infoTypes. 1900 * </pre> 1901 * 1902 * <code> 1903 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1904 * </code> 1905 */ 1906 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType(int index)1907 getMaxFindingsPerInfoType(int index) { 1908 if (maxFindingsPerInfoTypeBuilder_ == null) { 1909 return maxFindingsPerInfoType_.get(index); 1910 } else { 1911 return maxFindingsPerInfoTypeBuilder_.getMessage(index); 1912 } 1913 } 1914 /** 1915 * 1916 * 1917 * <pre> 1918 * Configuration of findings limit given for specified infoTypes. 1919 * </pre> 1920 * 1921 * <code> 1922 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1923 * </code> 1924 */ setMaxFindingsPerInfoType( int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value)1925 public Builder setMaxFindingsPerInfoType( 1926 int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value) { 1927 if (maxFindingsPerInfoTypeBuilder_ == null) { 1928 if (value == null) { 1929 throw new NullPointerException(); 1930 } 1931 ensureMaxFindingsPerInfoTypeIsMutable(); 1932 maxFindingsPerInfoType_.set(index, value); 1933 onChanged(); 1934 } else { 1935 maxFindingsPerInfoTypeBuilder_.setMessage(index, value); 1936 } 1937 return this; 1938 } 1939 /** 1940 * 1941 * 1942 * <pre> 1943 * Configuration of findings limit given for specified infoTypes. 1944 * </pre> 1945 * 1946 * <code> 1947 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1948 * </code> 1949 */ setMaxFindingsPerInfoType( int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder builderForValue)1950 public Builder setMaxFindingsPerInfoType( 1951 int index, 1952 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder 1953 builderForValue) { 1954 if (maxFindingsPerInfoTypeBuilder_ == null) { 1955 ensureMaxFindingsPerInfoTypeIsMutable(); 1956 maxFindingsPerInfoType_.set(index, builderForValue.build()); 1957 onChanged(); 1958 } else { 1959 maxFindingsPerInfoTypeBuilder_.setMessage(index, builderForValue.build()); 1960 } 1961 return this; 1962 } 1963 /** 1964 * 1965 * 1966 * <pre> 1967 * Configuration of findings limit given for specified infoTypes. 1968 * </pre> 1969 * 1970 * <code> 1971 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1972 * </code> 1973 */ addMaxFindingsPerInfoType( com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value)1974 public Builder addMaxFindingsPerInfoType( 1975 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value) { 1976 if (maxFindingsPerInfoTypeBuilder_ == null) { 1977 if (value == null) { 1978 throw new NullPointerException(); 1979 } 1980 ensureMaxFindingsPerInfoTypeIsMutable(); 1981 maxFindingsPerInfoType_.add(value); 1982 onChanged(); 1983 } else { 1984 maxFindingsPerInfoTypeBuilder_.addMessage(value); 1985 } 1986 return this; 1987 } 1988 /** 1989 * 1990 * 1991 * <pre> 1992 * Configuration of findings limit given for specified infoTypes. 1993 * </pre> 1994 * 1995 * <code> 1996 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 1997 * </code> 1998 */ addMaxFindingsPerInfoType( int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value)1999 public Builder addMaxFindingsPerInfoType( 2000 int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value) { 2001 if (maxFindingsPerInfoTypeBuilder_ == null) { 2002 if (value == null) { 2003 throw new NullPointerException(); 2004 } 2005 ensureMaxFindingsPerInfoTypeIsMutable(); 2006 maxFindingsPerInfoType_.add(index, value); 2007 onChanged(); 2008 } else { 2009 maxFindingsPerInfoTypeBuilder_.addMessage(index, value); 2010 } 2011 return this; 2012 } 2013 /** 2014 * 2015 * 2016 * <pre> 2017 * Configuration of findings limit given for specified infoTypes. 2018 * </pre> 2019 * 2020 * <code> 2021 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2022 * </code> 2023 */ addMaxFindingsPerInfoType( com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder builderForValue)2024 public Builder addMaxFindingsPerInfoType( 2025 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder 2026 builderForValue) { 2027 if (maxFindingsPerInfoTypeBuilder_ == null) { 2028 ensureMaxFindingsPerInfoTypeIsMutable(); 2029 maxFindingsPerInfoType_.add(builderForValue.build()); 2030 onChanged(); 2031 } else { 2032 maxFindingsPerInfoTypeBuilder_.addMessage(builderForValue.build()); 2033 } 2034 return this; 2035 } 2036 /** 2037 * 2038 * 2039 * <pre> 2040 * Configuration of findings limit given for specified infoTypes. 2041 * </pre> 2042 * 2043 * <code> 2044 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2045 * </code> 2046 */ addMaxFindingsPerInfoType( int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder builderForValue)2047 public Builder addMaxFindingsPerInfoType( 2048 int index, 2049 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder 2050 builderForValue) { 2051 if (maxFindingsPerInfoTypeBuilder_ == null) { 2052 ensureMaxFindingsPerInfoTypeIsMutable(); 2053 maxFindingsPerInfoType_.add(index, builderForValue.build()); 2054 onChanged(); 2055 } else { 2056 maxFindingsPerInfoTypeBuilder_.addMessage(index, builderForValue.build()); 2057 } 2058 return this; 2059 } 2060 /** 2061 * 2062 * 2063 * <pre> 2064 * Configuration of findings limit given for specified infoTypes. 2065 * </pre> 2066 * 2067 * <code> 2068 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2069 * </code> 2070 */ addAllMaxFindingsPerInfoType( java.lang.Iterable< ? extends com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit> values)2071 public Builder addAllMaxFindingsPerInfoType( 2072 java.lang.Iterable< 2073 ? extends com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit> 2074 values) { 2075 if (maxFindingsPerInfoTypeBuilder_ == null) { 2076 ensureMaxFindingsPerInfoTypeIsMutable(); 2077 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, maxFindingsPerInfoType_); 2078 onChanged(); 2079 } else { 2080 maxFindingsPerInfoTypeBuilder_.addAllMessages(values); 2081 } 2082 return this; 2083 } 2084 /** 2085 * 2086 * 2087 * <pre> 2088 * Configuration of findings limit given for specified infoTypes. 2089 * </pre> 2090 * 2091 * <code> 2092 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2093 * </code> 2094 */ clearMaxFindingsPerInfoType()2095 public Builder clearMaxFindingsPerInfoType() { 2096 if (maxFindingsPerInfoTypeBuilder_ == null) { 2097 maxFindingsPerInfoType_ = java.util.Collections.emptyList(); 2098 bitField0_ = (bitField0_ & ~0x00000004); 2099 onChanged(); 2100 } else { 2101 maxFindingsPerInfoTypeBuilder_.clear(); 2102 } 2103 return this; 2104 } 2105 /** 2106 * 2107 * 2108 * <pre> 2109 * Configuration of findings limit given for specified infoTypes. 2110 * </pre> 2111 * 2112 * <code> 2113 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2114 * </code> 2115 */ removeMaxFindingsPerInfoType(int index)2116 public Builder removeMaxFindingsPerInfoType(int index) { 2117 if (maxFindingsPerInfoTypeBuilder_ == null) { 2118 ensureMaxFindingsPerInfoTypeIsMutable(); 2119 maxFindingsPerInfoType_.remove(index); 2120 onChanged(); 2121 } else { 2122 maxFindingsPerInfoTypeBuilder_.remove(index); 2123 } 2124 return this; 2125 } 2126 /** 2127 * 2128 * 2129 * <pre> 2130 * Configuration of findings limit given for specified infoTypes. 2131 * </pre> 2132 * 2133 * <code> 2134 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2135 * </code> 2136 */ 2137 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder getMaxFindingsPerInfoTypeBuilder(int index)2138 getMaxFindingsPerInfoTypeBuilder(int index) { 2139 return getMaxFindingsPerInfoTypeFieldBuilder().getBuilder(index); 2140 } 2141 /** 2142 * 2143 * 2144 * <pre> 2145 * Configuration of findings limit given for specified infoTypes. 2146 * </pre> 2147 * 2148 * <code> 2149 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2150 * </code> 2151 */ 2152 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder getMaxFindingsPerInfoTypeOrBuilder(int index)2153 getMaxFindingsPerInfoTypeOrBuilder(int index) { 2154 if (maxFindingsPerInfoTypeBuilder_ == null) { 2155 return maxFindingsPerInfoType_.get(index); 2156 } else { 2157 return maxFindingsPerInfoTypeBuilder_.getMessageOrBuilder(index); 2158 } 2159 } 2160 /** 2161 * 2162 * 2163 * <pre> 2164 * Configuration of findings limit given for specified infoTypes. 2165 * </pre> 2166 * 2167 * <code> 2168 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2169 * </code> 2170 */ 2171 public java.util.List< 2172 ? extends 2173 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder> getMaxFindingsPerInfoTypeOrBuilderList()2174 getMaxFindingsPerInfoTypeOrBuilderList() { 2175 if (maxFindingsPerInfoTypeBuilder_ != null) { 2176 return maxFindingsPerInfoTypeBuilder_.getMessageOrBuilderList(); 2177 } else { 2178 return java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); 2179 } 2180 } 2181 /** 2182 * 2183 * 2184 * <pre> 2185 * Configuration of findings limit given for specified infoTypes. 2186 * </pre> 2187 * 2188 * <code> 2189 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2190 * </code> 2191 */ 2192 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder addMaxFindingsPerInfoTypeBuilder()2193 addMaxFindingsPerInfoTypeBuilder() { 2194 return getMaxFindingsPerInfoTypeFieldBuilder() 2195 .addBuilder( 2196 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit 2197 .getDefaultInstance()); 2198 } 2199 /** 2200 * 2201 * 2202 * <pre> 2203 * Configuration of findings limit given for specified infoTypes. 2204 * </pre> 2205 * 2206 * <code> 2207 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2208 * </code> 2209 */ 2210 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder addMaxFindingsPerInfoTypeBuilder(int index)2211 addMaxFindingsPerInfoTypeBuilder(int index) { 2212 return getMaxFindingsPerInfoTypeFieldBuilder() 2213 .addBuilder( 2214 index, 2215 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit 2216 .getDefaultInstance()); 2217 } 2218 /** 2219 * 2220 * 2221 * <pre> 2222 * Configuration of findings limit given for specified infoTypes. 2223 * </pre> 2224 * 2225 * <code> 2226 * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; 2227 * </code> 2228 */ 2229 public java.util.List< 2230 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder> getMaxFindingsPerInfoTypeBuilderList()2231 getMaxFindingsPerInfoTypeBuilderList() { 2232 return getMaxFindingsPerInfoTypeFieldBuilder().getBuilderList(); 2233 } 2234 2235 private com.google.protobuf.RepeatedFieldBuilderV3< 2236 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, 2237 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder, 2238 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder> getMaxFindingsPerInfoTypeFieldBuilder()2239 getMaxFindingsPerInfoTypeFieldBuilder() { 2240 if (maxFindingsPerInfoTypeBuilder_ == null) { 2241 maxFindingsPerInfoTypeBuilder_ = 2242 new com.google.protobuf.RepeatedFieldBuilderV3< 2243 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, 2244 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder, 2245 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder>( 2246 maxFindingsPerInfoType_, 2247 ((bitField0_ & 0x00000004) != 0), 2248 getParentForChildren(), 2249 isClean()); 2250 maxFindingsPerInfoType_ = null; 2251 } 2252 return maxFindingsPerInfoTypeBuilder_; 2253 } 2254 2255 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2256 public final Builder setUnknownFields( 2257 final com.google.protobuf.UnknownFieldSet unknownFields) { 2258 return super.setUnknownFields(unknownFields); 2259 } 2260 2261 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2262 public final Builder mergeUnknownFields( 2263 final com.google.protobuf.UnknownFieldSet unknownFields) { 2264 return super.mergeUnknownFields(unknownFields); 2265 } 2266 2267 // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits) 2268 } 2269 2270 // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits) 2271 private static final com.google.privacy.dlp.v2.InspectConfig.FindingLimits DEFAULT_INSTANCE; 2272 2273 static { 2274 DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectConfig.FindingLimits(); 2275 } 2276 getDefaultInstance()2277 public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstance() { 2278 return DEFAULT_INSTANCE; 2279 } 2280 2281 private static final com.google.protobuf.Parser<FindingLimits> PARSER = 2282 new com.google.protobuf.AbstractParser<FindingLimits>() { 2283 @java.lang.Override 2284 public FindingLimits parsePartialFrom( 2285 com.google.protobuf.CodedInputStream input, 2286 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2287 throws com.google.protobuf.InvalidProtocolBufferException { 2288 Builder builder = newBuilder(); 2289 try { 2290 builder.mergeFrom(input, extensionRegistry); 2291 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2292 throw e.setUnfinishedMessage(builder.buildPartial()); 2293 } catch (com.google.protobuf.UninitializedMessageException e) { 2294 throw e.asInvalidProtocolBufferException() 2295 .setUnfinishedMessage(builder.buildPartial()); 2296 } catch (java.io.IOException e) { 2297 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2298 .setUnfinishedMessage(builder.buildPartial()); 2299 } 2300 return builder.buildPartial(); 2301 } 2302 }; 2303 parser()2304 public static com.google.protobuf.Parser<FindingLimits> parser() { 2305 return PARSER; 2306 } 2307 2308 @java.lang.Override getParserForType()2309 public com.google.protobuf.Parser<FindingLimits> getParserForType() { 2310 return PARSER; 2311 } 2312 2313 @java.lang.Override getDefaultInstanceForType()2314 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstanceForType() { 2315 return DEFAULT_INSTANCE; 2316 } 2317 } 2318 2319 public static final int INFO_TYPES_FIELD_NUMBER = 1; 2320 2321 @SuppressWarnings("serial") 2322 private java.util.List<com.google.privacy.dlp.v2.InfoType> infoTypes_; 2323 /** 2324 * 2325 * 2326 * <pre> 2327 * Restricts what info_types to look for. The values must correspond to 2328 * InfoType values returned by ListInfoTypes or listed at 2329 * https://cloud.google.com/dlp/docs/infotypes-reference. 2330 * When no InfoTypes or CustomInfoTypes are specified in a request, the 2331 * system may automatically choose what detectors to run. By default this may 2332 * be all types, but may change over time as detectors are updated. 2333 * If you need precise control and predictability as to what detectors are 2334 * run you should specify specific InfoTypes listed in the reference, 2335 * otherwise a default list will be used, which may change over time. 2336 * </pre> 2337 * 2338 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 2339 */ 2340 @java.lang.Override getInfoTypesList()2341 public java.util.List<com.google.privacy.dlp.v2.InfoType> getInfoTypesList() { 2342 return infoTypes_; 2343 } 2344 /** 2345 * 2346 * 2347 * <pre> 2348 * Restricts what info_types to look for. The values must correspond to 2349 * InfoType values returned by ListInfoTypes or listed at 2350 * https://cloud.google.com/dlp/docs/infotypes-reference. 2351 * When no InfoTypes or CustomInfoTypes are specified in a request, the 2352 * system may automatically choose what detectors to run. By default this may 2353 * be all types, but may change over time as detectors are updated. 2354 * If you need precise control and predictability as to what detectors are 2355 * run you should specify specific InfoTypes listed in the reference, 2356 * otherwise a default list will be used, which may change over time. 2357 * </pre> 2358 * 2359 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 2360 */ 2361 @java.lang.Override 2362 public java.util.List<? extends com.google.privacy.dlp.v2.InfoTypeOrBuilder> getInfoTypesOrBuilderList()2363 getInfoTypesOrBuilderList() { 2364 return infoTypes_; 2365 } 2366 /** 2367 * 2368 * 2369 * <pre> 2370 * Restricts what info_types to look for. The values must correspond to 2371 * InfoType values returned by ListInfoTypes or listed at 2372 * https://cloud.google.com/dlp/docs/infotypes-reference. 2373 * When no InfoTypes or CustomInfoTypes are specified in a request, the 2374 * system may automatically choose what detectors to run. By default this may 2375 * be all types, but may change over time as detectors are updated. 2376 * If you need precise control and predictability as to what detectors are 2377 * run you should specify specific InfoTypes listed in the reference, 2378 * otherwise a default list will be used, which may change over time. 2379 * </pre> 2380 * 2381 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 2382 */ 2383 @java.lang.Override getInfoTypesCount()2384 public int getInfoTypesCount() { 2385 return infoTypes_.size(); 2386 } 2387 /** 2388 * 2389 * 2390 * <pre> 2391 * Restricts what info_types to look for. The values must correspond to 2392 * InfoType values returned by ListInfoTypes or listed at 2393 * https://cloud.google.com/dlp/docs/infotypes-reference. 2394 * When no InfoTypes or CustomInfoTypes are specified in a request, the 2395 * system may automatically choose what detectors to run. By default this may 2396 * be all types, but may change over time as detectors are updated. 2397 * If you need precise control and predictability as to what detectors are 2398 * run you should specify specific InfoTypes listed in the reference, 2399 * otherwise a default list will be used, which may change over time. 2400 * </pre> 2401 * 2402 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 2403 */ 2404 @java.lang.Override getInfoTypes(int index)2405 public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { 2406 return infoTypes_.get(index); 2407 } 2408 /** 2409 * 2410 * 2411 * <pre> 2412 * Restricts what info_types to look for. The values must correspond to 2413 * InfoType values returned by ListInfoTypes or listed at 2414 * https://cloud.google.com/dlp/docs/infotypes-reference. 2415 * When no InfoTypes or CustomInfoTypes are specified in a request, the 2416 * system may automatically choose what detectors to run. By default this may 2417 * be all types, but may change over time as detectors are updated. 2418 * If you need precise control and predictability as to what detectors are 2419 * run you should specify specific InfoTypes listed in the reference, 2420 * otherwise a default list will be used, which may change over time. 2421 * </pre> 2422 * 2423 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 2424 */ 2425 @java.lang.Override getInfoTypesOrBuilder(int index)2426 public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder(int index) { 2427 return infoTypes_.get(index); 2428 } 2429 2430 public static final int MIN_LIKELIHOOD_FIELD_NUMBER = 2; 2431 private int minLikelihood_ = 0; 2432 /** 2433 * 2434 * 2435 * <pre> 2436 * Only returns findings equal or above this threshold. The default is 2437 * POSSIBLE. 2438 * See https://cloud.google.com/dlp/docs/likelihood to learn more. 2439 * </pre> 2440 * 2441 * <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code> 2442 * 2443 * @return The enum numeric value on the wire for minLikelihood. 2444 */ 2445 @java.lang.Override getMinLikelihoodValue()2446 public int getMinLikelihoodValue() { 2447 return minLikelihood_; 2448 } 2449 /** 2450 * 2451 * 2452 * <pre> 2453 * Only returns findings equal or above this threshold. The default is 2454 * POSSIBLE. 2455 * See https://cloud.google.com/dlp/docs/likelihood to learn more. 2456 * </pre> 2457 * 2458 * <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code> 2459 * 2460 * @return The minLikelihood. 2461 */ 2462 @java.lang.Override getMinLikelihood()2463 public com.google.privacy.dlp.v2.Likelihood getMinLikelihood() { 2464 com.google.privacy.dlp.v2.Likelihood result = 2465 com.google.privacy.dlp.v2.Likelihood.forNumber(minLikelihood_); 2466 return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; 2467 } 2468 2469 public static final int LIMITS_FIELD_NUMBER = 3; 2470 private com.google.privacy.dlp.v2.InspectConfig.FindingLimits limits_; 2471 /** 2472 * 2473 * 2474 * <pre> 2475 * Configuration to control the number of findings returned. 2476 * This is not used for data profiling. 2477 * When redacting sensitive data from images, finding limits don't apply. They 2478 * can cause unexpected or inconsistent results, where only some data is 2479 * redacted. Don't include finding limits in 2480 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 2481 * requests. Otherwise, Cloud DLP returns an error. 2482 * </pre> 2483 * 2484 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 2485 * 2486 * @return Whether the limits field is set. 2487 */ 2488 @java.lang.Override hasLimits()2489 public boolean hasLimits() { 2490 return limits_ != null; 2491 } 2492 /** 2493 * 2494 * 2495 * <pre> 2496 * Configuration to control the number of findings returned. 2497 * This is not used for data profiling. 2498 * When redacting sensitive data from images, finding limits don't apply. They 2499 * can cause unexpected or inconsistent results, where only some data is 2500 * redacted. Don't include finding limits in 2501 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 2502 * requests. Otherwise, Cloud DLP returns an error. 2503 * </pre> 2504 * 2505 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 2506 * 2507 * @return The limits. 2508 */ 2509 @java.lang.Override getLimits()2510 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits() { 2511 return limits_ == null 2512 ? com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() 2513 : limits_; 2514 } 2515 /** 2516 * 2517 * 2518 * <pre> 2519 * Configuration to control the number of findings returned. 2520 * This is not used for data profiling. 2521 * When redacting sensitive data from images, finding limits don't apply. They 2522 * can cause unexpected or inconsistent results, where only some data is 2523 * redacted. Don't include finding limits in 2524 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 2525 * requests. Otherwise, Cloud DLP returns an error. 2526 * </pre> 2527 * 2528 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 2529 */ 2530 @java.lang.Override getLimitsOrBuilder()2531 public com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder getLimitsOrBuilder() { 2532 return limits_ == null 2533 ? com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() 2534 : limits_; 2535 } 2536 2537 public static final int INCLUDE_QUOTE_FIELD_NUMBER = 4; 2538 private boolean includeQuote_ = false; 2539 /** 2540 * 2541 * 2542 * <pre> 2543 * When true, a contextual quote from the data that triggered a finding is 2544 * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote]. 2545 * This is not used for data profiling. 2546 * </pre> 2547 * 2548 * <code>bool include_quote = 4;</code> 2549 * 2550 * @return The includeQuote. 2551 */ 2552 @java.lang.Override getIncludeQuote()2553 public boolean getIncludeQuote() { 2554 return includeQuote_; 2555 } 2556 2557 public static final int EXCLUDE_INFO_TYPES_FIELD_NUMBER = 5; 2558 private boolean excludeInfoTypes_ = false; 2559 /** 2560 * 2561 * 2562 * <pre> 2563 * When true, excludes type information of the findings. 2564 * This is not used for data profiling. 2565 * </pre> 2566 * 2567 * <code>bool exclude_info_types = 5;</code> 2568 * 2569 * @return The excludeInfoTypes. 2570 */ 2571 @java.lang.Override getExcludeInfoTypes()2572 public boolean getExcludeInfoTypes() { 2573 return excludeInfoTypes_; 2574 } 2575 2576 public static final int CUSTOM_INFO_TYPES_FIELD_NUMBER = 6; 2577 2578 @SuppressWarnings("serial") 2579 private java.util.List<com.google.privacy.dlp.v2.CustomInfoType> customInfoTypes_; 2580 /** 2581 * 2582 * 2583 * <pre> 2584 * CustomInfoTypes provided by the user. See 2585 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 2586 * </pre> 2587 * 2588 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 2589 */ 2590 @java.lang.Override getCustomInfoTypesList()2591 public java.util.List<com.google.privacy.dlp.v2.CustomInfoType> getCustomInfoTypesList() { 2592 return customInfoTypes_; 2593 } 2594 /** 2595 * 2596 * 2597 * <pre> 2598 * CustomInfoTypes provided by the user. See 2599 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 2600 * </pre> 2601 * 2602 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 2603 */ 2604 @java.lang.Override 2605 public java.util.List<? extends com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder> getCustomInfoTypesOrBuilderList()2606 getCustomInfoTypesOrBuilderList() { 2607 return customInfoTypes_; 2608 } 2609 /** 2610 * 2611 * 2612 * <pre> 2613 * CustomInfoTypes provided by the user. See 2614 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 2615 * </pre> 2616 * 2617 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 2618 */ 2619 @java.lang.Override getCustomInfoTypesCount()2620 public int getCustomInfoTypesCount() { 2621 return customInfoTypes_.size(); 2622 } 2623 /** 2624 * 2625 * 2626 * <pre> 2627 * CustomInfoTypes provided by the user. See 2628 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 2629 * </pre> 2630 * 2631 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 2632 */ 2633 @java.lang.Override getCustomInfoTypes(int index)2634 public com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index) { 2635 return customInfoTypes_.get(index); 2636 } 2637 /** 2638 * 2639 * 2640 * <pre> 2641 * CustomInfoTypes provided by the user. See 2642 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 2643 * </pre> 2644 * 2645 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 2646 */ 2647 @java.lang.Override getCustomInfoTypesOrBuilder(int index)2648 public com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBuilder(int index) { 2649 return customInfoTypes_.get(index); 2650 } 2651 2652 public static final int CONTENT_OPTIONS_FIELD_NUMBER = 8; 2653 2654 @SuppressWarnings("serial") 2655 private java.util.List<java.lang.Integer> contentOptions_; 2656 2657 private static final com.google.protobuf.Internal.ListAdapter.Converter< 2658 java.lang.Integer, com.google.privacy.dlp.v2.ContentOption> 2659 contentOptions_converter_ = 2660 new com.google.protobuf.Internal.ListAdapter.Converter< 2661 java.lang.Integer, com.google.privacy.dlp.v2.ContentOption>() { 2662 public com.google.privacy.dlp.v2.ContentOption convert(java.lang.Integer from) { 2663 com.google.privacy.dlp.v2.ContentOption result = 2664 com.google.privacy.dlp.v2.ContentOption.forNumber(from); 2665 return result == null ? com.google.privacy.dlp.v2.ContentOption.UNRECOGNIZED : result; 2666 } 2667 }; 2668 /** 2669 * 2670 * 2671 * <pre> 2672 * Deprecated and unused. 2673 * </pre> 2674 * 2675 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 2676 * 2677 * @return A list containing the contentOptions. 2678 */ 2679 @java.lang.Override getContentOptionsList()2680 public java.util.List<com.google.privacy.dlp.v2.ContentOption> getContentOptionsList() { 2681 return new com.google.protobuf.Internal.ListAdapter< 2682 java.lang.Integer, com.google.privacy.dlp.v2.ContentOption>( 2683 contentOptions_, contentOptions_converter_); 2684 } 2685 /** 2686 * 2687 * 2688 * <pre> 2689 * Deprecated and unused. 2690 * </pre> 2691 * 2692 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 2693 * 2694 * @return The count of contentOptions. 2695 */ 2696 @java.lang.Override getContentOptionsCount()2697 public int getContentOptionsCount() { 2698 return contentOptions_.size(); 2699 } 2700 /** 2701 * 2702 * 2703 * <pre> 2704 * Deprecated and unused. 2705 * </pre> 2706 * 2707 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 2708 * 2709 * @param index The index of the element to return. 2710 * @return The contentOptions at the given index. 2711 */ 2712 @java.lang.Override getContentOptions(int index)2713 public com.google.privacy.dlp.v2.ContentOption getContentOptions(int index) { 2714 return contentOptions_converter_.convert(contentOptions_.get(index)); 2715 } 2716 /** 2717 * 2718 * 2719 * <pre> 2720 * Deprecated and unused. 2721 * </pre> 2722 * 2723 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 2724 * 2725 * @return A list containing the enum numeric values on the wire for contentOptions. 2726 */ 2727 @java.lang.Override getContentOptionsValueList()2728 public java.util.List<java.lang.Integer> getContentOptionsValueList() { 2729 return contentOptions_; 2730 } 2731 /** 2732 * 2733 * 2734 * <pre> 2735 * Deprecated and unused. 2736 * </pre> 2737 * 2738 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 2739 * 2740 * @param index The index of the value to return. 2741 * @return The enum numeric value on the wire of contentOptions at the given index. 2742 */ 2743 @java.lang.Override getContentOptionsValue(int index)2744 public int getContentOptionsValue(int index) { 2745 return contentOptions_.get(index); 2746 } 2747 2748 private int contentOptionsMemoizedSerializedSize; 2749 2750 public static final int RULE_SET_FIELD_NUMBER = 10; 2751 2752 @SuppressWarnings("serial") 2753 private java.util.List<com.google.privacy.dlp.v2.InspectionRuleSet> ruleSet_; 2754 /** 2755 * 2756 * 2757 * <pre> 2758 * Set of rules to apply to the findings for this InspectConfig. 2759 * Exclusion rules, contained in the set are executed in the end, other 2760 * rules are executed in the order they are specified for each info type. 2761 * </pre> 2762 * 2763 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 2764 */ 2765 @java.lang.Override getRuleSetList()2766 public java.util.List<com.google.privacy.dlp.v2.InspectionRuleSet> getRuleSetList() { 2767 return ruleSet_; 2768 } 2769 /** 2770 * 2771 * 2772 * <pre> 2773 * Set of rules to apply to the findings for this InspectConfig. 2774 * Exclusion rules, contained in the set are executed in the end, other 2775 * rules are executed in the order they are specified for each info type. 2776 * </pre> 2777 * 2778 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 2779 */ 2780 @java.lang.Override 2781 public java.util.List<? extends com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder> getRuleSetOrBuilderList()2782 getRuleSetOrBuilderList() { 2783 return ruleSet_; 2784 } 2785 /** 2786 * 2787 * 2788 * <pre> 2789 * Set of rules to apply to the findings for this InspectConfig. 2790 * Exclusion rules, contained in the set are executed in the end, other 2791 * rules are executed in the order they are specified for each info type. 2792 * </pre> 2793 * 2794 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 2795 */ 2796 @java.lang.Override getRuleSetCount()2797 public int getRuleSetCount() { 2798 return ruleSet_.size(); 2799 } 2800 /** 2801 * 2802 * 2803 * <pre> 2804 * Set of rules to apply to the findings for this InspectConfig. 2805 * Exclusion rules, contained in the set are executed in the end, other 2806 * rules are executed in the order they are specified for each info type. 2807 * </pre> 2808 * 2809 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 2810 */ 2811 @java.lang.Override getRuleSet(int index)2812 public com.google.privacy.dlp.v2.InspectionRuleSet getRuleSet(int index) { 2813 return ruleSet_.get(index); 2814 } 2815 /** 2816 * 2817 * 2818 * <pre> 2819 * Set of rules to apply to the findings for this InspectConfig. 2820 * Exclusion rules, contained in the set are executed in the end, other 2821 * rules are executed in the order they are specified for each info type. 2822 * </pre> 2823 * 2824 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 2825 */ 2826 @java.lang.Override getRuleSetOrBuilder(int index)2827 public com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder getRuleSetOrBuilder(int index) { 2828 return ruleSet_.get(index); 2829 } 2830 2831 private byte memoizedIsInitialized = -1; 2832 2833 @java.lang.Override isInitialized()2834 public final boolean isInitialized() { 2835 byte isInitialized = memoizedIsInitialized; 2836 if (isInitialized == 1) return true; 2837 if (isInitialized == 0) return false; 2838 2839 memoizedIsInitialized = 1; 2840 return true; 2841 } 2842 2843 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)2844 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 2845 getSerializedSize(); 2846 for (int i = 0; i < infoTypes_.size(); i++) { 2847 output.writeMessage(1, infoTypes_.get(i)); 2848 } 2849 if (minLikelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { 2850 output.writeEnum(2, minLikelihood_); 2851 } 2852 if (limits_ != null) { 2853 output.writeMessage(3, getLimits()); 2854 } 2855 if (includeQuote_ != false) { 2856 output.writeBool(4, includeQuote_); 2857 } 2858 if (excludeInfoTypes_ != false) { 2859 output.writeBool(5, excludeInfoTypes_); 2860 } 2861 for (int i = 0; i < customInfoTypes_.size(); i++) { 2862 output.writeMessage(6, customInfoTypes_.get(i)); 2863 } 2864 if (getContentOptionsList().size() > 0) { 2865 output.writeUInt32NoTag(66); 2866 output.writeUInt32NoTag(contentOptionsMemoizedSerializedSize); 2867 } 2868 for (int i = 0; i < contentOptions_.size(); i++) { 2869 output.writeEnumNoTag(contentOptions_.get(i)); 2870 } 2871 for (int i = 0; i < ruleSet_.size(); i++) { 2872 output.writeMessage(10, ruleSet_.get(i)); 2873 } 2874 getUnknownFields().writeTo(output); 2875 } 2876 2877 @java.lang.Override getSerializedSize()2878 public int getSerializedSize() { 2879 int size = memoizedSize; 2880 if (size != -1) return size; 2881 2882 size = 0; 2883 for (int i = 0; i < infoTypes_.size(); i++) { 2884 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, infoTypes_.get(i)); 2885 } 2886 if (minLikelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { 2887 size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, minLikelihood_); 2888 } 2889 if (limits_ != null) { 2890 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLimits()); 2891 } 2892 if (includeQuote_ != false) { 2893 size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeQuote_); 2894 } 2895 if (excludeInfoTypes_ != false) { 2896 size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, excludeInfoTypes_); 2897 } 2898 for (int i = 0; i < customInfoTypes_.size(); i++) { 2899 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, customInfoTypes_.get(i)); 2900 } 2901 { 2902 int dataSize = 0; 2903 for (int i = 0; i < contentOptions_.size(); i++) { 2904 dataSize += 2905 com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(contentOptions_.get(i)); 2906 } 2907 size += dataSize; 2908 if (!getContentOptionsList().isEmpty()) { 2909 size += 1; 2910 size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); 2911 } 2912 contentOptionsMemoizedSerializedSize = dataSize; 2913 } 2914 for (int i = 0; i < ruleSet_.size(); i++) { 2915 size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, ruleSet_.get(i)); 2916 } 2917 size += getUnknownFields().getSerializedSize(); 2918 memoizedSize = size; 2919 return size; 2920 } 2921 2922 @java.lang.Override equals(final java.lang.Object obj)2923 public boolean equals(final java.lang.Object obj) { 2924 if (obj == this) { 2925 return true; 2926 } 2927 if (!(obj instanceof com.google.privacy.dlp.v2.InspectConfig)) { 2928 return super.equals(obj); 2929 } 2930 com.google.privacy.dlp.v2.InspectConfig other = (com.google.privacy.dlp.v2.InspectConfig) obj; 2931 2932 if (!getInfoTypesList().equals(other.getInfoTypesList())) return false; 2933 if (minLikelihood_ != other.minLikelihood_) return false; 2934 if (hasLimits() != other.hasLimits()) return false; 2935 if (hasLimits()) { 2936 if (!getLimits().equals(other.getLimits())) return false; 2937 } 2938 if (getIncludeQuote() != other.getIncludeQuote()) return false; 2939 if (getExcludeInfoTypes() != other.getExcludeInfoTypes()) return false; 2940 if (!getCustomInfoTypesList().equals(other.getCustomInfoTypesList())) return false; 2941 if (!contentOptions_.equals(other.contentOptions_)) return false; 2942 if (!getRuleSetList().equals(other.getRuleSetList())) return false; 2943 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 2944 return true; 2945 } 2946 2947 @java.lang.Override hashCode()2948 public int hashCode() { 2949 if (memoizedHashCode != 0) { 2950 return memoizedHashCode; 2951 } 2952 int hash = 41; 2953 hash = (19 * hash) + getDescriptor().hashCode(); 2954 if (getInfoTypesCount() > 0) { 2955 hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; 2956 hash = (53 * hash) + getInfoTypesList().hashCode(); 2957 } 2958 hash = (37 * hash) + MIN_LIKELIHOOD_FIELD_NUMBER; 2959 hash = (53 * hash) + minLikelihood_; 2960 if (hasLimits()) { 2961 hash = (37 * hash) + LIMITS_FIELD_NUMBER; 2962 hash = (53 * hash) + getLimits().hashCode(); 2963 } 2964 hash = (37 * hash) + INCLUDE_QUOTE_FIELD_NUMBER; 2965 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeQuote()); 2966 hash = (37 * hash) + EXCLUDE_INFO_TYPES_FIELD_NUMBER; 2967 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExcludeInfoTypes()); 2968 if (getCustomInfoTypesCount() > 0) { 2969 hash = (37 * hash) + CUSTOM_INFO_TYPES_FIELD_NUMBER; 2970 hash = (53 * hash) + getCustomInfoTypesList().hashCode(); 2971 } 2972 if (getContentOptionsCount() > 0) { 2973 hash = (37 * hash) + CONTENT_OPTIONS_FIELD_NUMBER; 2974 hash = (53 * hash) + contentOptions_.hashCode(); 2975 } 2976 if (getRuleSetCount() > 0) { 2977 hash = (37 * hash) + RULE_SET_FIELD_NUMBER; 2978 hash = (53 * hash) + getRuleSetList().hashCode(); 2979 } 2980 hash = (29 * hash) + getUnknownFields().hashCode(); 2981 memoizedHashCode = hash; 2982 return hash; 2983 } 2984 parseFrom(java.nio.ByteBuffer data)2985 public static com.google.privacy.dlp.v2.InspectConfig parseFrom(java.nio.ByteBuffer data) 2986 throws com.google.protobuf.InvalidProtocolBufferException { 2987 return PARSER.parseFrom(data); 2988 } 2989 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2990 public static com.google.privacy.dlp.v2.InspectConfig parseFrom( 2991 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2992 throws com.google.protobuf.InvalidProtocolBufferException { 2993 return PARSER.parseFrom(data, extensionRegistry); 2994 } 2995 parseFrom( com.google.protobuf.ByteString data)2996 public static com.google.privacy.dlp.v2.InspectConfig parseFrom( 2997 com.google.protobuf.ByteString data) 2998 throws com.google.protobuf.InvalidProtocolBufferException { 2999 return PARSER.parseFrom(data); 3000 } 3001 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3002 public static com.google.privacy.dlp.v2.InspectConfig parseFrom( 3003 com.google.protobuf.ByteString data, 3004 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3005 throws com.google.protobuf.InvalidProtocolBufferException { 3006 return PARSER.parseFrom(data, extensionRegistry); 3007 } 3008 parseFrom(byte[] data)3009 public static com.google.privacy.dlp.v2.InspectConfig parseFrom(byte[] data) 3010 throws com.google.protobuf.InvalidProtocolBufferException { 3011 return PARSER.parseFrom(data); 3012 } 3013 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3014 public static com.google.privacy.dlp.v2.InspectConfig parseFrom( 3015 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3016 throws com.google.protobuf.InvalidProtocolBufferException { 3017 return PARSER.parseFrom(data, extensionRegistry); 3018 } 3019 parseFrom(java.io.InputStream input)3020 public static com.google.privacy.dlp.v2.InspectConfig parseFrom(java.io.InputStream input) 3021 throws java.io.IOException { 3022 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 3023 } 3024 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3025 public static com.google.privacy.dlp.v2.InspectConfig parseFrom( 3026 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3027 throws java.io.IOException { 3028 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 3029 PARSER, input, extensionRegistry); 3030 } 3031 parseDelimitedFrom( java.io.InputStream input)3032 public static com.google.privacy.dlp.v2.InspectConfig parseDelimitedFrom( 3033 java.io.InputStream input) throws java.io.IOException { 3034 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 3035 } 3036 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3037 public static com.google.privacy.dlp.v2.InspectConfig parseDelimitedFrom( 3038 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3039 throws java.io.IOException { 3040 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 3041 PARSER, input, extensionRegistry); 3042 } 3043 parseFrom( com.google.protobuf.CodedInputStream input)3044 public static com.google.privacy.dlp.v2.InspectConfig parseFrom( 3045 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 3046 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 3047 } 3048 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3049 public static com.google.privacy.dlp.v2.InspectConfig parseFrom( 3050 com.google.protobuf.CodedInputStream input, 3051 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3052 throws java.io.IOException { 3053 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 3054 PARSER, input, extensionRegistry); 3055 } 3056 3057 @java.lang.Override newBuilderForType()3058 public Builder newBuilderForType() { 3059 return newBuilder(); 3060 } 3061 newBuilder()3062 public static Builder newBuilder() { 3063 return DEFAULT_INSTANCE.toBuilder(); 3064 } 3065 newBuilder(com.google.privacy.dlp.v2.InspectConfig prototype)3066 public static Builder newBuilder(com.google.privacy.dlp.v2.InspectConfig prototype) { 3067 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 3068 } 3069 3070 @java.lang.Override toBuilder()3071 public Builder toBuilder() { 3072 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 3073 } 3074 3075 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3076 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 3077 Builder builder = new Builder(parent); 3078 return builder; 3079 } 3080 /** 3081 * 3082 * 3083 * <pre> 3084 * Configuration description of the scanning process. 3085 * When used with redactContent only info_types and min_likelihood are currently 3086 * used. 3087 * </pre> 3088 * 3089 * Protobuf type {@code google.privacy.dlp.v2.InspectConfig} 3090 */ 3091 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 3092 implements 3093 // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectConfig) 3094 com.google.privacy.dlp.v2.InspectConfigOrBuilder { getDescriptor()3095 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 3096 return com.google.privacy.dlp.v2.DlpProto 3097 .internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; 3098 } 3099 3100 @java.lang.Override 3101 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()3102 internalGetFieldAccessorTable() { 3103 return com.google.privacy.dlp.v2.DlpProto 3104 .internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable 3105 .ensureFieldAccessorsInitialized( 3106 com.google.privacy.dlp.v2.InspectConfig.class, 3107 com.google.privacy.dlp.v2.InspectConfig.Builder.class); 3108 } 3109 3110 // Construct using com.google.privacy.dlp.v2.InspectConfig.newBuilder() Builder()3111 private Builder() {} 3112 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3113 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 3114 super(parent); 3115 } 3116 3117 @java.lang.Override clear()3118 public Builder clear() { 3119 super.clear(); 3120 bitField0_ = 0; 3121 if (infoTypesBuilder_ == null) { 3122 infoTypes_ = java.util.Collections.emptyList(); 3123 } else { 3124 infoTypes_ = null; 3125 infoTypesBuilder_.clear(); 3126 } 3127 bitField0_ = (bitField0_ & ~0x00000001); 3128 minLikelihood_ = 0; 3129 limits_ = null; 3130 if (limitsBuilder_ != null) { 3131 limitsBuilder_.dispose(); 3132 limitsBuilder_ = null; 3133 } 3134 includeQuote_ = false; 3135 excludeInfoTypes_ = false; 3136 if (customInfoTypesBuilder_ == null) { 3137 customInfoTypes_ = java.util.Collections.emptyList(); 3138 } else { 3139 customInfoTypes_ = null; 3140 customInfoTypesBuilder_.clear(); 3141 } 3142 bitField0_ = (bitField0_ & ~0x00000020); 3143 contentOptions_ = java.util.Collections.emptyList(); 3144 bitField0_ = (bitField0_ & ~0x00000040); 3145 if (ruleSetBuilder_ == null) { 3146 ruleSet_ = java.util.Collections.emptyList(); 3147 } else { 3148 ruleSet_ = null; 3149 ruleSetBuilder_.clear(); 3150 } 3151 bitField0_ = (bitField0_ & ~0x00000080); 3152 return this; 3153 } 3154 3155 @java.lang.Override getDescriptorForType()3156 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 3157 return com.google.privacy.dlp.v2.DlpProto 3158 .internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; 3159 } 3160 3161 @java.lang.Override getDefaultInstanceForType()3162 public com.google.privacy.dlp.v2.InspectConfig getDefaultInstanceForType() { 3163 return com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance(); 3164 } 3165 3166 @java.lang.Override build()3167 public com.google.privacy.dlp.v2.InspectConfig build() { 3168 com.google.privacy.dlp.v2.InspectConfig result = buildPartial(); 3169 if (!result.isInitialized()) { 3170 throw newUninitializedMessageException(result); 3171 } 3172 return result; 3173 } 3174 3175 @java.lang.Override buildPartial()3176 public com.google.privacy.dlp.v2.InspectConfig buildPartial() { 3177 com.google.privacy.dlp.v2.InspectConfig result = 3178 new com.google.privacy.dlp.v2.InspectConfig(this); 3179 buildPartialRepeatedFields(result); 3180 if (bitField0_ != 0) { 3181 buildPartial0(result); 3182 } 3183 onBuilt(); 3184 return result; 3185 } 3186 buildPartialRepeatedFields(com.google.privacy.dlp.v2.InspectConfig result)3187 private void buildPartialRepeatedFields(com.google.privacy.dlp.v2.InspectConfig result) { 3188 if (infoTypesBuilder_ == null) { 3189 if (((bitField0_ & 0x00000001) != 0)) { 3190 infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); 3191 bitField0_ = (bitField0_ & ~0x00000001); 3192 } 3193 result.infoTypes_ = infoTypes_; 3194 } else { 3195 result.infoTypes_ = infoTypesBuilder_.build(); 3196 } 3197 if (customInfoTypesBuilder_ == null) { 3198 if (((bitField0_ & 0x00000020) != 0)) { 3199 customInfoTypes_ = java.util.Collections.unmodifiableList(customInfoTypes_); 3200 bitField0_ = (bitField0_ & ~0x00000020); 3201 } 3202 result.customInfoTypes_ = customInfoTypes_; 3203 } else { 3204 result.customInfoTypes_ = customInfoTypesBuilder_.build(); 3205 } 3206 if (((bitField0_ & 0x00000040) != 0)) { 3207 contentOptions_ = java.util.Collections.unmodifiableList(contentOptions_); 3208 bitField0_ = (bitField0_ & ~0x00000040); 3209 } 3210 result.contentOptions_ = contentOptions_; 3211 if (ruleSetBuilder_ == null) { 3212 if (((bitField0_ & 0x00000080) != 0)) { 3213 ruleSet_ = java.util.Collections.unmodifiableList(ruleSet_); 3214 bitField0_ = (bitField0_ & ~0x00000080); 3215 } 3216 result.ruleSet_ = ruleSet_; 3217 } else { 3218 result.ruleSet_ = ruleSetBuilder_.build(); 3219 } 3220 } 3221 buildPartial0(com.google.privacy.dlp.v2.InspectConfig result)3222 private void buildPartial0(com.google.privacy.dlp.v2.InspectConfig result) { 3223 int from_bitField0_ = bitField0_; 3224 if (((from_bitField0_ & 0x00000002) != 0)) { 3225 result.minLikelihood_ = minLikelihood_; 3226 } 3227 if (((from_bitField0_ & 0x00000004) != 0)) { 3228 result.limits_ = limitsBuilder_ == null ? limits_ : limitsBuilder_.build(); 3229 } 3230 if (((from_bitField0_ & 0x00000008) != 0)) { 3231 result.includeQuote_ = includeQuote_; 3232 } 3233 if (((from_bitField0_ & 0x00000010) != 0)) { 3234 result.excludeInfoTypes_ = excludeInfoTypes_; 3235 } 3236 } 3237 3238 @java.lang.Override clone()3239 public Builder clone() { 3240 return super.clone(); 3241 } 3242 3243 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3244 public Builder setField( 3245 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 3246 return super.setField(field, value); 3247 } 3248 3249 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)3250 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 3251 return super.clearField(field); 3252 } 3253 3254 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)3255 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 3256 return super.clearOneof(oneof); 3257 } 3258 3259 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)3260 public Builder setRepeatedField( 3261 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 3262 return super.setRepeatedField(field, index, value); 3263 } 3264 3265 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3266 public Builder addRepeatedField( 3267 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 3268 return super.addRepeatedField(field, value); 3269 } 3270 3271 @java.lang.Override mergeFrom(com.google.protobuf.Message other)3272 public Builder mergeFrom(com.google.protobuf.Message other) { 3273 if (other instanceof com.google.privacy.dlp.v2.InspectConfig) { 3274 return mergeFrom((com.google.privacy.dlp.v2.InspectConfig) other); 3275 } else { 3276 super.mergeFrom(other); 3277 return this; 3278 } 3279 } 3280 mergeFrom(com.google.privacy.dlp.v2.InspectConfig other)3281 public Builder mergeFrom(com.google.privacy.dlp.v2.InspectConfig other) { 3282 if (other == com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance()) return this; 3283 if (infoTypesBuilder_ == null) { 3284 if (!other.infoTypes_.isEmpty()) { 3285 if (infoTypes_.isEmpty()) { 3286 infoTypes_ = other.infoTypes_; 3287 bitField0_ = (bitField0_ & ~0x00000001); 3288 } else { 3289 ensureInfoTypesIsMutable(); 3290 infoTypes_.addAll(other.infoTypes_); 3291 } 3292 onChanged(); 3293 } 3294 } else { 3295 if (!other.infoTypes_.isEmpty()) { 3296 if (infoTypesBuilder_.isEmpty()) { 3297 infoTypesBuilder_.dispose(); 3298 infoTypesBuilder_ = null; 3299 infoTypes_ = other.infoTypes_; 3300 bitField0_ = (bitField0_ & ~0x00000001); 3301 infoTypesBuilder_ = 3302 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 3303 ? getInfoTypesFieldBuilder() 3304 : null; 3305 } else { 3306 infoTypesBuilder_.addAllMessages(other.infoTypes_); 3307 } 3308 } 3309 } 3310 if (other.minLikelihood_ != 0) { 3311 setMinLikelihoodValue(other.getMinLikelihoodValue()); 3312 } 3313 if (other.hasLimits()) { 3314 mergeLimits(other.getLimits()); 3315 } 3316 if (other.getIncludeQuote() != false) { 3317 setIncludeQuote(other.getIncludeQuote()); 3318 } 3319 if (other.getExcludeInfoTypes() != false) { 3320 setExcludeInfoTypes(other.getExcludeInfoTypes()); 3321 } 3322 if (customInfoTypesBuilder_ == null) { 3323 if (!other.customInfoTypes_.isEmpty()) { 3324 if (customInfoTypes_.isEmpty()) { 3325 customInfoTypes_ = other.customInfoTypes_; 3326 bitField0_ = (bitField0_ & ~0x00000020); 3327 } else { 3328 ensureCustomInfoTypesIsMutable(); 3329 customInfoTypes_.addAll(other.customInfoTypes_); 3330 } 3331 onChanged(); 3332 } 3333 } else { 3334 if (!other.customInfoTypes_.isEmpty()) { 3335 if (customInfoTypesBuilder_.isEmpty()) { 3336 customInfoTypesBuilder_.dispose(); 3337 customInfoTypesBuilder_ = null; 3338 customInfoTypes_ = other.customInfoTypes_; 3339 bitField0_ = (bitField0_ & ~0x00000020); 3340 customInfoTypesBuilder_ = 3341 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 3342 ? getCustomInfoTypesFieldBuilder() 3343 : null; 3344 } else { 3345 customInfoTypesBuilder_.addAllMessages(other.customInfoTypes_); 3346 } 3347 } 3348 } 3349 if (!other.contentOptions_.isEmpty()) { 3350 if (contentOptions_.isEmpty()) { 3351 contentOptions_ = other.contentOptions_; 3352 bitField0_ = (bitField0_ & ~0x00000040); 3353 } else { 3354 ensureContentOptionsIsMutable(); 3355 contentOptions_.addAll(other.contentOptions_); 3356 } 3357 onChanged(); 3358 } 3359 if (ruleSetBuilder_ == null) { 3360 if (!other.ruleSet_.isEmpty()) { 3361 if (ruleSet_.isEmpty()) { 3362 ruleSet_ = other.ruleSet_; 3363 bitField0_ = (bitField0_ & ~0x00000080); 3364 } else { 3365 ensureRuleSetIsMutable(); 3366 ruleSet_.addAll(other.ruleSet_); 3367 } 3368 onChanged(); 3369 } 3370 } else { 3371 if (!other.ruleSet_.isEmpty()) { 3372 if (ruleSetBuilder_.isEmpty()) { 3373 ruleSetBuilder_.dispose(); 3374 ruleSetBuilder_ = null; 3375 ruleSet_ = other.ruleSet_; 3376 bitField0_ = (bitField0_ & ~0x00000080); 3377 ruleSetBuilder_ = 3378 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 3379 ? getRuleSetFieldBuilder() 3380 : null; 3381 } else { 3382 ruleSetBuilder_.addAllMessages(other.ruleSet_); 3383 } 3384 } 3385 } 3386 this.mergeUnknownFields(other.getUnknownFields()); 3387 onChanged(); 3388 return this; 3389 } 3390 3391 @java.lang.Override isInitialized()3392 public final boolean isInitialized() { 3393 return true; 3394 } 3395 3396 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3397 public Builder mergeFrom( 3398 com.google.protobuf.CodedInputStream input, 3399 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3400 throws java.io.IOException { 3401 if (extensionRegistry == null) { 3402 throw new java.lang.NullPointerException(); 3403 } 3404 try { 3405 boolean done = false; 3406 while (!done) { 3407 int tag = input.readTag(); 3408 switch (tag) { 3409 case 0: 3410 done = true; 3411 break; 3412 case 10: 3413 { 3414 com.google.privacy.dlp.v2.InfoType m = 3415 input.readMessage( 3416 com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); 3417 if (infoTypesBuilder_ == null) { 3418 ensureInfoTypesIsMutable(); 3419 infoTypes_.add(m); 3420 } else { 3421 infoTypesBuilder_.addMessage(m); 3422 } 3423 break; 3424 } // case 10 3425 case 16: 3426 { 3427 minLikelihood_ = input.readEnum(); 3428 bitField0_ |= 0x00000002; 3429 break; 3430 } // case 16 3431 case 26: 3432 { 3433 input.readMessage(getLimitsFieldBuilder().getBuilder(), extensionRegistry); 3434 bitField0_ |= 0x00000004; 3435 break; 3436 } // case 26 3437 case 32: 3438 { 3439 includeQuote_ = input.readBool(); 3440 bitField0_ |= 0x00000008; 3441 break; 3442 } // case 32 3443 case 40: 3444 { 3445 excludeInfoTypes_ = input.readBool(); 3446 bitField0_ |= 0x00000010; 3447 break; 3448 } // case 40 3449 case 50: 3450 { 3451 com.google.privacy.dlp.v2.CustomInfoType m = 3452 input.readMessage( 3453 com.google.privacy.dlp.v2.CustomInfoType.parser(), extensionRegistry); 3454 if (customInfoTypesBuilder_ == null) { 3455 ensureCustomInfoTypesIsMutable(); 3456 customInfoTypes_.add(m); 3457 } else { 3458 customInfoTypesBuilder_.addMessage(m); 3459 } 3460 break; 3461 } // case 50 3462 case 64: 3463 { 3464 int tmpRaw = input.readEnum(); 3465 ensureContentOptionsIsMutable(); 3466 contentOptions_.add(tmpRaw); 3467 break; 3468 } // case 64 3469 case 66: 3470 { 3471 int length = input.readRawVarint32(); 3472 int oldLimit = input.pushLimit(length); 3473 while (input.getBytesUntilLimit() > 0) { 3474 int tmpRaw = input.readEnum(); 3475 ensureContentOptionsIsMutable(); 3476 contentOptions_.add(tmpRaw); 3477 } 3478 input.popLimit(oldLimit); 3479 break; 3480 } // case 66 3481 case 82: 3482 { 3483 com.google.privacy.dlp.v2.InspectionRuleSet m = 3484 input.readMessage( 3485 com.google.privacy.dlp.v2.InspectionRuleSet.parser(), extensionRegistry); 3486 if (ruleSetBuilder_ == null) { 3487 ensureRuleSetIsMutable(); 3488 ruleSet_.add(m); 3489 } else { 3490 ruleSetBuilder_.addMessage(m); 3491 } 3492 break; 3493 } // case 82 3494 default: 3495 { 3496 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 3497 done = true; // was an endgroup tag 3498 } 3499 break; 3500 } // default: 3501 } // switch (tag) 3502 } // while (!done) 3503 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3504 throw e.unwrapIOException(); 3505 } finally { 3506 onChanged(); 3507 } // finally 3508 return this; 3509 } 3510 3511 private int bitField0_; 3512 3513 private java.util.List<com.google.privacy.dlp.v2.InfoType> infoTypes_ = 3514 java.util.Collections.emptyList(); 3515 ensureInfoTypesIsMutable()3516 private void ensureInfoTypesIsMutable() { 3517 if (!((bitField0_ & 0x00000001) != 0)) { 3518 infoTypes_ = new java.util.ArrayList<com.google.privacy.dlp.v2.InfoType>(infoTypes_); 3519 bitField0_ |= 0x00000001; 3520 } 3521 } 3522 3523 private com.google.protobuf.RepeatedFieldBuilderV3< 3524 com.google.privacy.dlp.v2.InfoType, 3525 com.google.privacy.dlp.v2.InfoType.Builder, 3526 com.google.privacy.dlp.v2.InfoTypeOrBuilder> 3527 infoTypesBuilder_; 3528 3529 /** 3530 * 3531 * 3532 * <pre> 3533 * Restricts what info_types to look for. The values must correspond to 3534 * InfoType values returned by ListInfoTypes or listed at 3535 * https://cloud.google.com/dlp/docs/infotypes-reference. 3536 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3537 * system may automatically choose what detectors to run. By default this may 3538 * be all types, but may change over time as detectors are updated. 3539 * If you need precise control and predictability as to what detectors are 3540 * run you should specify specific InfoTypes listed in the reference, 3541 * otherwise a default list will be used, which may change over time. 3542 * </pre> 3543 * 3544 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3545 */ getInfoTypesList()3546 public java.util.List<com.google.privacy.dlp.v2.InfoType> getInfoTypesList() { 3547 if (infoTypesBuilder_ == null) { 3548 return java.util.Collections.unmodifiableList(infoTypes_); 3549 } else { 3550 return infoTypesBuilder_.getMessageList(); 3551 } 3552 } 3553 /** 3554 * 3555 * 3556 * <pre> 3557 * Restricts what info_types to look for. The values must correspond to 3558 * InfoType values returned by ListInfoTypes or listed at 3559 * https://cloud.google.com/dlp/docs/infotypes-reference. 3560 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3561 * system may automatically choose what detectors to run. By default this may 3562 * be all types, but may change over time as detectors are updated. 3563 * If you need precise control and predictability as to what detectors are 3564 * run you should specify specific InfoTypes listed in the reference, 3565 * otherwise a default list will be used, which may change over time. 3566 * </pre> 3567 * 3568 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3569 */ getInfoTypesCount()3570 public int getInfoTypesCount() { 3571 if (infoTypesBuilder_ == null) { 3572 return infoTypes_.size(); 3573 } else { 3574 return infoTypesBuilder_.getCount(); 3575 } 3576 } 3577 /** 3578 * 3579 * 3580 * <pre> 3581 * Restricts what info_types to look for. The values must correspond to 3582 * InfoType values returned by ListInfoTypes or listed at 3583 * https://cloud.google.com/dlp/docs/infotypes-reference. 3584 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3585 * system may automatically choose what detectors to run. By default this may 3586 * be all types, but may change over time as detectors are updated. 3587 * If you need precise control and predictability as to what detectors are 3588 * run you should specify specific InfoTypes listed in the reference, 3589 * otherwise a default list will be used, which may change over time. 3590 * </pre> 3591 * 3592 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3593 */ getInfoTypes(int index)3594 public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { 3595 if (infoTypesBuilder_ == null) { 3596 return infoTypes_.get(index); 3597 } else { 3598 return infoTypesBuilder_.getMessage(index); 3599 } 3600 } 3601 /** 3602 * 3603 * 3604 * <pre> 3605 * Restricts what info_types to look for. The values must correspond to 3606 * InfoType values returned by ListInfoTypes or listed at 3607 * https://cloud.google.com/dlp/docs/infotypes-reference. 3608 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3609 * system may automatically choose what detectors to run. By default this may 3610 * be all types, but may change over time as detectors are updated. 3611 * If you need precise control and predictability as to what detectors are 3612 * run you should specify specific InfoTypes listed in the reference, 3613 * otherwise a default list will be used, which may change over time. 3614 * </pre> 3615 * 3616 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3617 */ setInfoTypes(int index, com.google.privacy.dlp.v2.InfoType value)3618 public Builder setInfoTypes(int index, com.google.privacy.dlp.v2.InfoType value) { 3619 if (infoTypesBuilder_ == null) { 3620 if (value == null) { 3621 throw new NullPointerException(); 3622 } 3623 ensureInfoTypesIsMutable(); 3624 infoTypes_.set(index, value); 3625 onChanged(); 3626 } else { 3627 infoTypesBuilder_.setMessage(index, value); 3628 } 3629 return this; 3630 } 3631 /** 3632 * 3633 * 3634 * <pre> 3635 * Restricts what info_types to look for. The values must correspond to 3636 * InfoType values returned by ListInfoTypes or listed at 3637 * https://cloud.google.com/dlp/docs/infotypes-reference. 3638 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3639 * system may automatically choose what detectors to run. By default this may 3640 * be all types, but may change over time as detectors are updated. 3641 * If you need precise control and predictability as to what detectors are 3642 * run you should specify specific InfoTypes listed in the reference, 3643 * otherwise a default list will be used, which may change over time. 3644 * </pre> 3645 * 3646 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3647 */ setInfoTypes( int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue)3648 public Builder setInfoTypes( 3649 int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { 3650 if (infoTypesBuilder_ == null) { 3651 ensureInfoTypesIsMutable(); 3652 infoTypes_.set(index, builderForValue.build()); 3653 onChanged(); 3654 } else { 3655 infoTypesBuilder_.setMessage(index, builderForValue.build()); 3656 } 3657 return this; 3658 } 3659 /** 3660 * 3661 * 3662 * <pre> 3663 * Restricts what info_types to look for. The values must correspond to 3664 * InfoType values returned by ListInfoTypes or listed at 3665 * https://cloud.google.com/dlp/docs/infotypes-reference. 3666 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3667 * system may automatically choose what detectors to run. By default this may 3668 * be all types, but may change over time as detectors are updated. 3669 * If you need precise control and predictability as to what detectors are 3670 * run you should specify specific InfoTypes listed in the reference, 3671 * otherwise a default list will be used, which may change over time. 3672 * </pre> 3673 * 3674 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3675 */ addInfoTypes(com.google.privacy.dlp.v2.InfoType value)3676 public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { 3677 if (infoTypesBuilder_ == null) { 3678 if (value == null) { 3679 throw new NullPointerException(); 3680 } 3681 ensureInfoTypesIsMutable(); 3682 infoTypes_.add(value); 3683 onChanged(); 3684 } else { 3685 infoTypesBuilder_.addMessage(value); 3686 } 3687 return this; 3688 } 3689 /** 3690 * 3691 * 3692 * <pre> 3693 * Restricts what info_types to look for. The values must correspond to 3694 * InfoType values returned by ListInfoTypes or listed at 3695 * https://cloud.google.com/dlp/docs/infotypes-reference. 3696 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3697 * system may automatically choose what detectors to run. By default this may 3698 * be all types, but may change over time as detectors are updated. 3699 * If you need precise control and predictability as to what detectors are 3700 * run you should specify specific InfoTypes listed in the reference, 3701 * otherwise a default list will be used, which may change over time. 3702 * </pre> 3703 * 3704 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3705 */ addInfoTypes(int index, com.google.privacy.dlp.v2.InfoType value)3706 public Builder addInfoTypes(int index, com.google.privacy.dlp.v2.InfoType value) { 3707 if (infoTypesBuilder_ == null) { 3708 if (value == null) { 3709 throw new NullPointerException(); 3710 } 3711 ensureInfoTypesIsMutable(); 3712 infoTypes_.add(index, value); 3713 onChanged(); 3714 } else { 3715 infoTypesBuilder_.addMessage(index, value); 3716 } 3717 return this; 3718 } 3719 /** 3720 * 3721 * 3722 * <pre> 3723 * Restricts what info_types to look for. The values must correspond to 3724 * InfoType values returned by ListInfoTypes or listed at 3725 * https://cloud.google.com/dlp/docs/infotypes-reference. 3726 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3727 * system may automatically choose what detectors to run. By default this may 3728 * be all types, but may change over time as detectors are updated. 3729 * If you need precise control and predictability as to what detectors are 3730 * run you should specify specific InfoTypes listed in the reference, 3731 * otherwise a default list will be used, which may change over time. 3732 * </pre> 3733 * 3734 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3735 */ addInfoTypes(com.google.privacy.dlp.v2.InfoType.Builder builderForValue)3736 public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { 3737 if (infoTypesBuilder_ == null) { 3738 ensureInfoTypesIsMutable(); 3739 infoTypes_.add(builderForValue.build()); 3740 onChanged(); 3741 } else { 3742 infoTypesBuilder_.addMessage(builderForValue.build()); 3743 } 3744 return this; 3745 } 3746 /** 3747 * 3748 * 3749 * <pre> 3750 * Restricts what info_types to look for. The values must correspond to 3751 * InfoType values returned by ListInfoTypes or listed at 3752 * https://cloud.google.com/dlp/docs/infotypes-reference. 3753 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3754 * system may automatically choose what detectors to run. By default this may 3755 * be all types, but may change over time as detectors are updated. 3756 * If you need precise control and predictability as to what detectors are 3757 * run you should specify specific InfoTypes listed in the reference, 3758 * otherwise a default list will be used, which may change over time. 3759 * </pre> 3760 * 3761 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3762 */ addInfoTypes( int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue)3763 public Builder addInfoTypes( 3764 int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { 3765 if (infoTypesBuilder_ == null) { 3766 ensureInfoTypesIsMutable(); 3767 infoTypes_.add(index, builderForValue.build()); 3768 onChanged(); 3769 } else { 3770 infoTypesBuilder_.addMessage(index, builderForValue.build()); 3771 } 3772 return this; 3773 } 3774 /** 3775 * 3776 * 3777 * <pre> 3778 * Restricts what info_types to look for. The values must correspond to 3779 * InfoType values returned by ListInfoTypes or listed at 3780 * https://cloud.google.com/dlp/docs/infotypes-reference. 3781 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3782 * system may automatically choose what detectors to run. By default this may 3783 * be all types, but may change over time as detectors are updated. 3784 * If you need precise control and predictability as to what detectors are 3785 * run you should specify specific InfoTypes listed in the reference, 3786 * otherwise a default list will be used, which may change over time. 3787 * </pre> 3788 * 3789 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3790 */ addAllInfoTypes( java.lang.Iterable<? extends com.google.privacy.dlp.v2.InfoType> values)3791 public Builder addAllInfoTypes( 3792 java.lang.Iterable<? extends com.google.privacy.dlp.v2.InfoType> values) { 3793 if (infoTypesBuilder_ == null) { 3794 ensureInfoTypesIsMutable(); 3795 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, infoTypes_); 3796 onChanged(); 3797 } else { 3798 infoTypesBuilder_.addAllMessages(values); 3799 } 3800 return this; 3801 } 3802 /** 3803 * 3804 * 3805 * <pre> 3806 * Restricts what info_types to look for. The values must correspond to 3807 * InfoType values returned by ListInfoTypes or listed at 3808 * https://cloud.google.com/dlp/docs/infotypes-reference. 3809 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3810 * system may automatically choose what detectors to run. By default this may 3811 * be all types, but may change over time as detectors are updated. 3812 * If you need precise control and predictability as to what detectors are 3813 * run you should specify specific InfoTypes listed in the reference, 3814 * otherwise a default list will be used, which may change over time. 3815 * </pre> 3816 * 3817 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3818 */ clearInfoTypes()3819 public Builder clearInfoTypes() { 3820 if (infoTypesBuilder_ == null) { 3821 infoTypes_ = java.util.Collections.emptyList(); 3822 bitField0_ = (bitField0_ & ~0x00000001); 3823 onChanged(); 3824 } else { 3825 infoTypesBuilder_.clear(); 3826 } 3827 return this; 3828 } 3829 /** 3830 * 3831 * 3832 * <pre> 3833 * Restricts what info_types to look for. The values must correspond to 3834 * InfoType values returned by ListInfoTypes or listed at 3835 * https://cloud.google.com/dlp/docs/infotypes-reference. 3836 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3837 * system may automatically choose what detectors to run. By default this may 3838 * be all types, but may change over time as detectors are updated. 3839 * If you need precise control and predictability as to what detectors are 3840 * run you should specify specific InfoTypes listed in the reference, 3841 * otherwise a default list will be used, which may change over time. 3842 * </pre> 3843 * 3844 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3845 */ removeInfoTypes(int index)3846 public Builder removeInfoTypes(int index) { 3847 if (infoTypesBuilder_ == null) { 3848 ensureInfoTypesIsMutable(); 3849 infoTypes_.remove(index); 3850 onChanged(); 3851 } else { 3852 infoTypesBuilder_.remove(index); 3853 } 3854 return this; 3855 } 3856 /** 3857 * 3858 * 3859 * <pre> 3860 * Restricts what info_types to look for. The values must correspond to 3861 * InfoType values returned by ListInfoTypes or listed at 3862 * https://cloud.google.com/dlp/docs/infotypes-reference. 3863 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3864 * system may automatically choose what detectors to run. By default this may 3865 * be all types, but may change over time as detectors are updated. 3866 * If you need precise control and predictability as to what detectors are 3867 * run you should specify specific InfoTypes listed in the reference, 3868 * otherwise a default list will be used, which may change over time. 3869 * </pre> 3870 * 3871 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3872 */ getInfoTypesBuilder(int index)3873 public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder(int index) { 3874 return getInfoTypesFieldBuilder().getBuilder(index); 3875 } 3876 /** 3877 * 3878 * 3879 * <pre> 3880 * Restricts what info_types to look for. The values must correspond to 3881 * InfoType values returned by ListInfoTypes or listed at 3882 * https://cloud.google.com/dlp/docs/infotypes-reference. 3883 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3884 * system may automatically choose what detectors to run. By default this may 3885 * be all types, but may change over time as detectors are updated. 3886 * If you need precise control and predictability as to what detectors are 3887 * run you should specify specific InfoTypes listed in the reference, 3888 * otherwise a default list will be used, which may change over time. 3889 * </pre> 3890 * 3891 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3892 */ getInfoTypesOrBuilder(int index)3893 public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder(int index) { 3894 if (infoTypesBuilder_ == null) { 3895 return infoTypes_.get(index); 3896 } else { 3897 return infoTypesBuilder_.getMessageOrBuilder(index); 3898 } 3899 } 3900 /** 3901 * 3902 * 3903 * <pre> 3904 * Restricts what info_types to look for. The values must correspond to 3905 * InfoType values returned by ListInfoTypes or listed at 3906 * https://cloud.google.com/dlp/docs/infotypes-reference. 3907 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3908 * system may automatically choose what detectors to run. By default this may 3909 * be all types, but may change over time as detectors are updated. 3910 * If you need precise control and predictability as to what detectors are 3911 * run you should specify specific InfoTypes listed in the reference, 3912 * otherwise a default list will be used, which may change over time. 3913 * </pre> 3914 * 3915 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3916 */ 3917 public java.util.List<? extends com.google.privacy.dlp.v2.InfoTypeOrBuilder> getInfoTypesOrBuilderList()3918 getInfoTypesOrBuilderList() { 3919 if (infoTypesBuilder_ != null) { 3920 return infoTypesBuilder_.getMessageOrBuilderList(); 3921 } else { 3922 return java.util.Collections.unmodifiableList(infoTypes_); 3923 } 3924 } 3925 /** 3926 * 3927 * 3928 * <pre> 3929 * Restricts what info_types to look for. The values must correspond to 3930 * InfoType values returned by ListInfoTypes or listed at 3931 * https://cloud.google.com/dlp/docs/infotypes-reference. 3932 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3933 * system may automatically choose what detectors to run. By default this may 3934 * be all types, but may change over time as detectors are updated. 3935 * If you need precise control and predictability as to what detectors are 3936 * run you should specify specific InfoTypes listed in the reference, 3937 * otherwise a default list will be used, which may change over time. 3938 * </pre> 3939 * 3940 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3941 */ addInfoTypesBuilder()3942 public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { 3943 return getInfoTypesFieldBuilder() 3944 .addBuilder(com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); 3945 } 3946 /** 3947 * 3948 * 3949 * <pre> 3950 * Restricts what info_types to look for. The values must correspond to 3951 * InfoType values returned by ListInfoTypes or listed at 3952 * https://cloud.google.com/dlp/docs/infotypes-reference. 3953 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3954 * system may automatically choose what detectors to run. By default this may 3955 * be all types, but may change over time as detectors are updated. 3956 * If you need precise control and predictability as to what detectors are 3957 * run you should specify specific InfoTypes listed in the reference, 3958 * otherwise a default list will be used, which may change over time. 3959 * </pre> 3960 * 3961 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3962 */ addInfoTypesBuilder(int index)3963 public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder(int index) { 3964 return getInfoTypesFieldBuilder() 3965 .addBuilder(index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); 3966 } 3967 /** 3968 * 3969 * 3970 * <pre> 3971 * Restricts what info_types to look for. The values must correspond to 3972 * InfoType values returned by ListInfoTypes or listed at 3973 * https://cloud.google.com/dlp/docs/infotypes-reference. 3974 * When no InfoTypes or CustomInfoTypes are specified in a request, the 3975 * system may automatically choose what detectors to run. By default this may 3976 * be all types, but may change over time as detectors are updated. 3977 * If you need precise control and predictability as to what detectors are 3978 * run you should specify specific InfoTypes listed in the reference, 3979 * otherwise a default list will be used, which may change over time. 3980 * </pre> 3981 * 3982 * <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code> 3983 */ getInfoTypesBuilderList()3984 public java.util.List<com.google.privacy.dlp.v2.InfoType.Builder> getInfoTypesBuilderList() { 3985 return getInfoTypesFieldBuilder().getBuilderList(); 3986 } 3987 3988 private com.google.protobuf.RepeatedFieldBuilderV3< 3989 com.google.privacy.dlp.v2.InfoType, 3990 com.google.privacy.dlp.v2.InfoType.Builder, 3991 com.google.privacy.dlp.v2.InfoTypeOrBuilder> getInfoTypesFieldBuilder()3992 getInfoTypesFieldBuilder() { 3993 if (infoTypesBuilder_ == null) { 3994 infoTypesBuilder_ = 3995 new com.google.protobuf.RepeatedFieldBuilderV3< 3996 com.google.privacy.dlp.v2.InfoType, 3997 com.google.privacy.dlp.v2.InfoType.Builder, 3998 com.google.privacy.dlp.v2.InfoTypeOrBuilder>( 3999 infoTypes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); 4000 infoTypes_ = null; 4001 } 4002 return infoTypesBuilder_; 4003 } 4004 4005 private int minLikelihood_ = 0; 4006 /** 4007 * 4008 * 4009 * <pre> 4010 * Only returns findings equal or above this threshold. The default is 4011 * POSSIBLE. 4012 * See https://cloud.google.com/dlp/docs/likelihood to learn more. 4013 * </pre> 4014 * 4015 * <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code> 4016 * 4017 * @return The enum numeric value on the wire for minLikelihood. 4018 */ 4019 @java.lang.Override getMinLikelihoodValue()4020 public int getMinLikelihoodValue() { 4021 return minLikelihood_; 4022 } 4023 /** 4024 * 4025 * 4026 * <pre> 4027 * Only returns findings equal or above this threshold. The default is 4028 * POSSIBLE. 4029 * See https://cloud.google.com/dlp/docs/likelihood to learn more. 4030 * </pre> 4031 * 4032 * <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code> 4033 * 4034 * @param value The enum numeric value on the wire for minLikelihood to set. 4035 * @return This builder for chaining. 4036 */ setMinLikelihoodValue(int value)4037 public Builder setMinLikelihoodValue(int value) { 4038 minLikelihood_ = value; 4039 bitField0_ |= 0x00000002; 4040 onChanged(); 4041 return this; 4042 } 4043 /** 4044 * 4045 * 4046 * <pre> 4047 * Only returns findings equal or above this threshold. The default is 4048 * POSSIBLE. 4049 * See https://cloud.google.com/dlp/docs/likelihood to learn more. 4050 * </pre> 4051 * 4052 * <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code> 4053 * 4054 * @return The minLikelihood. 4055 */ 4056 @java.lang.Override getMinLikelihood()4057 public com.google.privacy.dlp.v2.Likelihood getMinLikelihood() { 4058 com.google.privacy.dlp.v2.Likelihood result = 4059 com.google.privacy.dlp.v2.Likelihood.forNumber(minLikelihood_); 4060 return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; 4061 } 4062 /** 4063 * 4064 * 4065 * <pre> 4066 * Only returns findings equal or above this threshold. The default is 4067 * POSSIBLE. 4068 * See https://cloud.google.com/dlp/docs/likelihood to learn more. 4069 * </pre> 4070 * 4071 * <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code> 4072 * 4073 * @param value The minLikelihood to set. 4074 * @return This builder for chaining. 4075 */ setMinLikelihood(com.google.privacy.dlp.v2.Likelihood value)4076 public Builder setMinLikelihood(com.google.privacy.dlp.v2.Likelihood value) { 4077 if (value == null) { 4078 throw new NullPointerException(); 4079 } 4080 bitField0_ |= 0x00000002; 4081 minLikelihood_ = value.getNumber(); 4082 onChanged(); 4083 return this; 4084 } 4085 /** 4086 * 4087 * 4088 * <pre> 4089 * Only returns findings equal or above this threshold. The default is 4090 * POSSIBLE. 4091 * See https://cloud.google.com/dlp/docs/likelihood to learn more. 4092 * </pre> 4093 * 4094 * <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code> 4095 * 4096 * @return This builder for chaining. 4097 */ clearMinLikelihood()4098 public Builder clearMinLikelihood() { 4099 bitField0_ = (bitField0_ & ~0x00000002); 4100 minLikelihood_ = 0; 4101 onChanged(); 4102 return this; 4103 } 4104 4105 private com.google.privacy.dlp.v2.InspectConfig.FindingLimits limits_; 4106 private com.google.protobuf.SingleFieldBuilderV3< 4107 com.google.privacy.dlp.v2.InspectConfig.FindingLimits, 4108 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder, 4109 com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder> 4110 limitsBuilder_; 4111 /** 4112 * 4113 * 4114 * <pre> 4115 * Configuration to control the number of findings returned. 4116 * This is not used for data profiling. 4117 * When redacting sensitive data from images, finding limits don't apply. They 4118 * can cause unexpected or inconsistent results, where only some data is 4119 * redacted. Don't include finding limits in 4120 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 4121 * requests. Otherwise, Cloud DLP returns an error. 4122 * </pre> 4123 * 4124 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 4125 * 4126 * @return Whether the limits field is set. 4127 */ hasLimits()4128 public boolean hasLimits() { 4129 return ((bitField0_ & 0x00000004) != 0); 4130 } 4131 /** 4132 * 4133 * 4134 * <pre> 4135 * Configuration to control the number of findings returned. 4136 * This is not used for data profiling. 4137 * When redacting sensitive data from images, finding limits don't apply. They 4138 * can cause unexpected or inconsistent results, where only some data is 4139 * redacted. Don't include finding limits in 4140 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 4141 * requests. Otherwise, Cloud DLP returns an error. 4142 * </pre> 4143 * 4144 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 4145 * 4146 * @return The limits. 4147 */ getLimits()4148 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits() { 4149 if (limitsBuilder_ == null) { 4150 return limits_ == null 4151 ? com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() 4152 : limits_; 4153 } else { 4154 return limitsBuilder_.getMessage(); 4155 } 4156 } 4157 /** 4158 * 4159 * 4160 * <pre> 4161 * Configuration to control the number of findings returned. 4162 * This is not used for data profiling. 4163 * When redacting sensitive data from images, finding limits don't apply. They 4164 * can cause unexpected or inconsistent results, where only some data is 4165 * redacted. Don't include finding limits in 4166 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 4167 * requests. Otherwise, Cloud DLP returns an error. 4168 * </pre> 4169 * 4170 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 4171 */ setLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits value)4172 public Builder setLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits value) { 4173 if (limitsBuilder_ == null) { 4174 if (value == null) { 4175 throw new NullPointerException(); 4176 } 4177 limits_ = value; 4178 } else { 4179 limitsBuilder_.setMessage(value); 4180 } 4181 bitField0_ |= 0x00000004; 4182 onChanged(); 4183 return this; 4184 } 4185 /** 4186 * 4187 * 4188 * <pre> 4189 * Configuration to control the number of findings returned. 4190 * This is not used for data profiling. 4191 * When redacting sensitive data from images, finding limits don't apply. They 4192 * can cause unexpected or inconsistent results, where only some data is 4193 * redacted. Don't include finding limits in 4194 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 4195 * requests. Otherwise, Cloud DLP returns an error. 4196 * </pre> 4197 * 4198 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 4199 */ setLimits( com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder builderForValue)4200 public Builder setLimits( 4201 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder builderForValue) { 4202 if (limitsBuilder_ == null) { 4203 limits_ = builderForValue.build(); 4204 } else { 4205 limitsBuilder_.setMessage(builderForValue.build()); 4206 } 4207 bitField0_ |= 0x00000004; 4208 onChanged(); 4209 return this; 4210 } 4211 /** 4212 * 4213 * 4214 * <pre> 4215 * Configuration to control the number of findings returned. 4216 * This is not used for data profiling. 4217 * When redacting sensitive data from images, finding limits don't apply. They 4218 * can cause unexpected or inconsistent results, where only some data is 4219 * redacted. Don't include finding limits in 4220 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 4221 * requests. Otherwise, Cloud DLP returns an error. 4222 * </pre> 4223 * 4224 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 4225 */ mergeLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits value)4226 public Builder mergeLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits value) { 4227 if (limitsBuilder_ == null) { 4228 if (((bitField0_ & 0x00000004) != 0) 4229 && limits_ != null 4230 && limits_ 4231 != com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance()) { 4232 getLimitsBuilder().mergeFrom(value); 4233 } else { 4234 limits_ = value; 4235 } 4236 } else { 4237 limitsBuilder_.mergeFrom(value); 4238 } 4239 bitField0_ |= 0x00000004; 4240 onChanged(); 4241 return this; 4242 } 4243 /** 4244 * 4245 * 4246 * <pre> 4247 * Configuration to control the number of findings returned. 4248 * This is not used for data profiling. 4249 * When redacting sensitive data from images, finding limits don't apply. They 4250 * can cause unexpected or inconsistent results, where only some data is 4251 * redacted. Don't include finding limits in 4252 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 4253 * requests. Otherwise, Cloud DLP returns an error. 4254 * </pre> 4255 * 4256 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 4257 */ clearLimits()4258 public Builder clearLimits() { 4259 bitField0_ = (bitField0_ & ~0x00000004); 4260 limits_ = null; 4261 if (limitsBuilder_ != null) { 4262 limitsBuilder_.dispose(); 4263 limitsBuilder_ = null; 4264 } 4265 onChanged(); 4266 return this; 4267 } 4268 /** 4269 * 4270 * 4271 * <pre> 4272 * Configuration to control the number of findings returned. 4273 * This is not used for data profiling. 4274 * When redacting sensitive data from images, finding limits don't apply. They 4275 * can cause unexpected or inconsistent results, where only some data is 4276 * redacted. Don't include finding limits in 4277 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 4278 * requests. Otherwise, Cloud DLP returns an error. 4279 * </pre> 4280 * 4281 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 4282 */ getLimitsBuilder()4283 public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder getLimitsBuilder() { 4284 bitField0_ |= 0x00000004; 4285 onChanged(); 4286 return getLimitsFieldBuilder().getBuilder(); 4287 } 4288 /** 4289 * 4290 * 4291 * <pre> 4292 * Configuration to control the number of findings returned. 4293 * This is not used for data profiling. 4294 * When redacting sensitive data from images, finding limits don't apply. They 4295 * can cause unexpected or inconsistent results, where only some data is 4296 * redacted. Don't include finding limits in 4297 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 4298 * requests. Otherwise, Cloud DLP returns an error. 4299 * </pre> 4300 * 4301 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 4302 */ getLimitsOrBuilder()4303 public com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder getLimitsOrBuilder() { 4304 if (limitsBuilder_ != null) { 4305 return limitsBuilder_.getMessageOrBuilder(); 4306 } else { 4307 return limits_ == null 4308 ? com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() 4309 : limits_; 4310 } 4311 } 4312 /** 4313 * 4314 * 4315 * <pre> 4316 * Configuration to control the number of findings returned. 4317 * This is not used for data profiling. 4318 * When redacting sensitive data from images, finding limits don't apply. They 4319 * can cause unexpected or inconsistent results, where only some data is 4320 * redacted. Don't include finding limits in 4321 * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] 4322 * requests. Otherwise, Cloud DLP returns an error. 4323 * </pre> 4324 * 4325 * <code>.google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3;</code> 4326 */ 4327 private com.google.protobuf.SingleFieldBuilderV3< 4328 com.google.privacy.dlp.v2.InspectConfig.FindingLimits, 4329 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder, 4330 com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder> getLimitsFieldBuilder()4331 getLimitsFieldBuilder() { 4332 if (limitsBuilder_ == null) { 4333 limitsBuilder_ = 4334 new com.google.protobuf.SingleFieldBuilderV3< 4335 com.google.privacy.dlp.v2.InspectConfig.FindingLimits, 4336 com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder, 4337 com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder>( 4338 getLimits(), getParentForChildren(), isClean()); 4339 limits_ = null; 4340 } 4341 return limitsBuilder_; 4342 } 4343 4344 private boolean includeQuote_; 4345 /** 4346 * 4347 * 4348 * <pre> 4349 * When true, a contextual quote from the data that triggered a finding is 4350 * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote]. 4351 * This is not used for data profiling. 4352 * </pre> 4353 * 4354 * <code>bool include_quote = 4;</code> 4355 * 4356 * @return The includeQuote. 4357 */ 4358 @java.lang.Override getIncludeQuote()4359 public boolean getIncludeQuote() { 4360 return includeQuote_; 4361 } 4362 /** 4363 * 4364 * 4365 * <pre> 4366 * When true, a contextual quote from the data that triggered a finding is 4367 * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote]. 4368 * This is not used for data profiling. 4369 * </pre> 4370 * 4371 * <code>bool include_quote = 4;</code> 4372 * 4373 * @param value The includeQuote to set. 4374 * @return This builder for chaining. 4375 */ setIncludeQuote(boolean value)4376 public Builder setIncludeQuote(boolean value) { 4377 4378 includeQuote_ = value; 4379 bitField0_ |= 0x00000008; 4380 onChanged(); 4381 return this; 4382 } 4383 /** 4384 * 4385 * 4386 * <pre> 4387 * When true, a contextual quote from the data that triggered a finding is 4388 * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote]. 4389 * This is not used for data profiling. 4390 * </pre> 4391 * 4392 * <code>bool include_quote = 4;</code> 4393 * 4394 * @return This builder for chaining. 4395 */ clearIncludeQuote()4396 public Builder clearIncludeQuote() { 4397 bitField0_ = (bitField0_ & ~0x00000008); 4398 includeQuote_ = false; 4399 onChanged(); 4400 return this; 4401 } 4402 4403 private boolean excludeInfoTypes_; 4404 /** 4405 * 4406 * 4407 * <pre> 4408 * When true, excludes type information of the findings. 4409 * This is not used for data profiling. 4410 * </pre> 4411 * 4412 * <code>bool exclude_info_types = 5;</code> 4413 * 4414 * @return The excludeInfoTypes. 4415 */ 4416 @java.lang.Override getExcludeInfoTypes()4417 public boolean getExcludeInfoTypes() { 4418 return excludeInfoTypes_; 4419 } 4420 /** 4421 * 4422 * 4423 * <pre> 4424 * When true, excludes type information of the findings. 4425 * This is not used for data profiling. 4426 * </pre> 4427 * 4428 * <code>bool exclude_info_types = 5;</code> 4429 * 4430 * @param value The excludeInfoTypes to set. 4431 * @return This builder for chaining. 4432 */ setExcludeInfoTypes(boolean value)4433 public Builder setExcludeInfoTypes(boolean value) { 4434 4435 excludeInfoTypes_ = value; 4436 bitField0_ |= 0x00000010; 4437 onChanged(); 4438 return this; 4439 } 4440 /** 4441 * 4442 * 4443 * <pre> 4444 * When true, excludes type information of the findings. 4445 * This is not used for data profiling. 4446 * </pre> 4447 * 4448 * <code>bool exclude_info_types = 5;</code> 4449 * 4450 * @return This builder for chaining. 4451 */ clearExcludeInfoTypes()4452 public Builder clearExcludeInfoTypes() { 4453 bitField0_ = (bitField0_ & ~0x00000010); 4454 excludeInfoTypes_ = false; 4455 onChanged(); 4456 return this; 4457 } 4458 4459 private java.util.List<com.google.privacy.dlp.v2.CustomInfoType> customInfoTypes_ = 4460 java.util.Collections.emptyList(); 4461 ensureCustomInfoTypesIsMutable()4462 private void ensureCustomInfoTypesIsMutable() { 4463 if (!((bitField0_ & 0x00000020) != 0)) { 4464 customInfoTypes_ = 4465 new java.util.ArrayList<com.google.privacy.dlp.v2.CustomInfoType>(customInfoTypes_); 4466 bitField0_ |= 0x00000020; 4467 } 4468 } 4469 4470 private com.google.protobuf.RepeatedFieldBuilderV3< 4471 com.google.privacy.dlp.v2.CustomInfoType, 4472 com.google.privacy.dlp.v2.CustomInfoType.Builder, 4473 com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder> 4474 customInfoTypesBuilder_; 4475 4476 /** 4477 * 4478 * 4479 * <pre> 4480 * CustomInfoTypes provided by the user. See 4481 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4482 * </pre> 4483 * 4484 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4485 */ getCustomInfoTypesList()4486 public java.util.List<com.google.privacy.dlp.v2.CustomInfoType> getCustomInfoTypesList() { 4487 if (customInfoTypesBuilder_ == null) { 4488 return java.util.Collections.unmodifiableList(customInfoTypes_); 4489 } else { 4490 return customInfoTypesBuilder_.getMessageList(); 4491 } 4492 } 4493 /** 4494 * 4495 * 4496 * <pre> 4497 * CustomInfoTypes provided by the user. See 4498 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4499 * </pre> 4500 * 4501 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4502 */ getCustomInfoTypesCount()4503 public int getCustomInfoTypesCount() { 4504 if (customInfoTypesBuilder_ == null) { 4505 return customInfoTypes_.size(); 4506 } else { 4507 return customInfoTypesBuilder_.getCount(); 4508 } 4509 } 4510 /** 4511 * 4512 * 4513 * <pre> 4514 * CustomInfoTypes provided by the user. See 4515 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4516 * </pre> 4517 * 4518 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4519 */ getCustomInfoTypes(int index)4520 public com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index) { 4521 if (customInfoTypesBuilder_ == null) { 4522 return customInfoTypes_.get(index); 4523 } else { 4524 return customInfoTypesBuilder_.getMessage(index); 4525 } 4526 } 4527 /** 4528 * 4529 * 4530 * <pre> 4531 * CustomInfoTypes provided by the user. See 4532 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4533 * </pre> 4534 * 4535 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4536 */ setCustomInfoTypes(int index, com.google.privacy.dlp.v2.CustomInfoType value)4537 public Builder setCustomInfoTypes(int index, com.google.privacy.dlp.v2.CustomInfoType value) { 4538 if (customInfoTypesBuilder_ == null) { 4539 if (value == null) { 4540 throw new NullPointerException(); 4541 } 4542 ensureCustomInfoTypesIsMutable(); 4543 customInfoTypes_.set(index, value); 4544 onChanged(); 4545 } else { 4546 customInfoTypesBuilder_.setMessage(index, value); 4547 } 4548 return this; 4549 } 4550 /** 4551 * 4552 * 4553 * <pre> 4554 * CustomInfoTypes provided by the user. See 4555 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4556 * </pre> 4557 * 4558 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4559 */ setCustomInfoTypes( int index, com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue)4560 public Builder setCustomInfoTypes( 4561 int index, com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue) { 4562 if (customInfoTypesBuilder_ == null) { 4563 ensureCustomInfoTypesIsMutable(); 4564 customInfoTypes_.set(index, builderForValue.build()); 4565 onChanged(); 4566 } else { 4567 customInfoTypesBuilder_.setMessage(index, builderForValue.build()); 4568 } 4569 return this; 4570 } 4571 /** 4572 * 4573 * 4574 * <pre> 4575 * CustomInfoTypes provided by the user. See 4576 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4577 * </pre> 4578 * 4579 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4580 */ addCustomInfoTypes(com.google.privacy.dlp.v2.CustomInfoType value)4581 public Builder addCustomInfoTypes(com.google.privacy.dlp.v2.CustomInfoType value) { 4582 if (customInfoTypesBuilder_ == null) { 4583 if (value == null) { 4584 throw new NullPointerException(); 4585 } 4586 ensureCustomInfoTypesIsMutable(); 4587 customInfoTypes_.add(value); 4588 onChanged(); 4589 } else { 4590 customInfoTypesBuilder_.addMessage(value); 4591 } 4592 return this; 4593 } 4594 /** 4595 * 4596 * 4597 * <pre> 4598 * CustomInfoTypes provided by the user. See 4599 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4600 * </pre> 4601 * 4602 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4603 */ addCustomInfoTypes(int index, com.google.privacy.dlp.v2.CustomInfoType value)4604 public Builder addCustomInfoTypes(int index, com.google.privacy.dlp.v2.CustomInfoType value) { 4605 if (customInfoTypesBuilder_ == null) { 4606 if (value == null) { 4607 throw new NullPointerException(); 4608 } 4609 ensureCustomInfoTypesIsMutable(); 4610 customInfoTypes_.add(index, value); 4611 onChanged(); 4612 } else { 4613 customInfoTypesBuilder_.addMessage(index, value); 4614 } 4615 return this; 4616 } 4617 /** 4618 * 4619 * 4620 * <pre> 4621 * CustomInfoTypes provided by the user. See 4622 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4623 * </pre> 4624 * 4625 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4626 */ addCustomInfoTypes( com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue)4627 public Builder addCustomInfoTypes( 4628 com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue) { 4629 if (customInfoTypesBuilder_ == null) { 4630 ensureCustomInfoTypesIsMutable(); 4631 customInfoTypes_.add(builderForValue.build()); 4632 onChanged(); 4633 } else { 4634 customInfoTypesBuilder_.addMessage(builderForValue.build()); 4635 } 4636 return this; 4637 } 4638 /** 4639 * 4640 * 4641 * <pre> 4642 * CustomInfoTypes provided by the user. See 4643 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4644 * </pre> 4645 * 4646 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4647 */ addCustomInfoTypes( int index, com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue)4648 public Builder addCustomInfoTypes( 4649 int index, com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue) { 4650 if (customInfoTypesBuilder_ == null) { 4651 ensureCustomInfoTypesIsMutable(); 4652 customInfoTypes_.add(index, builderForValue.build()); 4653 onChanged(); 4654 } else { 4655 customInfoTypesBuilder_.addMessage(index, builderForValue.build()); 4656 } 4657 return this; 4658 } 4659 /** 4660 * 4661 * 4662 * <pre> 4663 * CustomInfoTypes provided by the user. See 4664 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4665 * </pre> 4666 * 4667 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4668 */ addAllCustomInfoTypes( java.lang.Iterable<? extends com.google.privacy.dlp.v2.CustomInfoType> values)4669 public Builder addAllCustomInfoTypes( 4670 java.lang.Iterable<? extends com.google.privacy.dlp.v2.CustomInfoType> values) { 4671 if (customInfoTypesBuilder_ == null) { 4672 ensureCustomInfoTypesIsMutable(); 4673 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customInfoTypes_); 4674 onChanged(); 4675 } else { 4676 customInfoTypesBuilder_.addAllMessages(values); 4677 } 4678 return this; 4679 } 4680 /** 4681 * 4682 * 4683 * <pre> 4684 * CustomInfoTypes provided by the user. See 4685 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4686 * </pre> 4687 * 4688 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4689 */ clearCustomInfoTypes()4690 public Builder clearCustomInfoTypes() { 4691 if (customInfoTypesBuilder_ == null) { 4692 customInfoTypes_ = java.util.Collections.emptyList(); 4693 bitField0_ = (bitField0_ & ~0x00000020); 4694 onChanged(); 4695 } else { 4696 customInfoTypesBuilder_.clear(); 4697 } 4698 return this; 4699 } 4700 /** 4701 * 4702 * 4703 * <pre> 4704 * CustomInfoTypes provided by the user. See 4705 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4706 * </pre> 4707 * 4708 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4709 */ removeCustomInfoTypes(int index)4710 public Builder removeCustomInfoTypes(int index) { 4711 if (customInfoTypesBuilder_ == null) { 4712 ensureCustomInfoTypesIsMutable(); 4713 customInfoTypes_.remove(index); 4714 onChanged(); 4715 } else { 4716 customInfoTypesBuilder_.remove(index); 4717 } 4718 return this; 4719 } 4720 /** 4721 * 4722 * 4723 * <pre> 4724 * CustomInfoTypes provided by the user. See 4725 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4726 * </pre> 4727 * 4728 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4729 */ getCustomInfoTypesBuilder(int index)4730 public com.google.privacy.dlp.v2.CustomInfoType.Builder getCustomInfoTypesBuilder(int index) { 4731 return getCustomInfoTypesFieldBuilder().getBuilder(index); 4732 } 4733 /** 4734 * 4735 * 4736 * <pre> 4737 * CustomInfoTypes provided by the user. See 4738 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4739 * </pre> 4740 * 4741 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4742 */ getCustomInfoTypesOrBuilder( int index)4743 public com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBuilder( 4744 int index) { 4745 if (customInfoTypesBuilder_ == null) { 4746 return customInfoTypes_.get(index); 4747 } else { 4748 return customInfoTypesBuilder_.getMessageOrBuilder(index); 4749 } 4750 } 4751 /** 4752 * 4753 * 4754 * <pre> 4755 * CustomInfoTypes provided by the user. See 4756 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4757 * </pre> 4758 * 4759 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4760 */ 4761 public java.util.List<? extends com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder> getCustomInfoTypesOrBuilderList()4762 getCustomInfoTypesOrBuilderList() { 4763 if (customInfoTypesBuilder_ != null) { 4764 return customInfoTypesBuilder_.getMessageOrBuilderList(); 4765 } else { 4766 return java.util.Collections.unmodifiableList(customInfoTypes_); 4767 } 4768 } 4769 /** 4770 * 4771 * 4772 * <pre> 4773 * CustomInfoTypes provided by the user. See 4774 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4775 * </pre> 4776 * 4777 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4778 */ addCustomInfoTypesBuilder()4779 public com.google.privacy.dlp.v2.CustomInfoType.Builder addCustomInfoTypesBuilder() { 4780 return getCustomInfoTypesFieldBuilder() 4781 .addBuilder(com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()); 4782 } 4783 /** 4784 * 4785 * 4786 * <pre> 4787 * CustomInfoTypes provided by the user. See 4788 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4789 * </pre> 4790 * 4791 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4792 */ addCustomInfoTypesBuilder(int index)4793 public com.google.privacy.dlp.v2.CustomInfoType.Builder addCustomInfoTypesBuilder(int index) { 4794 return getCustomInfoTypesFieldBuilder() 4795 .addBuilder(index, com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()); 4796 } 4797 /** 4798 * 4799 * 4800 * <pre> 4801 * CustomInfoTypes provided by the user. See 4802 * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. 4803 * </pre> 4804 * 4805 * <code>repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6;</code> 4806 */ 4807 public java.util.List<com.google.privacy.dlp.v2.CustomInfoType.Builder> getCustomInfoTypesBuilderList()4808 getCustomInfoTypesBuilderList() { 4809 return getCustomInfoTypesFieldBuilder().getBuilderList(); 4810 } 4811 4812 private com.google.protobuf.RepeatedFieldBuilderV3< 4813 com.google.privacy.dlp.v2.CustomInfoType, 4814 com.google.privacy.dlp.v2.CustomInfoType.Builder, 4815 com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder> getCustomInfoTypesFieldBuilder()4816 getCustomInfoTypesFieldBuilder() { 4817 if (customInfoTypesBuilder_ == null) { 4818 customInfoTypesBuilder_ = 4819 new com.google.protobuf.RepeatedFieldBuilderV3< 4820 com.google.privacy.dlp.v2.CustomInfoType, 4821 com.google.privacy.dlp.v2.CustomInfoType.Builder, 4822 com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder>( 4823 customInfoTypes_, 4824 ((bitField0_ & 0x00000020) != 0), 4825 getParentForChildren(), 4826 isClean()); 4827 customInfoTypes_ = null; 4828 } 4829 return customInfoTypesBuilder_; 4830 } 4831 4832 private java.util.List<java.lang.Integer> contentOptions_ = java.util.Collections.emptyList(); 4833 ensureContentOptionsIsMutable()4834 private void ensureContentOptionsIsMutable() { 4835 if (!((bitField0_ & 0x00000040) != 0)) { 4836 contentOptions_ = new java.util.ArrayList<java.lang.Integer>(contentOptions_); 4837 bitField0_ |= 0x00000040; 4838 } 4839 } 4840 /** 4841 * 4842 * 4843 * <pre> 4844 * Deprecated and unused. 4845 * </pre> 4846 * 4847 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 4848 * 4849 * @return A list containing the contentOptions. 4850 */ getContentOptionsList()4851 public java.util.List<com.google.privacy.dlp.v2.ContentOption> getContentOptionsList() { 4852 return new com.google.protobuf.Internal.ListAdapter< 4853 java.lang.Integer, com.google.privacy.dlp.v2.ContentOption>( 4854 contentOptions_, contentOptions_converter_); 4855 } 4856 /** 4857 * 4858 * 4859 * <pre> 4860 * Deprecated and unused. 4861 * </pre> 4862 * 4863 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 4864 * 4865 * @return The count of contentOptions. 4866 */ getContentOptionsCount()4867 public int getContentOptionsCount() { 4868 return contentOptions_.size(); 4869 } 4870 /** 4871 * 4872 * 4873 * <pre> 4874 * Deprecated and unused. 4875 * </pre> 4876 * 4877 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 4878 * 4879 * @param index The index of the element to return. 4880 * @return The contentOptions at the given index. 4881 */ getContentOptions(int index)4882 public com.google.privacy.dlp.v2.ContentOption getContentOptions(int index) { 4883 return contentOptions_converter_.convert(contentOptions_.get(index)); 4884 } 4885 /** 4886 * 4887 * 4888 * <pre> 4889 * Deprecated and unused. 4890 * </pre> 4891 * 4892 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 4893 * 4894 * @param index The index to set the value at. 4895 * @param value The contentOptions to set. 4896 * @return This builder for chaining. 4897 */ setContentOptions(int index, com.google.privacy.dlp.v2.ContentOption value)4898 public Builder setContentOptions(int index, com.google.privacy.dlp.v2.ContentOption value) { 4899 if (value == null) { 4900 throw new NullPointerException(); 4901 } 4902 ensureContentOptionsIsMutable(); 4903 contentOptions_.set(index, value.getNumber()); 4904 onChanged(); 4905 return this; 4906 } 4907 /** 4908 * 4909 * 4910 * <pre> 4911 * Deprecated and unused. 4912 * </pre> 4913 * 4914 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 4915 * 4916 * @param value The contentOptions to add. 4917 * @return This builder for chaining. 4918 */ addContentOptions(com.google.privacy.dlp.v2.ContentOption value)4919 public Builder addContentOptions(com.google.privacy.dlp.v2.ContentOption value) { 4920 if (value == null) { 4921 throw new NullPointerException(); 4922 } 4923 ensureContentOptionsIsMutable(); 4924 contentOptions_.add(value.getNumber()); 4925 onChanged(); 4926 return this; 4927 } 4928 /** 4929 * 4930 * 4931 * <pre> 4932 * Deprecated and unused. 4933 * </pre> 4934 * 4935 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 4936 * 4937 * @param values The contentOptions to add. 4938 * @return This builder for chaining. 4939 */ addAllContentOptions( java.lang.Iterable<? extends com.google.privacy.dlp.v2.ContentOption> values)4940 public Builder addAllContentOptions( 4941 java.lang.Iterable<? extends com.google.privacy.dlp.v2.ContentOption> values) { 4942 ensureContentOptionsIsMutable(); 4943 for (com.google.privacy.dlp.v2.ContentOption value : values) { 4944 contentOptions_.add(value.getNumber()); 4945 } 4946 onChanged(); 4947 return this; 4948 } 4949 /** 4950 * 4951 * 4952 * <pre> 4953 * Deprecated and unused. 4954 * </pre> 4955 * 4956 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 4957 * 4958 * @return This builder for chaining. 4959 */ clearContentOptions()4960 public Builder clearContentOptions() { 4961 contentOptions_ = java.util.Collections.emptyList(); 4962 bitField0_ = (bitField0_ & ~0x00000040); 4963 onChanged(); 4964 return this; 4965 } 4966 /** 4967 * 4968 * 4969 * <pre> 4970 * Deprecated and unused. 4971 * </pre> 4972 * 4973 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 4974 * 4975 * @return A list containing the enum numeric values on the wire for contentOptions. 4976 */ getContentOptionsValueList()4977 public java.util.List<java.lang.Integer> getContentOptionsValueList() { 4978 return java.util.Collections.unmodifiableList(contentOptions_); 4979 } 4980 /** 4981 * 4982 * 4983 * <pre> 4984 * Deprecated and unused. 4985 * </pre> 4986 * 4987 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 4988 * 4989 * @param index The index of the value to return. 4990 * @return The enum numeric value on the wire of contentOptions at the given index. 4991 */ getContentOptionsValue(int index)4992 public int getContentOptionsValue(int index) { 4993 return contentOptions_.get(index); 4994 } 4995 /** 4996 * 4997 * 4998 * <pre> 4999 * Deprecated and unused. 5000 * </pre> 5001 * 5002 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 5003 * 5004 * @param index The index to set the value at. 5005 * @param value The enum numeric value on the wire for contentOptions to set. 5006 * @return This builder for chaining. 5007 */ setContentOptionsValue(int index, int value)5008 public Builder setContentOptionsValue(int index, int value) { 5009 ensureContentOptionsIsMutable(); 5010 contentOptions_.set(index, value); 5011 onChanged(); 5012 return this; 5013 } 5014 /** 5015 * 5016 * 5017 * <pre> 5018 * Deprecated and unused. 5019 * </pre> 5020 * 5021 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 5022 * 5023 * @param value The enum numeric value on the wire for contentOptions to add. 5024 * @return This builder for chaining. 5025 */ addContentOptionsValue(int value)5026 public Builder addContentOptionsValue(int value) { 5027 ensureContentOptionsIsMutable(); 5028 contentOptions_.add(value); 5029 onChanged(); 5030 return this; 5031 } 5032 /** 5033 * 5034 * 5035 * <pre> 5036 * Deprecated and unused. 5037 * </pre> 5038 * 5039 * <code>repeated .google.privacy.dlp.v2.ContentOption content_options = 8;</code> 5040 * 5041 * @param values The enum numeric values on the wire for contentOptions to add. 5042 * @return This builder for chaining. 5043 */ addAllContentOptionsValue(java.lang.Iterable<java.lang.Integer> values)5044 public Builder addAllContentOptionsValue(java.lang.Iterable<java.lang.Integer> values) { 5045 ensureContentOptionsIsMutable(); 5046 for (int value : values) { 5047 contentOptions_.add(value); 5048 } 5049 onChanged(); 5050 return this; 5051 } 5052 5053 private java.util.List<com.google.privacy.dlp.v2.InspectionRuleSet> ruleSet_ = 5054 java.util.Collections.emptyList(); 5055 ensureRuleSetIsMutable()5056 private void ensureRuleSetIsMutable() { 5057 if (!((bitField0_ & 0x00000080) != 0)) { 5058 ruleSet_ = new java.util.ArrayList<com.google.privacy.dlp.v2.InspectionRuleSet>(ruleSet_); 5059 bitField0_ |= 0x00000080; 5060 } 5061 } 5062 5063 private com.google.protobuf.RepeatedFieldBuilderV3< 5064 com.google.privacy.dlp.v2.InspectionRuleSet, 5065 com.google.privacy.dlp.v2.InspectionRuleSet.Builder, 5066 com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder> 5067 ruleSetBuilder_; 5068 5069 /** 5070 * 5071 * 5072 * <pre> 5073 * Set of rules to apply to the findings for this InspectConfig. 5074 * Exclusion rules, contained in the set are executed in the end, other 5075 * rules are executed in the order they are specified for each info type. 5076 * </pre> 5077 * 5078 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5079 */ getRuleSetList()5080 public java.util.List<com.google.privacy.dlp.v2.InspectionRuleSet> getRuleSetList() { 5081 if (ruleSetBuilder_ == null) { 5082 return java.util.Collections.unmodifiableList(ruleSet_); 5083 } else { 5084 return ruleSetBuilder_.getMessageList(); 5085 } 5086 } 5087 /** 5088 * 5089 * 5090 * <pre> 5091 * Set of rules to apply to the findings for this InspectConfig. 5092 * Exclusion rules, contained in the set are executed in the end, other 5093 * rules are executed in the order they are specified for each info type. 5094 * </pre> 5095 * 5096 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5097 */ getRuleSetCount()5098 public int getRuleSetCount() { 5099 if (ruleSetBuilder_ == null) { 5100 return ruleSet_.size(); 5101 } else { 5102 return ruleSetBuilder_.getCount(); 5103 } 5104 } 5105 /** 5106 * 5107 * 5108 * <pre> 5109 * Set of rules to apply to the findings for this InspectConfig. 5110 * Exclusion rules, contained in the set are executed in the end, other 5111 * rules are executed in the order they are specified for each info type. 5112 * </pre> 5113 * 5114 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5115 */ getRuleSet(int index)5116 public com.google.privacy.dlp.v2.InspectionRuleSet getRuleSet(int index) { 5117 if (ruleSetBuilder_ == null) { 5118 return ruleSet_.get(index); 5119 } else { 5120 return ruleSetBuilder_.getMessage(index); 5121 } 5122 } 5123 /** 5124 * 5125 * 5126 * <pre> 5127 * Set of rules to apply to the findings for this InspectConfig. 5128 * Exclusion rules, contained in the set are executed in the end, other 5129 * rules are executed in the order they are specified for each info type. 5130 * </pre> 5131 * 5132 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5133 */ setRuleSet(int index, com.google.privacy.dlp.v2.InspectionRuleSet value)5134 public Builder setRuleSet(int index, com.google.privacy.dlp.v2.InspectionRuleSet value) { 5135 if (ruleSetBuilder_ == null) { 5136 if (value == null) { 5137 throw new NullPointerException(); 5138 } 5139 ensureRuleSetIsMutable(); 5140 ruleSet_.set(index, value); 5141 onChanged(); 5142 } else { 5143 ruleSetBuilder_.setMessage(index, value); 5144 } 5145 return this; 5146 } 5147 /** 5148 * 5149 * 5150 * <pre> 5151 * Set of rules to apply to the findings for this InspectConfig. 5152 * Exclusion rules, contained in the set are executed in the end, other 5153 * rules are executed in the order they are specified for each info type. 5154 * </pre> 5155 * 5156 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5157 */ setRuleSet( int index, com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue)5158 public Builder setRuleSet( 5159 int index, com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue) { 5160 if (ruleSetBuilder_ == null) { 5161 ensureRuleSetIsMutable(); 5162 ruleSet_.set(index, builderForValue.build()); 5163 onChanged(); 5164 } else { 5165 ruleSetBuilder_.setMessage(index, builderForValue.build()); 5166 } 5167 return this; 5168 } 5169 /** 5170 * 5171 * 5172 * <pre> 5173 * Set of rules to apply to the findings for this InspectConfig. 5174 * Exclusion rules, contained in the set are executed in the end, other 5175 * rules are executed in the order they are specified for each info type. 5176 * </pre> 5177 * 5178 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5179 */ addRuleSet(com.google.privacy.dlp.v2.InspectionRuleSet value)5180 public Builder addRuleSet(com.google.privacy.dlp.v2.InspectionRuleSet value) { 5181 if (ruleSetBuilder_ == null) { 5182 if (value == null) { 5183 throw new NullPointerException(); 5184 } 5185 ensureRuleSetIsMutable(); 5186 ruleSet_.add(value); 5187 onChanged(); 5188 } else { 5189 ruleSetBuilder_.addMessage(value); 5190 } 5191 return this; 5192 } 5193 /** 5194 * 5195 * 5196 * <pre> 5197 * Set of rules to apply to the findings for this InspectConfig. 5198 * Exclusion rules, contained in the set are executed in the end, other 5199 * rules are executed in the order they are specified for each info type. 5200 * </pre> 5201 * 5202 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5203 */ addRuleSet(int index, com.google.privacy.dlp.v2.InspectionRuleSet value)5204 public Builder addRuleSet(int index, com.google.privacy.dlp.v2.InspectionRuleSet value) { 5205 if (ruleSetBuilder_ == null) { 5206 if (value == null) { 5207 throw new NullPointerException(); 5208 } 5209 ensureRuleSetIsMutable(); 5210 ruleSet_.add(index, value); 5211 onChanged(); 5212 } else { 5213 ruleSetBuilder_.addMessage(index, value); 5214 } 5215 return this; 5216 } 5217 /** 5218 * 5219 * 5220 * <pre> 5221 * Set of rules to apply to the findings for this InspectConfig. 5222 * Exclusion rules, contained in the set are executed in the end, other 5223 * rules are executed in the order they are specified for each info type. 5224 * </pre> 5225 * 5226 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5227 */ addRuleSet(com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue)5228 public Builder addRuleSet(com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue) { 5229 if (ruleSetBuilder_ == null) { 5230 ensureRuleSetIsMutable(); 5231 ruleSet_.add(builderForValue.build()); 5232 onChanged(); 5233 } else { 5234 ruleSetBuilder_.addMessage(builderForValue.build()); 5235 } 5236 return this; 5237 } 5238 /** 5239 * 5240 * 5241 * <pre> 5242 * Set of rules to apply to the findings for this InspectConfig. 5243 * Exclusion rules, contained in the set are executed in the end, other 5244 * rules are executed in the order they are specified for each info type. 5245 * </pre> 5246 * 5247 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5248 */ addRuleSet( int index, com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue)5249 public Builder addRuleSet( 5250 int index, com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue) { 5251 if (ruleSetBuilder_ == null) { 5252 ensureRuleSetIsMutable(); 5253 ruleSet_.add(index, builderForValue.build()); 5254 onChanged(); 5255 } else { 5256 ruleSetBuilder_.addMessage(index, builderForValue.build()); 5257 } 5258 return this; 5259 } 5260 /** 5261 * 5262 * 5263 * <pre> 5264 * Set of rules to apply to the findings for this InspectConfig. 5265 * Exclusion rules, contained in the set are executed in the end, other 5266 * rules are executed in the order they are specified for each info type. 5267 * </pre> 5268 * 5269 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5270 */ addAllRuleSet( java.lang.Iterable<? extends com.google.privacy.dlp.v2.InspectionRuleSet> values)5271 public Builder addAllRuleSet( 5272 java.lang.Iterable<? extends com.google.privacy.dlp.v2.InspectionRuleSet> values) { 5273 if (ruleSetBuilder_ == null) { 5274 ensureRuleSetIsMutable(); 5275 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ruleSet_); 5276 onChanged(); 5277 } else { 5278 ruleSetBuilder_.addAllMessages(values); 5279 } 5280 return this; 5281 } 5282 /** 5283 * 5284 * 5285 * <pre> 5286 * Set of rules to apply to the findings for this InspectConfig. 5287 * Exclusion rules, contained in the set are executed in the end, other 5288 * rules are executed in the order they are specified for each info type. 5289 * </pre> 5290 * 5291 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5292 */ clearRuleSet()5293 public Builder clearRuleSet() { 5294 if (ruleSetBuilder_ == null) { 5295 ruleSet_ = java.util.Collections.emptyList(); 5296 bitField0_ = (bitField0_ & ~0x00000080); 5297 onChanged(); 5298 } else { 5299 ruleSetBuilder_.clear(); 5300 } 5301 return this; 5302 } 5303 /** 5304 * 5305 * 5306 * <pre> 5307 * Set of rules to apply to the findings for this InspectConfig. 5308 * Exclusion rules, contained in the set are executed in the end, other 5309 * rules are executed in the order they are specified for each info type. 5310 * </pre> 5311 * 5312 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5313 */ removeRuleSet(int index)5314 public Builder removeRuleSet(int index) { 5315 if (ruleSetBuilder_ == null) { 5316 ensureRuleSetIsMutable(); 5317 ruleSet_.remove(index); 5318 onChanged(); 5319 } else { 5320 ruleSetBuilder_.remove(index); 5321 } 5322 return this; 5323 } 5324 /** 5325 * 5326 * 5327 * <pre> 5328 * Set of rules to apply to the findings for this InspectConfig. 5329 * Exclusion rules, contained in the set are executed in the end, other 5330 * rules are executed in the order they are specified for each info type. 5331 * </pre> 5332 * 5333 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5334 */ getRuleSetBuilder(int index)5335 public com.google.privacy.dlp.v2.InspectionRuleSet.Builder getRuleSetBuilder(int index) { 5336 return getRuleSetFieldBuilder().getBuilder(index); 5337 } 5338 /** 5339 * 5340 * 5341 * <pre> 5342 * Set of rules to apply to the findings for this InspectConfig. 5343 * Exclusion rules, contained in the set are executed in the end, other 5344 * rules are executed in the order they are specified for each info type. 5345 * </pre> 5346 * 5347 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5348 */ getRuleSetOrBuilder(int index)5349 public com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder getRuleSetOrBuilder(int index) { 5350 if (ruleSetBuilder_ == null) { 5351 return ruleSet_.get(index); 5352 } else { 5353 return ruleSetBuilder_.getMessageOrBuilder(index); 5354 } 5355 } 5356 /** 5357 * 5358 * 5359 * <pre> 5360 * Set of rules to apply to the findings for this InspectConfig. 5361 * Exclusion rules, contained in the set are executed in the end, other 5362 * rules are executed in the order they are specified for each info type. 5363 * </pre> 5364 * 5365 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5366 */ 5367 public java.util.List<? extends com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder> getRuleSetOrBuilderList()5368 getRuleSetOrBuilderList() { 5369 if (ruleSetBuilder_ != null) { 5370 return ruleSetBuilder_.getMessageOrBuilderList(); 5371 } else { 5372 return java.util.Collections.unmodifiableList(ruleSet_); 5373 } 5374 } 5375 /** 5376 * 5377 * 5378 * <pre> 5379 * Set of rules to apply to the findings for this InspectConfig. 5380 * Exclusion rules, contained in the set are executed in the end, other 5381 * rules are executed in the order they are specified for each info type. 5382 * </pre> 5383 * 5384 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5385 */ addRuleSetBuilder()5386 public com.google.privacy.dlp.v2.InspectionRuleSet.Builder addRuleSetBuilder() { 5387 return getRuleSetFieldBuilder() 5388 .addBuilder(com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance()); 5389 } 5390 /** 5391 * 5392 * 5393 * <pre> 5394 * Set of rules to apply to the findings for this InspectConfig. 5395 * Exclusion rules, contained in the set are executed in the end, other 5396 * rules are executed in the order they are specified for each info type. 5397 * </pre> 5398 * 5399 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5400 */ addRuleSetBuilder(int index)5401 public com.google.privacy.dlp.v2.InspectionRuleSet.Builder addRuleSetBuilder(int index) { 5402 return getRuleSetFieldBuilder() 5403 .addBuilder(index, com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance()); 5404 } 5405 /** 5406 * 5407 * 5408 * <pre> 5409 * Set of rules to apply to the findings for this InspectConfig. 5410 * Exclusion rules, contained in the set are executed in the end, other 5411 * rules are executed in the order they are specified for each info type. 5412 * </pre> 5413 * 5414 * <code>repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10;</code> 5415 */ 5416 public java.util.List<com.google.privacy.dlp.v2.InspectionRuleSet.Builder> getRuleSetBuilderList()5417 getRuleSetBuilderList() { 5418 return getRuleSetFieldBuilder().getBuilderList(); 5419 } 5420 5421 private com.google.protobuf.RepeatedFieldBuilderV3< 5422 com.google.privacy.dlp.v2.InspectionRuleSet, 5423 com.google.privacy.dlp.v2.InspectionRuleSet.Builder, 5424 com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder> getRuleSetFieldBuilder()5425 getRuleSetFieldBuilder() { 5426 if (ruleSetBuilder_ == null) { 5427 ruleSetBuilder_ = 5428 new com.google.protobuf.RepeatedFieldBuilderV3< 5429 com.google.privacy.dlp.v2.InspectionRuleSet, 5430 com.google.privacy.dlp.v2.InspectionRuleSet.Builder, 5431 com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder>( 5432 ruleSet_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); 5433 ruleSet_ = null; 5434 } 5435 return ruleSetBuilder_; 5436 } 5437 5438 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)5439 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 5440 return super.setUnknownFields(unknownFields); 5441 } 5442 5443 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5444 public final Builder mergeUnknownFields( 5445 final com.google.protobuf.UnknownFieldSet unknownFields) { 5446 return super.mergeUnknownFields(unknownFields); 5447 } 5448 5449 // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectConfig) 5450 } 5451 5452 // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectConfig) 5453 private static final com.google.privacy.dlp.v2.InspectConfig DEFAULT_INSTANCE; 5454 5455 static { 5456 DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectConfig(); 5457 } 5458 getDefaultInstance()5459 public static com.google.privacy.dlp.v2.InspectConfig getDefaultInstance() { 5460 return DEFAULT_INSTANCE; 5461 } 5462 5463 private static final com.google.protobuf.Parser<InspectConfig> PARSER = 5464 new com.google.protobuf.AbstractParser<InspectConfig>() { 5465 @java.lang.Override 5466 public InspectConfig parsePartialFrom( 5467 com.google.protobuf.CodedInputStream input, 5468 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5469 throws com.google.protobuf.InvalidProtocolBufferException { 5470 Builder builder = newBuilder(); 5471 try { 5472 builder.mergeFrom(input, extensionRegistry); 5473 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 5474 throw e.setUnfinishedMessage(builder.buildPartial()); 5475 } catch (com.google.protobuf.UninitializedMessageException e) { 5476 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 5477 } catch (java.io.IOException e) { 5478 throw new com.google.protobuf.InvalidProtocolBufferException(e) 5479 .setUnfinishedMessage(builder.buildPartial()); 5480 } 5481 return builder.buildPartial(); 5482 } 5483 }; 5484 parser()5485 public static com.google.protobuf.Parser<InspectConfig> parser() { 5486 return PARSER; 5487 } 5488 5489 @java.lang.Override getParserForType()5490 public com.google.protobuf.Parser<InspectConfig> getParserForType() { 5491 return PARSER; 5492 } 5493 5494 @java.lang.Override getDefaultInstanceForType()5495 public com.google.privacy.dlp.v2.InspectConfig getDefaultInstanceForType() { 5496 return DEFAULT_INSTANCE; 5497 } 5498 } 5499