<?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;

/**
 * Prompt injection and Jailbreak Filter Result.
 *
 * Generated from protobuf message <code>google.cloud.modelarmor.v1.PiAndJailbreakFilterResult</code>
 */
class PiAndJailbreakFilterResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Reports whether Prompt injection and Jailbreak filter 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 Prompt injection and Jailbreak.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $match_state = 0;
    /**
     * Confidence level identified for Prompt injection and Jailbreak.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.DetectionConfidenceLevel confidence_level = 5;</code>
     */
    protected $confidence_level = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $execution_state
     *           Output only. Reports whether Prompt injection and Jailbreak filter 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 Prompt injection and Jailbreak.
     *     @type int $confidence_level
     *           Confidence level identified for Prompt injection and Jailbreak.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Modelarmor\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Reports whether Prompt injection and Jailbreak filter 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 Prompt injection and Jailbreak filter 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 Prompt injection and Jailbreak.
     *
     * 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 Prompt injection and Jailbreak.
     *
     * 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;
    }

    /**
     * Confidence level identified for Prompt injection and Jailbreak.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.DetectionConfidenceLevel confidence_level = 5;</code>
     * @return int
     */
    public function getConfidenceLevel()
    {
        return $this->confidence_level;
    }

    /**
     * Confidence level identified for Prompt injection and Jailbreak.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1.DetectionConfidenceLevel confidence_level = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setConfidenceLevel($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ModelArmor\V1\DetectionConfidenceLevel::class);
        $this->confidence_level = $var;

        return $this;
    }

}

