# automatically generated by the FlatBuffers compiler, do not modify

# namespace: MNN

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

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

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

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

    # PoolingSuperAcmeQuantizedParam
    def Needscale(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return True

    # PoolingSuperAcmeQuantizedParam
    def InputOffset(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

    # PoolingSuperAcmeQuantizedParam
    def OutputOffset(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

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

    # PoolingSuperAcmeQuantizedParam
    def OutputShift(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

def PoolingSuperAcmeQuantizedParamStart(builder): builder.StartObject(5)
def Start(builder):
    return PoolingSuperAcmeQuantizedParamStart(builder)
def PoolingSuperAcmeQuantizedParamAddNeedscale(builder, needscale): builder.PrependBoolSlot(0, needscale, 1)
def AddNeedscale(builder, needscale):
    return PoolingSuperAcmeQuantizedParamAddNeedscale(builder, needscale)
def PoolingSuperAcmeQuantizedParamAddInputOffset(builder, inputOffset): builder.PrependInt32Slot(1, inputOffset, 0)
def AddInputOffset(builder, inputOffset):
    return PoolingSuperAcmeQuantizedParamAddInputOffset(builder, inputOffset)
def PoolingSuperAcmeQuantizedParamAddOutputOffset(builder, outputOffset): builder.PrependInt32Slot(2, outputOffset, 0)
def AddOutputOffset(builder, outputOffset):
    return PoolingSuperAcmeQuantizedParamAddOutputOffset(builder, outputOffset)
def PoolingSuperAcmeQuantizedParamAddOutputMultiplier(builder, outputMultiplier): builder.PrependInt32Slot(3, outputMultiplier, 0)
def AddOutputMultiplier(builder, outputMultiplier):
    return PoolingSuperAcmeQuantizedParamAddOutputMultiplier(builder, outputMultiplier)
def PoolingSuperAcmeQuantizedParamAddOutputShift(builder, outputShift): builder.PrependInt32Slot(4, outputShift, 0)
def AddOutputShift(builder, outputShift):
    return PoolingSuperAcmeQuantizedParamAddOutputShift(builder, outputShift)
def PoolingSuperAcmeQuantizedParamEnd(builder): return builder.EndObject()
def End(builder):
    return PoolingSuperAcmeQuantizedParamEnd(builder)