<?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.AutoParticipantEgress</code>
 */
class AutoParticipantEgress extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .livekit.EncodedFileOutput file_outputs = 3;</code>
     */
    private $file_outputs;
    /**
     * Generated from protobuf field <code>repeated .livekit.SegmentedFileOutput segment_outputs = 4;</code>
     */
    private $segment_outputs;
    protected $options;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $preset
     *           (default H264_720P_30)
     *     @type \Livekit\EncodingOptions $advanced
     *           (optional)
     *     @type \Livekit\EncodedFileOutput[] $file_outputs
     *     @type \Livekit\SegmentedFileOutput[] $segment_outputs
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>repeated .livekit.EncodedFileOutput file_outputs = 3;</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.SegmentedFileOutput segment_outputs = 4;</code>
     * @return RepeatedField<\Livekit\SegmentedFileOutput>
     */
    public function getSegmentOutputs()
    {
        return $this->segment_outputs;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.SegmentedFileOutput segment_outputs = 4;</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;
    }

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

}

