// Code generated by the FlatBuffers compiler. DO NOT EDIT.

package order

import (
	flatbuffers "github.com/google/flatbuffers/go"
)

type CommandShipClassCreate struct {
	_tab flatbuffers.Table
}

func GetRootAsCommandShipClassCreate(buf []byte, offset flatbuffers.UOffsetT) *CommandShipClassCreate {
	n := flatbuffers.GetUOffsetT(buf[offset:])
	x := &CommandShipClassCreate{}
	x.Init(buf, n+offset)
	return x
}

func FinishCommandShipClassCreateBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.Finish(offset)
}

func GetSizePrefixedRootAsCommandShipClassCreate(buf []byte, offset flatbuffers.UOffsetT) *CommandShipClassCreate {
	n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
	x := &CommandShipClassCreate{}
	x.Init(buf, n+offset+flatbuffers.SizeUint32)
	return x
}

func FinishSizePrefixedCommandShipClassCreateBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.FinishSizePrefixed(offset)
}

func (rcv *CommandShipClassCreate) Init(buf []byte, i flatbuffers.UOffsetT) {
	rcv._tab.Bytes = buf
	rcv._tab.Pos = i
}

func (rcv *CommandShipClassCreate) Table() flatbuffers.Table {
	return rcv._tab
}

func (rcv *CommandShipClassCreate) Name() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *CommandShipClassCreate) Drive() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *CommandShipClassCreate) MutateDrive(n float64) bool {
	return rcv._tab.MutateFloat64Slot(6, n)
}

func (rcv *CommandShipClassCreate) Armament() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *CommandShipClassCreate) MutateArmament(n int64) bool {
	return rcv._tab.MutateInt64Slot(8, n)
}

func (rcv *CommandShipClassCreate) Weapons() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *CommandShipClassCreate) MutateWeapons(n float64) bool {
	return rcv._tab.MutateFloat64Slot(10, n)
}

func (rcv *CommandShipClassCreate) Shields() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *CommandShipClassCreate) MutateShields(n float64) bool {
	return rcv._tab.MutateFloat64Slot(12, n)
}

func (rcv *CommandShipClassCreate) Cargo() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *CommandShipClassCreate) MutateCargo(n float64) bool {
	return rcv._tab.MutateFloat64Slot(14, n)
}

func CommandShipClassCreateStart(builder *flatbuffers.Builder) {
	builder.StartObject(6)
}
func CommandShipClassCreateAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func CommandShipClassCreateAddDrive(builder *flatbuffers.Builder, drive float64) {
	builder.PrependFloat64Slot(1, drive, 0.0)
}
func CommandShipClassCreateAddArmament(builder *flatbuffers.Builder, armament int64) {
	builder.PrependInt64Slot(2, armament, 0)
}
func CommandShipClassCreateAddWeapons(builder *flatbuffers.Builder, weapons float64) {
	builder.PrependFloat64Slot(3, weapons, 0.0)
}
func CommandShipClassCreateAddShields(builder *flatbuffers.Builder, shields float64) {
	builder.PrependFloat64Slot(4, shields, 0.0)
}
func CommandShipClassCreateAddCargo(builder *flatbuffers.Builder, cargo float64) {
	builder.PrependFloat64Slot(5, cargo, 0.0)
}
func CommandShipClassCreateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
