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

package dataprotocol

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

type RLEStringValues struct {
	_tab flatbuffers.Table
}

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

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

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

func (rcv *RLEStringValues) Array(j int) []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		a := rcv._tab.Vector(o)
		return rcv._tab.ByteVector(a + flatbuffers.UOffsetT(j*4))
	}
	return nil
}

func (rcv *RLEStringValues) ArrayLength() int {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.VectorLen(o)
	}
	return 0
}

func (rcv *RLEStringValues) IndexMapping(j int) int32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		a := rcv._tab.Vector(o)
		return rcv._tab.GetInt32(a + flatbuffers.UOffsetT(j*4))
	}
	return 0
}

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

func (rcv *RLEStringValues) MutateIndexMapping(j int, n int32) bool {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		a := rcv._tab.Vector(o)
		return rcv._tab.MutateInt32(a+flatbuffers.UOffsetT(j*4), n)
	}
	return false
}

func RLEStringValuesStart(builder *flatbuffers.Builder) {
	builder.StartObject(2)
}
func RLEStringValuesAddArray(builder *flatbuffers.Builder, array flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(array), 0)
}
func RLEStringValuesStartArrayVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
	return builder.StartVector(4, numElems, 4)
}
func RLEStringValuesAddIndexMapping(builder *flatbuffers.Builder, indexMapping flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(indexMapping), 0)
}
func RLEStringValuesStartIndexMappingVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
	return builder.StartVector(4, numElems, 4)
}
func RLEStringValuesEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
