{-# LANGUAGE TypeApplications #-}


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

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

module GI.OSTree.Structs.DiffItem
    ( 

-- * Exported types
    DiffItem(..)                            ,
    newZeroDiffItem                         ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [ref]("GI.OSTree.Structs.DiffItem#g:method:ref"), [unref]("GI.OSTree.Structs.DiffItem#g:method:unref").
-- 
-- ==== Getters
-- /None/.
-- 
-- ==== Setters
-- /None/.

#if defined(ENABLE_OVERLOADING)
    ResolveDiffItemMethod                   ,
#endif

-- ** ref #method:ref#

#if defined(ENABLE_OVERLOADING)
    DiffItemRefMethodInfo                   ,
#endif
    diffItemRef                             ,


-- ** unref #method:unref#

#if defined(ENABLE_OVERLOADING)
    DiffItemUnrefMethodInfo                 ,
#endif
    diffItemUnref                           ,




 -- * Properties


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

#if defined(ENABLE_OVERLOADING)
    diffItem_refcount                       ,
#endif
    getDiffItemRefcount                     ,
    setDiffItemRefcount                     ,


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

    clearDiffItemSrc                        ,
#if defined(ENABLE_OVERLOADING)
    diffItem_src                            ,
#endif
    getDiffItemSrc                          ,
    setDiffItemSrc                          ,


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

    clearDiffItemSrcChecksum                ,
#if defined(ENABLE_OVERLOADING)
    diffItem_srcChecksum                    ,
#endif
    getDiffItemSrcChecksum                  ,
    setDiffItemSrcChecksum                  ,


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

    clearDiffItemSrcInfo                    ,
#if defined(ENABLE_OVERLOADING)
    diffItem_srcInfo                        ,
#endif
    getDiffItemSrcInfo                      ,
    setDiffItemSrcInfo                      ,


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

    clearDiffItemTarget                     ,
#if defined(ENABLE_OVERLOADING)
    diffItem_target                         ,
#endif
    getDiffItemTarget                       ,
    setDiffItemTarget                       ,


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

    clearDiffItemTargetChecksum             ,
#if defined(ENABLE_OVERLOADING)
    diffItem_targetChecksum                 ,
#endif
    getDiffItemTargetChecksum               ,
    setDiffItemTargetChecksum               ,


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

    clearDiffItemTargetInfo                 ,
#if defined(ENABLE_OVERLOADING)
    diffItem_targetInfo                     ,
#endif
    getDiffItemTargetInfo                   ,
    setDiffItemTargetInfo                   ,




    ) where

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

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

import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Objects.FileInfo as Gio.FileInfo

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

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

foreign import ccall "ostree_diff_item_get_type" c_ostree_diff_item_get_type :: 
    IO GType

type instance O.ParentTypes DiffItem = '[]
instance O.HasParentTypes DiffItem

instance B.Types.TypedObject DiffItem where
    glibType :: IO GType
glibType = IO GType
c_ostree_diff_item_get_type

instance B.Types.GBoxed DiffItem

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

-- | Construct a `DiffItem` struct initialized to zero.
newZeroDiffItem :: MonadIO m => m DiffItem
newZeroDiffItem :: forall (m :: * -> *). MonadIO m => m DiffItem
newZeroDiffItem = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
28 forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DiffItem -> DiffItem
DiffItem

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


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

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

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

diffItem_refcount :: AttrLabelProxy "refcount"
diffItem_refcount = AttrLabelProxy

#endif


-- | Get the value of the “@src@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' diffItem #src
-- @
getDiffItemSrc :: MonadIO m => DiffItem -> m (Maybe Gio.File.File)
getDiffItemSrc :: forall (m :: * -> *). MonadIO m => DiffItem -> m (Maybe File)
getDiffItemSrc DiffItem
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffItem
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffItem
ptr -> do
    Ptr File
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr DiffItem
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO (Ptr Gio.File.File)
    Maybe File
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr File
val forall a b. (a -> b) -> a -> b
$ \Ptr File
val' -> do
        File
val'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr File -> File
Gio.File.File) Ptr File
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return File
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
result

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

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

#if defined(ENABLE_OVERLOADING)
data DiffItemSrcFieldInfo
instance AttrInfo DiffItemSrcFieldInfo where
    type AttrBaseTypeConstraint DiffItemSrcFieldInfo = (~) DiffItem
    type AttrAllowedOps DiffItemSrcFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DiffItemSrcFieldInfo = (~) (Ptr Gio.File.File)
    type AttrTransferTypeConstraint DiffItemSrcFieldInfo = (~)(Ptr Gio.File.File)
    type AttrTransferType DiffItemSrcFieldInfo = (Ptr Gio.File.File)
    type AttrGetType DiffItemSrcFieldInfo = Maybe Gio.File.File
    type AttrLabel DiffItemSrcFieldInfo = "src"
    type AttrOrigin DiffItemSrcFieldInfo = DiffItem
    attrGet = getDiffItemSrc
    attrSet = setDiffItemSrc
    attrConstruct = undefined
    attrClear = clearDiffItemSrc
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.DiffItem.src"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffItem.html#g:attr:src"
        })

diffItem_src :: AttrLabelProxy "src"
diffItem_src = AttrLabelProxy

#endif


-- | Get the value of the “@target@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' diffItem #target
-- @
getDiffItemTarget :: MonadIO m => DiffItem -> m (Maybe Gio.File.File)
getDiffItemTarget :: forall (m :: * -> *). MonadIO m => DiffItem -> m (Maybe File)
getDiffItemTarget DiffItem
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffItem
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffItem
ptr -> do
    Ptr File
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr DiffItem
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO (Ptr Gio.File.File)
    Maybe File
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr File
val forall a b. (a -> b) -> a -> b
$ \Ptr File
val' -> do
        File
val'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr File -> File
Gio.File.File) Ptr File
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return File
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
result

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

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

#if defined(ENABLE_OVERLOADING)
data DiffItemTargetFieldInfo
instance AttrInfo DiffItemTargetFieldInfo where
    type AttrBaseTypeConstraint DiffItemTargetFieldInfo = (~) DiffItem
    type AttrAllowedOps DiffItemTargetFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DiffItemTargetFieldInfo = (~) (Ptr Gio.File.File)
    type AttrTransferTypeConstraint DiffItemTargetFieldInfo = (~)(Ptr Gio.File.File)
    type AttrTransferType DiffItemTargetFieldInfo = (Ptr Gio.File.File)
    type AttrGetType DiffItemTargetFieldInfo = Maybe Gio.File.File
    type AttrLabel DiffItemTargetFieldInfo = "target"
    type AttrOrigin DiffItemTargetFieldInfo = DiffItem
    attrGet = getDiffItemTarget
    attrSet = setDiffItemTarget
    attrConstruct = undefined
    attrClear = clearDiffItemTarget
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.DiffItem.target"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffItem.html#g:attr:target"
        })

diffItem_target :: AttrLabelProxy "target"
diffItem_target = AttrLabelProxy

#endif


-- | Get the value of the “@src_info@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' diffItem #srcInfo
-- @
getDiffItemSrcInfo :: MonadIO m => DiffItem -> m (Maybe Gio.FileInfo.FileInfo)
getDiffItemSrcInfo :: forall (m :: * -> *). MonadIO m => DiffItem -> m (Maybe FileInfo)
getDiffItemSrcInfo DiffItem
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffItem
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffItem
ptr -> do
    Ptr FileInfo
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr DiffItem
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) :: IO (Ptr Gio.FileInfo.FileInfo)
    Maybe FileInfo
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr FileInfo
val forall a b. (a -> b) -> a -> b
$ \Ptr FileInfo
val' -> do
        FileInfo
val'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FileInfo -> FileInfo
Gio.FileInfo.FileInfo) Ptr FileInfo
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return FileInfo
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FileInfo
result

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

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

#if defined(ENABLE_OVERLOADING)
data DiffItemSrcInfoFieldInfo
instance AttrInfo DiffItemSrcInfoFieldInfo where
    type AttrBaseTypeConstraint DiffItemSrcInfoFieldInfo = (~) DiffItem
    type AttrAllowedOps DiffItemSrcInfoFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DiffItemSrcInfoFieldInfo = (~) (Ptr Gio.FileInfo.FileInfo)
    type AttrTransferTypeConstraint DiffItemSrcInfoFieldInfo = (~)(Ptr Gio.FileInfo.FileInfo)
    type AttrTransferType DiffItemSrcInfoFieldInfo = (Ptr Gio.FileInfo.FileInfo)
    type AttrGetType DiffItemSrcInfoFieldInfo = Maybe Gio.FileInfo.FileInfo
    type AttrLabel DiffItemSrcInfoFieldInfo = "src_info"
    type AttrOrigin DiffItemSrcInfoFieldInfo = DiffItem
    attrGet = getDiffItemSrcInfo
    attrSet = setDiffItemSrcInfo
    attrConstruct = undefined
    attrClear = clearDiffItemSrcInfo
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.DiffItem.srcInfo"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffItem.html#g:attr:srcInfo"
        })

diffItem_srcInfo :: AttrLabelProxy "srcInfo"
diffItem_srcInfo = AttrLabelProxy

#endif


-- | Get the value of the “@target_info@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' diffItem #targetInfo
-- @
getDiffItemTargetInfo :: MonadIO m => DiffItem -> m (Maybe Gio.FileInfo.FileInfo)
getDiffItemTargetInfo :: forall (m :: * -> *). MonadIO m => DiffItem -> m (Maybe FileInfo)
getDiffItemTargetInfo DiffItem
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffItem
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffItem
ptr -> do
    Ptr FileInfo
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr DiffItem
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO (Ptr Gio.FileInfo.FileInfo)
    Maybe FileInfo
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr FileInfo
val forall a b. (a -> b) -> a -> b
$ \Ptr FileInfo
val' -> do
        FileInfo
val'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FileInfo -> FileInfo
Gio.FileInfo.FileInfo) Ptr FileInfo
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return FileInfo
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FileInfo
result

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

-- | Set the value of the “@target_info@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #targetInfo
-- @
clearDiffItemTargetInfo :: MonadIO m => DiffItem -> m ()
clearDiffItemTargetInfo :: forall (m :: * -> *). MonadIO m => DiffItem -> m ()
clearDiffItemTargetInfo DiffItem
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffItem
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffItem
ptr -> do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DiffItem
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (forall a. Ptr a
FP.nullPtr :: Ptr Gio.FileInfo.FileInfo)

#if defined(ENABLE_OVERLOADING)
data DiffItemTargetInfoFieldInfo
instance AttrInfo DiffItemTargetInfoFieldInfo where
    type AttrBaseTypeConstraint DiffItemTargetInfoFieldInfo = (~) DiffItem
    type AttrAllowedOps DiffItemTargetInfoFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DiffItemTargetInfoFieldInfo = (~) (Ptr Gio.FileInfo.FileInfo)
    type AttrTransferTypeConstraint DiffItemTargetInfoFieldInfo = (~)(Ptr Gio.FileInfo.FileInfo)
    type AttrTransferType DiffItemTargetInfoFieldInfo = (Ptr Gio.FileInfo.FileInfo)
    type AttrGetType DiffItemTargetInfoFieldInfo = Maybe Gio.FileInfo.FileInfo
    type AttrLabel DiffItemTargetInfoFieldInfo = "target_info"
    type AttrOrigin DiffItemTargetInfoFieldInfo = DiffItem
    attrGet = getDiffItemTargetInfo
    attrSet = setDiffItemTargetInfo
    attrConstruct = undefined
    attrClear = clearDiffItemTargetInfo
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.DiffItem.targetInfo"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffItem.html#g:attr:targetInfo"
        })

diffItem_targetInfo :: AttrLabelProxy "targetInfo"
diffItem_targetInfo = AttrLabelProxy

#endif


-- | Get the value of the “@src_checksum@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' diffItem #srcChecksum
-- @
getDiffItemSrcChecksum :: MonadIO m => DiffItem -> m (Maybe T.Text)
getDiffItemSrcChecksum :: forall (m :: * -> *). MonadIO m => DiffItem -> m (Maybe Text)
getDiffItemSrcChecksum DiffItem
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffItem
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffItem
ptr -> do
    CString
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr DiffItem
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) :: IO CString
    Maybe Text
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
        Text
val'' <- HasCallStack => CString -> IO Text
cstringToText CString
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result

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

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

#if defined(ENABLE_OVERLOADING)
data DiffItemSrcChecksumFieldInfo
instance AttrInfo DiffItemSrcChecksumFieldInfo where
    type AttrBaseTypeConstraint DiffItemSrcChecksumFieldInfo = (~) DiffItem
    type AttrAllowedOps DiffItemSrcChecksumFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DiffItemSrcChecksumFieldInfo = (~) CString
    type AttrTransferTypeConstraint DiffItemSrcChecksumFieldInfo = (~)CString
    type AttrTransferType DiffItemSrcChecksumFieldInfo = CString
    type AttrGetType DiffItemSrcChecksumFieldInfo = Maybe T.Text
    type AttrLabel DiffItemSrcChecksumFieldInfo = "src_checksum"
    type AttrOrigin DiffItemSrcChecksumFieldInfo = DiffItem
    attrGet = getDiffItemSrcChecksum
    attrSet = setDiffItemSrcChecksum
    attrConstruct = undefined
    attrClear = clearDiffItemSrcChecksum
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.DiffItem.srcChecksum"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffItem.html#g:attr:srcChecksum"
        })

diffItem_srcChecksum :: AttrLabelProxy "srcChecksum"
diffItem_srcChecksum = AttrLabelProxy

#endif


-- | Get the value of the “@target_checksum@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' diffItem #targetChecksum
-- @
getDiffItemTargetChecksum :: MonadIO m => DiffItem -> m (Maybe T.Text)
getDiffItemTargetChecksum :: forall (m :: * -> *). MonadIO m => DiffItem -> m (Maybe Text)
getDiffItemTargetChecksum DiffItem
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr DiffItem
s forall a b. (a -> b) -> a -> b
$ \Ptr DiffItem
ptr -> do
    CString
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr DiffItem
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO CString
    Maybe Text
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
        Text
val'' <- HasCallStack => CString -> IO Text
cstringToText CString
val'
        forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
    forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result

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

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

#if defined(ENABLE_OVERLOADING)
data DiffItemTargetChecksumFieldInfo
instance AttrInfo DiffItemTargetChecksumFieldInfo where
    type AttrBaseTypeConstraint DiffItemTargetChecksumFieldInfo = (~) DiffItem
    type AttrAllowedOps DiffItemTargetChecksumFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DiffItemTargetChecksumFieldInfo = (~) CString
    type AttrTransferTypeConstraint DiffItemTargetChecksumFieldInfo = (~)CString
    type AttrTransferType DiffItemTargetChecksumFieldInfo = CString
    type AttrGetType DiffItemTargetChecksumFieldInfo = Maybe T.Text
    type AttrLabel DiffItemTargetChecksumFieldInfo = "target_checksum"
    type AttrOrigin DiffItemTargetChecksumFieldInfo = DiffItem
    attrGet = getDiffItemTargetChecksum
    attrSet = setDiffItemTargetChecksum
    attrConstruct = undefined
    attrClear = clearDiffItemTargetChecksum
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.DiffItem.targetChecksum"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffItem.html#g:attr:targetChecksum"
        })

diffItem_targetChecksum :: AttrLabelProxy "targetChecksum"
diffItem_targetChecksum = AttrLabelProxy

#endif



#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DiffItem
type instance O.AttributeList DiffItem = DiffItemAttributeList
type DiffItemAttributeList = ('[ '("refcount", DiffItemRefcountFieldInfo), '("src", DiffItemSrcFieldInfo), '("target", DiffItemTargetFieldInfo), '("srcInfo", DiffItemSrcInfoFieldInfo), '("targetInfo", DiffItemTargetInfoFieldInfo), '("srcChecksum", DiffItemSrcChecksumFieldInfo), '("targetChecksum", DiffItemTargetChecksumFieldInfo)] :: [(Symbol, DK.Type)])
#endif

-- method DiffItem::ref
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "diffitem"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "DiffItem" }
--           , 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 = "DiffItem" })
-- throws : False
-- Skip return : False

foreign import ccall "ostree_diff_item_ref" ostree_diff_item_ref :: 
    Ptr DiffItem ->                         -- diffitem : TInterface (Name {namespace = "OSTree", name = "DiffItem"})
    IO (Ptr DiffItem)

-- | /No description available in the introspection data./
diffItemRef ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    DiffItem
    -> m DiffItem
diffItemRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DiffItem -> m DiffItem
diffItemRef DiffItem
diffitem = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    Ptr DiffItem
diffitem' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DiffItem
diffitem
    Ptr DiffItem
result <- Ptr DiffItem -> IO (Ptr DiffItem)
ostree_diff_item_ref Ptr DiffItem
diffitem'
    forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"diffItemRef" Ptr DiffItem
result
    DiffItem
result' <- (forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DiffItem -> DiffItem
DiffItem) Ptr DiffItem
result
    forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DiffItem
diffitem
    forall (m :: * -> *) a. Monad m => a -> m a
return DiffItem
result'

#if defined(ENABLE_OVERLOADING)
data DiffItemRefMethodInfo
instance (signature ~ (m DiffItem), MonadIO m) => O.OverloadedMethod DiffItemRefMethodInfo DiffItem signature where
    overloadedMethod = diffItemRef

instance O.OverloadedMethodInfo DiffItemRefMethodInfo DiffItem where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.DiffItem.diffItemRef",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffItem.html#v:diffItemRef"
        })


#endif

-- method DiffItem::unref
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "diffitem"
--           , argType =
--               TInterface Name { namespace = "OSTree" , name = "DiffItem" }
--           , 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_diff_item_unref" ostree_diff_item_unref :: 
    Ptr DiffItem ->                         -- diffitem : TInterface (Name {namespace = "OSTree", name = "DiffItem"})
    IO ()

-- | /No description available in the introspection data./
diffItemUnref ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    DiffItem
    -> m ()
diffItemUnref :: forall (m :: * -> *). (HasCallStack, MonadIO m) => DiffItem -> m ()
diffItemUnref DiffItem
diffitem = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    Ptr DiffItem
diffitem' <- forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DiffItem
diffitem
    Ptr DiffItem -> IO ()
ostree_diff_item_unref Ptr DiffItem
diffitem'
    forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DiffItem
diffitem
    forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DiffItemUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod DiffItemUnrefMethodInfo DiffItem signature where
    overloadedMethod = diffItemUnref

instance O.OverloadedMethodInfo DiffItemUnrefMethodInfo DiffItem where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.OSTree.Structs.DiffItem.diffItemUnref",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ostree-1.0.16/docs/GI-OSTree-Structs-DiffItem.html#v:diffItemUnref"
        })


#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveDiffItemMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveDiffItemMethod "ref" o = DiffItemRefMethodInfo
    ResolveDiffItemMethod "unref" o = DiffItemUnrefMethodInfo
    ResolveDiffItemMethod l o = O.MethodResolutionFailed l o

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

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

#endif

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

#endif