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

namespace PhpWA\Protocol\Proto\Message\ButtonsMessage;

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

/**
 * Generated from protobuf message <code>proto.Message.ButtonsMessage.Button</code>
 */
class Button extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string buttonId = 1;</code>
     */
    protected $buttonId = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.Button.ButtonText buttonText = 2;</code>
     */
    protected $buttonText = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.Button.Type type = 3;</code>
     */
    protected $type = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.Button.NativeFlowInfo nativeFlowInfo = 4;</code>
     */
    protected $nativeFlowInfo = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $buttonId
     *     @type \PhpWA\Protocol\Proto\Message\ButtonsMessage\Button\ButtonText $buttonText
     *     @type int $type
     *     @type \PhpWA\Protocol\Proto\Message\ButtonsMessage\Button\NativeFlowInfo $nativeFlowInfo
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasButtonId()
    {
        return isset($this->buttonId);
    }

    public function clearButtonId()
    {
        unset($this->buttonId);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.Button.ButtonText buttonText = 2;</code>
     * @return \PhpWA\Protocol\Proto\Message\ButtonsMessage\Button\ButtonText|null
     */
    public function getButtonText()
    {
        return $this->buttonText;
    }

    public function hasButtonText()
    {
        return isset($this->buttonText);
    }

    public function clearButtonText()
    {
        unset($this->buttonText);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.Button.ButtonText buttonText = 2;</code>
     * @param \PhpWA\Protocol\Proto\Message\ButtonsMessage\Button\ButtonText $var
     * @return $this
     */
    public function setButtonText($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\ButtonsMessage\Button\ButtonText::class);
        $this->buttonText = $var;

        return $this;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.Button.NativeFlowInfo nativeFlowInfo = 4;</code>
     * @return \PhpWA\Protocol\Proto\Message\ButtonsMessage\Button\NativeFlowInfo|null
     */
    public function getNativeFlowInfo()
    {
        return $this->nativeFlowInfo;
    }

    public function hasNativeFlowInfo()
    {
        return isset($this->nativeFlowInfo);
    }

    public function clearNativeFlowInfo()
    {
        unset($this->nativeFlowInfo);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ButtonsMessage.Button.NativeFlowInfo nativeFlowInfo = 4;</code>
     * @param \PhpWA\Protocol\Proto\Message\ButtonsMessage\Button\NativeFlowInfo $var
     * @return $this
     */
    public function setNativeFlowInfo($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\ButtonsMessage\Button\NativeFlowInfo::class);
        $this->nativeFlowInfo = $var;

        return $this;
    }

}

