<?php
 
 
 

namespace PhpWA\Protocol\Proto\Message;

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




class ButtonsMessage extends \Google\Protobuf\Internal\Message
{
    


    protected $contentText = null;
    


    protected $footerText = null;
    


    protected $contextInfo = null;
    


    private $buttons;
    


    protected $headerType = null;
    protected $header;

    

















    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    



    public function getContentText()
    {
        return isset($this->contentText) ? $this->contentText : '';
    }

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

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

    




    public function setContentText($var)
    {
        GPBUtil::checkString($var, True);
        $this->contentText = $var;

        return $this;
    }

    



    public function getFooterText()
    {
        return isset($this->footerText) ? $this->footerText : '';
    }

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

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

    




    public function setFooterText($var)
    {
        GPBUtil::checkString($var, True);
        $this->footerText = $var;

        return $this;
    }

    



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

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

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

    




    public function setContextInfo($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ContextInfo::class);
        $this->contextInfo = $var;

        return $this;
    }

    



    public function getButtons()
    {
        return $this->buttons;
    }

    




    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;
    }

    



    public function getHeaderType()
    {
        return isset($this->headerType) ? $this->headerType : 0;
    }

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

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

    




    public function setHeaderType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\ButtonsMessage\HeaderType::class);
        $this->headerType = $var;

        return $this;
    }

    



    public function getText()
    {
        return $this->readOneof(1);
    }

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

    




    public function setText($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    



    public function getDocumentMessage()
    {
        return $this->readOneof(2);
    }

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

    




    public function setDocumentMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\DocumentMessage::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    



    public function getImageMessage()
    {
        return $this->readOneof(3);
    }

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

    




    public function setImageMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\ImageMessage::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    



    public function getVideoMessage()
    {
        return $this->readOneof(4);
    }

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

    




    public function setVideoMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\VideoMessage::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    



    public function getLocationMessage()
    {
        return $this->readOneof(5);
    }

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

    




    public function setLocationMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\LocationMessage::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    


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

}

