# automatically generated by the FlatBuffers compiler, do not modify

# namespace: 

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

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

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

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

    # LinkLog
    def SourceUuid(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
        return 0

    # LinkLog
    def SourceUuidAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o)
        return 0

    # LinkLog
    def SourceUuidLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # LinkLog
    def SourceUuidIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        return o == 0

    # LinkLog
    def PipelineUuid(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
        return 0

    # LinkLog
    def PipelineUuidAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o)
        return 0

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

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

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

    # LinkLog
    def Fetch(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

    # LinkLog
    def Decode(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

    # LinkLog
    def Infer(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

    # LinkLog
    def Encode(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

    # LinkLog
    def Reply(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

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

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

def LinkLogStart(builder): builder.StartObject(10)
def Start(builder):
    return LinkLogStart(builder)
def LinkLogAddSourceUuid(builder, sourceUuid): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(sourceUuid), 0)
def AddSourceUuid(builder, sourceUuid):
    return LinkLogAddSourceUuid(builder, sourceUuid)
def LinkLogStartSourceUuidVector(builder, numElems): return builder.StartVector(1, numElems, 1)
def StartSourceUuidVector(builder, numElems):
    return LinkLogStartSourceUuidVector(builder, numElems)
def LinkLogAddPipelineUuid(builder, pipelineUuid): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(pipelineUuid), 0)
def AddPipelineUuid(builder, pipelineUuid):
    return LinkLogAddPipelineUuid(builder, pipelineUuid)
def LinkLogStartPipelineUuidVector(builder, numElems): return builder.StartVector(1, numElems, 1)
def StartPipelineUuidVector(builder, numElems):
    return LinkLogStartPipelineUuidVector(builder, numElems)
def LinkLogAddCount(builder, count): builder.PrependUint64Slot(2, count, 0)
def AddCount(builder, count):
    return LinkLogAddCount(builder, count)
def LinkLogAddFetch(builder, fetch): builder.PrependFloat64Slot(3, fetch, 0.0)
def AddFetch(builder, fetch):
    return LinkLogAddFetch(builder, fetch)
def LinkLogAddDecode(builder, decode): builder.PrependFloat64Slot(4, decode, 0.0)
def AddDecode(builder, decode):
    return LinkLogAddDecode(builder, decode)
def LinkLogAddInfer(builder, infer): builder.PrependFloat64Slot(5, infer, 0.0)
def AddInfer(builder, infer):
    return LinkLogAddInfer(builder, infer)
def LinkLogAddEncode(builder, encode): builder.PrependFloat64Slot(6, encode, 0.0)
def AddEncode(builder, encode):
    return LinkLogAddEncode(builder, encode)
def LinkLogAddReply(builder, reply): builder.PrependFloat64Slot(7, reply, 0.0)
def AddReply(builder, reply):
    return LinkLogAddReply(builder, reply)
def LinkLogAddReqSize(builder, reqSize): builder.PrependUint64Slot(8, reqSize, 0)
def AddReqSize(builder, reqSize):
    return LinkLogAddReqSize(builder, reqSize)
def LinkLogAddRepSize(builder, repSize): builder.PrependUint64Slot(9, repSize, 0)
def AddRepSize(builder, repSize):
    return LinkLogAddRepSize(builder, repSize)
def LinkLogEnd(builder): return builder.EndObject()
def End(builder):
    return LinkLogEnd(builder)