{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- 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.Objects.Deployment
    ( 

-- * Exported types
    Deployment(..)                          ,
    IsDeployment                            ,
    toDeployment                            ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveDeploymentMethod                 ,
#endif


-- ** clone #method:clone#

#if defined(ENABLE_OVERLOADING)
    DeploymentCloneMethodInfo               ,
#endif
    deploymentClone                         ,


-- ** equal #method:equal#

#if defined(ENABLE_OVERLOADING)
    DeploymentEqualMethodInfo               ,
#endif
    deploymentEqual                         ,


-- ** getBootconfig #method:getBootconfig#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetBootconfigMethodInfo       ,
#endif
    deploymentGetBootconfig                 ,


-- ** getBootcsum #method:getBootcsum#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetBootcsumMethodInfo         ,
#endif
    deploymentGetBootcsum                   ,


-- ** getBootserial #method:getBootserial#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetBootserialMethodInfo       ,
#endif
    deploymentGetBootserial                 ,


-- ** getCsum #method:getCsum#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetCsumMethodInfo             ,
#endif
    deploymentGetCsum                       ,


-- ** getDeployserial #method:getDeployserial#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetDeployserialMethodInfo     ,
#endif
    deploymentGetDeployserial               ,


-- ** getIndex #method:getIndex#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetIndexMethodInfo            ,
#endif
    deploymentGetIndex                      ,


-- ** getOrigin #method:getOrigin#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetOriginMethodInfo           ,
#endif
    deploymentGetOrigin                     ,


-- ** getOriginRelpath #method:getOriginRelpath#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetOriginRelpathMethodInfo    ,
#endif
    deploymentGetOriginRelpath              ,


-- ** getOsname #method:getOsname#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetOsnameMethodInfo           ,
#endif
    deploymentGetOsname                     ,


-- ** getUnlocked #method:getUnlocked#

#if defined(ENABLE_OVERLOADING)
    DeploymentGetUnlockedMethodInfo         ,
#endif
    deploymentGetUnlocked                   ,


-- ** hash #method:hash#

#if defined(ENABLE_OVERLOADING)
    DeploymentHashMethodInfo                ,
#endif
    deploymentHash                          ,


-- ** isPinned #method:isPinned#

#if defined(ENABLE_OVERLOADING)
    DeploymentIsPinnedMethodInfo            ,
#endif
    deploymentIsPinned                      ,


-- ** isStaged #method:isStaged#

#if defined(ENABLE_OVERLOADING)
    DeploymentIsStagedMethodInfo            ,
#endif
    deploymentIsStaged                      ,


-- ** new #method:new#

    deploymentNew                           ,


-- ** originRemoveTransientState #method:originRemoveTransientState#

    deploymentOriginRemoveTransientState    ,


-- ** setBootconfig #method:setBootconfig#

#if defined(ENABLE_OVERLOADING)
    DeploymentSetBootconfigMethodInfo       ,
#endif
    deploymentSetBootconfig                 ,


-- ** setBootserial #method:setBootserial#

#if defined(ENABLE_OVERLOADING)
    DeploymentSetBootserialMethodInfo       ,
#endif
    deploymentSetBootserial                 ,


-- ** setIndex #method:setIndex#

#if defined(ENABLE_OVERLOADING)
    DeploymentSetIndexMethodInfo            ,
#endif
    deploymentSetIndex                      ,


-- ** setOrigin #method:setOrigin#

#if defined(ENABLE_OVERLOADING)
    DeploymentSetOriginMethodInfo           ,
#endif
    deploymentSetOrigin                     ,


-- ** unlockedStateToString #method:unlockedStateToString#

    deploymentUnlockedStateToString         ,




    ) 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.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.Text as T
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 GI.GLib.Structs.KeyFile as GLib.KeyFile
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.OSTree.Enums as OSTree.Enums
import {-# SOURCE #-} qualified GI.OSTree.Objects.BootconfigParser as OSTree.BootconfigParser

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

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

foreign import ccall "ostree_deployment_get_type"
    c_ostree_deployment_get_type :: IO B.Types.GType

instance B.Types.TypedObject Deployment where
    glibType :: IO GType
glibType = IO GType
c_ostree_deployment_get_type

instance B.Types.GObject Deployment

-- | Convert 'Deployment' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue Deployment where
    toGValue :: Deployment -> IO GValue
toGValue o :: Deployment
o = do
        GType
gtype <- IO GType
c_ostree_deployment_get_type
        Deployment -> (Ptr Deployment -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Deployment
o (GType
-> (GValue -> Ptr Deployment -> IO ())
-> Ptr Deployment
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Deployment -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO Deployment
fromGValue gv :: GValue
gv = do
        Ptr Deployment
ptr <- GValue -> IO (Ptr Deployment)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Deployment)
        (ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Deployment -> Deployment
Deployment Ptr Deployment
ptr
        
    

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

instance O.HasParentTypes Deployment
type instance O.ParentTypes Deployment = '[GObject.Object.Object]

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

#if defined(ENABLE_OVERLOADING)
type family ResolveDeploymentMethod (t :: Symbol) (o :: *) :: * where
    ResolveDeploymentMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDeploymentMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDeploymentMethod "clone" o = DeploymentCloneMethodInfo
    ResolveDeploymentMethod "equal" o = DeploymentEqualMethodInfo
    ResolveDeploymentMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDeploymentMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDeploymentMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveDeploymentMethod "hash" o = DeploymentHashMethodInfo
    ResolveDeploymentMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDeploymentMethod "isPinned" o = DeploymentIsPinnedMethodInfo
    ResolveDeploymentMethod "isStaged" o = DeploymentIsStagedMethodInfo
    ResolveDeploymentMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDeploymentMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDeploymentMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDeploymentMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDeploymentMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDeploymentMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDeploymentMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDeploymentMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDeploymentMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDeploymentMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDeploymentMethod "getBootconfig" o = DeploymentGetBootconfigMethodInfo
    ResolveDeploymentMethod "getBootcsum" o = DeploymentGetBootcsumMethodInfo
    ResolveDeploymentMethod "getBootserial" o = DeploymentGetBootserialMethodInfo
    ResolveDeploymentMethod "getCsum" o = DeploymentGetCsumMethodInfo
    ResolveDeploymentMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDeploymentMethod "getDeployserial" o = DeploymentGetDeployserialMethodInfo
    ResolveDeploymentMethod "getIndex" o = DeploymentGetIndexMethodInfo
    ResolveDeploymentMethod "getOrigin" o = DeploymentGetOriginMethodInfo
    ResolveDeploymentMethod "getOriginRelpath" o = DeploymentGetOriginRelpathMethodInfo
    ResolveDeploymentMethod "getOsname" o = DeploymentGetOsnameMethodInfo
    ResolveDeploymentMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDeploymentMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDeploymentMethod "getUnlocked" o = DeploymentGetUnlockedMethodInfo
    ResolveDeploymentMethod "setBootconfig" o = DeploymentSetBootconfigMethodInfo
    ResolveDeploymentMethod "setBootserial" o = DeploymentSetBootserialMethodInfo
    ResolveDeploymentMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDeploymentMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveDeploymentMethod "setIndex" o = DeploymentSetIndexMethodInfo
    ResolveDeploymentMethod "setOrigin" o = DeploymentSetOriginMethodInfo
    ResolveDeploymentMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDeploymentMethod l o = O.MethodResolutionFailed l o

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

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Deployment
type instance O.AttributeList Deployment = DeploymentAttributeList
type DeploymentAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Deployment = DeploymentSignalList
type DeploymentSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method Deployment::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "index"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Global index into the bootloader entries"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "osname"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "\"stateroot\" for this deployment"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "csum"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "OSTree commit that will be deployed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "deployserial"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Unique counter" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bootcsum"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Kernel/initrd checksum"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bootserial"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Unique index" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "OSTree" , name = "Deployment" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_new" ostree_deployment_new :: 
    Int32 ->                                -- index : TBasicType TInt
    CString ->                              -- osname : TBasicType TUTF8
    CString ->                              -- csum : TBasicType TUTF8
    Int32 ->                                -- deployserial : TBasicType TInt
    CString ->                              -- bootcsum : TBasicType TUTF8
    Int32 ->                                -- bootserial : TBasicType TInt
    IO (Ptr Deployment)

-- | /No description available in the introspection data./
deploymentNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -- ^ /@index@/: Global index into the bootloader entries
    -> T.Text
    -- ^ /@osname@/: \"stateroot\" for this deployment
    -> T.Text
    -- ^ /@csum@/: OSTree commit that will be deployed
    -> Int32
    -- ^ /@deployserial@/: Unique counter
    -> Maybe (T.Text)
    -- ^ /@bootcsum@/: Kernel\/initrd checksum
    -> Int32
    -- ^ /@bootserial@/: Unique index
    -> m Deployment
    -- ^ __Returns:__ New deployment
deploymentNew :: Int32
-> Text -> Text -> Int32 -> Maybe Text -> Int32 -> m Deployment
deploymentNew index :: Int32
index osname :: Text
osname csum :: Text
csum deployserial :: Int32
deployserial bootcsum :: Maybe Text
bootcsum bootserial :: Int32
bootserial = IO Deployment -> m Deployment
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Deployment -> m Deployment) -> IO Deployment -> m Deployment
forall a b. (a -> b) -> a -> b
$ do
    CString
osname' <- Text -> IO CString
textToCString Text
osname
    CString
csum' <- Text -> IO CString
textToCString Text
csum
    CString
maybeBootcsum <- case Maybe Text
bootcsum of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jBootcsum :: Text
jBootcsum -> do
            CString
jBootcsum' <- Text -> IO CString
textToCString Text
jBootcsum
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jBootcsum'
    Ptr Deployment
result <- Int32
-> CString
-> CString
-> Int32
-> CString
-> Int32
-> IO (Ptr Deployment)
ostree_deployment_new Int32
index CString
osname' CString
csum' Int32
deployserial CString
maybeBootcsum Int32
bootserial
    Text -> Ptr Deployment -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "deploymentNew" Ptr Deployment
result
    Deployment
result' <- ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Deployment -> Deployment
Deployment) Ptr Deployment
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
osname'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
csum'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeBootcsum
    Deployment -> IO Deployment
forall (m :: * -> *) a. Monad m => a -> m a
return Deployment
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Deployment::clone
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "OSTree" , name = "Deployment" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_clone" ostree_deployment_clone :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO (Ptr Deployment)

-- | /No description available in the introspection data./
deploymentClone ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: Deployment
    -> m Deployment
    -- ^ __Returns:__ New deep copy of /@self@/
deploymentClone :: a -> m Deployment
deploymentClone self :: a
self = IO Deployment -> m Deployment
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Deployment -> m Deployment) -> IO Deployment -> m Deployment
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Deployment
result <- Ptr Deployment -> IO (Ptr Deployment)
ostree_deployment_clone Ptr Deployment
self'
    Text -> Ptr Deployment -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "deploymentClone" Ptr Deployment
result
    Deployment
result' <- ((ManagedPtr Deployment -> Deployment)
-> Ptr Deployment -> IO Deployment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Deployment -> Deployment
Deployment) Ptr Deployment
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Deployment -> IO Deployment
forall (m :: * -> *) a. Monad m => a -> m a
return Deployment
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentCloneMethodInfo
instance (signature ~ (m Deployment), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentCloneMethodInfo a signature where
    overloadedMethod = deploymentClone

#endif

-- method Deployment::equal
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "ap"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bp"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_equal" ostree_deployment_equal :: 
    Ptr Deployment ->                       -- ap : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    Ptr Deployment ->                       -- bp : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO CInt

-- | /No description available in the introspection data./
deploymentEqual ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a, IsDeployment b) =>
    a
    -- ^ /@ap@/: A deployment
    -> b
    -- ^ /@bp@/: A deployment
    -> m Bool
    -- ^ __Returns:__ 'P.True' if deployments have the same osname, csum, and deployserial
deploymentEqual :: a -> b -> m Bool
deploymentEqual ap :: a
ap bp :: b
bp = IO Bool -> m Bool
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 Deployment
ap' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    Ptr Deployment
bp' <- b -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
bp
    CInt
result <- Ptr Deployment -> Ptr Deployment -> IO CInt
ostree_deployment_equal Ptr Deployment
ap' Ptr Deployment
bp'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ap
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
bp
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentEqualMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDeployment a, IsDeployment b) => O.MethodInfo DeploymentEqualMethodInfo a signature where
    overloadedMethod = deploymentEqual

#endif

-- method Deployment::get_bootconfig
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "OSTree" , name = "BootconfigParser" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_bootconfig" ostree_deployment_get_bootconfig :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO (Ptr OSTree.BootconfigParser.BootconfigParser)

-- | /No description available in the introspection data./
deploymentGetBootconfig ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: Deployment
    -> m OSTree.BootconfigParser.BootconfigParser
    -- ^ __Returns:__ Boot configuration
deploymentGetBootconfig :: a -> m BootconfigParser
deploymentGetBootconfig self :: a
self = IO BootconfigParser -> m BootconfigParser
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BootconfigParser -> m BootconfigParser)
-> IO BootconfigParser -> m BootconfigParser
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr BootconfigParser
result <- Ptr Deployment -> IO (Ptr BootconfigParser)
ostree_deployment_get_bootconfig Ptr Deployment
self'
    Text -> Ptr BootconfigParser -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "deploymentGetBootconfig" Ptr BootconfigParser
result
    BootconfigParser
result' <- ((ManagedPtr BootconfigParser -> BootconfigParser)
-> Ptr BootconfigParser -> IO BootconfigParser
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr BootconfigParser -> BootconfigParser
OSTree.BootconfigParser.BootconfigParser) Ptr BootconfigParser
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    BootconfigParser -> IO BootconfigParser
forall (m :: * -> *) a. Monad m => a -> m a
return BootconfigParser
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentGetBootconfigMethodInfo
instance (signature ~ (m OSTree.BootconfigParser.BootconfigParser), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetBootconfigMethodInfo a signature where
    overloadedMethod = deploymentGetBootconfig

#endif

-- method Deployment::get_bootcsum
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_bootcsum" ostree_deployment_get_bootcsum :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO CString

-- | /No description available in the introspection data./
deploymentGetBootcsum ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> m T.Text
deploymentGetBootcsum :: a -> m Text
deploymentGetBootcsum self :: a
self = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
result <- Ptr Deployment -> IO CString
ostree_deployment_get_bootcsum Ptr Deployment
self'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "deploymentGetBootcsum" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentGetBootcsumMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetBootcsumMethodInfo a signature where
    overloadedMethod = deploymentGetBootcsum

#endif

-- method Deployment::get_bootserial
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_bootserial" ostree_deployment_get_bootserial :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO Int32

-- | /No description available in the introspection data./
deploymentGetBootserial ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> m Int32
deploymentGetBootserial :: a -> m Int32
deploymentGetBootserial self :: a
self = IO Int32 -> m Int32
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
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Int32
result <- Ptr Deployment -> IO Int32
ostree_deployment_get_bootserial Ptr Deployment
self'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data DeploymentGetBootserialMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetBootserialMethodInfo a signature where
    overloadedMethod = deploymentGetBootserial

#endif

-- method Deployment::get_csum
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_csum" ostree_deployment_get_csum :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO CString

-- | /No description available in the introspection data./
deploymentGetCsum ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> m T.Text
deploymentGetCsum :: a -> m Text
deploymentGetCsum self :: a
self = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
result <- Ptr Deployment -> IO CString
ostree_deployment_get_csum Ptr Deployment
self'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "deploymentGetCsum" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentGetCsumMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetCsumMethodInfo a signature where
    overloadedMethod = deploymentGetCsum

#endif

-- method Deployment::get_deployserial
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_deployserial" ostree_deployment_get_deployserial :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO Int32

-- | /No description available in the introspection data./
deploymentGetDeployserial ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> m Int32
deploymentGetDeployserial :: a -> m Int32
deploymentGetDeployserial self :: a
self = IO Int32 -> m Int32
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
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Int32
result <- Ptr Deployment -> IO Int32
ostree_deployment_get_deployserial Ptr Deployment
self'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data DeploymentGetDeployserialMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetDeployserialMethodInfo a signature where
    overloadedMethod = deploymentGetDeployserial

#endif

-- method Deployment::get_index
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_index" ostree_deployment_get_index :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO Int32

-- | /No description available in the introspection data./
deploymentGetIndex ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: Deployment
    -> m Int32
    -- ^ __Returns:__ The global index into the bootloader ordering
deploymentGetIndex :: a -> m Int32
deploymentGetIndex self :: a
self = IO Int32 -> m Int32
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
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Int32
result <- Ptr Deployment -> IO Int32
ostree_deployment_get_index Ptr Deployment
self'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data DeploymentGetIndexMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetIndexMethodInfo a signature where
    overloadedMethod = deploymentGetIndex

#endif

-- method Deployment::get_origin
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GLib" , name = "KeyFile" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_origin" ostree_deployment_get_origin :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO (Ptr GLib.KeyFile.KeyFile)

-- | /No description available in the introspection data./
deploymentGetOrigin ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: Deployment
    -> m GLib.KeyFile.KeyFile
    -- ^ __Returns:__ Origin
deploymentGetOrigin :: a -> m KeyFile
deploymentGetOrigin self :: a
self = IO KeyFile -> m KeyFile
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO KeyFile -> m KeyFile) -> IO KeyFile -> m KeyFile
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr KeyFile
result <- Ptr Deployment -> IO (Ptr KeyFile)
ostree_deployment_get_origin Ptr Deployment
self'
    Text -> Ptr KeyFile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "deploymentGetOrigin" Ptr KeyFile
result
    KeyFile
result' <- ((ManagedPtr KeyFile -> KeyFile) -> Ptr KeyFile -> IO KeyFile
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr KeyFile -> KeyFile
GLib.KeyFile.KeyFile) Ptr KeyFile
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    KeyFile -> IO KeyFile
forall (m :: * -> *) a. Monad m => a -> m a
return KeyFile
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentGetOriginMethodInfo
instance (signature ~ (m GLib.KeyFile.KeyFile), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetOriginMethodInfo a signature where
    overloadedMethod = deploymentGetOrigin

#endif

-- method Deployment::get_origin_relpath
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_origin_relpath" ostree_deployment_get_origin_relpath :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO CString

-- | Note this function only returns a *relative* path - if you want to
-- access, it, you must either use fd-relative api such as @/openat()/@,
-- or concatenate it with the full 'GI.OSTree.Objects.Sysroot.sysrootGetPath'.
deploymentGetOriginRelpath ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: A deployment
    -> m T.Text
    -- ^ __Returns:__ Path to deployment root directory, relative to sysroot
deploymentGetOriginRelpath :: a -> m Text
deploymentGetOriginRelpath self :: a
self = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
result <- Ptr Deployment -> IO CString
ostree_deployment_get_origin_relpath Ptr Deployment
self'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "deploymentGetOriginRelpath" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentGetOriginRelpathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetOriginRelpathMethodInfo a signature where
    overloadedMethod = deploymentGetOriginRelpath

#endif

-- method Deployment::get_osname
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_osname" ostree_deployment_get_osname :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO CString

-- | /No description available in the introspection data./
deploymentGetOsname ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> m T.Text
deploymentGetOsname :: a -> m Text
deploymentGetOsname self :: a
self = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
result <- Ptr Deployment -> IO CString
ostree_deployment_get_osname Ptr Deployment
self'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "deploymentGetOsname" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentGetOsnameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetOsnameMethodInfo a signature where
    overloadedMethod = deploymentGetOsname

#endif

-- method Deployment::get_unlocked
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "OSTree" , name = "DeploymentUnlockedState" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_get_unlocked" ostree_deployment_get_unlocked :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO CUInt

-- | /No description available in the introspection data./
-- 
-- /Since: 2016.4/
deploymentGetUnlocked ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> m OSTree.Enums.DeploymentUnlockedState
deploymentGetUnlocked :: a -> m DeploymentUnlockedState
deploymentGetUnlocked self :: a
self = IO DeploymentUnlockedState -> m DeploymentUnlockedState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeploymentUnlockedState -> m DeploymentUnlockedState)
-> IO DeploymentUnlockedState -> m DeploymentUnlockedState
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CUInt
result <- Ptr Deployment -> IO CUInt
ostree_deployment_get_unlocked Ptr Deployment
self'
    let result' :: DeploymentUnlockedState
result' = (Int -> DeploymentUnlockedState
forall a. Enum a => Int -> a
toEnum (Int -> DeploymentUnlockedState)
-> (CUInt -> Int) -> CUInt -> DeploymentUnlockedState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    DeploymentUnlockedState -> IO DeploymentUnlockedState
forall (m :: * -> *) a. Monad m => a -> m a
return DeploymentUnlockedState
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentGetUnlockedMethodInfo
instance (signature ~ (m OSTree.Enums.DeploymentUnlockedState), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentGetUnlockedMethodInfo a signature where
    overloadedMethod = deploymentGetUnlocked

#endif

-- method Deployment::hash
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "v"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_hash" ostree_deployment_hash :: 
    Ptr Deployment ->                       -- v : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO Word32

-- | /No description available in the introspection data./
deploymentHash ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@v@/: Deployment
    -> m Word32
    -- ^ __Returns:__ An integer suitable for use in a @GHashTable@
deploymentHash :: a -> m Word32
deploymentHash v :: a
v = IO Word32 -> m Word32
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
$ do
    Ptr Deployment
v' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
v
    Word32
result <- Ptr Deployment -> IO Word32
ostree_deployment_hash Ptr Deployment
v'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
v
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data DeploymentHashMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentHashMethodInfo a signature where
    overloadedMethod = deploymentHash

#endif

-- method Deployment::is_pinned
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_is_pinned" ostree_deployment_is_pinned :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO CInt

-- | See 'GI.OSTree.Objects.Sysroot.sysrootDeploymentSetPinned'.
-- 
-- /Since: 2018.3/
deploymentIsPinned ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: Deployment
    -> m Bool
    -- ^ __Returns:__ @TRUE@ if deployment will not be subject to GC
deploymentIsPinned :: a -> m Bool
deploymentIsPinned self :: a
self = IO Bool -> m Bool
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 Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr Deployment -> IO CInt
ostree_deployment_is_pinned Ptr Deployment
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentIsPinnedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentIsPinnedMethodInfo a signature where
    overloadedMethod = deploymentIsPinned

#endif

-- method Deployment::is_staged
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_is_staged" ostree_deployment_is_staged :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    IO CInt

-- | /No description available in the introspection data./
-- 
-- /Since: 2018.3/
deploymentIsStaged ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: Deployment
    -> m Bool
    -- ^ __Returns:__ @TRUE@ if deployment should be \"finalized\" at shutdown time
deploymentIsStaged :: a -> m Bool
deploymentIsStaged self :: a
self = IO Bool -> m Bool
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 Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr Deployment -> IO CInt
ostree_deployment_is_staged Ptr Deployment
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeploymentIsStagedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentIsStagedMethodInfo a signature where
    overloadedMethod = deploymentIsStaged

#endif

-- method Deployment::set_bootconfig
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bootconfig"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "BootconfigParser" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Bootloader configuration object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_set_bootconfig" ostree_deployment_set_bootconfig :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    Ptr OSTree.BootconfigParser.BootconfigParser -> -- bootconfig : TInterface (Name {namespace = "OSTree", name = "BootconfigParser"})
    IO ()

-- | Set or clear the bootloader configuration.
deploymentSetBootconfig ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a, OSTree.BootconfigParser.IsBootconfigParser b) =>
    a
    -- ^ /@self@/: Deployment
    -> Maybe (b)
    -- ^ /@bootconfig@/: Bootloader configuration object
    -> m ()
deploymentSetBootconfig :: a -> Maybe b -> m ()
deploymentSetBootconfig self :: a
self bootconfig :: Maybe b
bootconfig = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr BootconfigParser
maybeBootconfig <- case Maybe b
bootconfig of
        Nothing -> Ptr BootconfigParser -> IO (Ptr BootconfigParser)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BootconfigParser
forall a. Ptr a
nullPtr
        Just jBootconfig :: b
jBootconfig -> do
            Ptr BootconfigParser
jBootconfig' <- b -> IO (Ptr BootconfigParser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jBootconfig
            Ptr BootconfigParser -> IO (Ptr BootconfigParser)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BootconfigParser
jBootconfig'
    Ptr Deployment -> Ptr BootconfigParser -> IO ()
ostree_deployment_set_bootconfig Ptr Deployment
self' Ptr BootconfigParser
maybeBootconfig
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
bootconfig b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeploymentSetBootconfigMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDeployment a, OSTree.BootconfigParser.IsBootconfigParser b) => O.MethodInfo DeploymentSetBootconfigMethodInfo a signature where
    overloadedMethod = deploymentSetBootconfig

#endif

-- method Deployment::set_bootserial
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "index"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Don't use this" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_set_bootserial" ostree_deployment_set_bootserial :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    Int32 ->                                -- index : TBasicType TInt
    IO ()

-- | Should never have been made public API; don\'t use this.
deploymentSetBootserial ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: Deployment
    -> Int32
    -- ^ /@index@/: Don\'t use this
    -> m ()
deploymentSetBootserial :: a -> Int32 -> m ()
deploymentSetBootserial self :: a
self index :: Int32
index = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Deployment -> Int32 -> IO ()
ostree_deployment_set_bootserial Ptr Deployment
self' Int32
index
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeploymentSetBootserialMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentSetBootserialMethodInfo a signature where
    overloadedMethod = deploymentSetBootserial

#endif

-- method Deployment::set_index
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "index"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Index into bootloader ordering"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_set_index" ostree_deployment_set_index :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    Int32 ->                                -- index : TBasicType TInt
    IO ()

-- | Sets the global index into the bootloader ordering.
deploymentSetIndex ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: Deployment
    -> Int32
    -- ^ /@index@/: Index into bootloader ordering
    -> m ()
deploymentSetIndex :: a -> Int32 -> m ()
deploymentSetIndex self :: a
self index :: Int32
index = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Deployment -> Int32 -> IO ()
ostree_deployment_set_index Ptr Deployment
self' Int32
index
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeploymentSetIndexMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentSetIndexMethodInfo a signature where
    overloadedMethod = deploymentSetIndex

#endif

-- method Deployment::set_origin
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "Deployment" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Deployment" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "origin"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "KeyFile" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Set the origin for this deployment"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_set_origin" ostree_deployment_set_origin :: 
    Ptr Deployment ->                       -- self : TInterface (Name {namespace = "OSTree", name = "Deployment"})
    Ptr GLib.KeyFile.KeyFile ->             -- origin : TInterface (Name {namespace = "GLib", name = "KeyFile"})
    IO ()

-- | Replace the \"origin\", which is a description of the source
-- of the deployment and how to update to the next version.
deploymentSetOrigin ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -- ^ /@self@/: Deployment
    -> Maybe (GLib.KeyFile.KeyFile)
    -- ^ /@origin@/: Set the origin for this deployment
    -> m ()
deploymentSetOrigin :: a -> Maybe KeyFile -> m ()
deploymentSetOrigin self :: a
self origin :: Maybe KeyFile
origin = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Deployment
self' <- a -> IO (Ptr Deployment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr KeyFile
maybeOrigin <- case Maybe KeyFile
origin of
        Nothing -> Ptr KeyFile -> IO (Ptr KeyFile)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
forall a. Ptr a
nullPtr
        Just jOrigin :: KeyFile
jOrigin -> do
            Ptr KeyFile
jOrigin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
jOrigin
            Ptr KeyFile -> IO (Ptr KeyFile)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr KeyFile
jOrigin'
    Ptr Deployment -> Ptr KeyFile -> IO ()
ostree_deployment_set_origin Ptr Deployment
self' Ptr KeyFile
maybeOrigin
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe KeyFile -> (KeyFile -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe KeyFile
origin KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeploymentSetOriginMethodInfo
instance (signature ~ (Maybe (GLib.KeyFile.KeyFile) -> m ()), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentSetOriginMethodInfo a signature where
    overloadedMethod = deploymentSetOrigin

#endif

-- method Deployment::origin_remove_transient_state
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "origin"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "KeyFile" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An origin" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_origin_remove_transient_state" ostree_deployment_origin_remove_transient_state :: 
    Ptr GLib.KeyFile.KeyFile ->             -- origin : TInterface (Name {namespace = "GLib", name = "KeyFile"})
    IO ()

-- | The intention of an origin file is primarily describe the \"inputs\" that
-- resulted in a deployment, and it\'s commonly used to derive the new state. For
-- example, a key value (in pure libostree mode) is the \"refspec\". However,
-- libostree (or other applications) may want to store \"transient\" state that
-- should not be carried across upgrades.
-- 
-- This function just removes all members of the @libostree-transient@ group.
-- The name of that group is available to all libostree users; best practice
-- would be to prefix values underneath there with a short identifier for your
-- software.
-- 
-- Additionally, this function will remove the @origin\/unlocked@ and
-- @origin\/override-commit@ members; these should be considered transient state
-- that should have been under an explicit group.
-- 
-- /Since: 2018.3/
deploymentOriginRemoveTransientState ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GLib.KeyFile.KeyFile
    -- ^ /@origin@/: An origin
    -> m ()
deploymentOriginRemoveTransientState :: KeyFile -> m ()
deploymentOriginRemoveTransientState origin :: KeyFile
origin = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr KeyFile
origin' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
origin
    Ptr KeyFile -> IO ()
ostree_deployment_origin_remove_transient_state Ptr KeyFile
origin'
    KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
origin
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method Deployment::unlocked_state_to_string
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "state"
--           , argType =
--               TInterface
--                 Name { namespace = "OSTree" , name = "DeploymentUnlockedState" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "ostree_deployment_unlocked_state_to_string" ostree_deployment_unlocked_state_to_string :: 
    CUInt ->                                -- state : TInterface (Name {namespace = "OSTree", name = "DeploymentUnlockedState"})
    IO CString

-- | /No description available in the introspection data./
-- 
-- /Since: 2016.4/
deploymentUnlockedStateToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    OSTree.Enums.DeploymentUnlockedState
    -> m T.Text
    -- ^ __Returns:__ Description of state
deploymentUnlockedStateToString :: DeploymentUnlockedState -> m Text
deploymentUnlockedStateToString state :: DeploymentUnlockedState
state = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    let state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (DeploymentUnlockedState -> Int)
-> DeploymentUnlockedState
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DeploymentUnlockedState -> Int
forall a. Enum a => a -> Int
fromEnum) DeploymentUnlockedState
state
    CString
result <- CUInt -> IO CString
ostree_deployment_unlocked_state_to_string CUInt
state'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "deploymentUnlockedStateToString" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
#endif