<?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.Output</code>
 */
class Output extends \Google\Protobuf\Internal\Message
{
    /**
     * Per-output storage override (falls back to request, then server)
     *
     * Generated from protobuf field <code>.livekit.StorageConfig storage = 6;</code>
     */
    protected $storage = null;
    protected $config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Livekit\FileOutput $file
     *     @type \Livekit\StreamOutput $stream
     *     @type \Livekit\SegmentedFileOutput $segments
     *     @type \Livekit\ImageOutput $images
     *           5 reserved for mcap;
     *     @type \Livekit\StorageConfig $storage
     *           Per-output storage override (falls back to request, then server)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.livekit.FileOutput file = 1;</code>
     * @return \Livekit\FileOutput|null
     */
    public function getFile()
    {
        return $this->readOneof(1);
    }

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

    /**
     * 5 reserved for mcap;
     *
     * Generated from protobuf field <code>.livekit.ImageOutput images = 4;</code>
     * @return \Livekit\ImageOutput|null
     */
    public function getImages()
    {
        return $this->readOneof(4);
    }

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

    /**
     * 5 reserved for mcap;
     *
     * Generated from protobuf field <code>.livekit.ImageOutput images = 4;</code>
     * @param \Livekit\ImageOutput $var
     * @return $this
     */
    public function setImages($var)
    {
        GPBUtil::checkMessage($var, \Livekit\ImageOutput::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Per-output storage override (falls back to request, then server)
     *
     * Generated from protobuf field <code>.livekit.StorageConfig storage = 6;</code>
     * @return \Livekit\StorageConfig|null
     */
    public function getStorage()
    {
        return $this->storage;
    }

    public function hasStorage()
    {
        return isset($this->storage);
    }

    public function clearStorage()
    {
        unset($this->storage);
    }

    /**
     * Per-output storage override (falls back to request, then server)
     *
     * Generated from protobuf field <code>.livekit.StorageConfig storage = 6;</code>
     * @param \Livekit\StorageConfig $var
     * @return $this
     */
    public function setStorage($var)
    {
        GPBUtil::checkMessage($var, \Livekit\StorageConfig::class);
        $this->storage = $var;

        return $this;
    }

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

}

