    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- The class of an enumeration type holds information about its
    -- possible values.

    #if !defined(__HADDOCK_VERSION__)
    #define ENABLE_OVERLOADING
    #endif

    module GI.GObject.Structs.EnumClass
        (

    -- * Exported types
        EnumClass(..)                           ,
        newZeroEnumClass                        ,

     -- * Methods

    #if defined(ENABLE_OVERLOADING)
        ResolveEnumClassMethod                  ,
    #endif

     -- * Properties

    -- ** gTypeClass #attr:gTypeClass#
    -- | the parent class

    #if defined(ENABLE_OVERLOADING)
        enumClass_gTypeClass                    ,
    #endif
        getEnumClassGTypeClass                  ,

    -- ** maximum #attr:maximum#
    -- | the largest possible value.

    #if defined(ENABLE_OVERLOADING)
        enumClass_maximum                       ,
    #endif
        getEnumClassMaximum                     ,
        setEnumClassMaximum                     ,

    -- ** minimum #attr:minimum#
    -- | the smallest possible value.

    #if defined(ENABLE_OVERLOADING)
        enumClass_minimum                       ,
    #endif
        getEnumClassMinimum                     ,
        setEnumClassMinimum                     ,

    -- ** nValues #attr:nValues#
    -- | the number of possible values.

    #if defined(ENABLE_OVERLOADING)
        enumClass_nValues                       ,
    #endif
        getEnumClassNValues                     ,
        setEnumClassNValues                     ,

        ) where

    import Data.GI.Base.ShortPrelude
    import qualified Data.GI.Base.ShortPrelude as SP
    import qualified Data.GI.Base.Overloading as O
    import qualified Prelude as P

    import qualified Data.GI.Base.Attributes as GI.Attributes
    import qualified Data.GI.Base.BasicTypes as B.Types
    import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
    import qualified Data.GI.Base.GArray as B.GArray
    import qualified Data.GI.Base.GClosure as B.GClosure
    import qualified Data.GI.Base.GError as B.GError
    import qualified Data.GI.Base.GHashTable as B.GHT
    import qualified Data.GI.Base.GVariant as B.GVariant
    import qualified Data.GI.Base.GValue as B.GValue
    import qualified Data.GI.Base.GParamSpec as B.GParamSpec
    import qualified Data.GI.Base.CallStack as B.CallStack
    import qualified Data.GI.Base.Properties as B.Properties
    import qualified Data.GI.Base.Signals as B.Signals
    import qualified Control.Monad.IO.Class as MIO
    import qualified Data.Coerce as Coerce
    import qualified Data.Text as T
    import qualified Data.Kind as DK
    import qualified Data.ByteString.Char8 as B
    import qualified Data.Map as Map
    import qualified Foreign.Ptr as FP
    import qualified GHC.OverloadedLabels as OL
    import qualified GHC.Records as R
    import qualified Data.Word as DW
    import qualified Data.Int as DI
    import qualified System.Posix.Types as SPT
    import qualified Foreign.C.Types as FCT

    -- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
    #if MIN_VERSION_base(4,18,0)
    import {-# SOURCE #-} qualified GI.GObject.Structs.TypeClass as GObject.TypeClass

    #else
    import {-# SOURCE #-} qualified GI.GObject.Structs.TypeClass as GObject.TypeClass

    #endif

    -- | Memory-managed wrapper type.
    newtype EnumClass = EnumClass (SP.ManagedPtr EnumClass)
        deriving (EnumClass -> EnumClass -> Bool
    (EnumClass -> EnumClass -> Bool)
    -> (EnumClass -> EnumClass -> Bool) -> Eq EnumClass
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: EnumClass -> EnumClass -> Bool
    == :: EnumClass -> EnumClass -> Bool
    $c/= :: EnumClass -> EnumClass -> Bool
    /= :: EnumClass -> EnumClass -> Bool
    Eq)

    instance SP.ManagedPtrNewtype EnumClass where
        toManagedPtr :: EnumClass -> ManagedPtr EnumClass
    toManagedPtr (EnumClass ManagedPtr EnumClass
    p) = ManagedPtr EnumClass
    p

    instance BoxedPtr EnumClass where
        boxedPtrCopy :: EnumClass -> IO EnumClass
    boxedPtrCopy = \EnumClass
    p -> EnumClass -> (Ptr EnumClass -> IO EnumClass) -> IO EnumClass
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr EnumClass
    p (Int -> Ptr EnumClass -> IO (Ptr EnumClass)
    forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
    copyBytes Int
    32 (Ptr EnumClass -> IO (Ptr EnumClass))
    -> (Ptr EnumClass -> IO EnumClass) -> Ptr EnumClass -> IO EnumClass
    forall (m :: * -> *) a b c.
    Monad m =>
    (a -> m b) -> (b -> m c) -> a -> m c
    >=> (ManagedPtr EnumClass -> EnumClass)
    -> Ptr EnumClass -> IO EnumClass
    forall a.
    (HasCallStack, BoxedPtr a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    B.ManagedPtr.wrapPtr ManagedPtr EnumClass -> EnumClass
    EnumClass)
        boxedPtrFree :: EnumClass -> IO ()
    boxedPtrFree = \EnumClass
    x -> EnumClass -> (Ptr EnumClass -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    SP.withManagedPtr EnumClass
    x Ptr EnumClass -> IO ()
    forall a. Ptr a -> IO ()
    SP.freeMem
    instance CallocPtr EnumClass where
        boxedPtrCalloc :: IO (Ptr EnumClass)
    boxedPtrCalloc = Int -> IO (Ptr EnumClass)
    forall a. Int -> IO (Ptr a)
    callocBytes Int
    32

    -- | Construct a t'EnumClass' struct initialized to zero.
    newZeroEnumClass :: MonadIO m => m EnumClass
    newZeroEnumClass :: forall (m :: * -> *). MonadIO m => m EnumClass
    newZeroEnumClass = IO EnumClass -> m EnumClass
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO EnumClass -> m EnumClass) -> IO EnumClass -> m EnumClass
    forall a b. (a -> b) -> a -> b
    $ IO (Ptr EnumClass)
    forall a. CallocPtr a => IO (Ptr a)
    boxedPtrCalloc IO (Ptr EnumClass)
    -> (Ptr EnumClass -> IO EnumClass) -> IO EnumClass
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (ManagedPtr EnumClass -> EnumClass)
    -> Ptr EnumClass -> IO EnumClass
    forall a.
    (HasCallStack, BoxedPtr a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    wrapPtr ManagedPtr EnumClass -> EnumClass
    EnumClass

    instance tag ~ 'AttrSet => Constructible EnumClass tag where
        new :: forall (m :: * -> *).
    MonadIO m =>
    (ManagedPtr EnumClass -> EnumClass)
    -> [AttrOp EnumClass tag] -> m EnumClass
    new ManagedPtr EnumClass -> EnumClass
    _ [AttrOp EnumClass tag]
    attrs = do
            o <- m EnumClass
    forall (m :: * -> *). MonadIO m => m EnumClass
    newZeroEnumClass
            GI.Attributes.set o attrs
            return o

    -- | Get the value of the “@g_type_class@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' enumClass #gTypeClass
    -- @
    getEnumClassGTypeClass :: MonadIO m => EnumClass -> m GObject.TypeClass.TypeClass
    getEnumClassGTypeClass :: forall (m :: * -> *). MonadIO m => EnumClass -> m TypeClass
    getEnumClassGTypeClass EnumClass
    s = IO TypeClass -> m TypeClass
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO TypeClass -> m TypeClass) -> IO TypeClass -> m TypeClass
    forall a b. (a -> b) -> a -> b
    $ EnumClass -> (Ptr EnumClass -> IO TypeClass) -> IO TypeClass
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr EnumClass
    s ((Ptr EnumClass -> IO TypeClass) -> IO TypeClass)
    -> (Ptr EnumClass -> IO TypeClass) -> IO TypeClass
    forall a b. (a -> b) -> a -> b
    $ \Ptr EnumClass
    ptr -> do
        let val :: Ptr TypeClass
    val = Ptr EnumClass
    ptr Ptr EnumClass -> Int -> Ptr TypeClass
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    0 :: (Ptr GObject.TypeClass.TypeClass)
        val' <- ((ManagedPtr TypeClass -> TypeClass)
    -> Ptr TypeClass -> IO TypeClass
    forall a.
    (HasCallStack, BoxedPtr a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    newPtr ManagedPtr TypeClass -> TypeClass
    GObject.TypeClass.TypeClass) Ptr TypeClass
    val
        return val'

    #if defined(ENABLE_OVERLOADING)
    data EnumClassGTypeClassFieldInfo
    instance AttrInfo EnumClassGTypeClassFieldInfo where
        type AttrBaseTypeConstraint EnumClassGTypeClassFieldInfo = (~) EnumClass
        type AttrAllowedOps EnumClassGTypeClassFieldInfo = '[ 'AttrGet]
        type AttrSetTypeConstraint EnumClassGTypeClassFieldInfo = (~) (Ptr GObject.TypeClass.TypeClass)
        type AttrTransferTypeConstraint EnumClassGTypeClassFieldInfo = (~)(Ptr GObject.TypeClass.TypeClass)
        type AttrTransferType EnumClassGTypeClassFieldInfo = (Ptr GObject.TypeClass.TypeClass)
        type AttrGetType EnumClassGTypeClassFieldInfo = GObject.TypeClass.TypeClass
        type AttrLabel EnumClassGTypeClassFieldInfo = "g_type_class"
        type AttrOrigin EnumClassGTypeClassFieldInfo = EnumClass
        attrGet = getEnumClassGTypeClass
        attrSet = undefined
        attrConstruct = undefined
        attrClear = undefined
        attrTransfer = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.GObject.Structs.EnumClass.gTypeClass"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gobject-2.0.31/docs/GI-GObject-Structs-EnumClass.html#g:attr:gTypeClass"
            })

    enumClass_gTypeClass :: AttrLabelProxy "gTypeClass"
    enumClass_gTypeClass = AttrLabelProxy

    #endif

    -- | Get the value of the “@minimum@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' enumClass #minimum
    -- @
    getEnumClassMinimum :: MonadIO m => EnumClass -> m Int32
    getEnumClassMinimum :: forall (m :: * -> *). MonadIO m => EnumClass -> m Int32
    getEnumClassMinimum EnumClass
    s = IO Int32 -> m Int32
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
    forall a b. (a -> b) -> a -> b
    $ EnumClass -> (Ptr EnumClass -> IO Int32) -> IO Int32
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr EnumClass
    s ((Ptr EnumClass -> IO Int32) -> IO Int32)
    -> (Ptr EnumClass -> IO Int32) -> IO Int32
    forall a b. (a -> b) -> a -> b
    $ \Ptr EnumClass
    ptr -> do
        val <- Ptr Int32 -> IO Int32
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr EnumClass
    ptr Ptr EnumClass -> Int -> Ptr Int32
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    8) :: IO Int32
        return val

    -- | Set the value of the “@minimum@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' enumClass [ #minimum 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setEnumClassMinimum :: MonadIO m => EnumClass -> Int32 -> m ()
    setEnumClassMinimum :: forall (m :: * -> *). MonadIO m => EnumClass -> Int32 -> m ()
    setEnumClassMinimum EnumClass
    s Int32
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ EnumClass -> (Ptr EnumClass -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr EnumClass
    s ((Ptr EnumClass -> IO ()) -> IO ())
    -> (Ptr EnumClass -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr EnumClass
    ptr -> do
        Ptr Int32 -> Int32 -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr EnumClass
    ptr Ptr EnumClass -> Int -> Ptr Int32
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    8) (Int32
    val :: Int32)

    #if defined(ENABLE_OVERLOADING)
    data EnumClassMinimumFieldInfo
    instance AttrInfo EnumClassMinimumFieldInfo where
        type AttrBaseTypeConstraint EnumClassMinimumFieldInfo = (~) EnumClass
        type AttrAllowedOps EnumClassMinimumFieldInfo = '[ 'AttrSet, 'AttrGet]
        type AttrSetTypeConstraint EnumClassMinimumFieldInfo = (~) Int32
        type AttrTransferTypeConstraint EnumClassMinimumFieldInfo = (~)Int32
        type AttrTransferType EnumClassMinimumFieldInfo = Int32
        type AttrGetType EnumClassMinimumFieldInfo = Int32
        type AttrLabel EnumClassMinimumFieldInfo = "minimum"
        type AttrOrigin EnumClassMinimumFieldInfo = EnumClass
        attrGet = getEnumClassMinimum
        attrSet = setEnumClassMinimum
        attrConstruct = undefined
        attrClear = undefined
        attrTransfer _ v = do
            return v
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.GObject.Structs.EnumClass.minimum"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gobject-2.0.31/docs/GI-GObject-Structs-EnumClass.html#g:attr:minimum"
            })

    enumClass_minimum :: AttrLabelProxy "minimum"
    enumClass_minimum = AttrLabelProxy

    #endif

    -- | Get the value of the “@maximum@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' enumClass #maximum
    -- @
    getEnumClassMaximum :: MonadIO m => EnumClass -> m Int32
    getEnumClassMaximum :: forall (m :: * -> *). MonadIO m => EnumClass -> m Int32
    getEnumClassMaximum EnumClass
    s = IO Int32 -> m Int32
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
    forall a b. (a -> b) -> a -> b
    $ EnumClass -> (Ptr EnumClass -> IO Int32) -> IO Int32
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr EnumClass
    s ((Ptr EnumClass -> IO Int32) -> IO Int32)
    -> (Ptr EnumClass -> IO Int32) -> IO Int32
    forall a b. (a -> b) -> a -> b
    $ \Ptr EnumClass
    ptr -> do
        val <- Ptr Int32 -> IO Int32
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr EnumClass
    ptr Ptr EnumClass -> Int -> Ptr Int32
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    12) :: IO Int32
        return val

    -- | Set the value of the “@maximum@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' enumClass [ #maximum 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setEnumClassMaximum :: MonadIO m => EnumClass -> Int32 -> m ()
    setEnumClassMaximum :: forall (m :: * -> *). MonadIO m => EnumClass -> Int32 -> m ()
    setEnumClassMaximum EnumClass
    s Int32
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ EnumClass -> (Ptr EnumClass -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr EnumClass
    s ((Ptr EnumClass -> IO ()) -> IO ())
    -> (Ptr EnumClass -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr EnumClass
    ptr -> do
        Ptr Int32 -> Int32 -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr EnumClass
    ptr Ptr EnumClass -> Int -> Ptr Int32
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    12) (Int32
    val :: Int32)

    #if defined(ENABLE_OVERLOADING)
    data EnumClassMaximumFieldInfo
    instance AttrInfo EnumClassMaximumFieldInfo where
        type AttrBaseTypeConstraint EnumClassMaximumFieldInfo = (~) EnumClass
        type AttrAllowedOps EnumClassMaximumFieldInfo = '[ 'AttrSet, 'AttrGet]
        type AttrSetTypeConstraint EnumClassMaximumFieldInfo = (~) Int32
        type AttrTransferTypeConstraint EnumClassMaximumFieldInfo = (~)Int32
        type AttrTransferType EnumClassMaximumFieldInfo = Int32
        type AttrGetType EnumClassMaximumFieldInfo = Int32
        type AttrLabel EnumClassMaximumFieldInfo = "maximum"
        type AttrOrigin EnumClassMaximumFieldInfo = EnumClass
        attrGet = getEnumClassMaximum
        attrSet = setEnumClassMaximum
        attrConstruct = undefined
        attrClear = undefined
        attrTransfer _ v = do
            return v
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.GObject.Structs.EnumClass.maximum"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gobject-2.0.31/docs/GI-GObject-Structs-EnumClass.html#g:attr:maximum"
            })

    enumClass_maximum :: AttrLabelProxy "maximum"
    enumClass_maximum = AttrLabelProxy

    #endif

    -- | Get the value of the “@n_values@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' enumClass #nValues
    -- @
    getEnumClassNValues :: MonadIO m => EnumClass -> m Word32
    getEnumClassNValues :: forall (m :: * -> *). MonadIO m => EnumClass -> m Word32
    getEnumClassNValues EnumClass
    s = IO Word32 -> m Word32
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
    forall a b. (a -> b) -> a -> b
    $ EnumClass -> (Ptr EnumClass -> IO Word32) -> IO Word32
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr EnumClass
    s ((Ptr EnumClass -> IO Word32) -> IO Word32)
    -> (Ptr EnumClass -> IO Word32) -> IO Word32
    forall a b. (a -> b) -> a -> b
    $ \Ptr EnumClass
    ptr -> do
        val <- Ptr Word32 -> IO Word32
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr EnumClass
    ptr Ptr EnumClass -> Int -> Ptr Word32
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    16) :: IO Word32
        return val

    -- | Set the value of the “@n_values@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' enumClass [ #nValues 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setEnumClassNValues :: MonadIO m => EnumClass -> Word32 -> m ()
    setEnumClassNValues :: forall (m :: * -> *). MonadIO m => EnumClass -> Word32 -> m ()
    setEnumClassNValues EnumClass
    s Word32
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ EnumClass -> (Ptr EnumClass -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr EnumClass
    s ((Ptr EnumClass -> IO ()) -> IO ())
    -> (Ptr EnumClass -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr EnumClass
    ptr -> do
        Ptr Word32 -> Word32 -> IO ()
    forall a. Storable a => Ptr a -> a -> IO ()
    poke (Ptr EnumClass
    ptr Ptr EnumClass -> Int -> Ptr Word32
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    16) (Word32
    val :: Word32)

    #if defined(ENABLE_OVERLOADING)
    data EnumClassNValuesFieldInfo
    instance AttrInfo EnumClassNValuesFieldInfo where
        type AttrBaseTypeConstraint EnumClassNValuesFieldInfo = (~) EnumClass
        type AttrAllowedOps EnumClassNValuesFieldInfo = '[ 'AttrSet, 'AttrGet]
        type AttrSetTypeConstraint EnumClassNValuesFieldInfo = (~) Word32
        type AttrTransferTypeConstraint EnumClassNValuesFieldInfo = (~)Word32
        type AttrTransferType EnumClassNValuesFieldInfo = Word32
        type AttrGetType EnumClassNValuesFieldInfo = Word32
        type AttrLabel EnumClassNValuesFieldInfo = "n_values"
        type AttrOrigin EnumClassNValuesFieldInfo = EnumClass
        attrGet = getEnumClassNValues
        attrSet = setEnumClassNValues
        attrConstruct = undefined
        attrClear = undefined
        attrTransfer _ v = do
            return v
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.GObject.Structs.EnumClass.nValues"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gobject-2.0.31/docs/GI-GObject-Structs-EnumClass.html#g:attr:nValues"
            })

    enumClass_nValues :: AttrLabelProxy "nValues"
    enumClass_nValues = AttrLabelProxy

    #endif

    -- XXX Skipped attribute for "EnumClass:values"
    -- Not implemented: Don't know how to unpack C array of type TCArray False (-1) 3 (TInterface (Name {namespace = "GObject", name = "EnumValue"}))

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList EnumClass
    type instance O.AttributeList EnumClass = EnumClassAttributeList
    type EnumClassAttributeList = ('[ '("gTypeClass", EnumClassGTypeClassFieldInfo), '("minimum", EnumClassMinimumFieldInfo), '("maximum", EnumClassMaximumFieldInfo), '("nValues", EnumClassNValuesFieldInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    type family ResolveEnumClassMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveEnumClassMethod l o = O.MethodResolutionFailed l o

    instance (info ~ ResolveEnumClassMethod t EnumClass, O.OverloadedMethod info EnumClass p) => OL.IsLabel t (EnumClass -> p) where
    #if MIN_VERSION_base(4,10,0)
        fromLabel = O.overloadedMethod @info
    #else
        fromLabel _ = O.overloadedMethod @info
    #endif

    #if MIN_VERSION_base(4,13,0)
    instance (info ~ ResolveEnumClassMethod t EnumClass, O.OverloadedMethod info EnumClass p, R.HasField t EnumClass p) => R.HasField t EnumClass p where
        getField = O.overloadedMethod @info

    #endif

    instance (info ~ ResolveEnumClassMethod t EnumClass, O.OverloadedMethodInfo info EnumClass) => OL.IsLabel t (O.MethodProxy info EnumClass) where
    #if MIN_VERSION_base(4,10,0)
        fromLabel = O.MethodProxy
    #else
        fromLabel _ = O.MethodProxy
    #endif

    #endif