"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetBufferedAmountResponseT = exports.GetBufferedAmountResponse = 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 GetBufferedAmountResponse {
    bb = null;
    bb_pos = 0;
    __init(i, bb) {
        this.bb_pos = i;
        this.bb = bb;
        return this;
    }
    static getRootAsGetBufferedAmountResponse(bb, obj) {
        return (obj || new GetBufferedAmountResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    static getSizePrefixedRootAsGetBufferedAmountResponse(bb, obj) {
        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
        return (obj || new GetBufferedAmountResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    bufferedAmount() {
        const offset = this.bb.__offset(this.bb_pos, 4);
        return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
    }
    static startGetBufferedAmountResponse(builder) {
        builder.startObject(1);
    }
    static addBufferedAmount(builder, bufferedAmount) {
        builder.addFieldInt32(0, bufferedAmount, 0);
    }
    static endGetBufferedAmountResponse(builder) {
        const offset = builder.endObject();
        return offset;
    }
    static createGetBufferedAmountResponse(builder, bufferedAmount) {
        GetBufferedAmountResponse.startGetBufferedAmountResponse(builder);
        GetBufferedAmountResponse.addBufferedAmount(builder, bufferedAmount);
        return GetBufferedAmountResponse.endGetBufferedAmountResponse(builder);
    }
    unpack() {
        return new GetBufferedAmountResponseT(this.bufferedAmount());
    }
    unpackTo(_o) {
        _o.bufferedAmount = this.bufferedAmount();
    }
}
exports.GetBufferedAmountResponse = GetBufferedAmountResponse;
class GetBufferedAmountResponseT {
    bufferedAmount;
    constructor(bufferedAmount = 0) {
        this.bufferedAmount = bufferedAmount;
    }
    pack(builder) {
        return GetBufferedAmountResponse.createGetBufferedAmountResponse(builder, this.bufferedAmount);
    }
}
exports.GetBufferedAmountResponseT = GetBufferedAmountResponseT;
