"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.SetPriorityRequestT = exports.SetPriorityRequest = 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 SetPriorityRequest {
    bb = null;
    bb_pos = 0;
    __init(i, bb) {
        this.bb_pos = i;
        this.bb = bb;
        return this;
    }
    static getRootAsSetPriorityRequest(bb, obj) {
        return (obj || new SetPriorityRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    static getSizePrefixedRootAsSetPriorityRequest(bb, obj) {
        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
        return (obj || new SetPriorityRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    priority() {
        const offset = this.bb.__offset(this.bb_pos, 4);
        return offset ? this.bb.readUint8(this.bb_pos + offset) : 0;
    }
    static startSetPriorityRequest(builder) {
        builder.startObject(1);
    }
    static addPriority(builder, priority) {
        builder.addFieldInt8(0, priority, 0);
    }
    static endSetPriorityRequest(builder) {
        const offset = builder.endObject();
        return offset;
    }
    static createSetPriorityRequest(builder, priority) {
        SetPriorityRequest.startSetPriorityRequest(builder);
        SetPriorityRequest.addPriority(builder, priority);
        return SetPriorityRequest.endSetPriorityRequest(builder);
    }
    unpack() {
        return new SetPriorityRequestT(this.priority());
    }
    unpackTo(_o) {
        _o.priority = this.priority();
    }
}
exports.SetPriorityRequest = SetPriorityRequest;
class SetPriorityRequestT {
    priority;
    constructor(priority = 0) {
        this.priority = priority;
    }
    pack(builder) {
        return SetPriorityRequest.createSetPriorityRequest(builder, this.priority);
    }
}
exports.SetPriorityRequestT = SetPriorityRequestT;
