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

package report

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

	common "galaxy/schema/fbs/common"
)

type LocalGroup struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

func (rcv *LocalGroup) Number() uint64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.GetUint64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *LocalGroup) MutateNumber(n uint64) bool {
	return rcv._tab.MutateUint64Slot(4, n)
}

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

func (rcv *LocalGroup) Tech(obj *TechEntry, j int) bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		x := rcv._tab.Vector(o)
		x += flatbuffers.UOffsetT(j) * 4
		x = rcv._tab.Indirect(x)
		obj.Init(rcv._tab.Bytes, x)
		return true
	}
	return false
}

func (rcv *LocalGroup) TechLength() int {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.VectorLen(o)
	}
	return 0
}

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

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

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

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

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

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

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

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

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

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

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

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

func (rcv *LocalGroup) MutateMass(n float32) bool {
	return rcv._tab.MutateFloat32Slot(22, n)
}

func (rcv *LocalGroup) Id(obj *common.UUID) *common.UUID {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(24))
	if o != 0 {
		x := o + rcv._tab.Pos
		if obj == nil {
			obj = new(common.UUID)
		}
		obj.Init(rcv._tab.Bytes, x)
		return obj
	}
	return nil
}

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

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

func LocalGroupStart(builder *flatbuffers.Builder) {
	builder.StartObject(13)
}
func LocalGroupAddNumber(builder *flatbuffers.Builder, number uint64) {
	builder.PrependUint64Slot(0, number, 0)
}
func LocalGroupAddClass(builder *flatbuffers.Builder, class flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(class), 0)
}
func LocalGroupAddTech(builder *flatbuffers.Builder, tech flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(tech), 0)
}
func LocalGroupStartTechVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
	return builder.StartVector(4, numElems, 4)
}
func LocalGroupAddCargo(builder *flatbuffers.Builder, cargo flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(cargo), 0)
}
func LocalGroupAddLoad(builder *flatbuffers.Builder, load float32) {
	builder.PrependFloat32Slot(4, load, 0.0)
}
func LocalGroupAddDestination(builder *flatbuffers.Builder, destination uint64) {
	builder.PrependUint64Slot(5, destination, 0)
}
func LocalGroupAddOrigin(builder *flatbuffers.Builder, origin uint64) {
	builder.PrependUint64(origin)
	builder.Slot(6)
}
func LocalGroupAddRange(builder *flatbuffers.Builder, range_ float32) {
	builder.PrependFloat32(range_)
	builder.Slot(7)
}
func LocalGroupAddSpeed(builder *flatbuffers.Builder, speed float32) {
	builder.PrependFloat32Slot(8, speed, 0.0)
}
func LocalGroupAddMass(builder *flatbuffers.Builder, mass float32) {
	builder.PrependFloat32Slot(9, mass, 0.0)
}
func LocalGroupAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT) {
	builder.PrependStructSlot(10, flatbuffers.UOffsetT(id), 0)
}
func LocalGroupAddState(builder *flatbuffers.Builder, state flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(11, flatbuffers.UOffsetT(state), 0)
}
func LocalGroupAddFleet(builder *flatbuffers.Builder, fleet flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(12, flatbuffers.UOffsetT(fleet), 0)
}
func LocalGroupEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
