# automatically generated by the FlatBuffers compiler, do not modify

# namespace: API

import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()

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

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

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

    # ListVisibleDataResponse
    def Uris(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return ""

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

    # ListVisibleDataResponse
    def UrisIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        return o == 0

    # ListVisibleDataResponse
    def Ids(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            x = self._tab.Vector(o)
            x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 32
            from SEAScope.API.RenderableId import RenderableId
            obj = RenderableId()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # ListVisibleDataResponse
    def IdsLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # ListVisibleDataResponse
    def IdsIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        return o == 0

def ListVisibleDataResponseStart(builder): builder.StartObject(2)
def ListVisibleDataResponseAddUris(builder, uris): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(uris), 0)
def ListVisibleDataResponseStartUrisVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def ListVisibleDataResponseAddIds(builder, ids): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(ids), 0)
def ListVisibleDataResponseStartIdsVector(builder, numElems): return builder.StartVector(32, numElems, 8)
def ListVisibleDataResponseEnd(builder): return builder.EndObject()
