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

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

static getSizePrefixedRootAsCommandShipClassRemove(bb:flatbuffers.ByteBuffer, obj?:CommandShipClassRemove):CommandShipClassRemove {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (obj || new CommandShipClassRemove()).__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 startCommandShipClassRemove(builder:flatbuffers.Builder) {
  builder.startObject(1);
}

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

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

static createCommandShipClassRemove(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset):flatbuffers.Offset {
  CommandShipClassRemove.startCommandShipClassRemove(builder);
  CommandShipClassRemove.addName(builder, nameOffset);
  return CommandShipClassRemove.endCommandShipClassRemove(builder);
}

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


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

export class CommandShipClassRemoveT 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 CommandShipClassRemove.createCommandShipClassRemove(builder,
    name
  );
}
}
