    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- @GPowerProfileMonitor@ makes it possible for applications as well as OS
    -- components to monitor system power profiles and act upon them. It currently
    -- only exports whether the system is in “Power Saver” mode (known as
    -- “Low Power” mode on some systems).
    --
    -- When in “Low Power” mode, it is recommended that applications:
    --
    -- * disable automatic downloads;
    -- * reduce the rate of refresh from online sources such as calendar or
    -- email synchronisation;
    -- * reduce the use of expensive visual effects.
    --
    --
    -- It is also likely that OS components providing services to applications will
    -- lower their own background activity, for the sake of the system.
    --
    -- There are a variety of tools that exist for power consumption analysis, but those
    -- usually depend on the OS and hardware used. On Linux, one could use @upower@ to
    -- monitor the battery discharge rate, @powertop@ to check on the background activity
    -- or activity at all), @sysprof@ to inspect CPU usage, and @intel_gpu_time@ to
    -- profile GPU usage.
    --
    -- Don’t forget to disconnect the [Object::notify]("GI.GObject.Objects.Object#g:signal:notify") signal for
    -- t'GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor':@/power-saver-enabled/@, and unref the
    -- @GPowerProfileMonitor@ itself when exiting.
    --
    -- /Since: 2.70/

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

    module GI.Gio.Interfaces.PowerProfileMonitor
        (

    -- * Exported types
        PowerProfileMonitor(..)                 ,
        IsPowerProfileMonitor                   ,
        toPowerProfileMonitor                   ,

     -- * Methods
    -- |
    --
    --  === __Click to display all available methods, including inherited ones__
    -- ==== Methods
    -- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [init]("GI.Gio.Interfaces.Initable#g:method:init"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
    --
    -- ==== Getters
    -- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getPowerSaverEnabled]("GI.Gio.Interfaces.PowerProfileMonitor#g:method:getPowerSaverEnabled"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
    --
    -- ==== Setters
    -- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

    #if defined(ENABLE_OVERLOADING)
        ResolvePowerProfileMonitorMethod        ,
    #endif

    -- ** dupDefault #method:dupDefault#

        powerProfileMonitorDupDefault           ,

    -- ** getPowerSaverEnabled #method:getPowerSaverEnabled#

    #if defined(ENABLE_OVERLOADING)
        PowerProfileMonitorGetPowerSaverEnabledMethodInfo,
    #endif
        powerProfileMonitorGetPowerSaverEnabled ,

     -- * Properties

    -- ** powerSaverEnabled #attr:powerSaverEnabled#
    -- | Whether “Power Saver” mode is enabled on the system.
    --
    -- /Since: 2.70/

    #if defined(ENABLE_OVERLOADING)
        PowerProfileMonitorPowerSaverEnabledPropertyInfo,
    #endif
        getPowerProfileMonitorPowerSaverEnabled ,
    #if defined(ENABLE_OVERLOADING)
        powerProfileMonitorPowerSaverEnabled    ,
    #endif

        ) 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 qualified GI.GLib.Callbacks as GLib.Callbacks
    import qualified GI.GLib.Structs.PollFD as GLib.PollFD
    import qualified GI.GLib.Structs.Source as GLib.Source
    import qualified GI.GObject.Callbacks as GObject.Callbacks
    import qualified GI.GObject.Objects.Object as GObject.Object
    import qualified GI.GObject.Structs.Parameter as GObject.Parameter
    import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable
    import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable

    #else
    import qualified GI.GObject.Objects.Object as GObject.Object
    import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable

    #endif

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

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

    foreign import ccall "g_power_profile_monitor_get_type"
        c_g_power_profile_monitor_get_type :: IO B.Types.GType

    instance B.Types.TypedObject PowerProfileMonitor where
        glibType :: IO GType
    glibType = IO GType
    c_g_power_profile_monitor_get_type

    instance B.Types.GObject PowerProfileMonitor

    -- | Type class for types which can be safely cast to `PowerProfileMonitor`, for instance with `toPowerProfileMonitor`.
    class (SP.GObject o, O.IsDescendantOf PowerProfileMonitor o) => IsPowerProfileMonitor o
    instance (SP.GObject o, O.IsDescendantOf PowerProfileMonitor o) => IsPowerProfileMonitor o

    instance O.HasParentTypes PowerProfileMonitor
    type instance O.ParentTypes PowerProfileMonitor = '[Gio.Initable.Initable, GObject.Object.Object]

    -- | Cast to `PowerProfileMonitor`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
    toPowerProfileMonitor :: (MIO.MonadIO m, IsPowerProfileMonitor o) => o -> m PowerProfileMonitor
    toPowerProfileMonitor :: forall (m :: * -> *) o.
    (MonadIO m, IsPowerProfileMonitor o) =>
    o -> m PowerProfileMonitor
    toPowerProfileMonitor = IO PowerProfileMonitor -> m PowerProfileMonitor
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO PowerProfileMonitor -> m PowerProfileMonitor)
    -> (o -> IO PowerProfileMonitor) -> o -> m PowerProfileMonitor
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ManagedPtr PowerProfileMonitor -> PowerProfileMonitor)
    -> o -> IO PowerProfileMonitor
    forall o o'.
    (HasCallStack, ManagedPtrNewtype o, TypedObject o,
     ManagedPtrNewtype o', TypedObject o') =>
    (ManagedPtr o' -> o') -> o -> IO o'
    B.ManagedPtr.unsafeCastTo ManagedPtr PowerProfileMonitor -> PowerProfileMonitor
    PowerProfileMonitor

    -- | Convert 'PowerProfileMonitor' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
    instance B.GValue.IsGValue (Maybe PowerProfileMonitor) where
        gvalueGType_ :: IO GType
    gvalueGType_ = IO GType
    c_g_power_profile_monitor_get_type
        gvalueSet_ :: Ptr GValue -> Maybe PowerProfileMonitor -> IO ()
    gvalueSet_ Ptr GValue
    gv Maybe PowerProfileMonitor
    P.Nothing = Ptr GValue -> Ptr PowerProfileMonitor -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv (Ptr PowerProfileMonitor
    forall a. Ptr a
    FP.nullPtr :: FP.Ptr PowerProfileMonitor)
        gvalueSet_ Ptr GValue
    gv (P.Just PowerProfileMonitor
    obj) = PowerProfileMonitor -> (Ptr PowerProfileMonitor -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr PowerProfileMonitor
    obj (Ptr GValue -> Ptr PowerProfileMonitor -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv)
        gvalueGet_ :: Ptr GValue -> IO (Maybe PowerProfileMonitor)
    gvalueGet_ Ptr GValue
    gv = do
            Ptr PowerProfileMonitor
    ptr <- Ptr GValue -> IO (Ptr PowerProfileMonitor)
    forall a. GObject a => Ptr GValue -> IO (Ptr a)
    B.GValue.get_object Ptr GValue
    gv :: IO (FP.Ptr PowerProfileMonitor)
            if Ptr PowerProfileMonitor
    ptr Ptr PowerProfileMonitor -> Ptr PowerProfileMonitor -> Bool
    forall a. Eq a => a -> a -> Bool
    /= Ptr PowerProfileMonitor
    forall a. Ptr a
    FP.nullPtr
            then PowerProfileMonitor -> Maybe PowerProfileMonitor
    forall a. a -> Maybe a
    P.Just (PowerProfileMonitor -> Maybe PowerProfileMonitor)
    -> IO PowerProfileMonitor -> IO (Maybe PowerProfileMonitor)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (ManagedPtr PowerProfileMonitor -> PowerProfileMonitor)
    -> Ptr PowerProfileMonitor -> IO PowerProfileMonitor
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    B.ManagedPtr.newObject ManagedPtr PowerProfileMonitor -> PowerProfileMonitor
    PowerProfileMonitor Ptr PowerProfileMonitor
    ptr
            else Maybe PowerProfileMonitor -> IO (Maybe PowerProfileMonitor)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe PowerProfileMonitor
    forall a. Maybe a
    P.Nothing

    -- VVV Prop "power-saver-enabled"
       -- Type: TBasicType TBoolean
       -- Flags: [PropertyReadable]
       -- Nullable: (Just False,Nothing)

    -- | Get the value of the “@power-saver-enabled@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' powerProfileMonitor #powerSaverEnabled
    -- @
    getPowerProfileMonitorPowerSaverEnabled :: (MonadIO m, IsPowerProfileMonitor o) => o -> m Bool
    getPowerProfileMonitorPowerSaverEnabled :: forall (m :: * -> *) o.
    (MonadIO m, IsPowerProfileMonitor o) =>
    o -> m Bool
    getPowerProfileMonitorPowerSaverEnabled o
    obj = IO Bool -> m Bool
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO Bool
    forall a. GObject a => a -> String -> IO Bool
    B.Properties.getObjectPropertyBool o
    obj String
    "power-saver-enabled"

    #if defined(ENABLE_OVERLOADING)
    data PowerProfileMonitorPowerSaverEnabledPropertyInfo
    instance AttrInfo PowerProfileMonitorPowerSaverEnabledPropertyInfo where
        type AttrAllowedOps PowerProfileMonitorPowerSaverEnabledPropertyInfo = '[ 'AttrGet]
        type AttrBaseTypeConstraint PowerProfileMonitorPowerSaverEnabledPropertyInfo = IsPowerProfileMonitor
        type AttrSetTypeConstraint PowerProfileMonitorPowerSaverEnabledPropertyInfo = (~) ()
        type AttrTransferTypeConstraint PowerProfileMonitorPowerSaverEnabledPropertyInfo = (~) ()
        type AttrTransferType PowerProfileMonitorPowerSaverEnabledPropertyInfo = ()
        type AttrGetType PowerProfileMonitorPowerSaverEnabledPropertyInfo = Bool
        type AttrLabel PowerProfileMonitorPowerSaverEnabledPropertyInfo = "power-saver-enabled"
        type AttrOrigin PowerProfileMonitorPowerSaverEnabledPropertyInfo = PowerProfileMonitor
        attrGet = getPowerProfileMonitorPowerSaverEnabled
        attrSet = undefined
        attrTransfer _ = undefined
        attrConstruct = undefined
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.PowerProfileMonitor.powerSaverEnabled"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-PowerProfileMonitor.html#g:attr:powerSaverEnabled"
            })
    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList PowerProfileMonitor
    type instance O.AttributeList PowerProfileMonitor = PowerProfileMonitorAttributeList
    type PowerProfileMonitorAttributeList = ('[ '("powerSaverEnabled", PowerProfileMonitorPowerSaverEnabledPropertyInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    powerProfileMonitorPowerSaverEnabled :: AttrLabelProxy "powerSaverEnabled"
    powerProfileMonitorPowerSaverEnabled = AttrLabelProxy

    #endif

    #if defined(ENABLE_OVERLOADING)
    type family ResolvePowerProfileMonitorMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolvePowerProfileMonitorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolvePowerProfileMonitorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolvePowerProfileMonitorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolvePowerProfileMonitorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolvePowerProfileMonitorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolvePowerProfileMonitorMethod "init" o = Gio.Initable.InitableInitMethodInfo
        ResolvePowerProfileMonitorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolvePowerProfileMonitorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolvePowerProfileMonitorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolvePowerProfileMonitorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolvePowerProfileMonitorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolvePowerProfileMonitorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolvePowerProfileMonitorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolvePowerProfileMonitorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolvePowerProfileMonitorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolvePowerProfileMonitorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolvePowerProfileMonitorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolvePowerProfileMonitorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolvePowerProfileMonitorMethod "getPowerSaverEnabled" o = PowerProfileMonitorGetPowerSaverEnabledMethodInfo
        ResolvePowerProfileMonitorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolvePowerProfileMonitorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolvePowerProfileMonitorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolvePowerProfileMonitorMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolvePowerProfileMonitorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolvePowerProfileMonitorMethod l o = O.MethodResolutionFailed l o

    instance (info ~ ResolvePowerProfileMonitorMethod t PowerProfileMonitor, O.OverloadedMethod info PowerProfileMonitor p) => OL.IsLabel t (PowerProfileMonitor -> 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 ~ ResolvePowerProfileMonitorMethod t PowerProfileMonitor, O.OverloadedMethod info PowerProfileMonitor p, R.HasField t PowerProfileMonitor p) => R.HasField t PowerProfileMonitor p where
        getField = O.overloadedMethod @info

    #endif

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

    #endif

    -- method PowerProfileMonitor::get_power_saver_enabled
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "monitor"
    --           , argType =
    --               TInterface
    --                 Name { namespace = "Gio" , name = "PowerProfileMonitor" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GPowerProfileMonitor"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_power_profile_monitor_get_power_saver_enabled" g_power_profile_monitor_get_power_saver_enabled ::
        Ptr PowerProfileMonitor ->              -- monitor : TInterface (Name {namespace = "Gio", name = "PowerProfileMonitor"})
        IO CInt

    -- | Gets whether the system is in “Power Saver” mode.
    --
    -- You are expected to listen to the
    -- t'GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor'::@/notify/@[powerSaverEnabled](#g:signal:powerSaverEnabled) signal to know when the profile has
    -- changed.
    --
    -- /Since: 2.70/
    powerProfileMonitorGetPowerSaverEnabled ::
        (B.CallStack.HasCallStack, MonadIO m, IsPowerProfileMonitor a) =>
        a
        -- ^ /@monitor@/: a t'GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor'
        -> m Bool
        -- ^ __Returns:__ Whether the system is in “Power Saver” mode.
    powerProfileMonitorGetPowerSaverEnabled :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsPowerProfileMonitor a) =>
    a -> m Bool
    powerProfileMonitorGetPowerSaverEnabled a
    monitor = IO Bool -> m Bool
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr PowerProfileMonitor
    monitor' <- a -> IO (Ptr PowerProfileMonitor)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    monitor
        CInt
    result <- Ptr PowerProfileMonitor -> IO CInt
    g_power_profile_monitor_get_power_saver_enabled Ptr PowerProfileMonitor
    monitor'
        let result' :: Bool
    result' = (CInt -> CInt -> Bool
    forall a. Eq a => a -> a -> Bool
    /= CInt
    0) CInt
    result
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    monitor
        Bool -> IO Bool
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    #if defined(ENABLE_OVERLOADING)
    data PowerProfileMonitorGetPowerSaverEnabledMethodInfo
    instance (signature ~ (m Bool), MonadIO m, IsPowerProfileMonitor a) => O.OverloadedMethod PowerProfileMonitorGetPowerSaverEnabledMethodInfo a signature where
        overloadedMethod = powerProfileMonitorGetPowerSaverEnabled

    instance O.OverloadedMethodInfo PowerProfileMonitorGetPowerSaverEnabledMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Interfaces.PowerProfileMonitor.powerProfileMonitorGetPowerSaverEnabled",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-PowerProfileMonitor.html#v:powerProfileMonitorGetPowerSaverEnabled"
            })

    #endif

    -- method PowerProfileMonitor::dup_default
    -- method type : MemberFunction
    -- Args: []
    -- Lengths: []
    -- returnType: Just
    --               (TInterface
    --                  Name { namespace = "Gio" , name = "PowerProfileMonitor" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_power_profile_monitor_dup_default" g_power_profile_monitor_dup_default ::
        IO (Ptr PowerProfileMonitor)

    -- | Gets a reference to the default t'GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor' for the system.
    --
    -- /Since: 2.70/
    powerProfileMonitorDupDefault ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        m PowerProfileMonitor
        -- ^ __Returns:__ a new reference to the default t'GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor'
    powerProfileMonitorDupDefault :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    m PowerProfileMonitor
    powerProfileMonitorDupDefault  = IO PowerProfileMonitor -> m PowerProfileMonitor
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO PowerProfileMonitor -> m PowerProfileMonitor)
    -> IO PowerProfileMonitor -> m PowerProfileMonitor
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr PowerProfileMonitor
    result <- IO (Ptr PowerProfileMonitor)
    g_power_profile_monitor_dup_default
        Text -> Ptr PowerProfileMonitor -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL Text
    "powerProfileMonitorDupDefault" Ptr PowerProfileMonitor
    result
        PowerProfileMonitor
    result' <- ((ManagedPtr PowerProfileMonitor -> PowerProfileMonitor)
    -> Ptr PowerProfileMonitor -> IO PowerProfileMonitor
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    wrapObject ManagedPtr PowerProfileMonitor -> PowerProfileMonitor
    PowerProfileMonitor) Ptr PowerProfileMonitor
    result
        PowerProfileMonitor -> IO PowerProfileMonitor
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return PowerProfileMonitor
    result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList PowerProfileMonitor = PowerProfileMonitorSignalList
    type PowerProfileMonitorSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

    #endif