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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.EgressInfo</code>
 */
class EgressInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string egress_id = 1;</code>
     */
    protected $egress_id = '';
    /**
     * Generated from protobuf field <code>string room_id = 2;</code>
     */
    protected $room_id = '';
    /**
     * Generated from protobuf field <code>string room_name = 13;</code>
     */
    protected $room_name = '';
    /**
     * Generated from protobuf field <code>.livekit.EgressSourceType source_type = 26;</code>
     */
    protected $source_type = 0;
    /**
     * Generated from protobuf field <code>.livekit.EgressStatus status = 3;</code>
     */
    protected $status = 0;
    /**
     * Generated from protobuf field <code>int64 started_at = 10;</code>
     */
    protected $started_at = 0;
    /**
     * Generated from protobuf field <code>int64 ended_at = 11;</code>
     */
    protected $ended_at = 0;
    /**
     * Generated from protobuf field <code>int64 updated_at = 18;</code>
     */
    protected $updated_at = 0;
    /**
     * Generated from protobuf field <code>string details = 21;</code>
     */
    protected $details = '';
    /**
     * Generated from protobuf field <code>string error = 9;</code>
     */
    protected $error = '';
    /**
     * Generated from protobuf field <code>int32 error_code = 22;</code>
     */
    protected $error_code = 0;
    /**
     * Generated from protobuf field <code>repeated .livekit.StreamInfo stream_results = 15;</code>
     */
    private $stream_results;
    /**
     * Generated from protobuf field <code>repeated .livekit.FileInfo file_results = 16;</code>
     */
    private $file_results;
    /**
     * Generated from protobuf field <code>repeated .livekit.SegmentsInfo segment_results = 17;</code>
     */
    private $segment_results;
    /**
     * Generated from protobuf field <code>repeated .livekit.ImagesInfo image_results = 20;</code>
     */
    private $image_results;
    /**
     * Generated from protobuf field <code>string manifest_location = 23;</code>
     */
    protected $manifest_location = '';
    /**
     * next ID: 27
     *
     * Generated from protobuf field <code>bool backup_storage_used = 25;</code>
     */
    protected $backup_storage_used = false;
    protected $request;
    protected $result;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $egress_id
     *     @type string $room_id
     *     @type string $room_name
     *     @type int $source_type
     *     @type int $status
     *     @type int|string $started_at
     *     @type int|string $ended_at
     *     @type int|string $updated_at
     *     @type string $details
     *     @type string $error
     *     @type int $error_code
     *     @type \Livekit\RoomCompositeEgressRequest $room_composite
     *     @type \Livekit\WebEgressRequest $web
     *     @type \Livekit\ParticipantEgressRequest $participant
     *     @type \Livekit\TrackCompositeEgressRequest $track_composite
     *     @type \Livekit\TrackEgressRequest $track
     *     @type \Livekit\StreamInfoList $stream
     *     @type \Livekit\FileInfo $file
     *     @type \Livekit\SegmentsInfo $segments
     *     @type \Livekit\StreamInfo[]|\Google\Protobuf\Internal\RepeatedField $stream_results
     *     @type \Livekit\FileInfo[]|\Google\Protobuf\Internal\RepeatedField $file_results
     *     @type \Livekit\SegmentsInfo[]|\Google\Protobuf\Internal\RepeatedField $segment_results
     *     @type \Livekit\ImagesInfo[]|\Google\Protobuf\Internal\RepeatedField $image_results
     *     @type string $manifest_location
     *     @type bool $backup_storage_used
     *           next ID: 27
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string room_id = 2;</code>
     * @return string
     */
    public function getRoomId()
    {
        return $this->room_id;
    }

    /**
     * Generated from protobuf field <code>string room_id = 2;</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>string room_name = 13;</code>
     * @return string
     */
    public function getRoomName()
    {
        return $this->room_name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.EgressSourceType source_type = 26;</code>
     * @return int
     */
    public function getSourceType()
    {
        return $this->source_type;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>int64 started_at = 10;</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 = 11;</code>
     * @return int|string
     */
    public function getEndedAt()
    {
        return $this->ended_at;
    }

    /**
     * Generated from protobuf field <code>int64 ended_at = 11;</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 = 18;</code>
     * @return int|string
     */
    public function getUpdatedAt()
    {
        return $this->updated_at;
    }

    /**
     * Generated from protobuf field <code>int64 updated_at = 18;</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 details = 21;</code>
     * @return string
     */
    public function getDetails()
    {
        return $this->details;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string error = 9;</code>
     * @return string
     */
    public function getError()
    {
        return $this->error;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int32 error_code = 22;</code>
     * @return int
     */
    public function getErrorCode()
    {
        return $this->error_code;
    }

    /**
     * Generated from protobuf field <code>int32 error_code = 22;</code>
     * @param int $var
     * @return $this
     */
    public function setErrorCode($var)
    {
        GPBUtil::checkInt32($var);
        $this->error_code = $var;

        return $this;
    }

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

    public function hasRoomComposite()
    {
        return $this->hasOneof(4);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.WebEgressRequest web = 14;</code>
     * @return \Livekit\WebEgressRequest|null
     */
    public function getWeb()
    {
        return $this->readOneof(14);
    }

    public function hasWeb()
    {
        return $this->hasOneof(14);
    }

    /**
     * Generated from protobuf field <code>.livekit.WebEgressRequest web = 14;</code>
     * @param \Livekit\WebEgressRequest $var
     * @return $this
     */
    public function setWeb($var)
    {
        GPBUtil::checkMessage($var, \Livekit\WebEgressRequest::class);
        $this->writeOneof(14, $var);

        return $this;
    }

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

    public function hasParticipant()
    {
        return $this->hasOneof(19);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.TrackCompositeEgressRequest track_composite = 5;</code>
     * @return \Livekit\TrackCompositeEgressRequest|null
     */
    public function getTrackComposite()
    {
        return $this->readOneof(5);
    }

    public function hasTrackComposite()
    {
        return $this->hasOneof(5);
    }

    /**
     * Generated from protobuf field <code>.livekit.TrackCompositeEgressRequest track_composite = 5;</code>
     * @param \Livekit\TrackCompositeEgressRequest $var
     * @return $this
     */
    public function setTrackComposite($var)
    {
        GPBUtil::checkMessage($var, \Livekit\TrackCompositeEgressRequest::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.TrackEgressRequest track = 6;</code>
     * @return \Livekit\TrackEgressRequest|null
     */
    public function getTrack()
    {
        return $this->readOneof(6);
    }

    public function hasTrack()
    {
        return $this->hasOneof(6);
    }

    /**
     * Generated from protobuf field <code>.livekit.TrackEgressRequest track = 6;</code>
     * @param \Livekit\TrackEgressRequest $var
     * @return $this
     */
    public function setTrack($var)
    {
        GPBUtil::checkMessage($var, \Livekit\TrackEgressRequest::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.StreamInfoList stream = 7 [deprecated = true];</code>
     * @return \Livekit\StreamInfoList|null
     * @deprecated
     */
    public function getStream()
    {
        @trigger_error('stream is deprecated.', E_USER_DEPRECATED);
        return $this->readOneof(7);
    }

    public function hasStream()
    {
        @trigger_error('stream is deprecated.', E_USER_DEPRECATED);
        return $this->hasOneof(7);
    }

    /**
     * Generated from protobuf field <code>.livekit.StreamInfoList stream = 7 [deprecated = true];</code>
     * @param \Livekit\StreamInfoList $var
     * @return $this
     * @deprecated
     */
    public function setStream($var)
    {
        @trigger_error('stream is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Livekit\StreamInfoList::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.FileInfo file = 8 [deprecated = true];</code>
     * @return \Livekit\FileInfo|null
     * @deprecated
     */
    public function getFile()
    {
        @trigger_error('file is deprecated.', E_USER_DEPRECATED);
        return $this->readOneof(8);
    }

    public function hasFile()
    {
        @trigger_error('file is deprecated.', E_USER_DEPRECATED);
        return $this->hasOneof(8);
    }

    /**
     * Generated from protobuf field <code>.livekit.FileInfo file = 8 [deprecated = true];</code>
     * @param \Livekit\FileInfo $var
     * @return $this
     * @deprecated
     */
    public function setFile($var)
    {
        @trigger_error('file is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Livekit\FileInfo::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SegmentsInfo segments = 12 [deprecated = true];</code>
     * @return \Livekit\SegmentsInfo|null
     * @deprecated
     */
    public function getSegments()
    {
        @trigger_error('segments is deprecated.', E_USER_DEPRECATED);
        return $this->readOneof(12);
    }

    public function hasSegments()
    {
        @trigger_error('segments is deprecated.', E_USER_DEPRECATED);
        return $this->hasOneof(12);
    }

    /**
     * Generated from protobuf field <code>.livekit.SegmentsInfo segments = 12 [deprecated = true];</code>
     * @param \Livekit\SegmentsInfo $var
     * @return $this
     * @deprecated
     */
    public function setSegments($var)
    {
        @trigger_error('segments is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Livekit\SegmentsInfo::class);
        $this->writeOneof(12, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.StreamInfo stream_results = 15;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getStreamResults()
    {
        return $this->stream_results;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.FileInfo file_results = 16;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFileResults()
    {
        return $this->file_results;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.SegmentsInfo segment_results = 17;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSegmentResults()
    {
        return $this->segment_results;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.ImagesInfo image_results = 20;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getImageResults()
    {
        return $this->image_results;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string manifest_location = 23;</code>
     * @return string
     */
    public function getManifestLocation()
    {
        return $this->manifest_location;
    }

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

        return $this;
    }

    /**
     * next ID: 27
     *
     * Generated from protobuf field <code>bool backup_storage_used = 25;</code>
     * @return bool
     */
    public function getBackupStorageUsed()
    {
        return $this->backup_storage_used;
    }

    /**
     * next ID: 27
     *
     * Generated from protobuf field <code>bool backup_storage_used = 25;</code>
     * @param bool $var
     * @return $this
     */
    public function setBackupStorageUsed($var)
    {
        GPBUtil::checkBool($var);
        $this->backup_storage_used = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getRequest()
    {
        return $this->whichOneof("request");
    }

    /**
     * @return string
     */
    public function getResult()
    {
        return $this->whichOneof("result");
    }

}

