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

namespace Google\Cloud\ModelArmor\V1beta;

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

/**
 * CSAM (Child Safety Abuse Material) Filter Result
 *
 * Generated from protobuf message <code>google.cloud.modelarmor.v1beta.CsamFilterResult</code>
 */
class CsamFilterResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Reports whether the CSAM filter was successfully executed or
     * not.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.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.v1beta.MessageItem message_items = 2;</code>
     */
    private $message_items;
    /**
     * Output only. Match state for CSAM.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $match_state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $execution_state
     *           Output only. Reports whether the CSAM filter was successfully executed or
     *           not.
     *     @type array<\Google\Cloud\ModelArmor\V1beta\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 CSAM.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Modelarmor\V1Beta\Service::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Output only. Reports whether the CSAM filter was successfully executed or
     * not.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.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\V1beta\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.v1beta.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.v1beta.MessageItem message_items = 2;</code>
     * @param array<\Google\Cloud\ModelArmor\V1beta\MessageItem>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMessageItems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ModelArmor\V1beta\MessageItem::class);
        $this->message_items = $arr;

        return $this;
    }

    /**
     * Output only. Match state for CSAM.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.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 CSAM.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.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\V1beta\FilterMatchState::class);
        $this->match_state = $var;

        return $this;
    }

}

