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

package flatbuffers

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

type FlatBufferA struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

func (rcv *FlatBufferA) BirthDay() int64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetInt64(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *FlatBufferA) MutateBirthDay(n int64) bool {
	return rcv._tab.MutateInt64Slot(6, n)
}

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

func (rcv *FlatBufferA) Siblings() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *FlatBufferA) MutateSiblings(n int32) bool {
	return rcv._tab.MutateInt32Slot(10, n)
}

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

func (rcv *FlatBufferA) MutateSpouse(n bool) bool {
	return rcv._tab.MutateBoolSlot(12, n)
}

func (rcv *FlatBufferA) Money() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *FlatBufferA) MutateMoney(n float64) bool {
	return rcv._tab.MutateFloat64Slot(14, n)
}

func FlatBufferAStart(builder *flatbuffers.Builder) {
	builder.StartObject(6)
}
func FlatBufferAAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func FlatBufferAAddBirthDay(builder *flatbuffers.Builder, birthDay int64) {
	builder.PrependInt64Slot(1, birthDay, 0)
}
func FlatBufferAAddPhone(builder *flatbuffers.Builder, phone flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(phone), 0)
}
func FlatBufferAAddSiblings(builder *flatbuffers.Builder, siblings int32) {
	builder.PrependInt32Slot(3, siblings, 0)
}
func FlatBufferAAddSpouse(builder *flatbuffers.Builder, spouse bool) {
	builder.PrependBoolSlot(4, spouse, false)
}
func FlatBufferAAddMoney(builder *flatbuffers.Builder, money float64) {
	builder.PrependFloat64Slot(5, money, 0.0)
}
func FlatBufferAEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
