"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.SetBufferedAmountLowThresholdRequestT = exports.SetBufferedAmountLowThresholdRequest = 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 SetBufferedAmountLowThresholdRequest {
    bb = null;
    bb_pos = 0;
    __init(i, bb) {
        this.bb_pos = i;
        this.bb = bb;
        return this;
    }
    static getRootAsSetBufferedAmountLowThresholdRequest(bb, obj) {
        return (obj || new SetBufferedAmountLowThresholdRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    static getSizePrefixedRootAsSetBufferedAmountLowThresholdRequest(bb, obj) {
        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
        return (obj || new SetBufferedAmountLowThresholdRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    threshold() {
        const offset = this.bb.__offset(this.bb_pos, 4);
        return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
    }
    static startSetBufferedAmountLowThresholdRequest(builder) {
        builder.startObject(1);
    }
    static addThreshold(builder, threshold) {
        builder.addFieldInt32(0, threshold, 0);
    }
    static endSetBufferedAmountLowThresholdRequest(builder) {
        const offset = builder.endObject();
        return offset;
    }
    static createSetBufferedAmountLowThresholdRequest(builder, threshold) {
        SetBufferedAmountLowThresholdRequest.startSetBufferedAmountLowThresholdRequest(builder);
        SetBufferedAmountLowThresholdRequest.addThreshold(builder, threshold);
        return SetBufferedAmountLowThresholdRequest.endSetBufferedAmountLowThresholdRequest(builder);
    }
    unpack() {
        return new SetBufferedAmountLowThresholdRequestT(this.threshold());
    }
    unpackTo(_o) {
        _o.threshold = this.threshold();
    }
}
exports.SetBufferedAmountLowThresholdRequest = SetBufferedAmountLowThresholdRequest;
class SetBufferedAmountLowThresholdRequestT {
    threshold;
    constructor(threshold = 0) {
        this.threshold = threshold;
    }
    pack(builder) {
        return SetBufferedAmountLowThresholdRequest.createSetBufferedAmountLowThresholdRequest(builder, this.threshold);
    }
}
exports.SetBufferedAmountLowThresholdRequestT = SetBufferedAmountLowThresholdRequestT;
