{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.OSTree.Objects.Deployment
    ( 

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


 -- * Methods
-- ** clone #method:clone#
    DeploymentCloneMethodInfo               ,
    deploymentClone                         ,


-- ** equal #method:equal#
    DeploymentEqualMethodInfo               ,
    deploymentEqual                         ,


-- ** getBootconfig #method:getBootconfig#
    DeploymentGetBootconfigMethodInfo       ,
    deploymentGetBootconfig                 ,


-- ** getBootcsum #method:getBootcsum#
    DeploymentGetBootcsumMethodInfo         ,
    deploymentGetBootcsum                   ,


-- ** getBootserial #method:getBootserial#
    DeploymentGetBootserialMethodInfo       ,
    deploymentGetBootserial                 ,


-- ** getCsum #method:getCsum#
    DeploymentGetCsumMethodInfo             ,
    deploymentGetCsum                       ,


-- ** getDeployserial #method:getDeployserial#
    DeploymentGetDeployserialMethodInfo     ,
    deploymentGetDeployserial               ,


-- ** getIndex #method:getIndex#
    DeploymentGetIndexMethodInfo            ,
    deploymentGetIndex                      ,


-- ** getOrigin #method:getOrigin#
    DeploymentGetOriginMethodInfo           ,
    deploymentGetOrigin                     ,


-- ** getOriginRelpath #method:getOriginRelpath#
    DeploymentGetOriginRelpathMethodInfo    ,
    deploymentGetOriginRelpath              ,


-- ** getOsname #method:getOsname#
    DeploymentGetOsnameMethodInfo           ,
    deploymentGetOsname                     ,


-- ** getUnlocked #method:getUnlocked#
    DeploymentGetUnlockedMethodInfo         ,
    deploymentGetUnlocked                   ,


-- ** hash #method:hash#
    deploymentHash                          ,


-- ** new #method:new#
    deploymentNew                           ,


-- ** setBootconfig #method:setBootconfig#
    DeploymentSetBootconfigMethodInfo       ,
    deploymentSetBootconfig                 ,


-- ** setBootserial #method:setBootserial#
    DeploymentSetBootserialMethodInfo       ,
    deploymentSetBootserial                 ,


-- ** setIndex #method:setIndex#
    DeploymentSetIndexMethodInfo            ,
    deploymentSetIndex                      ,


-- ** setOrigin #method:setOrigin#
    DeploymentSetOriginMethodInfo           ,
    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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 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

newtype Deployment = Deployment (ManagedPtr Deployment)
foreign import ccall "ostree_deployment_get_type"
    c_ostree_deployment_get_type :: IO GType

instance GObject Deployment where
    gobjectType _ = c_ostree_deployment_get_type
    

class GObject o => IsDeployment o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError Deployment a) =>
    IsDeployment a
#endif
instance IsDeployment Deployment
instance GObject.Object.IsObject Deployment

toDeployment :: IsDeployment o => o -> IO Deployment
toDeployment = unsafeCastTo Deployment

noDeployment :: Maybe Deployment
noDeployment = Nothing

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 "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    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 "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveDeploymentMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    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 "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) => O.IsLabelProxy t (Deployment -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDeploymentMethod t Deployment, O.MethodInfo info Deployment p) => O.IsLabel t (Deployment -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

instance O.HasAttributeList Deployment
type instance O.AttributeList Deployment = DeploymentAttributeList
type DeploymentAttributeList = ('[ ] :: [(Symbol, *)])

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

-- method Deployment::new
-- method type : Constructor
-- Args : [Arg {argCName = "index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, 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 = Nothing, 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 = Nothing, 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 = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bootcsum", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, 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 = Nothing, 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
    -> T.Text
    -> T.Text
    -> Int32
    -> T.Text
    -> Int32
    -> m Deployment
deploymentNew index osname csum deployserial bootcsum bootserial = liftIO $ do
    osname' <- textToCString osname
    csum' <- textToCString csum
    bootcsum' <- textToCString bootcsum
    result <- ostree_deployment_new index osname' csum' deployserial bootcsum' bootserial
    checkUnexpectedReturnNULL "deploymentNew" result
    result' <- (wrapObject Deployment) result
    freeMem osname'
    freeMem csum'
    freeMem bootcsum'
    return result'

-- 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 self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_clone self'
    checkUnexpectedReturnNULL "deploymentClone" result
    result' <- (wrapObject Deployment) result
    touchManagedPtr self
    return result'

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

-- 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:__ 'True' if deployments have the same osname, csum, and deployserial -}
deploymentEqual ap bp = liftIO $ do
    ap' <- unsafeManagedPtrCastPtr ap
    bp' <- unsafeManagedPtrCastPtr bp
    result <- ostree_deployment_equal ap' bp'
    let result' = (/= 0) result
    touchManagedPtr ap
    touchManagedPtr bp
    return result'

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

-- 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 self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_bootconfig self'
    checkUnexpectedReturnNULL "deploymentGetBootconfig" result
    result' <- (newObject OSTree.BootconfigParser.BootconfigParser) result
    touchManagedPtr self
    return result'

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

-- 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 self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_bootcsum self'
    checkUnexpectedReturnNULL "deploymentGetBootcsum" result
    result' <- cstringToText result
    touchManagedPtr self
    return result'

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

-- 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 self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_bootserial self'
    touchManagedPtr self
    return result

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

-- 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 self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_csum self'
    checkUnexpectedReturnNULL "deploymentGetCsum" result
    result' <- cstringToText result
    touchManagedPtr self
    return result'

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

-- 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 self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_deployserial self'
    touchManagedPtr self
    return result

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

-- 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 = 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_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
    -> m Int32
deploymentGetIndex self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_index self'
    touchManagedPtr self
    return result

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

-- 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 self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_origin self'
    checkUnexpectedReturnNULL "deploymentGetOrigin" result
    result' <- (newBoxed GLib.KeyFile.KeyFile) result
    touchManagedPtr self
    return result'

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

-- 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 self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_origin_relpath self'
    checkUnexpectedReturnNULL "deploymentGetOriginRelpath" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr self
    return result'

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

-- 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 self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_osname self'
    checkUnexpectedReturnNULL "deploymentGetOsname" result
    result' <- cstringToText result
    touchManagedPtr self
    return result'

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

-- 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./
-}
deploymentGetUnlocked ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> m OSTree.Enums.DeploymentUnlockedState
deploymentGetUnlocked self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- ostree_deployment_get_unlocked self'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr self
    return result'

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

-- 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 = Nothing, 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 = False, argDoc = Documentation {rawDocText = Nothing, 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 ()

{- |
/No description available in the introspection data./
-}
deploymentSetBootconfig ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a, OSTree.BootconfigParser.IsBootconfigParser b) =>
    a
    -> b
    -> m ()
deploymentSetBootconfig self bootconfig = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    bootconfig' <- unsafeManagedPtrCastPtr bootconfig
    ostree_deployment_set_bootconfig self' bootconfig'
    touchManagedPtr self
    touchManagedPtr bootconfig
    return ()

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

-- 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 = Nothing, 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 = Nothing, 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 ()

{- |
/No description available in the introspection data./
-}
deploymentSetBootserial ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> Int32
    -> m ()
deploymentSetBootserial self index = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    ostree_deployment_set_bootserial self' index
    touchManagedPtr self
    return ()

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

-- 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 = Nothing, 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 = Nothing, 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 ()

{- |
/No description available in the introspection data./
-}
deploymentSetIndex ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> Int32
    -> m ()
deploymentSetIndex self index = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    ostree_deployment_set_index self' index
    touchManagedPtr self
    return ()

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

-- 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 = Nothing, 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 = False, argDoc = Documentation {rawDocText = Nothing, 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 ()

{- |
/No description available in the introspection data./
-}
deploymentSetOrigin ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeployment a) =>
    a
    -> GLib.KeyFile.KeyFile
    -> m ()
deploymentSetOrigin self origin = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    origin' <- unsafeManagedPtrGetPtr origin
    ostree_deployment_set_origin self' origin'
    touchManagedPtr self
    touchManagedPtr origin
    return ()

data DeploymentSetOriginMethodInfo
instance (signature ~ (GLib.KeyFile.KeyFile -> m ()), MonadIO m, IsDeployment a) => O.MethodInfo DeploymentSetOriginMethodInfo a signature where
    overloadedMethod _ = deploymentSetOrigin

-- method Deployment::hash
-- method type : MemberFunction
-- Args : [Arg {argCName = "v", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, 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 () ->                               -- v : TBasicType TPtr
    IO Word32

{- |
/No description available in the introspection data./
-}
deploymentHash ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -> m Word32
deploymentHash v = liftIO $ do
    result <- ostree_deployment_hash v
    return result

-- 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./
-}
deploymentUnlockedStateToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    OSTree.Enums.DeploymentUnlockedState
    -> m T.Text
deploymentUnlockedStateToString state = liftIO $ do
    let state' = (fromIntegral . fromEnum) state
    result <- ostree_deployment_unlocked_state_to_string state'
    checkUnexpectedReturnNULL "deploymentUnlockedStateToString" result
    result' <- cstringToText result
    return result'