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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.AgentDispatchState</code>
 */
class AgentDispatchState extends \Google\Protobuf\Internal\Message
{
    /**
     * For dispatches of tyoe JT_ROOM, there will be at most 1 job. 
     * For dispatches of type JT_PUBLISHER, there will be 1 per publisher.
     *
     * Generated from protobuf field <code>repeated .livekit.Job jobs = 1;</code>
     */
    private $jobs;
    /**
     * Generated from protobuf field <code>int64 created_at = 2;</code>
     */
    protected $created_at = 0;
    /**
     * Generated from protobuf field <code>int64 deleted_at = 3;</code>
     */
    protected $deleted_at = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Livekit\Job[] $jobs
     *           For dispatches of tyoe JT_ROOM, there will be at most 1 job. 
     *           For dispatches of type JT_PUBLISHER, there will be 1 per publisher.
     *     @type int|string $created_at
     *     @type int|string $deleted_at
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitAgentDispatch::initOnce();
        parent::__construct($data);
    }

    /**
     * For dispatches of tyoe JT_ROOM, there will be at most 1 job. 
     * For dispatches of type JT_PUBLISHER, there will be 1 per publisher.
     *
     * Generated from protobuf field <code>repeated .livekit.Job jobs = 1;</code>
     * @return RepeatedField<\Livekit\Job>
     */
    public function getJobs()
    {
        return $this->jobs;
    }

    /**
     * For dispatches of tyoe JT_ROOM, there will be at most 1 job. 
     * For dispatches of type JT_PUBLISHER, there will be 1 per publisher.
     *
     * Generated from protobuf field <code>repeated .livekit.Job jobs = 1;</code>
     * @param \Livekit\Job[] $var
     * @return $this
     */
    public function setJobs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\Job::class);
        $this->jobs = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 created_at = 2;</code>
     * @return int|string
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    /**
     * Generated from protobuf field <code>int64 created_at = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCreatedAt($var)
    {
        GPBUtil::checkInt64($var);
        $this->created_at = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 deleted_at = 3;</code>
     * @return int|string
     */
    public function getDeletedAt()
    {
        return $this->deleted_at;
    }

    /**
     * Generated from protobuf field <code>int64 deleted_at = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDeletedAt($var)
    {
        GPBUtil::checkInt64($var);
        $this->deleted_at = $var;

        return $this;
    }

}

