"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecvRtpHeaderExtensionsT = exports.RecvRtpHeaderExtensions = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
const flatbuffers = require("flatbuffers");
class RecvRtpHeaderExtensions {
    bb = null;
    bb_pos = 0;
    __init(i, bb) {
        this.bb_pos = i;
        this.bb = bb;
        return this;
    }
    static getRootAsRecvRtpHeaderExtensions(bb, obj) {
        return (obj || new RecvRtpHeaderExtensions()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    static getSizePrefixedRootAsRecvRtpHeaderExtensions(bb, obj) {
        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
        return (obj || new RecvRtpHeaderExtensions()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    mid() {
        const offset = this.bb.__offset(this.bb_pos, 4);
        return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
    }
    rid() {
        const offset = this.bb.__offset(this.bb_pos, 6);
        return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
    }
    rrid() {
        const offset = this.bb.__offset(this.bb_pos, 8);
        return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
    }
    absSendTime() {
        const offset = this.bb.__offset(this.bb_pos, 10);
        return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
    }
    transportWideCc01() {
        const offset = this.bb.__offset(this.bb_pos, 12);
        return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
    }
    static startRecvRtpHeaderExtensions(builder) {
        builder.startObject(5);
    }
    static addMid(builder, mid) {
        builder.addFieldInt8(0, mid, null);
    }
    static addRid(builder, rid) {
        builder.addFieldInt8(1, rid, null);
    }
    static addRrid(builder, rrid) {
        builder.addFieldInt8(2, rrid, null);
    }
    static addAbsSendTime(builder, absSendTime) {
        builder.addFieldInt8(3, absSendTime, null);
    }
    static addTransportWideCc01(builder, transportWideCc01) {
        builder.addFieldInt8(4, transportWideCc01, null);
    }
    static endRecvRtpHeaderExtensions(builder) {
        const offset = builder.endObject();
        return offset;
    }
    static createRecvRtpHeaderExtensions(builder, mid, rid, rrid, absSendTime, transportWideCc01) {
        RecvRtpHeaderExtensions.startRecvRtpHeaderExtensions(builder);
        if (mid !== null)
            RecvRtpHeaderExtensions.addMid(builder, mid);
        if (rid !== null)
            RecvRtpHeaderExtensions.addRid(builder, rid);
        if (rrid !== null)
            RecvRtpHeaderExtensions.addRrid(builder, rrid);
        if (absSendTime !== null)
            RecvRtpHeaderExtensions.addAbsSendTime(builder, absSendTime);
        if (transportWideCc01 !== null)
            RecvRtpHeaderExtensions.addTransportWideCc01(builder, transportWideCc01);
        return RecvRtpHeaderExtensions.endRecvRtpHeaderExtensions(builder);
    }
    unpack() {
        return new RecvRtpHeaderExtensionsT(this.mid(), this.rid(), this.rrid(), this.absSendTime(), this.transportWideCc01());
    }
    unpackTo(_o) {
        _o.mid = this.mid();
        _o.rid = this.rid();
        _o.rrid = this.rrid();
        _o.absSendTime = this.absSendTime();
        _o.transportWideCc01 = this.transportWideCc01();
    }
}
exports.RecvRtpHeaderExtensions = RecvRtpHeaderExtensions;
class RecvRtpHeaderExtensionsT {
    mid;
    rid;
    rrid;
    absSendTime;
    transportWideCc01;
    constructor(mid = null, rid = null, rrid = null, absSendTime = null, transportWideCc01 = null) {
        this.mid = mid;
        this.rid = rid;
        this.rrid = rrid;
        this.absSendTime = absSendTime;
        this.transportWideCc01 = transportWideCc01;
    }
    pack(builder) {
        return RecvRtpHeaderExtensions.createRecvRtpHeaderExtensions(builder, this.mid, this.rid, this.rrid, this.absSendTime, this.transportWideCc01);
    }
}
exports.RecvRtpHeaderExtensionsT = RecvRtpHeaderExtensionsT;
