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

package report

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

type ShipClass struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func ShipClassStart(builder *flatbuffers.Builder) {
	builder.StartObject(7)
}
func ShipClassAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func ShipClassAddDrive(builder *flatbuffers.Builder, drive float32) {
	builder.PrependFloat32Slot(1, drive, 0.0)
}
func ShipClassAddArmament(builder *flatbuffers.Builder, armament uint64) {
	builder.PrependUint64Slot(2, armament, 0)
}
func ShipClassAddWeapons(builder *flatbuffers.Builder, weapons float32) {
	builder.PrependFloat32Slot(3, weapons, 0.0)
}
func ShipClassAddShields(builder *flatbuffers.Builder, shields float32) {
	builder.PrependFloat32Slot(4, shields, 0.0)
}
func ShipClassAddCargo(builder *flatbuffers.Builder, cargo float32) {
	builder.PrependFloat32Slot(5, cargo, 0.0)
}
func ShipClassAddMass(builder *flatbuffers.Builder, mass float32) {
	builder.PrependFloat32Slot(6, mass, 0.0)
}
func ShipClassEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
