<?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;

/**
 * containerize up to one audio and one video track
 *
 * Generated from protobuf message <code>livekit.TrackCompositeEgressRequest</code>
 */
class TrackCompositeEgressRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * required
     *
     * Generated from protobuf field <code>string room_name = 1;</code>
     */
    protected $room_name = '';
    /**
     * (optional)
     *
     * Generated from protobuf field <code>string audio_track_id = 2;</code>
     */
    protected $audio_track_id = '';
    /**
     * (optional)
     *
     * Generated from protobuf field <code>string video_track_id = 3;</code>
     */
    protected $video_track_id = '';
    protected $output;
    protected $options;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $room_name
     *           required
     *     @type string $audio_track_id
     *           (optional)
     *     @type string $video_track_id
     *           (optional)
     *     @type \Livekit\EncodedFileOutput $file
     *     @type \Livekit\StreamOutput $stream
     *     @type \Livekit\SegmentedFileOutput $segments
     *     @type int $preset
     *           (default H264_720P_30)
     *     @type \Livekit\EncodingOptions $advanced
     *           (optional)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

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

    /**
     * required
     *
     * 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;
    }

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

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

        return $this;
    }

    /**
     * (optional)
     *
     * Generated from protobuf field <code>string video_track_id = 3;</code>
     * @return string
     */
    public function getVideoTrackId()
    {
        return $this->video_track_id;
    }

    /**
     * (optional)
     *
     * Generated from protobuf field <code>string video_track_id = 3;</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;</code>
     * @return \Livekit\EncodedFileOutput|null
     */
    public function getFile()
    {
        return $this->readOneof(4);
    }

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

    public function hasSegments()
    {
        return $this->hasOneof(8);
    }

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

        return $this;
    }

    /**
     * (default H264_720P_30)
     *
     * 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);
    }

    /**
     * (default H264_720P_30)
     *
     * 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;
    }

    /**
     * (optional)
     *
     * 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);
    }

    /**
     * (optional)
     *
     * 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;
    }

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

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

}

