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

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

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

name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
  const offset = this.bb!.__offset(this.bb_pos, 4);
  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}

static startCommandScienceRemove(builder:flatbuffers.Builder) {
  builder.startObject(1);
}

static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
  builder.addFieldOffset(0, nameOffset, 0);
}

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

static createCommandScienceRemove(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset):flatbuffers.Offset {
  CommandScienceRemove.startCommandScienceRemove(builder);
  CommandScienceRemove.addName(builder, nameOffset);
  return CommandScienceRemove.endCommandScienceRemove(builder);
}

unpack(): CommandScienceRemoveT {
  return new CommandScienceRemoveT(
    this.name()
  );
}


unpackTo(_o: CommandScienceRemoveT): void {
  _o.name = this.name();
}
}

export class CommandScienceRemoveT implements flatbuffers.IGeneratedObject {
constructor(
  public name: string|Uint8Array|null = null
){}


pack(builder:flatbuffers.Builder): flatbuffers.Offset {
  const name = (this.name !== null ? builder.createString(this.name!) : 0);

  return CommandScienceRemove.createCommandScienceRemove(builder,
    name
  );
}
}
