# automatically generated by the FlatBuffers compiler, do not modify

# namespace: MNN

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

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

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

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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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

    # QuantizedAvgPool
    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 QuantizedAvgPoolStart(builder): builder.StartObject(11)
def Start(builder):
    return QuantizedAvgPoolStart(builder)
def QuantizedAvgPoolAddKernelX(builder, kernelX): builder.PrependInt32Slot(0, kernelX, 0)
def AddKernelX(builder, kernelX):
    return QuantizedAvgPoolAddKernelX(builder, kernelX)
def QuantizedAvgPoolAddKernelY(builder, kernelY): builder.PrependInt32Slot(1, kernelY, 0)
def AddKernelY(builder, kernelY):
    return QuantizedAvgPoolAddKernelY(builder, kernelY)
def QuantizedAvgPoolAddModelFormat(builder, modelFormat): builder.PrependInt8Slot(2, modelFormat, 0)
def AddModelFormat(builder, modelFormat):
    return QuantizedAvgPoolAddModelFormat(builder, modelFormat)
def QuantizedAvgPoolAddOutputActivationMax(builder, outputActivationMax): builder.PrependInt32Slot(3, outputActivationMax, 0)
def AddOutputActivationMax(builder, outputActivationMax):
    return QuantizedAvgPoolAddOutputActivationMax(builder, outputActivationMax)
def QuantizedAvgPoolAddOutputActivationMin(builder, outputActivationMin): builder.PrependInt32Slot(4, outputActivationMin, 0)
def AddOutputActivationMin(builder, outputActivationMin):
    return QuantizedAvgPoolAddOutputActivationMin(builder, outputActivationMin)
def QuantizedAvgPoolAddPadType(builder, padType): builder.PrependInt8Slot(5, padType, 0)
def AddPadType(builder, padType):
    return QuantizedAvgPoolAddPadType(builder, padType)
def QuantizedAvgPoolAddPadX(builder, padX): builder.PrependInt32Slot(6, padX, 0)
def AddPadX(builder, padX):
    return QuantizedAvgPoolAddPadX(builder, padX)
def QuantizedAvgPoolAddPadY(builder, padY): builder.PrependInt32Slot(7, padY, 0)
def AddPadY(builder, padY):
    return QuantizedAvgPoolAddPadY(builder, padY)
def QuantizedAvgPoolAddStrideX(builder, strideX): builder.PrependInt32Slot(8, strideX, 0)
def AddStrideX(builder, strideX):
    return QuantizedAvgPoolAddStrideX(builder, strideX)
def QuantizedAvgPoolAddStrideY(builder, strideY): builder.PrependInt32Slot(9, strideY, 0)
def AddStrideY(builder, strideY):
    return QuantizedAvgPoolAddStrideY(builder, strideY)
def QuantizedAvgPoolAddType(builder, type): builder.PrependInt32Slot(10, type, 0)
def AddType(builder, type):
    return QuantizedAvgPoolAddType(builder, type)
def QuantizedAvgPoolEnd(builder): return builder.EndObject()
def End(builder):
    return QuantizedAvgPoolEnd(builder)