<?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.UpdateJobStatus</code>
 */
class UpdateJobStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string job_id = 1;</code>
     */
    protected $job_id = '';
    /**
     * The worker can indicate the job end by either specifying SUCCESS or FAILED
     *
     * Generated from protobuf field <code>.livekit.JobStatus status = 2;</code>
     */
    protected $status = 0;
    /**
     * metadata shown on the dashboard, useful for debugging
     *
     * Generated from protobuf field <code>string error = 3;</code>
     */
    protected $error = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $job_id
     *     @type int $status
     *           The worker can indicate the job end by either specifying SUCCESS or FAILED
     *     @type string $error
     *           metadata shown on the dashboard, useful for debugging
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitAgent::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * The worker can indicate the job end by either specifying SUCCESS or FAILED
     *
     * Generated from protobuf field <code>.livekit.JobStatus status = 2;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * The worker can indicate the job end by either specifying SUCCESS or FAILED
     *
     * Generated from protobuf field <code>.livekit.JobStatus status = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Livekit\JobStatus::class);
        $this->status = $var;

        return $this;
    }

    /**
     * metadata shown on the dashboard, useful for debugging
     *
     * Generated from protobuf field <code>string error = 3;</code>
     * @return string
     */
    public function getError()
    {
        return $this->error;
    }

    /**
     * metadata shown on the dashboard, useful for debugging
     *
     * Generated from protobuf field <code>string error = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkString($var, True);
        $this->error = $var;

        return $this;
    }

}

