<?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.NodeResult</code>
 */
class NodeResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string uid = 1;</code>
     */
    protected $uid = '';
    /**
     * Generated from protobuf field <code>string name = 2;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>string version = 3;</code>
     */
    protected $version = '';
    /**
     * Generated from protobuf field <code>uint32 num_clients = 4;</code>
     */
    protected $num_clients = 0;
    /**
     * Generated from protobuf field <code>uint32 num_users = 5;</code>
     */
    protected $num_users = 0;
    /**
     * Generated from protobuf field <code>uint32 num_channels = 6;</code>
     */
    protected $num_channels = 0;
    /**
     * Generated from protobuf field <code>uint32 uptime = 7;</code>
     */
    protected $uptime = 0;
    /**
     * Generated from protobuf field <code>.centrifugal.centrifugo.api.Metrics metrics = 8;</code>
     */
    protected $metrics = null;
    /**
     * Generated from protobuf field <code>.centrifugal.centrifugo.api.Process process = 9;</code>
     */
    protected $process = null;
    /**
     * Generated from protobuf field <code>uint32 num_subs = 10;</code>
     */
    protected $num_subs = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $uid
     *     @type string $name
     *     @type string $version
     *     @type int $num_clients
     *     @type int $num_users
     *     @type int $num_channels
     *     @type int $uptime
     *     @type \RoadRunner\Centrifugal\API\DTO\V1\Metrics $metrics
     *     @type \RoadRunner\Centrifugal\API\DTO\V1\Process $process
     *     @type int $num_subs
     * }
     */
    public function __construct($data = NULL) {
        \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>string name = 2;</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 = 3;</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    public function hasMetrics()
    {
        return isset($this->metrics);
    }

    public function clearMetrics()
    {
        unset($this->metrics);
    }

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

        return $this;
    }

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

    public function hasProcess()
    {
        return isset($this->process);
    }

    public function clearProcess()
    {
        unset($this->process);
    }

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

        return $this;
    }

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

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

        return $this;
    }

}

