{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.OSTree.Structs.BootloaderInterface
    ( 

-- * Exported types
    BootloaderInterface(..)                 ,
    newZeroBootloaderInterface              ,


 -- * Methods

#if defined(ENABLE_OVERLOADING)
    ResolveBootloaderInterfaceMethod        ,
#endif



 -- * Properties


-- ** gIface #attr:gIface#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    bootloaderInterface_gIface              ,
#endif
    getBootloaderInterfaceGIface            ,


-- ** getName #attr:getName#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    bootloaderInterface_getName             ,
#endif
    clearBootloaderInterfaceGetName         ,
    getBootloaderInterfaceGetName           ,
    setBootloaderInterfaceGetName           ,


-- ** isAtomic #attr:isAtomic#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    bootloaderInterface_isAtomic            ,
#endif
    clearBootloaderInterfaceIsAtomic        ,
    getBootloaderInterfaceIsAtomic          ,
    setBootloaderInterfaceIsAtomic          ,


-- ** postBlsSync #attr:postBlsSync#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    bootloaderInterface_postBlsSync         ,
#endif
    clearBootloaderInterfacePostBlsSync     ,
    getBootloaderInterfacePostBlsSync       ,
    setBootloaderInterfacePostBlsSync       ,


-- ** query #attr:query#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    bootloaderInterface_query               ,
#endif
    clearBootloaderInterfaceQuery           ,
    getBootloaderInterfaceQuery             ,
    setBootloaderInterfaceQuery             ,




    ) 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 GI.GObject.Structs.TypeInterface as GObject.TypeInterface
import qualified GI.OSTree.Callbacks as OSTree.Callbacks

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

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

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


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

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


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

#if defined(ENABLE_OVERLOADING)
data BootloaderInterfaceGIfaceFieldInfo
instance AttrInfo BootloaderInterfaceGIfaceFieldInfo where
    type AttrBaseTypeConstraint BootloaderInterfaceGIfaceFieldInfo = (~) BootloaderInterface
    type AttrAllowedOps BootloaderInterfaceGIfaceFieldInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint BootloaderInterfaceGIfaceFieldInfo = (~) (Ptr GObject.TypeInterface.TypeInterface)
    type AttrTransferTypeConstraint BootloaderInterfaceGIfaceFieldInfo = (~)(Ptr GObject.TypeInterface.TypeInterface)
    type AttrTransferType BootloaderInterfaceGIfaceFieldInfo = (Ptr GObject.TypeInterface.TypeInterface)
    type AttrGetType BootloaderInterfaceGIfaceFieldInfo = GObject.TypeInterface.TypeInterface
    type AttrLabel BootloaderInterfaceGIfaceFieldInfo = "g_iface"
    type AttrOrigin BootloaderInterfaceGIfaceFieldInfo = BootloaderInterface
    attrGet = getBootloaderInterfaceGIface
    attrSet = undefined
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.BootloaderInterface.gIface"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-BootloaderInterface.html#g:attr:gIface"
        })

bootloaderInterface_gIface :: AttrLabelProxy "gIface"
bootloaderInterface_gIface = AttrLabelProxy

#endif


-- | Get the value of the “@query@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bootloaderInterface #query
-- @
getBootloaderInterfaceQuery :: MonadIO m => BootloaderInterface -> m (Maybe OSTree.Callbacks.BootloaderInterfaceQueryFieldCallback)
getBootloaderInterfaceQuery :: forall (m :: * -> *).
MonadIO m =>
BootloaderInterface
-> m (Maybe BootloaderInterfaceQueryFieldCallback)
getBootloaderInterfaceQuery BootloaderInterface
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BootloaderInterface
s forall a b. (a -> b) -> a -> b
$ \Ptr BootloaderInterface
ptr -> do
    FunPtr C_BootloaderInterfaceQueryFieldCallback
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr BootloaderInterface
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO (FunPtr OSTree.Callbacks.C_BootloaderInterfaceQueryFieldCallback)
    Maybe BootloaderInterfaceQueryFieldCallback
result <- forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BootloaderInterfaceQueryFieldCallback
val forall a b. (a -> b) -> a -> b
$ \FunPtr C_BootloaderInterfaceQueryFieldCallback
val' -> do
        let val'' :: BootloaderInterfaceQueryFieldCallback
val'' = forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCancellable a) =>
FunPtr C_BootloaderInterfaceQueryFieldCallback
-> Bootloader -> Bool -> a -> m ()
OSTree.Callbacks.dynamic_BootloaderInterfaceQueryFieldCallback FunPtr C_BootloaderInterfaceQueryFieldCallback
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return BootloaderInterfaceQueryFieldCallback
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BootloaderInterfaceQueryFieldCallback
result

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

-- | Set the value of the “@query@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #query
-- @
clearBootloaderInterfaceQuery :: MonadIO m => BootloaderInterface -> m ()
clearBootloaderInterfaceQuery :: forall (m :: * -> *). MonadIO m => BootloaderInterface -> m ()
clearBootloaderInterfaceQuery BootloaderInterface
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BootloaderInterface
s forall a b. (a -> b) -> a -> b
$ \Ptr BootloaderInterface
ptr -> do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BootloaderInterface
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (forall a. FunPtr a
FP.nullFunPtr :: FunPtr OSTree.Callbacks.C_BootloaderInterfaceQueryFieldCallback)

#if defined(ENABLE_OVERLOADING)
data BootloaderInterfaceQueryFieldInfo
instance AttrInfo BootloaderInterfaceQueryFieldInfo where
    type AttrBaseTypeConstraint BootloaderInterfaceQueryFieldInfo = (~) BootloaderInterface
    type AttrAllowedOps BootloaderInterfaceQueryFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint BootloaderInterfaceQueryFieldInfo = (~) (FunPtr OSTree.Callbacks.C_BootloaderInterfaceQueryFieldCallback)
    type AttrTransferTypeConstraint BootloaderInterfaceQueryFieldInfo = (~)(FunPtr OSTree.Callbacks.C_BootloaderInterfaceQueryFieldCallback)
    type AttrTransferType BootloaderInterfaceQueryFieldInfo = (FunPtr OSTree.Callbacks.C_BootloaderInterfaceQueryFieldCallback)
    type AttrGetType BootloaderInterfaceQueryFieldInfo = Maybe OSTree.Callbacks.BootloaderInterfaceQueryFieldCallback
    type AttrLabel BootloaderInterfaceQueryFieldInfo = "query"
    type AttrOrigin BootloaderInterfaceQueryFieldInfo = BootloaderInterface
    attrGet = getBootloaderInterfaceQuery
    attrSet = setBootloaderInterfaceQuery
    attrConstruct = undefined
    attrClear = clearBootloaderInterfaceQuery
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.BootloaderInterface.query"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-BootloaderInterface.html#g:attr:query"
        })

bootloaderInterface_query :: AttrLabelProxy "query"
bootloaderInterface_query = AttrLabelProxy

#endif


-- | Get the value of the “@get_name@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bootloaderInterface #getName
-- @
getBootloaderInterfaceGetName :: MonadIO m => BootloaderInterface -> m (Maybe OSTree.Callbacks.BootloaderInterfaceGetNameFieldCallback)
getBootloaderInterfaceGetName :: forall (m :: * -> *).
MonadIO m =>
BootloaderInterface
-> m (Maybe BootloaderInterfaceGetNameFieldCallback)
getBootloaderInterfaceGetName BootloaderInterface
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BootloaderInterface
s forall a b. (a -> b) -> a -> b
$ \Ptr BootloaderInterface
ptr -> do
    FunPtr C_BootloaderInterfaceGetNameFieldCallback
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr BootloaderInterface
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) :: IO (FunPtr OSTree.Callbacks.C_BootloaderInterfaceGetNameFieldCallback)
    Maybe BootloaderInterfaceGetNameFieldCallback
result <- forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BootloaderInterfaceGetNameFieldCallback
val forall a b. (a -> b) -> a -> b
$ \FunPtr C_BootloaderInterfaceGetNameFieldCallback
val' -> do
        let val'' :: BootloaderInterfaceGetNameFieldCallback
val'' = forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_BootloaderInterfaceGetNameFieldCallback
-> Bootloader -> m Text
OSTree.Callbacks.dynamic_BootloaderInterfaceGetNameFieldCallback FunPtr C_BootloaderInterfaceGetNameFieldCallback
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return BootloaderInterfaceGetNameFieldCallback
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BootloaderInterfaceGetNameFieldCallback
result

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

-- | Set the value of the “@get_name@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #getName
-- @
clearBootloaderInterfaceGetName :: MonadIO m => BootloaderInterface -> m ()
clearBootloaderInterfaceGetName :: forall (m :: * -> *). MonadIO m => BootloaderInterface -> m ()
clearBootloaderInterfaceGetName BootloaderInterface
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BootloaderInterface
s forall a b. (a -> b) -> a -> b
$ \Ptr BootloaderInterface
ptr -> do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BootloaderInterface
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) (forall a. FunPtr a
FP.nullFunPtr :: FunPtr OSTree.Callbacks.C_BootloaderInterfaceGetNameFieldCallback)

#if defined(ENABLE_OVERLOADING)
data BootloaderInterfaceGetNameFieldInfo
instance AttrInfo BootloaderInterfaceGetNameFieldInfo where
    type AttrBaseTypeConstraint BootloaderInterfaceGetNameFieldInfo = (~) BootloaderInterface
    type AttrAllowedOps BootloaderInterfaceGetNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint BootloaderInterfaceGetNameFieldInfo = (~) (FunPtr OSTree.Callbacks.C_BootloaderInterfaceGetNameFieldCallback)
    type AttrTransferTypeConstraint BootloaderInterfaceGetNameFieldInfo = (~)OSTree.Callbacks.BootloaderInterfaceGetNameFieldCallback
    type AttrTransferType BootloaderInterfaceGetNameFieldInfo = (FunPtr OSTree.Callbacks.C_BootloaderInterfaceGetNameFieldCallback)
    type AttrGetType BootloaderInterfaceGetNameFieldInfo = Maybe OSTree.Callbacks.BootloaderInterfaceGetNameFieldCallback
    type AttrLabel BootloaderInterfaceGetNameFieldInfo = "get_name"
    type AttrOrigin BootloaderInterfaceGetNameFieldInfo = BootloaderInterface
    attrGet = getBootloaderInterfaceGetName
    attrSet = setBootloaderInterfaceGetName
    attrConstruct = undefined
    attrClear = clearBootloaderInterfaceGetName
    attrTransfer _ v = do
        OSTree.Callbacks.mk_BootloaderInterfaceGetNameFieldCallback (OSTree.Callbacks.wrap_BootloaderInterfaceGetNameFieldCallback Nothing v)
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.BootloaderInterface.getName"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-BootloaderInterface.html#g:attr:getName"
        })

bootloaderInterface_getName :: AttrLabelProxy "getName"
bootloaderInterface_getName = AttrLabelProxy

#endif


-- | Get the value of the “@post_bls_sync@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bootloaderInterface #postBlsSync
-- @
getBootloaderInterfacePostBlsSync :: MonadIO m => BootloaderInterface -> m (Maybe OSTree.Callbacks.BootloaderInterfacePostBlsSyncFieldCallback)
getBootloaderInterfacePostBlsSync :: forall (m :: * -> *).
MonadIO m =>
BootloaderInterface
-> m (Maybe BootloaderInterfacePostBlsSyncFieldCallback)
getBootloaderInterfacePostBlsSync BootloaderInterface
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BootloaderInterface
s forall a b. (a -> b) -> a -> b
$ \Ptr BootloaderInterface
ptr -> do
    FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr BootloaderInterface
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) :: IO (FunPtr OSTree.Callbacks.C_BootloaderInterfacePostBlsSyncFieldCallback)
    Maybe BootloaderInterfacePostBlsSyncFieldCallback
result <- forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
val forall a b. (a -> b) -> a -> b
$ \FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
val' -> do
        let val'' :: BootloaderInterfacePostBlsSyncFieldCallback
val'' = forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCancellable a) =>
FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
-> Bootloader -> Int32 -> a -> m ()
OSTree.Callbacks.dynamic_BootloaderInterfacePostBlsSyncFieldCallback FunPtr C_BootloaderInterfacePostBlsSyncFieldCallback
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return BootloaderInterfacePostBlsSyncFieldCallback
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BootloaderInterfacePostBlsSyncFieldCallback
result

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

-- | Set the value of the “@post_bls_sync@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #postBlsSync
-- @
clearBootloaderInterfacePostBlsSync :: MonadIO m => BootloaderInterface -> m ()
clearBootloaderInterfacePostBlsSync :: forall (m :: * -> *). MonadIO m => BootloaderInterface -> m ()
clearBootloaderInterfacePostBlsSync BootloaderInterface
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BootloaderInterface
s forall a b. (a -> b) -> a -> b
$ \Ptr BootloaderInterface
ptr -> do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BootloaderInterface
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) (forall a. FunPtr a
FP.nullFunPtr :: FunPtr OSTree.Callbacks.C_BootloaderInterfacePostBlsSyncFieldCallback)

#if defined(ENABLE_OVERLOADING)
data BootloaderInterfacePostBlsSyncFieldInfo
instance AttrInfo BootloaderInterfacePostBlsSyncFieldInfo where
    type AttrBaseTypeConstraint BootloaderInterfacePostBlsSyncFieldInfo = (~) BootloaderInterface
    type AttrAllowedOps BootloaderInterfacePostBlsSyncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint BootloaderInterfacePostBlsSyncFieldInfo = (~) (FunPtr OSTree.Callbacks.C_BootloaderInterfacePostBlsSyncFieldCallback)
    type AttrTransferTypeConstraint BootloaderInterfacePostBlsSyncFieldInfo = (~)(FunPtr OSTree.Callbacks.C_BootloaderInterfacePostBlsSyncFieldCallback)
    type AttrTransferType BootloaderInterfacePostBlsSyncFieldInfo = (FunPtr OSTree.Callbacks.C_BootloaderInterfacePostBlsSyncFieldCallback)
    type AttrGetType BootloaderInterfacePostBlsSyncFieldInfo = Maybe OSTree.Callbacks.BootloaderInterfacePostBlsSyncFieldCallback
    type AttrLabel BootloaderInterfacePostBlsSyncFieldInfo = "post_bls_sync"
    type AttrOrigin BootloaderInterfacePostBlsSyncFieldInfo = BootloaderInterface
    attrGet = getBootloaderInterfacePostBlsSync
    attrSet = setBootloaderInterfacePostBlsSync
    attrConstruct = undefined
    attrClear = clearBootloaderInterfacePostBlsSync
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.BootloaderInterface.postBlsSync"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-BootloaderInterface.html#g:attr:postBlsSync"
        })

bootloaderInterface_postBlsSync :: AttrLabelProxy "postBlsSync"
bootloaderInterface_postBlsSync = AttrLabelProxy

#endif


-- | Get the value of the “@is_atomic@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' bootloaderInterface #isAtomic
-- @
getBootloaderInterfaceIsAtomic :: MonadIO m => BootloaderInterface -> m (Maybe OSTree.Callbacks.BootloaderInterfaceIsAtomicFieldCallback)
getBootloaderInterfaceIsAtomic :: forall (m :: * -> *).
MonadIO m =>
BootloaderInterface
-> m (Maybe BootloaderInterfaceIsAtomicFieldCallback)
getBootloaderInterfaceIsAtomic BootloaderInterface
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BootloaderInterface
s forall a b. (a -> b) -> a -> b
$ \Ptr BootloaderInterface
ptr -> do
    FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr BootloaderInterface
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO (FunPtr OSTree.Callbacks.C_BootloaderInterfaceIsAtomicFieldCallback)
    Maybe BootloaderInterfaceIsAtomicFieldCallback
result <- forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
val forall a b. (a -> b) -> a -> b
$ \FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
val' -> do
        let val'' :: BootloaderInterfaceIsAtomicFieldCallback
val'' = forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
-> Bootloader -> m Bool
OSTree.Callbacks.dynamic_BootloaderInterfaceIsAtomicFieldCallback FunPtr C_BootloaderInterfaceIsAtomicFieldCallback
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return BootloaderInterfaceIsAtomicFieldCallback
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BootloaderInterfaceIsAtomicFieldCallback
result

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

-- | Set the value of the “@is_atomic@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #isAtomic
-- @
clearBootloaderInterfaceIsAtomic :: MonadIO m => BootloaderInterface -> m ()
clearBootloaderInterfaceIsAtomic :: forall (m :: * -> *). MonadIO m => BootloaderInterface -> m ()
clearBootloaderInterfaceIsAtomic BootloaderInterface
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr BootloaderInterface
s forall a b. (a -> b) -> a -> b
$ \Ptr BootloaderInterface
ptr -> do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr BootloaderInterface
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (forall a. FunPtr a
FP.nullFunPtr :: FunPtr OSTree.Callbacks.C_BootloaderInterfaceIsAtomicFieldCallback)

#if defined(ENABLE_OVERLOADING)
data BootloaderInterfaceIsAtomicFieldInfo
instance AttrInfo BootloaderInterfaceIsAtomicFieldInfo where
    type AttrBaseTypeConstraint BootloaderInterfaceIsAtomicFieldInfo = (~) BootloaderInterface
    type AttrAllowedOps BootloaderInterfaceIsAtomicFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint BootloaderInterfaceIsAtomicFieldInfo = (~) (FunPtr OSTree.Callbacks.C_BootloaderInterfaceIsAtomicFieldCallback)
    type AttrTransferTypeConstraint BootloaderInterfaceIsAtomicFieldInfo = (~)OSTree.Callbacks.BootloaderInterfaceIsAtomicFieldCallback
    type AttrTransferType BootloaderInterfaceIsAtomicFieldInfo = (FunPtr OSTree.Callbacks.C_BootloaderInterfaceIsAtomicFieldCallback)
    type AttrGetType BootloaderInterfaceIsAtomicFieldInfo = Maybe OSTree.Callbacks.BootloaderInterfaceIsAtomicFieldCallback
    type AttrLabel BootloaderInterfaceIsAtomicFieldInfo = "is_atomic"
    type AttrOrigin BootloaderInterfaceIsAtomicFieldInfo = BootloaderInterface
    attrGet = getBootloaderInterfaceIsAtomic
    attrSet = setBootloaderInterfaceIsAtomic
    attrConstruct = undefined
    attrClear = clearBootloaderInterfaceIsAtomic
    attrTransfer _ v = do
        OSTree.Callbacks.mk_BootloaderInterfaceIsAtomicFieldCallback (OSTree.Callbacks.wrap_BootloaderInterfaceIsAtomicFieldCallback Nothing v)
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.BootloaderInterface.isAtomic"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-BootloaderInterface.html#g:attr:isAtomic"
        })

bootloaderInterface_isAtomic :: AttrLabelProxy "isAtomic"
bootloaderInterface_isAtomic = AttrLabelProxy

#endif



#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BootloaderInterface
type instance O.AttributeList BootloaderInterface = BootloaderInterfaceAttributeList
type BootloaderInterfaceAttributeList = ('[ '("gIface", BootloaderInterfaceGIfaceFieldInfo), '("query", BootloaderInterfaceQueryFieldInfo), '("getName", BootloaderInterfaceGetNameFieldInfo), '("postBlsSync", BootloaderInterfacePostBlsSyncFieldInfo), '("isAtomic", BootloaderInterfaceIsAtomicFieldInfo)] :: [(Symbol, DK.Type)])
#endif

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

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

#endif

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

#endif