<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * All the findings for a single scanned item.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.InspectResult</code>
 */
class InspectResult extends \Google\Protobuf\Internal\Message
{
    /**
     * List of findings for an item.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.Finding findings = 1;</code>
     */
    private $findings;
    /**
     * If true, then this item might have more findings than were returned,
     * and the findings returned are an arbitrary subset of all findings.
     * The findings list might be truncated because the input items were too
     * large, or because the server reached the maximum amount of resources
     * allowed for a single API call. For best results, divide the input into
     * smaller batches.
     *
     * Generated from protobuf field <code>bool findings_truncated = 2;</code>
     */
    private $findings_truncated = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Dlp\V2\Finding>|\Google\Protobuf\Internal\RepeatedField $findings
     *           List of findings for an item.
     *     @type bool $findings_truncated
     *           If true, then this item might have more findings than were returned,
     *           and the findings returned are an arbitrary subset of all findings.
     *           The findings list might be truncated because the input items were too
     *           large, or because the server reached the maximum amount of resources
     *           allowed for a single API call. For best results, divide the input into
     *           smaller batches.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * List of findings for an item.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.Finding findings = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFindings()
    {
        return $this->findings;
    }

    /**
     * List of findings for an item.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.Finding findings = 1;</code>
     * @param array<\Google\Cloud\Dlp\V2\Finding>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFindings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\Finding::class);
        $this->findings = $arr;

        return $this;
    }

    /**
     * If true, then this item might have more findings than were returned,
     * and the findings returned are an arbitrary subset of all findings.
     * The findings list might be truncated because the input items were too
     * large, or because the server reached the maximum amount of resources
     * allowed for a single API call. For best results, divide the input into
     * smaller batches.
     *
     * Generated from protobuf field <code>bool findings_truncated = 2;</code>
     * @return bool
     */
    public function getFindingsTruncated()
    {
        return $this->findings_truncated;
    }

    /**
     * If true, then this item might have more findings than were returned,
     * and the findings returned are an arbitrary subset of all findings.
     * The findings list might be truncated because the input items were too
     * large, or because the server reached the maximum amount of resources
     * allowed for a single API call. For best results, divide the input into
     * smaller batches.
     *
     * Generated from protobuf field <code>bool findings_truncated = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setFindingsTruncated($var)
    {
        GPBUtil::checkBool($var);
        $this->findings_truncated = $var;

        return $this;
    }

}

