<?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.ExportReplayRequest</code>
 */
class ExportReplayRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string replay_id = 1 [(.logger.name) = "replayID"];</code>
     */
    protected $replay_id = '';
    /**
     * Generated from protobuf field <code>int64 start_offset_ms = 2;</code>
     */
    protected $start_offset_ms = 0;
    /**
     * Generated from protobuf field <code>int64 end_offset_ms = 3;</code>
     */
    protected $end_offset_ms = 0;
    /**
     * Generated from protobuf field <code>repeated .livekit.Output outputs = 9;</code>
     */
    private $outputs;
    /**
     * Generated from protobuf field <code>.livekit.StorageConfig storage = 10;</code>
     */
    protected $storage = null;
    /**
     * Generated from protobuf field <code>repeated .livekit.WebhookConfig webhooks = 11;</code>
     */
    private $webhooks;
    protected $source;
    protected $encoding;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $replay_id
     *     @type int|string $start_offset_ms
     *     @type int|string $end_offset_ms
     *     @type \Livekit\TemplateSource $template
     *     @type \Livekit\WebSource $web
     *     @type \Livekit\MediaSource $media
     *     @type int $preset
     *     @type \Livekit\EncodingOptions $advanced
     *     @type \Livekit\Output[] $outputs
     *     @type \Livekit\StorageConfig $storage
     *     @type \Livekit\WebhookConfig[] $webhooks
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string replay_id = 1 [(.logger.name) = "replayID"];</code>
     * @return string
     */
    public function getReplayId()
    {
        return $this->replay_id;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 start_offset_ms = 2;</code>
     * @return int|string
     */
    public function getStartOffsetMs()
    {
        return $this->start_offset_ms;
    }

    /**
     * Generated from protobuf field <code>int64 start_offset_ms = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setStartOffsetMs($var)
    {
        GPBUtil::checkInt64($var);
        $this->start_offset_ms = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 end_offset_ms = 3;</code>
     * @return int|string
     */
    public function getEndOffsetMs()
    {
        return $this->end_offset_ms;
    }

    /**
     * Generated from protobuf field <code>int64 end_offset_ms = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEndOffsetMs($var)
    {
        GPBUtil::checkInt64($var);
        $this->end_offset_ms = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.TemplateSource template = 4;</code>
     * @return \Livekit\TemplateSource|null
     */
    public function getTemplate()
    {
        return $this->readOneof(4);
    }

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .livekit.Output outputs = 9;</code>
     * @return RepeatedField<\Livekit\Output>
     */
    public function getOutputs()
    {
        return $this->outputs;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.StorageConfig storage = 10;</code>
     * @return \Livekit\StorageConfig|null
     */
    public function getStorage()
    {
        return $this->storage;
    }

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

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

    /**
     * Generated from protobuf field <code>.livekit.StorageConfig storage = 10;</code>
     * @param \Livekit\StorageConfig $var
     * @return $this
     */
    public function setStorage($var)
    {
        GPBUtil::checkMessage($var, \Livekit\StorageConfig::class);
        $this->storage = $var;

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>repeated .livekit.WebhookConfig webhooks = 11;</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 getSource()
    {
        return $this->whichOneof("source");
    }

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

}

