# automatically generated by the FlatBuffers compiler, do not modify

# namespace: spacy

import flatbuffers

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

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

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

    # DEPSpacyResponse
    def Lang(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

    # DEPSpacyResponse
    def Relation(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

    # DEPSpacyResponse
    def Source(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

    # DEPSpacyResponse
    def SourcePos(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

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

    # DEPSpacyResponse
    def SourceTag(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # DEPSpacyResponse
    def SourceBase(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # DEPSpacyResponse
    def Target(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # DEPSpacyResponse
    def TargetPos(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

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

    # DEPSpacyResponse
    def TargetTag(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # DEPSpacyResponse
    def TargetBase(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

def DEPSpacyResponseStart(builder): builder.StartObject(12)
def DEPSpacyResponseAddLang(builder, lang): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(lang), 0)
def DEPSpacyResponseAddRelation(builder, relation): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(relation), 0)
def DEPSpacyResponseAddSource(builder, source): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(source), 0)
def DEPSpacyResponseAddSourcePos(builder, sourcePos): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(sourcePos), 0)
def DEPSpacyResponseAddSourceIndex(builder, sourceIndex): builder.PrependInt32Slot(4, sourceIndex, 0)
def DEPSpacyResponseAddSourceTag(builder, sourceTag): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(sourceTag), 0)
def DEPSpacyResponseAddSourceBase(builder, sourceBase): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(sourceBase), 0)
def DEPSpacyResponseAddTarget(builder, target): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(target), 0)
def DEPSpacyResponseAddTargetPos(builder, targetPos): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(targetPos), 0)
def DEPSpacyResponseAddTargetIndex(builder, targetIndex): builder.PrependInt32Slot(9, targetIndex, 0)
def DEPSpacyResponseAddTargetTag(builder, targetTag): builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(targetTag), 0)
def DEPSpacyResponseAddTargetBase(builder, targetBase): builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(targetBase), 0)
def DEPSpacyResponseEnd(builder): return builder.EndObject()
