"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.SetMaxIncomingBitrateRequestT = exports.SetMaxIncomingBitrateRequest = 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 SetMaxIncomingBitrateRequest {
    bb = null;
    bb_pos = 0;
    __init(i, bb) {
        this.bb_pos = i;
        this.bb = bb;
        return this;
    }
    static getRootAsSetMaxIncomingBitrateRequest(bb, obj) {
        return (obj || new SetMaxIncomingBitrateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    static getSizePrefixedRootAsSetMaxIncomingBitrateRequest(bb, obj) {
        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
        return (obj || new SetMaxIncomingBitrateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    maxIncomingBitrate() {
        const offset = this.bb.__offset(this.bb_pos, 4);
        return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
    }
    static startSetMaxIncomingBitrateRequest(builder) {
        builder.startObject(1);
    }
    static addMaxIncomingBitrate(builder, maxIncomingBitrate) {
        builder.addFieldInt32(0, maxIncomingBitrate, 0);
    }
    static endSetMaxIncomingBitrateRequest(builder) {
        const offset = builder.endObject();
        return offset;
    }
    static createSetMaxIncomingBitrateRequest(builder, maxIncomingBitrate) {
        SetMaxIncomingBitrateRequest.startSetMaxIncomingBitrateRequest(builder);
        SetMaxIncomingBitrateRequest.addMaxIncomingBitrate(builder, maxIncomingBitrate);
        return SetMaxIncomingBitrateRequest.endSetMaxIncomingBitrateRequest(builder);
    }
    unpack() {
        return new SetMaxIncomingBitrateRequestT(this.maxIncomingBitrate());
    }
    unpackTo(_o) {
        _o.maxIncomingBitrate = this.maxIncomingBitrate();
    }
}
exports.SetMaxIncomingBitrateRequest = SetMaxIncomingBitrateRequest;
class SetMaxIncomingBitrateRequestT {
    maxIncomingBitrate;
    constructor(maxIncomingBitrate = 0) {
        this.maxIncomingBitrate = maxIncomingBitrate;
    }
    pack(builder) {
        return SetMaxIncomingBitrateRequest.createSetMaxIncomingBitrateRequest(builder, this.maxIncomingBitrate);
    }
}
exports.SetMaxIncomingBitrateRequestT = SetMaxIncomingBitrateRequestT;
