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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.IngressState</code>
 */
class IngressState extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.livekit.IngressState.Status status = 1;</code>
     */
    protected $status = 0;
    /**
     * Error/non compliance description if any
     *
     * Generated from protobuf field <code>string error = 2;</code>
     */
    protected $error = '';
    /**
     * Generated from protobuf field <code>.livekit.InputVideoState video = 3;</code>
     */
    protected $video = null;
    /**
     * Generated from protobuf field <code>.livekit.InputAudioState audio = 4;</code>
     */
    protected $audio = null;
    /**
     * ID of the current/previous room published to
     *
     * Generated from protobuf field <code>string room_id = 5 [(.logger.name) = "roomID"];</code>
     */
    protected $room_id = '';
    /**
     * Generated from protobuf field <code>int64 started_at = 7;</code>
     */
    protected $started_at = 0;
    /**
     * Generated from protobuf field <code>int64 ended_at = 8;</code>
     */
    protected $ended_at = 0;
    /**
     * Generated from protobuf field <code>int64 updated_at = 10;</code>
     */
    protected $updated_at = 0;
    /**
     * Generated from protobuf field <code>string resource_id = 9 [(.logger.name) = "resourceID"];</code>
     */
    protected $resource_id = '';
    /**
     * Generated from protobuf field <code>repeated .livekit.TrackInfo tracks = 6;</code>
     */
    private $tracks;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $status
     *     @type string $error
     *           Error/non compliance description if any
     *     @type \Livekit\InputVideoState $video
     *     @type \Livekit\InputAudioState $audio
     *     @type string $room_id
     *           ID of the current/previous room published to
     *     @type int|string $started_at
     *     @type int|string $ended_at
     *     @type int|string $updated_at
     *     @type string $resource_id
     *     @type \Livekit\TrackInfo[] $tracks
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitIngress::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.livekit.IngressState.Status status = 1;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

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

        return $this;
    }

    /**
     * Error/non compliance description if any
     *
     * Generated from protobuf field <code>string error = 2;</code>
     * @return string
     */
    public function getError()
    {
        return $this->error;
    }

    /**
     * Error/non compliance description if any
     *
     * Generated from protobuf field <code>string error = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkString($var, True);
        $this->error = $var;

        return $this;
    }

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

    public function hasVideo()
    {
        return isset($this->video);
    }

    public function clearVideo()
    {
        unset($this->video);
    }

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

        return $this;
    }

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

    public function hasAudio()
    {
        return isset($this->audio);
    }

    public function clearAudio()
    {
        unset($this->audio);
    }

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

        return $this;
    }

    /**
     * ID of the current/previous room published to
     *
     * Generated from protobuf field <code>string room_id = 5 [(.logger.name) = "roomID"];</code>
     * @return string
     */
    public function getRoomId()
    {
        return $this->room_id;
    }

    /**
     * ID of the current/previous room published to
     *
     * Generated from protobuf field <code>string room_id = 5 [(.logger.name) = "roomID"];</code>
     * @param string $var
     * @return $this
     */
    public function setRoomId($var)
    {
        GPBUtil::checkString($var, True);
        $this->room_id = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string resource_id = 9 [(.logger.name) = "resourceID"];</code>
     * @return string
     */
    public function getResourceId()
    {
        return $this->resource_id;
    }

    /**
     * Generated from protobuf field <code>string resource_id = 9 [(.logger.name) = "resourceID"];</code>
     * @param string $var
     * @return $this
     */
    public function setResourceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.TrackInfo tracks = 6;</code>
     * @return RepeatedField<\Livekit\TrackInfo>
     */
    public function getTracks()
    {
        return $this->tracks;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.TrackInfo tracks = 6;</code>
     * @param \Livekit\TrackInfo[] $var
     * @return $this
     */
    public function setTracks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\TrackInfo::class);
        $this->tracks = $arr;

        return $this;
    }

}

