<?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.Job</code>
 */
class Job extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Generated from protobuf field <code>string dispatch_id = 9;</code>
     */
    protected $dispatch_id = '';
    /**
     * Generated from protobuf field <code>.livekit.JobType type = 2;</code>
     */
    protected $type = 0;
    /**
     * Generated from protobuf field <code>.livekit.Room room = 3;</code>
     */
    protected $room = null;
    /**
     * Generated from protobuf field <code>optional .livekit.ParticipantInfo participant = 4;</code>
     */
    protected $participant = null;
    /**
     * Generated from protobuf field <code>string namespace = 5 [deprecated = true];</code>
     * @deprecated
     */
    protected $namespace = '';
    /**
     * Generated from protobuf field <code>string metadata = 6;</code>
     */
    protected $metadata = '';
    /**
     * Generated from protobuf field <code>string agent_name = 7;</code>
     */
    protected $agent_name = '';
    /**
     * Generated from protobuf field <code>.livekit.JobState state = 8;</code>
     */
    protected $state = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *     @type string $dispatch_id
     *     @type int $type
     *     @type \Livekit\Room $room
     *     @type \Livekit\ParticipantInfo $participant
     *     @type string $namespace
     *     @type string $metadata
     *     @type string $agent_name
     *     @type \Livekit\JobState $state
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitAgent::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 dispatch_id = 9;</code>
     * @return string
     */
    public function getDispatchId()
    {
        return $this->dispatch_id;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.Room room = 3;</code>
     * @return \Livekit\Room|null
     */
    public function getRoom()
    {
        return $this->room;
    }

    public function hasRoom()
    {
        return isset($this->room);
    }

    public function clearRoom()
    {
        unset($this->room);
    }

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

        return $this;
    }

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

    public function hasParticipant()
    {
        return isset($this->participant);
    }

    public function clearParticipant()
    {
        unset($this->participant);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string namespace = 5 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getNamespace()
    {
        @trigger_error('namespace is deprecated.', E_USER_DEPRECATED);
        return $this->namespace;
    }

    /**
     * Generated from protobuf field <code>string namespace = 5 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setNamespace($var)
    {
        @trigger_error('namespace is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->namespace = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string metadata = 6;</code>
     * @return string
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.JobState state = 8;</code>
     * @return \Livekit\JobState|null
     */
    public function getState()
    {
        return $this->state;
    }

    public function hasState()
    {
        return isset($this->state);
    }

    public function clearState()
    {
        unset($this->state);
    }

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

        return $this;
    }

}

