# automatically generated by the FlatBuffers compiler, do not modify

# namespace: MNN

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

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

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

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

    # QuantizedMaxPool
    def KernelX(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

    # QuantizedMaxPool
    def KernelY(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

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

    # QuantizedMaxPool
    def OutputActivationMax(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

    # QuantizedMaxPool
    def OutputActivationMin(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

    # QuantizedMaxPool
    def PadType(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
        return 0

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

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

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

    # QuantizedMaxPool
    def StrideY(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

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

def QuantizedMaxPoolStart(builder): builder.StartObject(11)
def Start(builder):
    return QuantizedMaxPoolStart(builder)
def QuantizedMaxPoolAddKernelX(builder, kernelX): builder.PrependInt32Slot(0, kernelX, 0)
def AddKernelX(builder, kernelX):
    return QuantizedMaxPoolAddKernelX(builder, kernelX)
def QuantizedMaxPoolAddKernelY(builder, kernelY): builder.PrependInt32Slot(1, kernelY, 0)
def AddKernelY(builder, kernelY):
    return QuantizedMaxPoolAddKernelY(builder, kernelY)
def QuantizedMaxPoolAddModelFormat(builder, modelFormat): builder.PrependInt8Slot(2, modelFormat, 0)
def AddModelFormat(builder, modelFormat):
    return QuantizedMaxPoolAddModelFormat(builder, modelFormat)
def QuantizedMaxPoolAddOutputActivationMax(builder, outputActivationMax): builder.PrependInt32Slot(3, outputActivationMax, 0)
def AddOutputActivationMax(builder, outputActivationMax):
    return QuantizedMaxPoolAddOutputActivationMax(builder, outputActivationMax)
def QuantizedMaxPoolAddOutputActivationMin(builder, outputActivationMin): builder.PrependInt32Slot(4, outputActivationMin, 0)
def AddOutputActivationMin(builder, outputActivationMin):
    return QuantizedMaxPoolAddOutputActivationMin(builder, outputActivationMin)
def QuantizedMaxPoolAddPadType(builder, padType): builder.PrependInt8Slot(5, padType, 0)
def AddPadType(builder, padType):
    return QuantizedMaxPoolAddPadType(builder, padType)
def QuantizedMaxPoolAddPadX(builder, padX): builder.PrependInt32Slot(6, padX, 0)
def AddPadX(builder, padX):
    return QuantizedMaxPoolAddPadX(builder, padX)
def QuantizedMaxPoolAddPadY(builder, padY): builder.PrependInt32Slot(7, padY, 0)
def AddPadY(builder, padY):
    return QuantizedMaxPoolAddPadY(builder, padY)
def QuantizedMaxPoolAddStrideX(builder, strideX): builder.PrependInt32Slot(8, strideX, 0)
def AddStrideX(builder, strideX):
    return QuantizedMaxPoolAddStrideX(builder, strideX)
def QuantizedMaxPoolAddStrideY(builder, strideY): builder.PrependInt32Slot(9, strideY, 0)
def AddStrideY(builder, strideY):
    return QuantizedMaxPoolAddStrideY(builder, strideY)
def QuantizedMaxPoolAddType(builder, type): builder.PrependInt32Slot(10, type, 0)
def AddType(builder, type):
    return QuantizedMaxPoolAddType(builder, type)
def QuantizedMaxPoolEnd(builder): return builder.EndObject()
def End(builder):
    return QuantizedMaxPoolEnd(builder)