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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.TrackCompositeEgressRequest</code>
 */
class TrackCompositeEgressRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string room_name = 1;</code>
     */
    protected $room_name = '';
    /**
     * Generated from protobuf field <code>string audio_track_id = 2 [(.logger.name) = "audioTrackID"];</code>
     */
    protected $audio_track_id = '';
    /**
     * Generated from protobuf field <code>string video_track_id = 3 [(.logger.name) = "videoTrackID"];</code>
     */
    protected $video_track_id = '';
    /**
     * Generated from protobuf field <code>repeated .livekit.EncodedFileOutput file_outputs = 11;</code>
     */
    private $file_outputs;
    /**
     * Generated from protobuf field <code>repeated .livekit.StreamOutput stream_outputs = 12;</code>
     */
    private $stream_outputs;
    /**
     * Generated from protobuf field <code>repeated .livekit.SegmentedFileOutput segment_outputs = 13;</code>
     */
    private $segment_outputs;
    /**
     * Generated from protobuf field <code>repeated .livekit.ImageOutput image_outputs = 14;</code>
     */
    private $image_outputs;
    /**
     * Generated from protobuf field <code>repeated .livekit.WebhookConfig webhooks = 15;</code>
     */
    private $webhooks;
    protected $output;
    protected $options;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $room_name
     *     @type string $audio_track_id
     *     @type string $video_track_id
     *     @type \Livekit\EncodedFileOutput $file
     *     @type \Livekit\StreamOutput $stream
     *     @type \Livekit\SegmentedFileOutput $segments
     *     @type int $preset
     *     @type \Livekit\EncodingOptions $advanced
     *     @type \Livekit\EncodedFileOutput[] $file_outputs
     *     @type \Livekit\StreamOutput[] $stream_outputs
     *     @type \Livekit\SegmentedFileOutput[] $segment_outputs
     *     @type \Livekit\ImageOutput[] $image_outputs
     *     @type \Livekit\WebhookConfig[] $webhooks
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Generated from protobuf field <code>string room_name = 1;</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>string audio_track_id = 2 [(.logger.name) = "audioTrackID"];</code>
     * @return string
     */
    public function getAudioTrackId()
    {
        return $this->audio_track_id;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string video_track_id = 3 [(.logger.name) = "videoTrackID"];</code>
     * @return string
     */
    public function getVideoTrackId()
    {
        return $this->video_track_id;
    }

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.EncodingOptionsPreset preset = 6;</code>
     * @return int
     */
    public function getPreset()
    {
        return $this->readOneof(6);
    }

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

    /**
     * Generated from protobuf field <code>.livekit.EncodingOptionsPreset preset = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setPreset($var)
    {
        GPBUtil::checkEnum($var, \Livekit\EncodingOptionsPreset::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.EncodingOptions advanced = 7;</code>
     * @return \Livekit\EncodingOptions|null
     */
    public function getAdvanced()
    {
        return $this->readOneof(7);
    }

    public function hasAdvanced()
    {
        return $this->hasOneof(7);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.EncodedFileOutput file_outputs = 11;</code>
     * @return RepeatedField<\Livekit\EncodedFileOutput>
     */
    public function getFileOutputs()
    {
        return $this->file_outputs;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.StreamOutput stream_outputs = 12;</code>
     * @return RepeatedField<\Livekit\StreamOutput>
     */
    public function getStreamOutputs()
    {
        return $this->stream_outputs;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.SegmentedFileOutput segment_outputs = 13;</code>
     * @return RepeatedField<\Livekit\SegmentedFileOutput>
     */
    public function getSegmentOutputs()
    {
        return $this->segment_outputs;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.ImageOutput image_outputs = 14;</code>
     * @return RepeatedField<\Livekit\ImageOutput>
     */
    public function getImageOutputs()
    {
        return $this->image_outputs;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.WebhookConfig webhooks = 15;</code>
     * @return RepeatedField<\Livekit\WebhookConfig>
     */
    public function getWebhooks()
    {
        return $this->webhooks;
    }

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

        return $this;
    }

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

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

}

