<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/cx/v3/data_store_connection.proto

namespace Google\Cloud\Dialogflow\Cx\V3;

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

/**
 * Data store connection feature output signals.
 * Might be only partially field if processing stop before the final answer.
 * Reasons for this can be, but are not limited to: empty UCS search results,
 * positive RAI check outcome, grounding failure, ...
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals</code>
 */
class DataStoreConnectionSignals extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Diagnostic info related to the rewriter model call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals rewriter_model_call_signals = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $rewriter_model_call_signals = null;
    /**
     * Optional. Rewritten string query used for search.
     *
     * Generated from protobuf field <code>string rewritten_query = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $rewritten_query = '';
    /**
     * Optional. Search snippets included in the answer generation prompt.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippets = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $search_snippets;
    /**
     * Optional. Diagnostic info related to the answer generation model call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $answer_generation_model_call_signals = null;
    /**
     * Optional. The final compiled answer.
     *
     * Generated from protobuf field <code>string answer = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $answer = '';
    /**
     * Optional. Answer parts with relevant citations.
     * Concatenation of texts should add up the `answer` (not counting
     * whitespaces).
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart answer_parts = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $answer_parts;
    /**
     * Optional. Snippets cited by the answer generation model from the most to
     * least relevant.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet cited_snippets = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $cited_snippets;
    /**
     * Optional. Grounding signals.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals grounding_signals = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $grounding_signals = null;
    /**
     * Optional. Safety check result.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals safety_signals = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $safety_signals = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals $rewriter_model_call_signals
     *           Optional. Diagnostic info related to the rewriter model call.
     *     @type string $rewritten_query
     *           Optional. Rewritten string query used for search.
     *     @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet>|\Google\Protobuf\Internal\RepeatedField $search_snippets
     *           Optional. Search snippets included in the answer generation prompt.
     *     @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals $answer_generation_model_call_signals
     *           Optional. Diagnostic info related to the answer generation model call.
     *     @type string $answer
     *           Optional. The final compiled answer.
     *     @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerPart>|\Google\Protobuf\Internal\RepeatedField $answer_parts
     *           Optional. Answer parts with relevant citations.
     *           Concatenation of texts should add up the `answer` (not counting
     *           whitespaces).
     *     @type array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\CitedSnippet>|\Google\Protobuf\Internal\RepeatedField $cited_snippets
     *           Optional. Snippets cited by the answer generation model from the most to
     *           least relevant.
     *     @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals $grounding_signals
     *           Optional. Grounding signals.
     *     @type \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals $safety_signals
     *           Optional. Safety check result.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnection::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Diagnostic info related to the rewriter model call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals rewriter_model_call_signals = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals|null
     */
    public function getRewriterModelCallSignals()
    {
        return $this->rewriter_model_call_signals;
    }

    public function hasRewriterModelCallSignals()
    {
        return isset($this->rewriter_model_call_signals);
    }

    public function clearRewriterModelCallSignals()
    {
        unset($this->rewriter_model_call_signals);
    }

    /**
     * Optional. Diagnostic info related to the rewriter model call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.RewriterModelCallSignals rewriter_model_call_signals = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals $var
     * @return $this
     */
    public function setRewriterModelCallSignals($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\RewriterModelCallSignals::class);
        $this->rewriter_model_call_signals = $var;

        return $this;
    }

    /**
     * Optional. Rewritten string query used for search.
     *
     * Generated from protobuf field <code>string rewritten_query = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getRewrittenQuery()
    {
        return $this->rewritten_query;
    }

    /**
     * Optional. Rewritten string query used for search.
     *
     * Generated from protobuf field <code>string rewritten_query = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setRewrittenQuery($var)
    {
        GPBUtil::checkString($var, True);
        $this->rewritten_query = $var;

        return $this;
    }

    /**
     * Optional. Search snippets included in the answer generation prompt.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippets = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSearchSnippets()
    {
        return $this->search_snippets;
    }

    /**
     * Optional. Search snippets included in the answer generation prompt.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet search_snippets = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSearchSnippets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SearchSnippet::class);
        $this->search_snippets = $arr;

        return $this;
    }

    /**
     * Optional. Diagnostic info related to the answer generation model call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals|null
     */
    public function getAnswerGenerationModelCallSignals()
    {
        return $this->answer_generation_model_call_signals;
    }

    public function hasAnswerGenerationModelCallSignals()
    {
        return isset($this->answer_generation_model_call_signals);
    }

    public function clearAnswerGenerationModelCallSignals()
    {
        unset($this->answer_generation_model_call_signals);
    }

    /**
     * Optional. Diagnostic info related to the answer generation model call.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals $var
     * @return $this
     */
    public function setAnswerGenerationModelCallSignals($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerGenerationModelCallSignals::class);
        $this->answer_generation_model_call_signals = $var;

        return $this;
    }

    /**
     * Optional. The final compiled answer.
     *
     * Generated from protobuf field <code>string answer = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getAnswer()
    {
        return $this->answer;
    }

    /**
     * Optional. The final compiled answer.
     *
     * Generated from protobuf field <code>string answer = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setAnswer($var)
    {
        GPBUtil::checkString($var, True);
        $this->answer = $var;

        return $this;
    }

    /**
     * Optional. Answer parts with relevant citations.
     * Concatenation of texts should add up the `answer` (not counting
     * whitespaces).
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart answer_parts = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAnswerParts()
    {
        return $this->answer_parts;
    }

    /**
     * Optional. Answer parts with relevant citations.
     * Concatenation of texts should add up the `answer` (not counting
     * whitespaces).
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.AnswerPart answer_parts = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerPart>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAnswerParts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\AnswerPart::class);
        $this->answer_parts = $arr;

        return $this;
    }

    /**
     * Optional. Snippets cited by the answer generation model from the most to
     * least relevant.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet cited_snippets = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCitedSnippets()
    {
        return $this->cited_snippets;
    }

    /**
     * Optional. Snippets cited by the answer generation model from the most to
     * least relevant.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.CitedSnippet cited_snippets = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\CitedSnippet>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCitedSnippets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\CitedSnippet::class);
        $this->cited_snippets = $arr;

        return $this;
    }

    /**
     * Optional. Grounding signals.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals grounding_signals = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals|null
     */
    public function getGroundingSignals()
    {
        return $this->grounding_signals;
    }

    public function hasGroundingSignals()
    {
        return isset($this->grounding_signals);
    }

    public function clearGroundingSignals()
    {
        unset($this->grounding_signals);
    }

    /**
     * Optional. Grounding signals.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals grounding_signals = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals $var
     * @return $this
     */
    public function setGroundingSignals($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals::class);
        $this->grounding_signals = $var;

        return $this;
    }

    /**
     * Optional. Safety check result.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals safety_signals = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals|null
     */
    public function getSafetySignals()
    {
        return $this->safety_signals;
    }

    public function hasSafetySignals()
    {
        return isset($this->safety_signals);
    }

    public function clearSafetySignals()
    {
        unset($this->safety_signals);
    }

    /**
     * Optional. Safety check result.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SafetySignals safety_signals = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals $var
     * @return $this
     */
    public function setSafetySignals($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\SafetySignals::class);
        $this->safety_signals = $var;

        return $this;
    }

}

