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

package order

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

type CommandShipGroupUnload struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

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

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

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

func CommandShipGroupUnloadStart(builder *flatbuffers.Builder) {
	builder.StartObject(2)
}
func CommandShipGroupUnloadAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(id), 0)
}
func CommandShipGroupUnloadAddQuantity(builder *flatbuffers.Builder, quantity float64) {
	builder.PrependFloat64Slot(1, quantity, 0.0)
}
func CommandShipGroupUnloadEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
