"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.RtxDumpT = exports.RtxDump = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
const flatbuffers = require("flatbuffers");
const params_1 = require("../../fbs/rtx-stream/params");
class RtxDump {
    bb = null;
    bb_pos = 0;
    __init(i, bb) {
        this.bb_pos = i;
        this.bb = bb;
        return this;
    }
    static getRootAsRtxDump(bb, obj) {
        return (obj || new RtxDump()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    static getSizePrefixedRootAsRtxDump(bb, obj) {
        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
        return (obj || new RtxDump()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    params(obj) {
        const offset = this.bb.__offset(this.bb_pos, 4);
        return offset ? (obj || new params_1.Params()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
    }
    static startRtxDump(builder) {
        builder.startObject(1);
    }
    static addParams(builder, paramsOffset) {
        builder.addFieldOffset(0, paramsOffset, 0);
    }
    static endRtxDump(builder) {
        const offset = builder.endObject();
        builder.requiredField(offset, 4); // params
        return offset;
    }
    static createRtxDump(builder, paramsOffset) {
        RtxDump.startRtxDump(builder);
        RtxDump.addParams(builder, paramsOffset);
        return RtxDump.endRtxDump(builder);
    }
    unpack() {
        return new RtxDumpT((this.params() !== null ? this.params().unpack() : null));
    }
    unpackTo(_o) {
        _o.params = (this.params() !== null ? this.params().unpack() : null);
    }
}
exports.RtxDump = RtxDump;
class RtxDumpT {
    params;
    constructor(params = null) {
        this.params = params;
    }
    pack(builder) {
        const params = (this.params !== null ? this.params.pack(builder) : 0);
        return RtxDump.createRtxDump(builder, params);
    }
}
exports.RtxDumpT = RtxDumpT;
