# automatically generated by the FlatBuffers compiler, do not modify

# namespace: metrics

import flatbuffers

class MetricSearchResultList(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAsMetricSearchResultList(cls, buf, offset):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = MetricSearchResultList()
        x.Init(buf, n + offset)
        return x

    # MetricSearchResultList
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # MetricSearchResultList
    def Results(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            x = self._tab.Vector(o)
            x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
            x = self._tab.Indirect(x)
            from .MetricSearchResult import MetricSearchResult
            obj = MetricSearchResult()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # MetricSearchResultList
    def ResultsLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

def MetricSearchResultListStart(builder): builder.StartObject(1)
def MetricSearchResultListAddResults(builder, results): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(results), 0)
def MetricSearchResultListStartResultsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def MetricSearchResultListEnd(builder): return builder.EndObject()

# automatically generated by the FlatBuffers compiler, do not modify

# namespace: metrics

import flatbuffers

class MetricSearchResultList(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAsMetricSearchResultList(cls, buf, offset):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = MetricSearchResultList()
        x.Init(buf, n + offset)
        return x

    # MetricSearchResultList
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # MetricSearchResultList
    def Results(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            x = self._tab.Vector(o)
            x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
            x = self._tab.Indirect(x)
            from .MetricSearchResult import MetricSearchResult
            obj = MetricSearchResult()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # MetricSearchResultList
    def ResultsLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

def MetricSearchResultListStart(builder): builder.StartObject(1)
def MetricSearchResultListAddResults(builder, results): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(results), 0)
def MetricSearchResultListStartResultsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def MetricSearchResultListEnd(builder): return builder.EndObject()

# automatically generated by the FlatBuffers compiler, do not modify # namespace: metrics # MetricSearchResultList # MetricSearchResultList # MetricSearchResultList