<?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.HydratedTemplateButton</code>
 */
class HydratedTemplateButton extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint32 index = 4;</code>
     */
    protected $index = null;
    protected $hydratedButton;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $index
     *     @type \PhpWA\Protocol\Proto\HydratedTemplateButton\HydratedQuickReplyButton $quickReplyButton
     *     @type \PhpWA\Protocol\Proto\HydratedTemplateButton\HydratedURLButton $urlButton
     *     @type \PhpWA\Protocol\Proto\HydratedTemplateButton\HydratedCallButton $callButton
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional uint32 index = 4;</code>
     * @return int
     */
    public function getIndex()
    {
        return isset($this->index) ? $this->index : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional uint32 index = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->index = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.HydratedTemplateButton.HydratedQuickReplyButton quickReplyButton = 1;</code>
     * @return \PhpWA\Protocol\Proto\HydratedTemplateButton\HydratedQuickReplyButton|null
     */
    public function getQuickReplyButton()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Generated from protobuf field <code>.proto.HydratedTemplateButton.HydratedQuickReplyButton quickReplyButton = 1;</code>
     * @param \PhpWA\Protocol\Proto\HydratedTemplateButton\HydratedQuickReplyButton $var
     * @return $this
     */
    public function setQuickReplyButton($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\HydratedTemplateButton\HydratedQuickReplyButton::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

}

