<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/modelarmor/v1/service.proto

namespace Google\Cloud\ModelArmor\V1;

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

/**
 * Sensitive Data Protection Inspection Result.
 *
 * Generated from protobuf message <code>google.cloud.modelarmor.v1.SdpInspectResult</code>
 */
class SdpInspectResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Reports whether Sensitive Data Protection inspection was
     * successfully executed or not.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.FilterExecutionState execution_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $execution_state = 0;
    /**
     * Optional messages corresponding to the result.
     * A message can provide warnings or error details.
     * For example, if execution state is skipped then this field provides
     * related reason/explanation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2;</code>
     */
    private $message_items;
    /**
     * Output only. Match state for SDP Inspection.
     * Value is MATCH_FOUND if at least one Sensitive Data Protection finding is
     * identified.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $match_state = 0;
    /**
     * List of Sensitive Data Protection findings.
     *
     * Generated from protobuf field <code>repeated .google.cloud.modelarmor.v1.SdpFinding findings = 4;</code>
     */
    private $findings;
    /**
     * If true, then there is possibility that more findings were identified and
     * the findings returned are a 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.
     *
     * Generated from protobuf field <code>bool findings_truncated = 5;</code>
     */
    protected $findings_truncated = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $execution_state
     *           Output only. Reports whether Sensitive Data Protection inspection was
     *           successfully executed or not.
     *     @type array<\Google\Cloud\ModelArmor\V1\MessageItem>|\Google\Protobuf\Internal\RepeatedField $message_items
     *           Optional messages corresponding to the result.
     *           A message can provide warnings or error details.
     *           For example, if execution state is skipped then this field provides
     *           related reason/explanation.
     *     @type int $match_state
     *           Output only. Match state for SDP Inspection.
     *           Value is MATCH_FOUND if at least one Sensitive Data Protection finding is
     *           identified.
     *     @type array<\Google\Cloud\ModelArmor\V1\SdpFinding>|\Google\Protobuf\Internal\RepeatedField $findings
     *           List of Sensitive Data Protection findings.
     *     @type bool $findings_truncated
     *           If true, then there is possibility that more findings were identified and
     *           the findings returned are a 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.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Modelarmor\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Reports whether Sensitive Data Protection inspection was
     * successfully executed or not.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.FilterExecutionState execution_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getExecutionState()
    {
        return $this->execution_state;
    }

    /**
     * Output only. Reports whether Sensitive Data Protection inspection was
     * successfully executed or not.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.FilterExecutionState execution_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setExecutionState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ModelArmor\V1\FilterExecutionState::class);
        $this->execution_state = $var;

        return $this;
    }

    /**
     * Optional messages corresponding to the result.
     * A message can provide warnings or error details.
     * For example, if execution state is skipped then this field provides
     * related reason/explanation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMessageItems()
    {
        return $this->message_items;
    }

    /**
     * Optional messages corresponding to the result.
     * A message can provide warnings or error details.
     * For example, if execution state is skipped then this field provides
     * related reason/explanation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2;</code>
     * @param array<\Google\Cloud\ModelArmor\V1\MessageItem>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMessageItems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ModelArmor\V1\MessageItem::class);
        $this->message_items = $arr;

        return $this;
    }

    /**
     * Output only. Match state for SDP Inspection.
     * Value is MATCH_FOUND if at least one Sensitive Data Protection finding is
     * identified.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getMatchState()
    {
        return $this->match_state;
    }

    /**
     * Output only. Match state for SDP Inspection.
     * Value is MATCH_FOUND if at least one Sensitive Data Protection finding is
     * identified.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setMatchState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ModelArmor\V1\FilterMatchState::class);
        $this->match_state = $var;

        return $this;
    }

    /**
     * List of Sensitive Data Protection findings.
     *
     * Generated from protobuf field <code>repeated .google.cloud.modelarmor.v1.SdpFinding findings = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFindings()
    {
        return $this->findings;
    }

    /**
     * List of Sensitive Data Protection findings.
     *
     * Generated from protobuf field <code>repeated .google.cloud.modelarmor.v1.SdpFinding findings = 4;</code>
     * @param array<\Google\Cloud\ModelArmor\V1\SdpFinding>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFindings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ModelArmor\V1\SdpFinding::class);
        $this->findings = $arr;

        return $this;
    }

    /**
     * If true, then there is possibility that more findings were identified and
     * the findings returned are a 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.
     *
     * Generated from protobuf field <code>bool findings_truncated = 5;</code>
     * @return bool
     */
    public function getFindingsTruncated()
    {
        return $this->findings_truncated;
    }

    /**
     * If true, then there is possibility that more findings were identified and
     * the findings returned are a 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.
     *
     * Generated from protobuf field <code>bool findings_truncated = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setFindingsTruncated($var)
    {
        GPBUtil::checkBool($var);
        $this->findings_truncated = $var;

        return $this;
    }

}

