# automatically generated by the FlatBuffers compiler, do not modify

# namespace: Dl

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

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

    @classmethod
    def SizeOf(cls):
        return 8

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

    # AttributeI
    def I(self): return self._tab.Get(flatbuffers.number_types.Int64Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0))

def CreateAttributeI(builder, i):
    builder.Prep(8, 8)
    builder.PrependInt64(i)
    return builder.Offset()


class AttributeIT(object):

    # AttributeIT
    def __init__(self):
        self.i = 0  # type: int

    @classmethod
    def InitFromBuf(cls, buf, pos):
        attributeI = AttributeI()
        attributeI.Init(buf, pos)
        return cls.InitFromObj(attributeI)

    @classmethod
    def InitFromPackedBuf(cls, buf, pos=0):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos)
        return cls.InitFromBuf(buf, pos+n)

    @classmethod
    def InitFromObj(cls, attributeI):
        x = AttributeIT()
        x._UnPack(attributeI)
        return x

    # AttributeIT
    def _UnPack(self, attributeI):
        if attributeI is None:
            return
        self.i = attributeI.I()

    # AttributeIT
    def Pack(self, builder):
        return CreateAttributeI(builder, self.i)
