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

package fbsemantic

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

type WrappedStatement struct {
	_tab flatbuffers.Table
}

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

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

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

func (rcv *WrappedStatement) StatementType() byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.GetByte(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *WrappedStatement) MutateStatementType(n byte) bool {
	return rcv._tab.MutateByteSlot(4, n)
}

func (rcv *WrappedStatement) Statement(obj *flatbuffers.Table) bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		rcv._tab.Union(obj, o)
		return true
	}
	return false
}

func WrappedStatementStart(builder *flatbuffers.Builder) {
	builder.StartObject(2)
}
func WrappedStatementAddStatementType(builder *flatbuffers.Builder, statementType byte) {
	builder.PrependByteSlot(0, statementType, 0)
}
func WrappedStatementAddStatement(builder *flatbuffers.Builder, statement flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(statement), 0)
}
func WrappedStatementEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
