<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: livekit_agent.proto

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.UpdateWorkerStatus</code>
 */
class UpdateWorkerStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .livekit.WorkerStatus status = 1;</code>
     */
    protected $status = null;
    /**
     * optional string metadata = 2 [deprecated=true];
     *
     * Generated from protobuf field <code>float load = 3;</code>
     */
    protected $load = 0.0;
    /**
     * Generated from protobuf field <code>uint32 job_count = 4;</code>
     */
    protected $job_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $status
     *     @type float $load
     *           optional string metadata = 2 [deprecated=true];
     *     @type int $job_count
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitAgent::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .livekit.WorkerStatus status = 1;</code>
     * @return int
     */
    public function getStatus()
    {
        return isset($this->status) ? $this->status : 0;
    }

    public function hasStatus()
    {
        return isset($this->status);
    }

    public function clearStatus()
    {
        unset($this->status);
    }

    /**
     * Generated from protobuf field <code>optional .livekit.WorkerStatus status = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Livekit\WorkerStatus::class);
        $this->status = $var;

        return $this;
    }

    /**
     * optional string metadata = 2 [deprecated=true];
     *
     * Generated from protobuf field <code>float load = 3;</code>
     * @return float
     */
    public function getLoad()
    {
        return $this->load;
    }

    /**
     * optional string metadata = 2 [deprecated=true];
     *
     * Generated from protobuf field <code>float load = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setLoad($var)
    {
        GPBUtil::checkFloat($var);
        $this->load = $var;

        return $this;
    }

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

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

        return $this;
    }

}

