# automatically generated by the FlatBuffers compiler, do not modify

# namespace: fbs

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

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

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

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

    # Internal
    def DeepestLevReached(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
        return 0

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

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

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

    # Internal
    def KillerName(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # Internal
    def Xwaitforspace(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

    # Internal
    def StairsDown(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

def InternalStart(builder): builder.StartObject(5)
def InternalAddDeepestLevReached(builder, deepestLevReached): builder.PrependInt8Slot(0, deepestLevReached, 0)
def InternalAddCallStack(builder, callStack): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(callStack), 0)
def InternalStartCallStackVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def InternalAddKillerName(builder, killerName): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(killerName), 0)
def InternalAddXwaitforspace(builder, xwaitforspace): builder.PrependBoolSlot(3, xwaitforspace, 0)
def InternalAddStairsDown(builder, stairsDown): builder.PrependBoolSlot(4, stairsDown, 0)
def InternalEnd(builder): return builder.EndObject()
