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

package report

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

type OthersShipClass struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

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

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

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

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

func (rcv *OthersShipClass) Armament() uint64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetUint64(o + rcv._tab.Pos)
	}
	return 0
}

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

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

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

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

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

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

func (rcv *OthersShipClass) MutateCargo(n float32) bool {
	return rcv._tab.MutateFloat32Slot(16, n)
}

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

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

func OthersShipClassStart(builder *flatbuffers.Builder) {
	builder.StartObject(8)
}
func OthersShipClassAddRace(builder *flatbuffers.Builder, race flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(race), 0)
}
func OthersShipClassAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(name), 0)
}
func OthersShipClassAddDrive(builder *flatbuffers.Builder, drive float32) {
	builder.PrependFloat32Slot(2, drive, 0.0)
}
func OthersShipClassAddArmament(builder *flatbuffers.Builder, armament uint64) {
	builder.PrependUint64Slot(3, armament, 0)
}
func OthersShipClassAddWeapons(builder *flatbuffers.Builder, weapons float32) {
	builder.PrependFloat32Slot(4, weapons, 0.0)
}
func OthersShipClassAddShields(builder *flatbuffers.Builder, shields float32) {
	builder.PrependFloat32Slot(5, shields, 0.0)
}
func OthersShipClassAddCargo(builder *flatbuffers.Builder, cargo float32) {
	builder.PrependFloat32Slot(6, cargo, 0.0)
}
func OthersShipClassAddMass(builder *flatbuffers.Builder, mass float32) {
	builder.PrependFloat32Slot(7, mass, 0.0)
}
func OthersShipClassEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
