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

package gamma_api

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

type RangeFilter struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

func (rcv *RangeFilter) LowerValue(j int) byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		a := rcv._tab.Vector(o)
		return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1))
	}
	return 0
}

func (rcv *RangeFilter) LowerValueLength() int {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.VectorLen(o)
	}
	return 0
}

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

func (rcv *RangeFilter) MutateLowerValue(j int, n byte) bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		a := rcv._tab.Vector(o)
		return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n)
	}
	return false
}

func (rcv *RangeFilter) UpperValue(j int) byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		a := rcv._tab.Vector(o)
		return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1))
	}
	return 0
}

func (rcv *RangeFilter) UpperValueLength() int {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.VectorLen(o)
	}
	return 0
}

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

func (rcv *RangeFilter) MutateUpperValue(j int, n byte) bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		a := rcv._tab.Vector(o)
		return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n)
	}
	return false
}

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

func (rcv *RangeFilter) MutateIncludeLower(n bool) bool {
	return rcv._tab.MutateBoolSlot(10, n)
}

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

func (rcv *RangeFilter) MutateIncludeUpper(n bool) bool {
	return rcv._tab.MutateBoolSlot(12, n)
}

func RangeFilterStart(builder *flatbuffers.Builder) {
	builder.StartObject(5)
}
func RangeFilterAddField(builder *flatbuffers.Builder, field flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(field), 0)
}
func RangeFilterAddLowerValue(builder *flatbuffers.Builder, lowerValue flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(lowerValue), 0)
}
func RangeFilterStartLowerValueVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
	return builder.StartVector(1, numElems, 1)
}
func RangeFilterAddUpperValue(builder *flatbuffers.Builder, upperValue flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(upperValue), 0)
}
func RangeFilterStartUpperValueVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
	return builder.StartVector(1, numElems, 1)
}
func RangeFilterAddIncludeLower(builder *flatbuffers.Builder, includeLower bool) {
	builder.PrependBoolSlot(3, includeLower, false)
}
func RangeFilterAddIncludeUpper(builder *flatbuffers.Builder, includeUpper bool) {
	builder.PrependBoolSlot(4, includeUpper, false)
}
func RangeFilterEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
