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

/**
 * Used to generate HLS segments or other kind of segmented output
 *
 * Generated from protobuf message <code>livekit.SegmentedFileOutput</code>
 */
class SegmentedFileOutput extends \Google\Protobuf\Internal\Message
{
    /**
     * (optional)
     *
     * Generated from protobuf field <code>.livekit.SegmentedFileProtocol protocol = 1;</code>
     */
    protected $protocol = 0;
    /**
     * (optional)
     *
     * Generated from protobuf field <code>string filename_prefix = 2;</code>
     */
    protected $filename_prefix = '';
    /**
     * (optional)
     *
     * Generated from protobuf field <code>string playlist_name = 3;</code>
     */
    protected $playlist_name = '';
    /**
     * (optional, disabled if not provided). Path of a live playlist
     *
     * Generated from protobuf field <code>string live_playlist_name = 11;</code>
     */
    protected $live_playlist_name = '';
    /**
     * in seconds (optional)
     *
     * Generated from protobuf field <code>uint32 segment_duration = 4;</code>
     */
    protected $segment_duration = 0;
    /**
     * (optional, default INDEX)
     *
     * Generated from protobuf field <code>.livekit.SegmentedFileSuffix filename_suffix = 10;</code>
     */
    protected $filename_suffix = 0;
    /**
     * disable upload of manifest file (default false)
     *
     * Generated from protobuf field <code>bool disable_manifest = 8;</code>
     */
    protected $disable_manifest = false;
    protected $output;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $protocol
     *           (optional)
     *     @type string $filename_prefix
     *           (optional)
     *     @type string $playlist_name
     *           (optional)
     *     @type string $live_playlist_name
     *           (optional, disabled if not provided). Path of a live playlist
     *     @type int $segment_duration
     *           in seconds (optional)
     *     @type int $filename_suffix
     *           (optional, default INDEX)
     *     @type bool $disable_manifest
     *           disable upload of manifest file (default false)
     *     @type \Livekit\S3Upload $s3
     *     @type \Livekit\GCPUpload $gcp
     *     @type \Livekit\AzureBlobUpload $azure
     *     @type \Livekit\AliOSSUpload $aliOSS
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

    /**
     * (optional)
     *
     * Generated from protobuf field <code>.livekit.SegmentedFileProtocol protocol = 1;</code>
     * @return int
     */
    public function getProtocol()
    {
        return $this->protocol;
    }

    /**
     * (optional)
     *
     * Generated from protobuf field <code>.livekit.SegmentedFileProtocol protocol = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setProtocol($var)
    {
        GPBUtil::checkEnum($var, \Livekit\SegmentedFileProtocol::class);
        $this->protocol = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * (optional, disabled if not provided). Path of a live playlist
     *
     * Generated from protobuf field <code>string live_playlist_name = 11;</code>
     * @return string
     */
    public function getLivePlaylistName()
    {
        return $this->live_playlist_name;
    }

    /**
     * (optional, disabled if not provided). Path of a live playlist
     *
     * Generated from protobuf field <code>string live_playlist_name = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setLivePlaylistName($var)
    {
        GPBUtil::checkString($var, True);
        $this->live_playlist_name = $var;

        return $this;
    }

    /**
     * in seconds (optional)
     *
     * Generated from protobuf field <code>uint32 segment_duration = 4;</code>
     * @return int
     */
    public function getSegmentDuration()
    {
        return $this->segment_duration;
    }

    /**
     * in seconds (optional)
     *
     * Generated from protobuf field <code>uint32 segment_duration = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setSegmentDuration($var)
    {
        GPBUtil::checkUint32($var);
        $this->segment_duration = $var;

        return $this;
    }

    /**
     * (optional, default INDEX)
     *
     * Generated from protobuf field <code>.livekit.SegmentedFileSuffix filename_suffix = 10;</code>
     * @return int
     */
    public function getFilenameSuffix()
    {
        return $this->filename_suffix;
    }

    /**
     * (optional, default INDEX)
     *
     * Generated from protobuf field <code>.livekit.SegmentedFileSuffix filename_suffix = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setFilenameSuffix($var)
    {
        GPBUtil::checkEnum($var, \Livekit\SegmentedFileSuffix::class);
        $this->filename_suffix = $var;

        return $this;
    }

    /**
     * disable upload of manifest file (default false)
     *
     * Generated from protobuf field <code>bool disable_manifest = 8;</code>
     * @return bool
     */
    public function getDisableManifest()
    {
        return $this->disable_manifest;
    }

    /**
     * disable upload of manifest file (default false)
     *
     * Generated from protobuf field <code>bool disable_manifest = 8;</code>
     * @param bool $var
     * @return $this
     */
    public function setDisableManifest($var)
    {
        GPBUtil::checkBool($var);
        $this->disable_manifest = $var;

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.AliOSSUpload aliOSS = 9;</code>
     * @return \Livekit\AliOSSUpload|null
     */
    public function getAliOSS()
    {
        return $this->readOneof(9);
    }

    public function hasAliOSS()
    {
        return $this->hasOneof(9);
    }

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

        return $this;
    }

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

}

