<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.AIRichResponseMessage</code>
 */
class AIRichResponseMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.AIRichResponseMessageType messageType = 1;</code>
     */
    protected $messageType = null;
    /**
     * Generated from protobuf field <code>repeated .proto.AIRichResponseSubMessage submessages = 2;</code>
     */
    private $submessages;
    /**
     * Generated from protobuf field <code>optional .proto.AIRichResponseUnifiedResponse unifiedResponse = 3;</code>
     */
    protected $unifiedResponse = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 4;</code>
     */
    protected $contextInfo = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $messageType
     *     @type \PhpWA\Protocol\Proto\AIRichResponseSubMessage[] $submessages
     *     @type \PhpWA\Protocol\Proto\AIRichResponseUnifiedResponse $unifiedResponse
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.AIRichResponseMessageType messageType = 1;</code>
     * @return int
     */
    public function getMessageType()
    {
        return isset($this->messageType) ? $this->messageType : 0;
    }

    public function hasMessageType()
    {
        return isset($this->messageType);
    }

    public function clearMessageType()
    {
        unset($this->messageType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.AIRichResponseMessageType messageType = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setMessageType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\AIRichResponseMessageType::class);
        $this->messageType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.AIRichResponseSubMessage submessages = 2;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\AIRichResponseSubMessage>
     */
    public function getSubmessages()
    {
        return $this->submessages;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.AIRichResponseSubMessage submessages = 2;</code>
     * @param \PhpWA\Protocol\Proto\AIRichResponseSubMessage[] $var
     * @return $this
     */
    public function setSubmessages($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\AIRichResponseSubMessage::class);
        $this->submessages = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.AIRichResponseUnifiedResponse unifiedResponse = 3;</code>
     * @return \PhpWA\Protocol\Proto\AIRichResponseUnifiedResponse|null
     */
    public function getUnifiedResponse()
    {
        return $this->unifiedResponse;
    }

    public function hasUnifiedResponse()
    {
        return isset($this->unifiedResponse);
    }

    public function clearUnifiedResponse()
    {
        unset($this->unifiedResponse);
    }

    /**
     * Generated from protobuf field <code>optional .proto.AIRichResponseUnifiedResponse unifiedResponse = 3;</code>
     * @param \PhpWA\Protocol\Proto\AIRichResponseUnifiedResponse $var
     * @return $this
     */
    public function setUnifiedResponse($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\AIRichResponseUnifiedResponse::class);
        $this->unifiedResponse = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 4;</code>
     * @return \PhpWA\Protocol\Proto\ContextInfo|null
     */
    public function getContextInfo()
    {
        return $this->contextInfo;
    }

    public function hasContextInfo()
    {
        return isset($this->contextInfo);
    }

    public function clearContextInfo()
    {
        unset($this->contextInfo);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 4;</code>
     * @param \PhpWA\Protocol\Proto\ContextInfo $var
     * @return $this
     */
    public function setContextInfo($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ContextInfo::class);
        $this->contextInfo = $var;

        return $this;
    }

}

