"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.DumpData = void 0;
exports.unionToDumpData = unionToDumpData;
exports.unionListToDumpData = unionListToDumpData;
const pipe_consumer_dump_1 = require("../../fbs/consumer/pipe-consumer-dump");
const simple_consumer_dump_1 = require("../../fbs/consumer/simple-consumer-dump");
const simulcast_consumer_dump_1 = require("../../fbs/consumer/simulcast-consumer-dump");
const svc_consumer_dump_1 = require("../../fbs/consumer/svc-consumer-dump");
var DumpData;
(function (DumpData) {
    DumpData[DumpData["NONE"] = 0] = "NONE";
    DumpData[DumpData["SimpleConsumerDump"] = 1] = "SimpleConsumerDump";
    DumpData[DumpData["SimulcastConsumerDump"] = 2] = "SimulcastConsumerDump";
    DumpData[DumpData["SvcConsumerDump"] = 3] = "SvcConsumerDump";
    DumpData[DumpData["PipeConsumerDump"] = 4] = "PipeConsumerDump";
})(DumpData || (exports.DumpData = DumpData = {}));
function unionToDumpData(type, accessor) {
    switch (DumpData[type]) {
        case 'NONE': return null;
        case 'SimpleConsumerDump': return accessor(new simple_consumer_dump_1.SimpleConsumerDump());
        case 'SimulcastConsumerDump': return accessor(new simulcast_consumer_dump_1.SimulcastConsumerDump());
        case 'SvcConsumerDump': return accessor(new svc_consumer_dump_1.SvcConsumerDump());
        case 'PipeConsumerDump': return accessor(new pipe_consumer_dump_1.PipeConsumerDump());
        default: return null;
    }
}
function unionListToDumpData(type, accessor, index) {
    switch (DumpData[type]) {
        case 'NONE': return null;
        case 'SimpleConsumerDump': return accessor(index, new simple_consumer_dump_1.SimpleConsumerDump());
        case 'SimulcastConsumerDump': return accessor(index, new simulcast_consumer_dump_1.SimulcastConsumerDump());
        case 'SvcConsumerDump': return accessor(index, new svc_consumer_dump_1.SvcConsumerDump());
        case 'PipeConsumerDump': return accessor(index, new pipe_consumer_dump_1.PipeConsumerDump());
        default: return null;
    }
}
