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

package order

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

type CommandPlanetRouteRemove struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

func (rcv *CommandPlanetRouteRemove) Origin() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *CommandPlanetRouteRemove) MutateOrigin(n int64) bool {
	return rcv._tab.MutateInt64Slot(4, n)
}

func (rcv *CommandPlanetRouteRemove) LoadType() PlanetRouteLoadType {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return PlanetRouteLoadType(rcv._tab.GetInt8(o + rcv._tab.Pos))
	}
	return 0
}

func (rcv *CommandPlanetRouteRemove) MutateLoadType(n PlanetRouteLoadType) bool {
	return rcv._tab.MutateInt8Slot(6, int8(n))
}

func CommandPlanetRouteRemoveStart(builder *flatbuffers.Builder) {
	builder.StartObject(2)
}
func CommandPlanetRouteRemoveAddOrigin(builder *flatbuffers.Builder, origin int64) {
	builder.PrependInt64Slot(0, origin, 0)
}
func CommandPlanetRouteRemoveAddLoadType(builder *flatbuffers.Builder, loadType PlanetRouteLoadType) {
	builder.PrependInt8Slot(1, int8(loadType), 0)
}
func CommandPlanetRouteRemoveEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
