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

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

static getSizePrefixedRootAsUnidentifiedPlanet(bb:flatbuffers.ByteBuffer, obj?:UnidentifiedPlanet):UnidentifiedPlanet {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (obj || new UnidentifiedPlanet()).__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;
}

number():bigint {
  const offset = this.bb!.__offset(this.bb_pos, 8);
  return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
}

static startUnidentifiedPlanet(builder:flatbuffers.Builder) {
  builder.startObject(3);
}

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 addNumber(builder:flatbuffers.Builder, number:bigint) {
  builder.addFieldInt64(2, number, BigInt('0'));
}

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

static createUnidentifiedPlanet(builder:flatbuffers.Builder, x:number, y:number, number:bigint):flatbuffers.Offset {
  UnidentifiedPlanet.startUnidentifiedPlanet(builder);
  UnidentifiedPlanet.addX(builder, x);
  UnidentifiedPlanet.addY(builder, y);
  UnidentifiedPlanet.addNumber(builder, number);
  return UnidentifiedPlanet.endUnidentifiedPlanet(builder);
}

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


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

export class UnidentifiedPlanetT implements flatbuffers.IGeneratedObject {
constructor(
  public x: number = 0.0,
  public y: number = 0.0,
  public number: bigint = BigInt('0')
){}


pack(builder:flatbuffers.Builder): flatbuffers.Offset {
  return UnidentifiedPlanet.createUnidentifiedPlanet(builder,
    this.x,
    this.y,
    this.number
  );
}
}
