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

package order

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

type UserGamesOrderGetResponse struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

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

func (rcv *UserGamesOrderGetResponse) MutateFound(n bool) bool {
	return rcv._tab.MutateBoolSlot(4, n)
}

func (rcv *UserGamesOrderGetResponse) Order(obj *UserGamesOrder) *UserGamesOrder {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		x := rcv._tab.Indirect(o + rcv._tab.Pos)
		if obj == nil {
			obj = new(UserGamesOrder)
		}
		obj.Init(rcv._tab.Bytes, x)
		return obj
	}
	return nil
}

func UserGamesOrderGetResponseStart(builder *flatbuffers.Builder) {
	builder.StartObject(2)
}
func UserGamesOrderGetResponseAddFound(builder *flatbuffers.Builder, found bool) {
	builder.PrependBoolSlot(0, found, false)
}
func UserGamesOrderGetResponseAddOrder(builder *flatbuffers.Builder, order flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(order), 0)
}
func UserGamesOrderGetResponseEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
