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

package gamma_api

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

type VectorQuery struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

func (rcv *VectorQuery) Value(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 *VectorQuery) ValueLength() int {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.VectorLen(o)
	}
	return 0
}

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

func (rcv *VectorQuery) MutateValue(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 *VectorQuery) MinScore() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *VectorQuery) MutateMinScore(n float64) bool {
	return rcv._tab.MutateFloat64Slot(8, n)
}

func (rcv *VectorQuery) MaxScore() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *VectorQuery) MutateMaxScore(n float64) bool {
	return rcv._tab.MutateFloat64Slot(10, n)
}

func (rcv *VectorQuery) Boost() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *VectorQuery) MutateBoost(n float64) bool {
	return rcv._tab.MutateFloat64Slot(12, n)
}

func (rcv *VectorQuery) HasBoost() int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
	if o != 0 {
		return rcv._tab.GetInt32(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *VectorQuery) MutateHasBoost(n int32) bool {
	return rcv._tab.MutateInt32Slot(14, n)
}

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

func VectorQueryStart(builder *flatbuffers.Builder) {
	builder.StartObject(7)
}
func VectorQueryAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func VectorQueryAddValue(builder *flatbuffers.Builder, value flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(value), 0)
}
func VectorQueryStartValueVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
	return builder.StartVector(1, numElems, 1)
}
func VectorQueryAddMinScore(builder *flatbuffers.Builder, minScore float64) {
	builder.PrependFloat64Slot(2, minScore, 0.0)
}
func VectorQueryAddMaxScore(builder *flatbuffers.Builder, maxScore float64) {
	builder.PrependFloat64Slot(3, maxScore, 0.0)
}
func VectorQueryAddBoost(builder *flatbuffers.Builder, boost float64) {
	builder.PrependFloat64Slot(4, boost, 0.0)
}
func VectorQueryAddHasBoost(builder *flatbuffers.Builder, hasBoost int32) {
	builder.PrependInt32Slot(5, hasBoost, 0)
}
func VectorQueryAddRetrievalType(builder *flatbuffers.Builder, retrievalType flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(6, flatbuffers.UOffsetT(retrievalType), 0)
}
func VectorQueryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
