<?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.ButtonsMessage</code>
 */
class ButtonsMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string contentText = 6;</code>
     */
    protected $contentText = null;
    /**
     * Generated from protobuf field <code>optional string footerText = 7;</code>
     */
    protected $footerText = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 8;</code>
     */
    protected $contextInfo = null;
    /**
     * Generated from protobuf field <code>repeated .proto.Message.ButtonsMessage.Button buttons = 9;</code>
     */
    private $buttons;
    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.HeaderType headerType = 10;</code>
     */
    protected $headerType = null;
    protected $header;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $contentText
     *     @type string $footerText
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     *     @type \PhpWA\Protocol\Proto\Message\ButtonsMessage\Button[] $buttons
     *     @type int $headerType
     *     @type string $text
     *     @type \PhpWA\Protocol\Proto\Message\DocumentMessage $documentMessage
     *     @type \PhpWA\Protocol\Proto\Message\ImageMessage $imageMessage
     *     @type \PhpWA\Protocol\Proto\Message\VideoMessage $videoMessage
     *     @type \PhpWA\Protocol\Proto\Message\LocationMessage $locationMessage
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasContentText()
    {
        return isset($this->contentText);
    }

    public function clearContentText()
    {
        unset($this->contentText);
    }

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

        return $this;
    }

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

    public function hasFooterText()
    {
        return isset($this->footerText);
    }

    public function clearFooterText()
    {
        unset($this->footerText);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 8;</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 = 8;</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>repeated .proto.Message.ButtonsMessage.Button buttons = 9;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Message\ButtonsMessage\Button>
     */
    public function getButtons()
    {
        return $this->buttons;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.HeaderType headerType = 10;</code>
     * @return int
     */
    public function getHeaderType()
    {
        return isset($this->headerType) ? $this->headerType : 0;
    }

    public function hasHeaderType()
    {
        return isset($this->headerType);
    }

    public function clearHeaderType()
    {
        unset($this->headerType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.HeaderType headerType = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setHeaderType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\ButtonsMessage\HeaderType::class);
        $this->headerType = $var;

        return $this;
    }

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

    public function hasText()
    {
        return $this->hasOneof(1);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.DocumentMessage documentMessage = 2;</code>
     * @return \PhpWA\Protocol\Proto\Message\DocumentMessage|null
     */
    public function getDocumentMessage()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Generated from protobuf field <code>.proto.Message.DocumentMessage documentMessage = 2;</code>
     * @param \PhpWA\Protocol\Proto\Message\DocumentMessage $var
     * @return $this
     */
    public function setDocumentMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\DocumentMessage::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.ImageMessage imageMessage = 3;</code>
     * @return \PhpWA\Protocol\Proto\Message\ImageMessage|null
     */
    public function getImageMessage()
    {
        return $this->readOneof(3);
    }

    public function hasImageMessage()
    {
        return $this->hasOneof(3);
    }

    /**
     * Generated from protobuf field <code>.proto.Message.ImageMessage imageMessage = 3;</code>
     * @param \PhpWA\Protocol\Proto\Message\ImageMessage $var
     * @return $this
     */
    public function setImageMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\ImageMessage::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.VideoMessage videoMessage = 4;</code>
     * @return \PhpWA\Protocol\Proto\Message\VideoMessage|null
     */
    public function getVideoMessage()
    {
        return $this->readOneof(4);
    }

    public function hasVideoMessage()
    {
        return $this->hasOneof(4);
    }

    /**
     * Generated from protobuf field <code>.proto.Message.VideoMessage videoMessage = 4;</code>
     * @param \PhpWA\Protocol\Proto\Message\VideoMessage $var
     * @return $this
     */
    public function setVideoMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\VideoMessage::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.LocationMessage locationMessage = 5;</code>
     * @return \PhpWA\Protocol\Proto\Message\LocationMessage|null
     */
    public function getLocationMessage()
    {
        return $this->readOneof(5);
    }

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

    /**
     * Generated from protobuf field <code>.proto.Message.LocationMessage locationMessage = 5;</code>
     * @param \PhpWA\Protocol\Proto\Message\LocationMessage $var
     * @return $this
     */
    public function setLocationMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\LocationMessage::class);
        $this->writeOneof(5, $var);

        return $this;
    }

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

}

