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

namespace PhpWA\Protocol\Proto\Message\InteractiveMessage;

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

/**
 * Generated from protobuf message <code>proto.Message.InteractiveMessage.NativeFlowMessage</code>
 */
class NativeFlowMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton buttons = 1;</code>
     */
    private $buttons;
    /**
     * Generated from protobuf field <code>optional string messageParamsJson = 2;</code>
     */
    protected $messageParamsJson = null;
    /**
     * Generated from protobuf field <code>optional int32 messageVersion = 3;</code>
     */
    protected $messageVersion = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \PhpWA\Protocol\Proto\Message\InteractiveMessage\NativeFlowMessage\NativeFlowButton[] $buttons
     *     @type string $messageParamsJson
     *     @type int $messageVersion
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton buttons = 1;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Message\InteractiveMessage\NativeFlowMessage\NativeFlowButton>
     */
    public function getButtons()
    {
        return $this->buttons;
    }

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

        return $this;
    }

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

    public function hasMessageParamsJson()
    {
        return isset($this->messageParamsJson);
    }

    public function clearMessageParamsJson()
    {
        unset($this->messageParamsJson);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int32 messageVersion = 3;</code>
     * @return int
     */
    public function getMessageVersion()
    {
        return isset($this->messageVersion) ? $this->messageVersion : 0;
    }

    public function hasMessageVersion()
    {
        return isset($this->messageVersion);
    }

    public function clearMessageVersion()
    {
        unset($this->messageVersion);
    }

    /**
     * Generated from protobuf field <code>optional int32 messageVersion = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setMessageVersion($var)
    {
        GPBUtil::checkInt32($var);
        $this->messageVersion = $var;

        return $this;
    }

}

