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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Represents a record of a human agent assist answer.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.AgentAssistantRecord</code>
 */
class AgentAssistantRecord extends \Google\Protobuf\Internal\Message
{
    protected $answer;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\ArticleAnswer $article_suggestion_answer
     *           Output only. The article suggestion answer.
     *     @type \Google\Cloud\Dialogflow\V2\FaqAnswer $faq_answer
     *           Output only. The FAQ answer.
     *     @type \Google\Cloud\Dialogflow\V2\DialogflowAssistAnswer $dialogflow_assist_answer
     *           Output only. Dialogflow assist answer.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\AnswerRecord::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The article suggestion answer.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ArticleAnswer article_suggestion_answer = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Dialogflow\V2\ArticleAnswer|null
     */
    public function getArticleSuggestionAnswer()
    {
        return $this->readOneof(5);
    }

    public function hasArticleSuggestionAnswer()
    {
        return $this->hasOneof(5);
    }

    /**
     * Output only. The article suggestion answer.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ArticleAnswer article_suggestion_answer = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dialogflow\V2\ArticleAnswer $var
     * @return $this
     */
    public function setArticleSuggestionAnswer($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ArticleAnswer::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Output only. The FAQ answer.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.FaqAnswer faq_answer = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Dialogflow\V2\FaqAnswer|null
     */
    public function getFaqAnswer()
    {
        return $this->readOneof(6);
    }

    public function hasFaqAnswer()
    {
        return $this->hasOneof(6);
    }

    /**
     * Output only. The FAQ answer.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.FaqAnswer faq_answer = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dialogflow\V2\FaqAnswer $var
     * @return $this
     */
    public function setFaqAnswer($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\FaqAnswer::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Output only. Dialogflow assist answer.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Dialogflow\V2\DialogflowAssistAnswer|null
     */
    public function getDialogflowAssistAnswer()
    {
        return $this->readOneof(7);
    }

    public function hasDialogflowAssistAnswer()
    {
        return $this->hasOneof(7);
    }

    /**
     * Output only. Dialogflow assist answer.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.DialogflowAssistAnswer dialogflow_assist_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dialogflow\V2\DialogflowAssistAnswer $var
     * @return $this
     */
    public function setDialogflowAssistAnswer($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\DialogflowAssistAnswer::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getAnswer()
    {
        return $this->whichOneof("answer");
    }

}

