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

namespace PhpWA\Protocol\Proto\Message;

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

/**
 * Generated from protobuf message <code>proto.Message.ButtonsResponseMessage</code>
 */
class ButtonsResponseMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string selectedButtonId = 1;</code>
     */
    protected $selectedButtonId = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 3;</code>
     */
    protected $contextInfo = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsResponseMessage.Type type = 4;</code>
     */
    protected $type = null;
    protected $response;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $selectedButtonId
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     *     @type int $type
     *     @type string $selectedDisplayText
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string selectedButtonId = 1;</code>
     * @return string
     */
    public function getSelectedButtonId()
    {
        return isset($this->selectedButtonId) ? $this->selectedButtonId : '';
    }

    public function hasSelectedButtonId()
    {
        return isset($this->selectedButtonId);
    }

    public function clearSelectedButtonId()
    {
        unset($this->selectedButtonId);
    }

    /**
     * Generated from protobuf field <code>optional string selectedButtonId = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSelectedButtonId($var)
    {
        GPBUtil::checkString($var, True);
        $this->selectedButtonId = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 3;</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 = 3;</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;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsResponseMessage.Type type = 4;</code>
     * @return int
     */
    public function getType()
    {
        return isset($this->type) ? $this->type : 0;
    }

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsResponseMessage.Type type = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\ButtonsResponseMessage\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string selectedDisplayText = 2;</code>
     * @return string
     */
    public function getSelectedDisplayText()
    {
        return $this->readOneof(2);
    }

    public function hasSelectedDisplayText()
    {
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>string selectedDisplayText = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSelectedDisplayText($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

