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

namespace RoadRunner\Centrifugal\API\DTO\V1;

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

/**
 * Generated from protobuf message <code>centrifugal.centrifugo.api.HistoryRequest</code>
 */
class HistoryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string channel = 1;</code>
     */
    protected $channel = '';
    /**
     * Generated from protobuf field <code>int32 limit = 2;</code>
     */
    protected $limit = 0;
    /**
     * Generated from protobuf field <code>.centrifugal.centrifugo.api.StreamPosition since = 3;</code>
     */
    protected $since = null;
    /**
     * Generated from protobuf field <code>bool reverse = 4;</code>
     */
    protected $reverse = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $channel
     *     @type int $limit
     *     @type \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition $since
     *     @type bool $reverse
     * }
     */
    public function __construct($data = NULL) {
        \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string channel = 1;</code>
     * @return string
     */
    public function getChannel()
    {
        return $this->channel;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int32 limit = 2;</code>
     * @return int
     */
    public function getLimit()
    {
        return $this->limit;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.centrifugal.centrifugo.api.StreamPosition since = 3;</code>
     * @return \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition|null
     */
    public function getSince()
    {
        return $this->since;
    }

    public function hasSince()
    {
        return isset($this->since);
    }

    public function clearSince()
    {
        unset($this->since);
    }

    /**
     * Generated from protobuf field <code>.centrifugal.centrifugo.api.StreamPosition since = 3;</code>
     * @param \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition $var
     * @return $this
     */
    public function setSince($var)
    {
        GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition::class);
        $this->since = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool reverse = 4;</code>
     * @return bool
     */
    public function getReverse()
    {
        return $this->reverse;
    }

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

        return $this;
    }

}

