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

package scrabblefb

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

type SeatView struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

func (rcv *SeatView) Seat() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *SeatView) MutateSeat(n int32) bool {
	return rcv._tab.MutateInt32Slot(4, n)
}

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

func (rcv *SeatView) Score() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *SeatView) MutateScore(n int32) bool {
	return rcv._tab.MutateInt32Slot(8, n)
}

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

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

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

func (rcv *SeatView) MutateIsWinner(n bool) bool {
	return rcv._tab.MutateBoolSlot(12, n)
}

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

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

func (rcv *SeatView) MutateDeleted(n bool) bool {
	return rcv._tab.MutateBoolSlot(16, n)
}

func SeatViewStart(builder *flatbuffers.Builder) {
	builder.StartObject(7)
}
func SeatViewAddSeat(builder *flatbuffers.Builder, seat int32) {
	builder.PrependInt32Slot(0, seat, 0)
}
func SeatViewAddAccountId(builder *flatbuffers.Builder, accountId flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(accountId), 0)
}
func SeatViewAddScore(builder *flatbuffers.Builder, score int32) {
	builder.PrependInt32Slot(2, score, 0)
}
func SeatViewAddHintsUsed(builder *flatbuffers.Builder, hintsUsed int32) {
	builder.PrependInt32Slot(3, hintsUsed, 0)
}
func SeatViewAddIsWinner(builder *flatbuffers.Builder, isWinner bool) {
	builder.PrependBoolSlot(4, isWinner, false)
}
func SeatViewAddDisplayName(builder *flatbuffers.Builder, displayName flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(displayName), 0)
}
func SeatViewAddDeleted(builder *flatbuffers.Builder, deleted bool) {
	builder.PrependBoolSlot(6, deleted, false)
}
func SeatViewEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
