/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.dlp.v2.model;

/**
 * Configuration to control the number of findings returned for inspection. This is not used for de-
 * identification or data profiling. When redacting sensitive data from images, finding limits don't
 * apply. They can cause unexpected or inconsistent results, where only some data is redacted. Don't
 * include finding limits in RedactImage requests. Otherwise, Cloud DLP returns an error.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Data Loss Prevention (DLP). For a detailed
 * explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GooglePrivacyDlpV2FindingLimits extends com.google.api.client.json.GenericJson {

  /**
   * Configuration of findings limit given for specified infoTypes.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GooglePrivacyDlpV2InfoTypeLimit> maxFindingsPerInfoType;

  /**
   * Max number of findings that are returned for each item scanned. When set within an
   * InspectContentRequest, this field is ignored. This value isn't a hard limit. If the number of
   * findings for an item reaches this limit, the inspection of that item ends gradually, not
   * abruptly. Therefore, the actual number of findings that Cloud DLP returns for the item can be
   * multiple times higher than this value.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer maxFindingsPerItem;

  /**
   * Max number of findings that are returned per request or job. If you set this field in an
   * InspectContentRequest, the resulting maximum value is the value that you set or 3,000,
   * whichever is lower. This value isn't a hard limit. If an inspection reaches this limit, the
   * inspection ends gradually, not abruptly. Therefore, the actual number of findings that Cloud
   * DLP returns can be multiple times higher than this value.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer maxFindingsPerRequest;

  /**
   * Configuration of findings limit given for specified infoTypes.
   * @return value or {@code null} for none
   */
  public java.util.List<GooglePrivacyDlpV2InfoTypeLimit> getMaxFindingsPerInfoType() {
    return maxFindingsPerInfoType;
  }

  /**
   * Configuration of findings limit given for specified infoTypes.
   * @param maxFindingsPerInfoType maxFindingsPerInfoType or {@code null} for none
   */
  public GooglePrivacyDlpV2FindingLimits setMaxFindingsPerInfoType(java.util.List<GooglePrivacyDlpV2InfoTypeLimit> maxFindingsPerInfoType) {
    this.maxFindingsPerInfoType = maxFindingsPerInfoType;
    return this;
  }

  /**
   * Max number of findings that are returned for each item scanned. When set within an
   * InspectContentRequest, this field is ignored. This value isn't a hard limit. If the number of
   * findings for an item reaches this limit, the inspection of that item ends gradually, not
   * abruptly. Therefore, the actual number of findings that Cloud DLP returns for the item can be
   * multiple times higher than this value.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getMaxFindingsPerItem() {
    return maxFindingsPerItem;
  }

  /**
   * Max number of findings that are returned for each item scanned. When set within an
   * InspectContentRequest, this field is ignored. This value isn't a hard limit. If the number of
   * findings for an item reaches this limit, the inspection of that item ends gradually, not
   * abruptly. Therefore, the actual number of findings that Cloud DLP returns for the item can be
   * multiple times higher than this value.
   * @param maxFindingsPerItem maxFindingsPerItem or {@code null} for none
   */
  public GooglePrivacyDlpV2FindingLimits setMaxFindingsPerItem(java.lang.Integer maxFindingsPerItem) {
    this.maxFindingsPerItem = maxFindingsPerItem;
    return this;
  }

  /**
   * Max number of findings that are returned per request or job. If you set this field in an
   * InspectContentRequest, the resulting maximum value is the value that you set or 3,000,
   * whichever is lower. This value isn't a hard limit. If an inspection reaches this limit, the
   * inspection ends gradually, not abruptly. Therefore, the actual number of findings that Cloud
   * DLP returns can be multiple times higher than this value.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getMaxFindingsPerRequest() {
    return maxFindingsPerRequest;
  }

  /**
   * Max number of findings that are returned per request or job. If you set this field in an
   * InspectContentRequest, the resulting maximum value is the value that you set or 3,000,
   * whichever is lower. This value isn't a hard limit. If an inspection reaches this limit, the
   * inspection ends gradually, not abruptly. Therefore, the actual number of findings that Cloud
   * DLP returns can be multiple times higher than this value.
   * @param maxFindingsPerRequest maxFindingsPerRequest or {@code null} for none
   */
  public GooglePrivacyDlpV2FindingLimits setMaxFindingsPerRequest(java.lang.Integer maxFindingsPerRequest) {
    this.maxFindingsPerRequest = maxFindingsPerRequest;
    return this;
  }

  @Override
  public GooglePrivacyDlpV2FindingLimits set(String fieldName, Object value) {
    return (GooglePrivacyDlpV2FindingLimits) super.set(fieldName, value);
  }

  @Override
  public GooglePrivacyDlpV2FindingLimits clone() {
    return (GooglePrivacyDlpV2FindingLimits) super.clone();
  }

}
