# automatically generated by the FlatBuffers compiler, do not modify

# namespace: graph

import flatbuffers

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

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

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

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

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

def LongPairStart(builder): builder.StartObject(2)
def LongPairAddFirst(builder, first): builder.PrependInt64Slot(0, first, 0)
def LongPairAddSecond(builder, second): builder.PrependInt64Slot(1, second, 0)
def LongPairEnd(builder): return builder.EndObject()
