// 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 UnidentifiedGroup implements flatbuffers.IUnpackableObject<UnidentifiedGroupT> {
  bb: flatbuffers.ByteBuffer|null = null;
  bb_pos = 0;
  __init(i:number, bb:flatbuffers.ByteBuffer):UnidentifiedGroup {
  this.bb_pos = i;
  this.bb = bb;
  return this;
}

static getRootAsUnidentifiedGroup(bb:flatbuffers.ByteBuffer, obj?:UnidentifiedGroup):UnidentifiedGroup {
  return (obj || new UnidentifiedGroup()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

static getSizePrefixedRootAsUnidentifiedGroup(bb:flatbuffers.ByteBuffer, obj?:UnidentifiedGroup):UnidentifiedGroup {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (obj || new UnidentifiedGroup()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

x():number {
  const offset = this.bb!.__offset(this.bb_pos, 4);
  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
}

y():number {
  const offset = this.bb!.__offset(this.bb_pos, 6);
  return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
}

static startUnidentifiedGroup(builder:flatbuffers.Builder) {
  builder.startObject(2);
}

static addX(builder:flatbuffers.Builder, x:number) {
  builder.addFieldFloat32(0, x, 0.0);
}

static addY(builder:flatbuffers.Builder, y:number) {
  builder.addFieldFloat32(1, y, 0.0);
}

static endUnidentifiedGroup(builder:flatbuffers.Builder):flatbuffers.Offset {
  const offset = builder.endObject();
  return offset;
}

static createUnidentifiedGroup(builder:flatbuffers.Builder, x:number, y:number):flatbuffers.Offset {
  UnidentifiedGroup.startUnidentifiedGroup(builder);
  UnidentifiedGroup.addX(builder, x);
  UnidentifiedGroup.addY(builder, y);
  return UnidentifiedGroup.endUnidentifiedGroup(builder);
}

unpack(): UnidentifiedGroupT {
  return new UnidentifiedGroupT(
    this.x(),
    this.y()
  );
}


unpackTo(_o: UnidentifiedGroupT): void {
  _o.x = this.x();
  _o.y = this.y();
}
}

export class UnidentifiedGroupT implements flatbuffers.IGeneratedObject {
constructor(
  public x: number = 0.0,
  public y: number = 0.0
){}


pack(builder:flatbuffers.Builder): flatbuffers.Offset {
  return UnidentifiedGroup.createUnidentifiedGroup(builder,
    this.x,
    this.y
  );
}
}
