/*
 * 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.cloudsearch.v1.model;

/**
 * A summary of a DLP scan event. This is a summary and should contain the minimum amount of data
 * required to identify and process DLP scans. It is written to Starcast and encoded & returned to
 * the client on attachment upload.
 *
 * <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 Search API. 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 DlpScanSummary extends com.google.api.client.json.GenericJson {

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private DlpAction dlpAction;

  /**
   * The scan ID of the corresponding {@link DlpViolationScanRecord} in the {@link
   * EphemeralDlpScans} Spanner table. This can be used to fetch additional details about the scan,
   * e.g. for audit logging.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String scanId;

  /**
   * Indicates that was no attempt to scan a message or attachment because it was not applicable in
   * the given context (e.g. atomic mutuate). If this is true, scan_outcome should not be set. This
   * flag is used to identify messages that DLP did not attempt to scan for monitoring scan
   * coverage. Contents that DLP attempted to scan but skipped can be identified by
   * DlpScanOutcome.SCAN_SKIPPED_* reasons. DEPRECATED: The prober can determine this from the
   * context.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean scanNotApplicableForContext;

  /**
   * The outcome of a DLP Scan. If this is set, scan_not_applicable_for_context should not be true.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String scanOutcome;

  /**
   * The event that triggered the scan. This corresponds to the rule trigger configured in admin
   * console and maps to the different things that can be scanned.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String scanTrigger;

  /**
   * @return value or {@code null} for none
   */
  public DlpAction getDlpAction() {
    return dlpAction;
  }

  /**
   * @param dlpAction dlpAction or {@code null} for none
   */
  public DlpScanSummary setDlpAction(DlpAction dlpAction) {
    this.dlpAction = dlpAction;
    return this;
  }

  /**
   * The scan ID of the corresponding {@link DlpViolationScanRecord} in the {@link
   * EphemeralDlpScans} Spanner table. This can be used to fetch additional details about the scan,
   * e.g. for audit logging.
   * @return value or {@code null} for none
   */
  public java.lang.String getScanId() {
    return scanId;
  }

  /**
   * The scan ID of the corresponding {@link DlpViolationScanRecord} in the {@link
   * EphemeralDlpScans} Spanner table. This can be used to fetch additional details about the scan,
   * e.g. for audit logging.
   * @param scanId scanId or {@code null} for none
   */
  public DlpScanSummary setScanId(java.lang.String scanId) {
    this.scanId = scanId;
    return this;
  }

  /**
   * Indicates that was no attempt to scan a message or attachment because it was not applicable in
   * the given context (e.g. atomic mutuate). If this is true, scan_outcome should not be set. This
   * flag is used to identify messages that DLP did not attempt to scan for monitoring scan
   * coverage. Contents that DLP attempted to scan but skipped can be identified by
   * DlpScanOutcome.SCAN_SKIPPED_* reasons. DEPRECATED: The prober can determine this from the
   * context.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getScanNotApplicableForContext() {
    return scanNotApplicableForContext;
  }

  /**
   * Indicates that was no attempt to scan a message or attachment because it was not applicable in
   * the given context (e.g. atomic mutuate). If this is true, scan_outcome should not be set. This
   * flag is used to identify messages that DLP did not attempt to scan for monitoring scan
   * coverage. Contents that DLP attempted to scan but skipped can be identified by
   * DlpScanOutcome.SCAN_SKIPPED_* reasons. DEPRECATED: The prober can determine this from the
   * context.
   * @param scanNotApplicableForContext scanNotApplicableForContext or {@code null} for none
   */
  public DlpScanSummary setScanNotApplicableForContext(java.lang.Boolean scanNotApplicableForContext) {
    this.scanNotApplicableForContext = scanNotApplicableForContext;
    return this;
  }

  /**
   * The outcome of a DLP Scan. If this is set, scan_not_applicable_for_context should not be true.
   * @return value or {@code null} for none
   */
  public java.lang.String getScanOutcome() {
    return scanOutcome;
  }

  /**
   * The outcome of a DLP Scan. If this is set, scan_not_applicable_for_context should not be true.
   * @param scanOutcome scanOutcome or {@code null} for none
   */
  public DlpScanSummary setScanOutcome(java.lang.String scanOutcome) {
    this.scanOutcome = scanOutcome;
    return this;
  }

  /**
   * The event that triggered the scan. This corresponds to the rule trigger configured in admin
   * console and maps to the different things that can be scanned.
   * @return value or {@code null} for none
   */
  public java.lang.String getScanTrigger() {
    return scanTrigger;
  }

  /**
   * The event that triggered the scan. This corresponds to the rule trigger configured in admin
   * console and maps to the different things that can be scanned.
   * @param scanTrigger scanTrigger or {@code null} for none
   */
  public DlpScanSummary setScanTrigger(java.lang.String scanTrigger) {
    this.scanTrigger = scanTrigger;
    return this;
  }

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

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

}
