// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';



export class UUID implements flatbuffers.IUnpackableObject<UUIDT> {
  bb: flatbuffers.ByteBuffer|null = null;
  bb_pos = 0;
  __init(i:number, bb:flatbuffers.ByteBuffer):UUID {
  this.bb_pos = i;
  this.bb = bb;
  return this;
}

hi():bigint {
  return this.bb!.readUint64(this.bb_pos);
}

lo():bigint {
  return this.bb!.readUint64(this.bb_pos + 8);
}

static sizeOf():number {
  return 16;
}

static createUUID(builder:flatbuffers.Builder, hi: bigint, lo: bigint):flatbuffers.Offset {
  builder.prep(8, 16);
  builder.writeInt64(BigInt(lo ?? 0));
  builder.writeInt64(BigInt(hi ?? 0));
  return builder.offset();
}


unpack(): UUIDT {
  return new UUIDT(
    this.hi(),
    this.lo()
  );
}


unpackTo(_o: UUIDT): void {
  _o.hi = this.hi();
  _o.lo = this.lo();
}
}

export class UUIDT implements flatbuffers.IGeneratedObject {
constructor(
  public hi: bigint = BigInt('0'),
  public lo: bigint = BigInt('0')
){}


pack(builder:flatbuffers.Builder): flatbuffers.Offset {
  return UUID.createUUID(builder,
    this.hi,
    this.lo
  );
}
}
