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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.Node</code>
 */
class Node extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Generated from protobuf field <code>string ip = 2;</code>
     */
    protected $ip = '';
    /**
     * Generated from protobuf field <code>uint32 num_cpus = 3;</code>
     */
    protected $num_cpus = 0;
    /**
     * Generated from protobuf field <code>.livekit.NodeStats stats = 4;</code>
     */
    protected $stats = null;
    /**
     * Generated from protobuf field <code>.livekit.NodeType type = 5;</code>
     */
    protected $type = 0;
    /**
     * Generated from protobuf field <code>.livekit.NodeState state = 6;</code>
     */
    protected $state = 0;
    /**
     * Generated from protobuf field <code>string region = 7;</code>
     */
    protected $region = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *     @type string $ip
     *     @type int $num_cpus
     *     @type \Livekit\NodeStats $stats
     *     @type int $type
     *     @type int $state
     *     @type string $region
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitInternal::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.NodeStats stats = 4;</code>
     * @return \Livekit\NodeStats|null
     */
    public function getStats()
    {
        return $this->stats;
    }

    public function hasStats()
    {
        return isset($this->stats);
    }

    public function clearStats()
    {
        unset($this->stats);
    }

    /**
     * Generated from protobuf field <code>.livekit.NodeStats stats = 4;</code>
     * @param \Livekit\NodeStats $var
     * @return $this
     */
    public function setStats($var)
    {
        GPBUtil::checkMessage($var, \Livekit\NodeStats::class);
        $this->stats = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.NodeType type = 5;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Generated from protobuf field <code>.livekit.NodeType type = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Livekit\NodeType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.NodeState state = 6;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Generated from protobuf field <code>.livekit.NodeState state = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Livekit\NodeState::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string region = 7;</code>
     * @return string
     */
    public function getRegion()
    {
        return $this->region;
    }

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

        return $this;
    }

}

