<?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.DisconnectRequest</code>
 */
class DisconnectRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string user = 1;</code>
     */
    protected $user = '';
    /**
     * Generated from protobuf field <code>.centrifugal.centrifugo.api.Disconnect disconnect = 2;</code>
     */
    protected $disconnect = null;
    /**
     * Generated from protobuf field <code>string client = 3;</code>
     */
    protected $client = '';
    /**
     * Generated from protobuf field <code>repeated string whitelist = 4;</code>
     */
    private $whitelist;
    /**
     * Generated from protobuf field <code>string session = 5;</code>
     */
    protected $session = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $user
     *     @type \RoadRunner\Centrifugal\API\DTO\V1\Disconnect $disconnect
     *     @type string $client
     *     @type string[] $whitelist
     *     @type string $session
     * }
     */
    public function __construct($data = NULL) {
        \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

    public function hasDisconnect()
    {
        return isset($this->disconnect);
    }

    public function clearDisconnect()
    {
        unset($this->disconnect);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string client = 3;</code>
     * @return string
     */
    public function getClient()
    {
        return $this->client;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated string whitelist = 4;</code>
     * @return RepeatedField<string>
     */
    public function getWhitelist()
    {
        return $this->whitelist;
    }

    /**
     * Generated from protobuf field <code>repeated string whitelist = 4;</code>
     * @param string[] $var
     * @return $this
     */
    public function setWhitelist($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->whitelist = $arr;

        return $this;
    }

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

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

        return $this;
    }

}

