"use strict";
// automatically generated by the FlatBuffers compiler, do not modify
Object.defineProperty(exports, "__esModule", { value: true });
exports.IceSelectedTupleChangeNotificationT = exports.IceSelectedTupleChangeNotification = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
const flatbuffers = require("flatbuffers");
const tuple_1 = require("../../fbs/transport/tuple");
class IceSelectedTupleChangeNotification {
    bb = null;
    bb_pos = 0;
    __init(i, bb) {
        this.bb_pos = i;
        this.bb = bb;
        return this;
    }
    static getRootAsIceSelectedTupleChangeNotification(bb, obj) {
        return (obj || new IceSelectedTupleChangeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    static getSizePrefixedRootAsIceSelectedTupleChangeNotification(bb, obj) {
        bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
        return (obj || new IceSelectedTupleChangeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
    }
    tuple(obj) {
        const offset = this.bb.__offset(this.bb_pos, 4);
        return offset ? (obj || new tuple_1.Tuple()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
    }
    static startIceSelectedTupleChangeNotification(builder) {
        builder.startObject(1);
    }
    static addTuple(builder, tupleOffset) {
        builder.addFieldOffset(0, tupleOffset, 0);
    }
    static endIceSelectedTupleChangeNotification(builder) {
        const offset = builder.endObject();
        builder.requiredField(offset, 4); // tuple
        return offset;
    }
    static createIceSelectedTupleChangeNotification(builder, tupleOffset) {
        IceSelectedTupleChangeNotification.startIceSelectedTupleChangeNotification(builder);
        IceSelectedTupleChangeNotification.addTuple(builder, tupleOffset);
        return IceSelectedTupleChangeNotification.endIceSelectedTupleChangeNotification(builder);
    }
    unpack() {
        return new IceSelectedTupleChangeNotificationT((this.tuple() !== null ? this.tuple().unpack() : null));
    }
    unpackTo(_o) {
        _o.tuple = (this.tuple() !== null ? this.tuple().unpack() : null);
    }
}
exports.IceSelectedTupleChangeNotification = IceSelectedTupleChangeNotification;
class IceSelectedTupleChangeNotificationT {
    tuple;
    constructor(tuple = null) {
        this.tuple = tuple;
    }
    pack(builder) {
        const tuple = (this.tuple !== null ? this.tuple.pack(builder) : 0);
        return IceSelectedTupleChangeNotification.createIceSelectedTupleChangeNotification(builder, tuple);
    }
}
exports.IceSelectedTupleChangeNotificationT = IceSelectedTupleChangeNotificationT;
