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

package fbsemantic

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

type WrappedExpression struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

func WrappedExpressionStart(builder *flatbuffers.Builder) {
	builder.StartObject(2)
}
func WrappedExpressionAddExpressionType(builder *flatbuffers.Builder, expressionType byte) {
	builder.PrependByteSlot(0, expressionType, 0)
}
func WrappedExpressionAddExpression(builder *flatbuffers.Builder, expression flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(expression), 0)
}
func WrappedExpressionEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
