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

package battle

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

type BattleReportGroup struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

func (rcv *BattleReportGroup) InBattle() bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.GetBool(o + rcv._tab.Pos)
	}
	return false
}

func (rcv *BattleReportGroup) MutateInBattle(n bool) bool {
	return rcv._tab.MutateBoolSlot(4, n)
}

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

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

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

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

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

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

func (rcv *BattleReportGroup) Tech(obj *TechEntry, j int) bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	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 *BattleReportGroup) TechLength() int {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		return rcv._tab.VectorLen(o)
	}
	return 0
}

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

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

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

func BattleReportGroupStart(builder *flatbuffers.Builder) {
	builder.StartObject(8)
}
func BattleReportGroupAddInBattle(builder *flatbuffers.Builder, inBattle bool) {
	builder.PrependBoolSlot(0, inBattle, false)
}
func BattleReportGroupAddNumber(builder *flatbuffers.Builder, number uint64) {
	builder.PrependUint64Slot(1, number, 0)
}
func BattleReportGroupAddNumberLeft(builder *flatbuffers.Builder, numberLeft uint64) {
	builder.PrependUint64Slot(2, numberLeft, 0)
}
func BattleReportGroupAddLoadQuantity(builder *flatbuffers.Builder, loadQuantity float32) {
	builder.PrependFloat32Slot(3, loadQuantity, 0.0)
}
func BattleReportGroupAddTech(builder *flatbuffers.Builder, tech flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(tech), 0)
}
func BattleReportGroupStartTechVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
	return builder.StartVector(4, numElems, 4)
}
func BattleReportGroupAddRace(builder *flatbuffers.Builder, race flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(race), 0)
}
func BattleReportGroupAddClassName(builder *flatbuffers.Builder, className flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(6, flatbuffers.UOffsetT(className), 0)
}
func BattleReportGroupAddLoadType(builder *flatbuffers.Builder, loadType flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(7, flatbuffers.UOffsetT(loadType), 0)
}
func BattleReportGroupEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
