<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




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


    protected $index = null;
    protected $button;

    











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

    



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

    public function hasIndex()
    {
        return isset($this->index);
    }

    public function clearIndex()
    {
        unset($this->index);
    }

    




    public function setIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->index = $var;

        return $this;
    }

    



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

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

    




    public function setQuickReplyButton($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\TemplateButton\QuickReplyButton::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    



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

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

    




    public function setUrlButton($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\TemplateButton\URLButton::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    



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

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

    




    public function setCallButton($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\TemplateButton\CallButton::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    


    public function getButton()
    {
        return $this->whichOneof("button");
    }

}

