<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: dy.proto

namespace Douyin;

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

/**
 * Generated from protobuf message <code>douyin.Response</code>
 */
class Response extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .douyin.Message messagesList = 1;</code>
     */
    private $messagesList;
    /**
     * Generated from protobuf field <code>string cursor = 2;</code>
     */
    protected $cursor = '';
    /**
     * Generated from protobuf field <code>uint64 fetchInterval = 3;</code>
     */
    protected $fetchInterval = 0;
    /**
     * Generated from protobuf field <code>uint64 now = 4;</code>
     */
    protected $now = 0;
    /**
     * Generated from protobuf field <code>string internalExt = 5;</code>
     */
    protected $internalExt = '';
    /**
     * Generated from protobuf field <code>uint32 fetchType = 6;</code>
     */
    protected $fetchType = 0;
    /**
     * Generated from protobuf field <code>map<string, string> routeParams = 7;</code>
     */
    private $routeParams;
    /**
     * Generated from protobuf field <code>uint64 heartbeatDuration = 8;</code>
     */
    protected $heartbeatDuration = 0;
    /**
     * Generated from protobuf field <code>bool needAck = 9;</code>
     */
    protected $needAck = false;
    /**
     * Generated from protobuf field <code>string pushServer = 10;</code>
     */
    protected $pushServer = '';
    /**
     * Generated from protobuf field <code>string liveCursor = 11;</code>
     */
    protected $liveCursor = '';
    /**
     * Generated from protobuf field <code>bool historyNoMore = 12;</code>
     */
    protected $historyNoMore = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Douyin\Message>|\Google\Protobuf\Internal\RepeatedField $messagesList
     *     @type string $cursor
     *     @type int|string $fetchInterval
     *     @type int|string $now
     *     @type string $internalExt
     *     @type int $fetchType
     *     @type array|\Google\Protobuf\Internal\MapField $routeParams
     *     @type int|string $heartbeatDuration
     *     @type bool $needAck
     *     @type string $pushServer
     *     @type string $liveCursor
     *     @type bool $historyNoMore
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Dy::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .douyin.Message messagesList = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMessagesList()
    {
        return $this->messagesList;
    }

    /**
     * Generated from protobuf field <code>repeated .douyin.Message messagesList = 1;</code>
     * @param array<\Douyin\Message>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMessagesList($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Douyin\Message::class);
        $this->messagesList = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string cursor = 2;</code>
     * @return string
     */
    public function getCursor()
    {
        return $this->cursor;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 fetchInterval = 3;</code>
     * @return int|string
     */
    public function getFetchInterval()
    {
        return $this->fetchInterval;
    }

    /**
     * Generated from protobuf field <code>uint64 fetchInterval = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setFetchInterval($var)
    {
        GPBUtil::checkUint64($var);
        $this->fetchInterval = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 now = 4;</code>
     * @return int|string
     */
    public function getNow()
    {
        return $this->now;
    }

    /**
     * Generated from protobuf field <code>uint64 now = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setNow($var)
    {
        GPBUtil::checkUint64($var);
        $this->now = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string internalExt = 5;</code>
     * @return string
     */
    public function getInternalExt()
    {
        return $this->internalExt;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 fetchType = 6;</code>
     * @return int
     */
    public function getFetchType()
    {
        return $this->fetchType;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, string> routeParams = 7;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getRouteParams()
    {
        return $this->routeParams;
    }

    /**
     * Generated from protobuf field <code>map<string, string> routeParams = 7;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setRouteParams($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->routeParams = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 heartbeatDuration = 8;</code>
     * @return int|string
     */
    public function getHeartbeatDuration()
    {
        return $this->heartbeatDuration;
    }

    /**
     * Generated from protobuf field <code>uint64 heartbeatDuration = 8;</code>
     * @param int|string $var
     * @return $this
     */
    public function setHeartbeatDuration($var)
    {
        GPBUtil::checkUint64($var);
        $this->heartbeatDuration = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool needAck = 9;</code>
     * @return bool
     */
    public function getNeedAck()
    {
        return $this->needAck;
    }

    /**
     * Generated from protobuf field <code>bool needAck = 9;</code>
     * @param bool $var
     * @return $this
     */
    public function setNeedAck($var)
    {
        GPBUtil::checkBool($var);
        $this->needAck = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string pushServer = 10;</code>
     * @return string
     */
    public function getPushServer()
    {
        return $this->pushServer;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string liveCursor = 11;</code>
     * @return string
     */
    public function getLiveCursor()
    {
        return $this->liveCursor;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool historyNoMore = 12;</code>
     * @return bool
     */
    public function getHistoryNoMore()
    {
        return $this->historyNoMore;
    }

    /**
     * Generated from protobuf field <code>bool historyNoMore = 12;</code>
     * @param bool $var
     * @return $this
     */
    public function setHistoryNoMore($var)
    {
        GPBUtil::checkBool($var);
        $this->historyNoMore = $var;

        return $this;
    }

}

