# 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

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

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

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

def ObjectDetailsStart(builder):
    builder.StartObject(10)

def Start(builder):
    ObjectDetailsStart(builder)

def ObjectDetailsAddName(builder, name):
    builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)

def AddName(builder, name):
    ObjectDetailsAddName(builder, name)

def ObjectDetailsAddProperties(builder, properties):
    builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(properties), 0)

def AddProperties(builder, properties):
    ObjectDetailsAddProperties(builder, properties)

def ObjectDetailsAddHandle(builder, handle):
    builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(handle), 0)

def AddHandle(builder, handle):
    ObjectDetailsAddHandle(builder, handle)

def ObjectDetailsAddNumRows(builder, numRows):
    builder.PrependUint64Slot(3, numRows, 0)

def AddNumRows(builder, numRows):
    ObjectDetailsAddNumRows(builder, numRows)

def ObjectDetailsAddSizeInBytes(builder, sizeInBytes):
    builder.PrependUint64Slot(4, sizeInBytes, 0)

def AddSizeInBytes(builder, sizeInBytes):
    ObjectDetailsAddSizeInBytes(builder, sizeInBytes)

def ObjectDetailsAddNumPartitions(builder, numPartitions):
    builder.PrependUint64Slot(5, numPartitions, 0)

def AddNumPartitions(builder, numPartitions):
    ObjectDetailsAddNumPartitions(builder, numPartitions)

def ObjectDetailsAddSortingKeyEnabled(builder, sortingKeyEnabled):
    builder.PrependBoolSlot(6, sortingKeyEnabled, 0)

def AddSortingKeyEnabled(builder, sortingKeyEnabled):
    ObjectDetailsAddSortingKeyEnabled(builder, sortingKeyEnabled)

def ObjectDetailsAddSortingScore(builder, sortingScore):
    builder.PrependInt64Slot(7, sortingScore, 0)

def AddSortingScore(builder, sortingScore):
    ObjectDetailsAddSortingScore(builder, sortingScore)

def ObjectDetailsAddWriteAmplification(builder, writeAmplification):
    builder.PrependInt64Slot(8, writeAmplification, 0)

def AddWriteAmplification(builder, writeAmplification):
    ObjectDetailsAddWriteAmplification(builder, writeAmplification)

def ObjectDetailsAddAcummulativeRowInseritionCount(builder, acummulativeRowInseritionCount):
    builder.PrependInt64Slot(9, acummulativeRowInseritionCount, 0)

def AddAcummulativeRowInseritionCount(builder, acummulativeRowInseritionCount):
    ObjectDetailsAddAcummulativeRowInseritionCount(builder, acummulativeRowInseritionCount)

def ObjectDetailsEnd(builder):
    return builder.EndObject()

def End(builder):
    return ObjectDetailsEnd(builder)
