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

package report

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

type IncomingGroup struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

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

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

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

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

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

func (rcv *IncomingGroup) MutateDistance(n float32) bool {
	return rcv._tab.MutateFloat32Slot(8, n)
}

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

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

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

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

func IncomingGroupStart(builder *flatbuffers.Builder) {
	builder.StartObject(5)
}
func IncomingGroupAddOrigin(builder *flatbuffers.Builder, origin uint64) {
	builder.PrependUint64Slot(0, origin, 0)
}
func IncomingGroupAddDestination(builder *flatbuffers.Builder, destination uint64) {
	builder.PrependUint64Slot(1, destination, 0)
}
func IncomingGroupAddDistance(builder *flatbuffers.Builder, distance float32) {
	builder.PrependFloat32Slot(2, distance, 0.0)
}
func IncomingGroupAddSpeed(builder *flatbuffers.Builder, speed float32) {
	builder.PrependFloat32Slot(3, speed, 0.0)
}
func IncomingGroupAddMass(builder *flatbuffers.Builder, mass float32) {
	builder.PrependFloat32Slot(4, mass, 0.0)
}
func IncomingGroupEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
