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

package report

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

type LocalFleet struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

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

func (rcv *LocalFleet) Groups() uint64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetUint64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *LocalFleet) MutateGroups(n uint64) bool {
	return rcv._tab.MutateUint64Slot(6, n)
}

func (rcv *LocalFleet) Destination() uint64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetUint64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *LocalFleet) MutateDestination(n uint64) bool {
	return rcv._tab.MutateUint64Slot(8, n)
}

func (rcv *LocalFleet) Origin() *uint64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		v := rcv._tab.GetUint64(o + rcv._tab.Pos)
		return &v
	}
	return nil
}

func (rcv *LocalFleet) MutateOrigin(n uint64) bool {
	return rcv._tab.MutateUint64Slot(10, n)
}

func (rcv *LocalFleet) Range() *float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		v := rcv._tab.GetFloat32(o + rcv._tab.Pos)
		return &v
	}
	return nil
}

func (rcv *LocalFleet) MutateRange(n float32) bool {
	return rcv._tab.MutateFloat32Slot(12, n)
}

func (rcv *LocalFleet) Speed() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *LocalFleet) MutateSpeed(n float32) bool {
	return rcv._tab.MutateFloat32Slot(14, n)
}

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

func LocalFleetStart(builder *flatbuffers.Builder) {
	builder.StartObject(7)
}
func LocalFleetAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func LocalFleetAddGroups(builder *flatbuffers.Builder, groups uint64) {
	builder.PrependUint64Slot(1, groups, 0)
}
func LocalFleetAddDestination(builder *flatbuffers.Builder, destination uint64) {
	builder.PrependUint64Slot(2, destination, 0)
}
func LocalFleetAddOrigin(builder *flatbuffers.Builder, origin uint64) {
	builder.PrependUint64(origin)
	builder.Slot(3)
}
func LocalFleetAddRange(builder *flatbuffers.Builder, range_ float32) {
	builder.PrependFloat32(range_)
	builder.Slot(4)
}
func LocalFleetAddSpeed(builder *flatbuffers.Builder, speed float32) {
	builder.PrependFloat32Slot(5, speed, 0.0)
}
func LocalFleetAddState(builder *flatbuffers.Builder, state flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(6, flatbuffers.UOffsetT(state), 0)
}
func LocalFleetEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
