# automatically generated by the FlatBuffers compiler, do not modify

# namespace: 

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

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

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

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

    # Pipeline
    def Uuid(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

    # Pipeline
    def UuidAsNumpy(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

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

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

    # Pipeline
    def Name(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

    # Pipeline
    def NStage(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

    # Pipeline
    def Version(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

    # Pipeline
    def Created(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

    # Pipeline
    def Meta(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        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

    # Pipeline
    def MetaAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o)
        return 0

    # Pipeline
    def MetaLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # Pipeline
    def MetaIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        return o == 0

def PipelineStart(builder): builder.StartObject(6)
def Start(builder):
    return PipelineStart(builder)
def PipelineAddUuid(builder, uuid): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(uuid), 0)
def AddUuid(builder, uuid):
    return PipelineAddUuid(builder, uuid)
def PipelineStartUuidVector(builder, numElems): return builder.StartVector(1, numElems, 1)
def StartUuidVector(builder, numElems):
    return PipelineStartUuidVector(builder, numElems)
def PipelineAddName(builder, name): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
def AddName(builder, name):
    return PipelineAddName(builder, name)
def PipelineAddNStage(builder, nStage): builder.PrependUint64Slot(2, nStage, 0)
def AddNStage(builder, nStage):
    return PipelineAddNStage(builder, nStage)
def PipelineAddVersion(builder, version): builder.PrependUint64Slot(3, version, 0)
def AddVersion(builder, version):
    return PipelineAddVersion(builder, version)
def PipelineAddCreated(builder, created): builder.PrependUint64Slot(4, created, 0)
def AddCreated(builder, created):
    return PipelineAddCreated(builder, created)
def PipelineAddMeta(builder, meta): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(meta), 0)
def AddMeta(builder, meta):
    return PipelineAddMeta(builder, meta)
def PipelineStartMetaVector(builder, numElems): return builder.StartVector(1, numElems, 1)
def StartMetaVector(builder, numElems):
    return PipelineStartMetaVector(builder, numElems)
def PipelineEnd(builder): return builder.EndObject()
def End(builder):
    return PipelineEnd(builder)