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

namespace RoadRunner\Centrifugal\Proxy\DTO\V1;

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

/**
 * Generated from protobuf message <code>centrifugal.centrifugo.proxy.ConnectRequest</code>
 */
class ConnectRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string client = 1;</code>
     */
    protected $client = '';
    /**
     * Generated from protobuf field <code>string transport = 2;</code>
     */
    protected $transport = '';
    /**
     * Generated from protobuf field <code>string protocol = 3;</code>
     */
    protected $protocol = '';
    /**
     * Generated from protobuf field <code>string encoding = 4;</code>
     */
    protected $encoding = '';
    /**
     * Generated from protobuf field <code>bytes data = 10;</code>
     */
    protected $data = '';
    /**
     * Generated from protobuf field <code>string b64data = 11;</code>
     */
    protected $b64data = '';
    /**
     * Generated from protobuf field <code>string name = 12;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>string version = 13;</code>
     */
    protected $version = '';
    /**
     * Generated from protobuf field <code>repeated string channels = 14;</code>
     */
    private $channels;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $client
     *     @type string $transport
     *     @type string $protocol
     *     @type string $encoding
     *     @type string $data
     *     @type string $b64data
     *     @type string $name
     *     @type string $version
     *     @type string[] $channels
     * }
     */
    public function __construct($data = NULL) {
        \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string name = 12;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string version = 13;</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

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

        return $this;
    }

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

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

        return $this;
    }

}

