# automatically generated by the FlatBuffers compiler, do not modify

# namespace: tabular

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

# used by `ListSchemas` and `ListTables` API
class ObjectDetails(object):
    __slots__ = ['_tab']

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

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

    # ObjectDetails
    def Name(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # ObjectDetails
    def Properties(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # ObjectDetails
    def Handle(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

    # ObjectDetails
    def NumRows(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
        return 0

    # ObjectDetails
    def SizeInBytes(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
        return 0

    # ObjectDetails
    def NumPartitions(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
        return 0

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

def Start(builder): builder.StartObject(7)
def ObjectDetailsStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
def ObjectDetailsAddName(builder, name):
    """This method is deprecated. Please switch to AddName."""
    return AddName(builder, name)
def AddProperties(builder, properties): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(properties), 0)
def ObjectDetailsAddProperties(builder, properties):
    """This method is deprecated. Please switch to AddProperties."""
    return AddProperties(builder, properties)
def AddHandle(builder, handle): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(handle), 0)
def ObjectDetailsAddHandle(builder, handle):
    """This method is deprecated. Please switch to AddHandle."""
    return AddHandle(builder, handle)
def AddNumRows(builder, numRows): builder.PrependUint64Slot(3, numRows, 0)
def ObjectDetailsAddNumRows(builder, numRows):
    """This method is deprecated. Please switch to AddNumRows."""
    return AddNumRows(builder, numRows)
def AddSizeInBytes(builder, sizeInBytes): builder.PrependUint64Slot(4, sizeInBytes, 0)
def ObjectDetailsAddSizeInBytes(builder, sizeInBytes):
    """This method is deprecated. Please switch to AddSizeInBytes."""
    return AddSizeInBytes(builder, sizeInBytes)
def AddNumPartitions(builder, numPartitions): builder.PrependUint64Slot(5, numPartitions, 0)
def ObjectDetailsAddNumPartitions(builder, numPartitions):
    """This method is deprecated. Please switch to AddNumPartitions."""
    return AddNumPartitions(builder, numPartitions)
def AddSortingKeyEnabled(builder, sortingKeyEnabled): builder.PrependBoolSlot(6, sortingKeyEnabled, 0)
def ObjectDetailsAddSortingKeyEnabled(builder, sortingKeyEnabled):
    """This method is deprecated. Please switch to AddSortingKeyEnabled."""
    return AddSortingKeyEnabled(builder, sortingKeyEnabled)
def End(builder): return builder.EndObject()
def ObjectDetailsEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)