# automatically generated by the FlatBuffers compiler, do not modify

# namespace: MNN

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

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

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

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

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

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

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

def GatherV2Start(builder): builder.StartObject(3)
def Start(builder):
    return GatherV2Start(builder)
def GatherV2AddTaxis(builder, taxis): builder.PrependInt32Slot(0, taxis, 0)
def AddTaxis(builder, taxis):
    return GatherV2AddTaxis(builder, taxis)
def GatherV2AddTindices(builder, tindices): builder.PrependInt32Slot(1, tindices, 0)
def AddTindices(builder, tindices):
    return GatherV2AddTindices(builder, tindices)
def GatherV2AddTparams(builder, tparams): builder.PrependInt32Slot(2, tparams, 0)
def AddTparams(builder, tparams):
    return GatherV2AddTparams(builder, tparams)
def GatherV2End(builder): return builder.EndObject()
def End(builder):
    return GatherV2End(builder)