# automatically generated by the FlatBuffers compiler, do not modify

# namespace: flatbuf

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

# Zero-based range of elements in an array
class ArraySlice(object):
    __slots__ = ['_tab']

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

    @classmethod
    def GetRootAsArraySlice(cls, buf, offset=0):
        """This method is deprecated. Please switch to GetRootAs."""
        return cls.GetRootAs(buf, offset)
    # ArraySlice
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # The start of an array slice, inclusive
    # ArraySlice
    def StartInclusive(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
        return 0

    # The end of an array slice, exclusive
    # ArraySlice
    def EndExclusive(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
        return 0

def Start(builder): builder.StartObject(2)
def ArraySliceStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddStartInclusive(builder, startInclusive): builder.PrependUint32Slot(0, startInclusive, 0)
def ArraySliceAddStartInclusive(builder, startInclusive):
    """This method is deprecated. Please switch to AddStartInclusive."""
    return AddStartInclusive(builder, startInclusive)
def AddEndExclusive(builder, endExclusive): builder.PrependUint32Slot(1, endExclusive, 0)
def ArraySliceAddEndExclusive(builder, endExclusive):
    """This method is deprecated. Please switch to AddEndExclusive."""
    return AddEndExclusive(builder, endExclusive)
def End(builder): return builder.EndObject()
def ArraySliceEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)