{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Represents the options used when doign a cherry-pick.

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

module GI.Ggit.Objects.CherryPickOptions
    ( 

-- * Exported types
    CherryPickOptions(..)                   ,
    IsCherryPickOptions                     ,
    toCherryPickOptions                     ,
    noCherryPickOptions                     ,


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

#if defined(ENABLE_OVERLOADING)
    ResolveCherryPickOptionsMethod          ,
#endif


-- ** getCheckoutOptions #method:getCheckoutOptions#

#if defined(ENABLE_OVERLOADING)
    CherryPickOptionsGetCheckoutOptionsMethodInfo,
#endif
    cherryPickOptionsGetCheckoutOptions     ,


-- ** getMainline #method:getMainline#

#if defined(ENABLE_OVERLOADING)
    CherryPickOptionsGetMainlineMethodInfo  ,
#endif
    cherryPickOptionsGetMainline            ,


-- ** getMergeOptions #method:getMergeOptions#

#if defined(ENABLE_OVERLOADING)
    CherryPickOptionsGetMergeOptionsMethodInfo,
#endif
    cherryPickOptionsGetMergeOptions        ,


-- ** new #method:new#

    cherryPickOptionsNew                    ,


-- ** setCheckoutOptions #method:setCheckoutOptions#

#if defined(ENABLE_OVERLOADING)
    CherryPickOptionsSetCheckoutOptionsMethodInfo,
#endif
    cherryPickOptionsSetCheckoutOptions     ,


-- ** setMainline #method:setMainline#

#if defined(ENABLE_OVERLOADING)
    CherryPickOptionsSetMainlineMethodInfo  ,
#endif
    cherryPickOptionsSetMainline            ,


-- ** setMergeOptions #method:setMergeOptions#

#if defined(ENABLE_OVERLOADING)
    CherryPickOptionsSetMergeOptionsMethodInfo,
#endif
    cherryPickOptionsSetMergeOptions        ,




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

#if defined(ENABLE_OVERLOADING)
    CherryPickOptionsCheckoutOptionsPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
    cherryPickOptionsCheckoutOptions        ,
#endif
    clearCherryPickOptionsCheckoutOptions   ,
    constructCherryPickOptionsCheckoutOptions,
    getCherryPickOptionsCheckoutOptions     ,
    setCherryPickOptionsCheckoutOptions     ,


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

#if defined(ENABLE_OVERLOADING)
    CherryPickOptionsMainlinePropertyInfo   ,
#endif
#if defined(ENABLE_OVERLOADING)
    cherryPickOptionsMainline               ,
#endif
    constructCherryPickOptionsMainline      ,
    getCherryPickOptionsMainline            ,
    setCherryPickOptionsMainline            ,


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

#if defined(ENABLE_OVERLOADING)
    CherryPickOptionsMergeOptionsPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
    cherryPickOptionsMergeOptions           ,
#endif
    clearCherryPickOptionsMergeOptions      ,
    constructCherryPickOptionsMergeOptions  ,
    getCherryPickOptionsMergeOptions        ,
    setCherryPickOptionsMergeOptions        ,




    ) 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.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 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.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Ggit.Objects.CheckoutOptions as Ggit.CheckoutOptions
import {-# SOURCE #-} qualified GI.Ggit.Structs.MergeOptions as Ggit.MergeOptions

-- | Memory-managed wrapper type.
newtype CherryPickOptions = CherryPickOptions (ManagedPtr CherryPickOptions)
    deriving (CherryPickOptions -> CherryPickOptions -> Bool
(CherryPickOptions -> CherryPickOptions -> Bool)
-> (CherryPickOptions -> CherryPickOptions -> Bool)
-> Eq CherryPickOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CherryPickOptions -> CherryPickOptions -> Bool
$c/= :: CherryPickOptions -> CherryPickOptions -> Bool
== :: CherryPickOptions -> CherryPickOptions -> Bool
$c== :: CherryPickOptions -> CherryPickOptions -> Bool
Eq)
foreign import ccall "ggit_cherry_pick_options_get_type"
    c_ggit_cherry_pick_options_get_type :: IO GType

instance GObject CherryPickOptions where
    gobjectType :: IO GType
gobjectType = IO GType
c_ggit_cherry_pick_options_get_type
    

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

-- | Type class for types which can be safely cast to `CherryPickOptions`, for instance with `toCherryPickOptions`.
class (GObject o, O.IsDescendantOf CherryPickOptions o) => IsCherryPickOptions o
instance (GObject o, O.IsDescendantOf CherryPickOptions o) => IsCherryPickOptions o

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

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

-- | A convenience alias for `Nothing` :: `Maybe` `CherryPickOptions`.
noCherryPickOptions :: Maybe CherryPickOptions
noCherryPickOptions :: Maybe CherryPickOptions
noCherryPickOptions = Maybe CherryPickOptions
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveCherryPickOptionsMethod (t :: Symbol) (o :: *) :: * where
    ResolveCherryPickOptionsMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveCherryPickOptionsMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveCherryPickOptionsMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveCherryPickOptionsMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveCherryPickOptionsMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveCherryPickOptionsMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveCherryPickOptionsMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveCherryPickOptionsMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveCherryPickOptionsMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveCherryPickOptionsMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveCherryPickOptionsMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveCherryPickOptionsMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveCherryPickOptionsMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveCherryPickOptionsMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveCherryPickOptionsMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveCherryPickOptionsMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveCherryPickOptionsMethod "getCheckoutOptions" o = CherryPickOptionsGetCheckoutOptionsMethodInfo
    ResolveCherryPickOptionsMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveCherryPickOptionsMethod "getMainline" o = CherryPickOptionsGetMainlineMethodInfo
    ResolveCherryPickOptionsMethod "getMergeOptions" o = CherryPickOptionsGetMergeOptionsMethodInfo
    ResolveCherryPickOptionsMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveCherryPickOptionsMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveCherryPickOptionsMethod "setCheckoutOptions" o = CherryPickOptionsSetCheckoutOptionsMethodInfo
    ResolveCherryPickOptionsMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveCherryPickOptionsMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveCherryPickOptionsMethod "setMainline" o = CherryPickOptionsSetMainlineMethodInfo
    ResolveCherryPickOptionsMethod "setMergeOptions" o = CherryPickOptionsSetMergeOptionsMethodInfo
    ResolveCherryPickOptionsMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveCherryPickOptionsMethod l o = O.MethodResolutionFailed l o

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

#endif

-- VVV Prop "checkout-options"
   -- Type: TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just True)

-- | Get the value of the “@checkout-options@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' cherryPickOptions #checkoutOptions
-- @
getCherryPickOptionsCheckoutOptions :: (MonadIO m, IsCherryPickOptions o) => o -> m Ggit.CheckoutOptions.CheckoutOptions
getCherryPickOptionsCheckoutOptions :: o -> m CheckoutOptions
getCherryPickOptionsCheckoutOptions obj :: o
obj = IO CheckoutOptions -> m CheckoutOptions
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CheckoutOptions -> m CheckoutOptions)
-> IO CheckoutOptions -> m CheckoutOptions
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe CheckoutOptions) -> IO CheckoutOptions
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing "getCherryPickOptionsCheckoutOptions" (IO (Maybe CheckoutOptions) -> IO CheckoutOptions)
-> IO (Maybe CheckoutOptions) -> IO CheckoutOptions
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr CheckoutOptions -> CheckoutOptions)
-> IO (Maybe CheckoutOptions)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "checkout-options" ManagedPtr CheckoutOptions -> CheckoutOptions
Ggit.CheckoutOptions.CheckoutOptions

-- | Set the value of the “@checkout-options@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' cherryPickOptions [ #checkoutOptions 'Data.GI.Base.Attributes.:=' value ]
-- @
setCherryPickOptionsCheckoutOptions :: (MonadIO m, IsCherryPickOptions o, Ggit.CheckoutOptions.IsCheckoutOptions a) => o -> a -> m ()
setCherryPickOptionsCheckoutOptions :: o -> a -> m ()
setCherryPickOptionsCheckoutOptions obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "checkout-options" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@checkout-options@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCherryPickOptionsCheckoutOptions :: (IsCherryPickOptions o, Ggit.CheckoutOptions.IsCheckoutOptions a) => a -> IO (GValueConstruct o)
constructCherryPickOptionsCheckoutOptions :: a -> IO (GValueConstruct o)
constructCherryPickOptionsCheckoutOptions val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "checkout-options" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Set the value of the “@checkout-options@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #checkoutOptions
-- @
clearCherryPickOptionsCheckoutOptions :: (MonadIO m, IsCherryPickOptions o) => o -> m ()
clearCherryPickOptionsCheckoutOptions :: o -> m ()
clearCherryPickOptionsCheckoutOptions obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe CheckoutOptions -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "checkout-options" (Maybe CheckoutOptions
forall a. Maybe a
Nothing :: Maybe Ggit.CheckoutOptions.CheckoutOptions)

#if defined(ENABLE_OVERLOADING)
data CherryPickOptionsCheckoutOptionsPropertyInfo
instance AttrInfo CherryPickOptionsCheckoutOptionsPropertyInfo where
    type AttrAllowedOps CherryPickOptionsCheckoutOptionsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CherryPickOptionsCheckoutOptionsPropertyInfo = IsCherryPickOptions
    type AttrSetTypeConstraint CherryPickOptionsCheckoutOptionsPropertyInfo = Ggit.CheckoutOptions.IsCheckoutOptions
    type AttrTransferTypeConstraint CherryPickOptionsCheckoutOptionsPropertyInfo = Ggit.CheckoutOptions.IsCheckoutOptions
    type AttrTransferType CherryPickOptionsCheckoutOptionsPropertyInfo = Ggit.CheckoutOptions.CheckoutOptions
    type AttrGetType CherryPickOptionsCheckoutOptionsPropertyInfo = Ggit.CheckoutOptions.CheckoutOptions
    type AttrLabel CherryPickOptionsCheckoutOptionsPropertyInfo = "checkout-options"
    type AttrOrigin CherryPickOptionsCheckoutOptionsPropertyInfo = CherryPickOptions
    attrGet = getCherryPickOptionsCheckoutOptions
    attrSet = setCherryPickOptionsCheckoutOptions
    attrTransfer _ v = do
        unsafeCastTo Ggit.CheckoutOptions.CheckoutOptions v
    attrConstruct = constructCherryPickOptionsCheckoutOptions
    attrClear = clearCherryPickOptionsCheckoutOptions
#endif

-- VVV Prop "mainline"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@mainline@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' cherryPickOptions #mainline
-- @
getCherryPickOptionsMainline :: (MonadIO m, IsCherryPickOptions o) => o -> m Word32
getCherryPickOptionsMainline :: o -> m Word32
getCherryPickOptionsMainline obj :: o
obj = 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
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj "mainline"

-- | Set the value of the “@mainline@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' cherryPickOptions [ #mainline 'Data.GI.Base.Attributes.:=' value ]
-- @
setCherryPickOptionsMainline :: (MonadIO m, IsCherryPickOptions o) => o -> Word32 -> m ()
setCherryPickOptionsMainline :: o -> Word32 -> m ()
setCherryPickOptionsMainline obj :: o
obj val :: Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj "mainline" Word32
val

-- | Construct a `GValueConstruct` with valid value for the “@mainline@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCherryPickOptionsMainline :: (IsCherryPickOptions o) => Word32 -> IO (GValueConstruct o)
constructCherryPickOptionsMainline :: Word32 -> IO (GValueConstruct o)
constructCherryPickOptionsMainline val :: Word32
val = String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 "mainline" Word32
val

#if defined(ENABLE_OVERLOADING)
data CherryPickOptionsMainlinePropertyInfo
instance AttrInfo CherryPickOptionsMainlinePropertyInfo where
    type AttrAllowedOps CherryPickOptionsMainlinePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint CherryPickOptionsMainlinePropertyInfo = IsCherryPickOptions
    type AttrSetTypeConstraint CherryPickOptionsMainlinePropertyInfo = (~) Word32
    type AttrTransferTypeConstraint CherryPickOptionsMainlinePropertyInfo = (~) Word32
    type AttrTransferType CherryPickOptionsMainlinePropertyInfo = Word32
    type AttrGetType CherryPickOptionsMainlinePropertyInfo = Word32
    type AttrLabel CherryPickOptionsMainlinePropertyInfo = "mainline"
    type AttrOrigin CherryPickOptionsMainlinePropertyInfo = CherryPickOptions
    attrGet = getCherryPickOptionsMainline
    attrSet = setCherryPickOptionsMainline
    attrTransfer _ v = do
        return v
    attrConstruct = constructCherryPickOptionsMainline
    attrClear = undefined
#endif

-- VVV Prop "merge-options"
   -- Type: TInterface (Name {namespace = "Ggit", name = "MergeOptions"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Just True)

-- | Get the value of the “@merge-options@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' cherryPickOptions #mergeOptions
-- @
getCherryPickOptionsMergeOptions :: (MonadIO m, IsCherryPickOptions o) => o -> m (Maybe Ggit.MergeOptions.MergeOptions)
getCherryPickOptionsMergeOptions :: o -> m (Maybe MergeOptions)
getCherryPickOptionsMergeOptions obj :: o
obj = IO (Maybe MergeOptions) -> m (Maybe MergeOptions)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MergeOptions) -> m (Maybe MergeOptions))
-> IO (Maybe MergeOptions) -> m (Maybe MergeOptions)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr MergeOptions -> MergeOptions)
-> IO (Maybe MergeOptions)
forall a b.
(GObject a, BoxedObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj "merge-options" ManagedPtr MergeOptions -> MergeOptions
Ggit.MergeOptions.MergeOptions

-- | Set the value of the “@merge-options@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' cherryPickOptions [ #mergeOptions 'Data.GI.Base.Attributes.:=' value ]
-- @
setCherryPickOptionsMergeOptions :: (MonadIO m, IsCherryPickOptions o) => o -> Ggit.MergeOptions.MergeOptions -> m ()
setCherryPickOptionsMergeOptions :: o -> MergeOptions -> m ()
setCherryPickOptionsMergeOptions obj :: o
obj val :: MergeOptions
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe MergeOptions -> IO ()
forall a b.
(GObject a, BoxedObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj "merge-options" (MergeOptions -> Maybe MergeOptions
forall a. a -> Maybe a
Just MergeOptions
val)

-- | Construct a `GValueConstruct` with valid value for the “@merge-options@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCherryPickOptionsMergeOptions :: (IsCherryPickOptions o) => Ggit.MergeOptions.MergeOptions -> IO (GValueConstruct o)
constructCherryPickOptionsMergeOptions :: MergeOptions -> IO (GValueConstruct o)
constructCherryPickOptionsMergeOptions val :: MergeOptions
val = String -> Maybe MergeOptions -> IO (GValueConstruct o)
forall a o.
BoxedObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed "merge-options" (MergeOptions -> Maybe MergeOptions
forall a. a -> Maybe a
Just MergeOptions
val)

-- | Set the value of the “@merge-options@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #mergeOptions
-- @
clearCherryPickOptionsMergeOptions :: (MonadIO m, IsCherryPickOptions o) => o -> m ()
clearCherryPickOptionsMergeOptions :: o -> m ()
clearCherryPickOptionsMergeOptions obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe MergeOptions -> IO ()
forall a b.
(GObject a, BoxedObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj "merge-options" (Maybe MergeOptions
forall a. Maybe a
Nothing :: Maybe Ggit.MergeOptions.MergeOptions)

#if defined(ENABLE_OVERLOADING)
data CherryPickOptionsMergeOptionsPropertyInfo
instance AttrInfo CherryPickOptionsMergeOptionsPropertyInfo where
    type AttrAllowedOps CherryPickOptionsMergeOptionsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CherryPickOptionsMergeOptionsPropertyInfo = IsCherryPickOptions
    type AttrSetTypeConstraint CherryPickOptionsMergeOptionsPropertyInfo = (~) Ggit.MergeOptions.MergeOptions
    type AttrTransferTypeConstraint CherryPickOptionsMergeOptionsPropertyInfo = (~) Ggit.MergeOptions.MergeOptions
    type AttrTransferType CherryPickOptionsMergeOptionsPropertyInfo = Ggit.MergeOptions.MergeOptions
    type AttrGetType CherryPickOptionsMergeOptionsPropertyInfo = (Maybe Ggit.MergeOptions.MergeOptions)
    type AttrLabel CherryPickOptionsMergeOptionsPropertyInfo = "merge-options"
    type AttrOrigin CherryPickOptionsMergeOptionsPropertyInfo = CherryPickOptions
    attrGet = getCherryPickOptionsMergeOptions
    attrSet = setCherryPickOptionsMergeOptions
    attrTransfer _ v = do
        return v
    attrConstruct = constructCherryPickOptionsMergeOptions
    attrClear = clearCherryPickOptionsMergeOptions
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList CherryPickOptions
type instance O.AttributeList CherryPickOptions = CherryPickOptionsAttributeList
type CherryPickOptionsAttributeList = ('[ '("checkoutOptions", CherryPickOptionsCheckoutOptionsPropertyInfo), '("mainline", CherryPickOptionsMainlinePropertyInfo), '("mergeOptions", CherryPickOptionsMergeOptionsPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
cherryPickOptionsCheckoutOptions :: AttrLabelProxy "checkoutOptions"
cherryPickOptionsCheckoutOptions = AttrLabelProxy

cherryPickOptionsMainline :: AttrLabelProxy "mainline"
cherryPickOptionsMainline = AttrLabelProxy

cherryPickOptionsMergeOptions :: AttrLabelProxy "mergeOptions"
cherryPickOptionsMergeOptions = AttrLabelProxy

#endif

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

#endif

-- method CherryPickOptions::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "Ggit" , name = "CherryPickOptions" })
-- throws : False
-- Skip return : False

foreign import ccall "ggit_cherry_pick_options_new" ggit_cherry_pick_options_new :: 
    IO (Ptr CherryPickOptions)

-- | Create a new cherry-pick options object.
cherryPickOptionsNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m CherryPickOptions
    -- ^ __Returns:__ a t'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'.
cherryPickOptionsNew :: m CherryPickOptions
cherryPickOptionsNew  = IO CherryPickOptions -> m CherryPickOptions
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CherryPickOptions -> m CherryPickOptions)
-> IO CherryPickOptions -> m CherryPickOptions
forall a b. (a -> b) -> a -> b
$ do
    Ptr CherryPickOptions
result <- IO (Ptr CherryPickOptions)
ggit_cherry_pick_options_new
    Text -> Ptr CherryPickOptions -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "cherryPickOptionsNew" Ptr CherryPickOptions
result
    CherryPickOptions
result' <- ((ManagedPtr CherryPickOptions -> CherryPickOptions)
-> Ptr CherryPickOptions -> IO CherryPickOptions
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr CherryPickOptions -> CherryPickOptions
CherryPickOptions) Ptr CherryPickOptions
result
    CherryPickOptions -> IO CherryPickOptions
forall (m :: * -> *) a. Monad m => a -> m a
return CherryPickOptions
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method CherryPickOptions::get_checkout_options
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "options"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "CherryPickOptions" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GgitCherryPickOptions."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Ggit" , name = "CheckoutOptions" })
-- throws : False
-- Skip return : False

foreign import ccall "ggit_cherry_pick_options_get_checkout_options" ggit_cherry_pick_options_get_checkout_options :: 
    Ptr CherryPickOptions ->                -- options : TInterface (Name {namespace = "Ggit", name = "CherryPickOptions"})
    IO (Ptr Ggit.CheckoutOptions.CheckoutOptions)

-- | Get the checkout options.
cherryPickOptionsGetCheckoutOptions ::
    (B.CallStack.HasCallStack, MonadIO m, IsCherryPickOptions a) =>
    a
    -- ^ /@options@/: a t'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'.
    -> m Ggit.CheckoutOptions.CheckoutOptions
    -- ^ __Returns:__ a t'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions'.
cherryPickOptionsGetCheckoutOptions :: a -> m CheckoutOptions
cherryPickOptionsGetCheckoutOptions options :: a
options = IO CheckoutOptions -> m CheckoutOptions
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CheckoutOptions -> m CheckoutOptions)
-> IO CheckoutOptions -> m CheckoutOptions
forall a b. (a -> b) -> a -> b
$ do
    Ptr CherryPickOptions
options' <- a -> IO (Ptr CherryPickOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
options
    Ptr CheckoutOptions
result <- Ptr CherryPickOptions -> IO (Ptr CheckoutOptions)
ggit_cherry_pick_options_get_checkout_options Ptr CherryPickOptions
options'
    Text -> Ptr CheckoutOptions -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "cherryPickOptionsGetCheckoutOptions" Ptr CheckoutOptions
result
    CheckoutOptions
result' <- ((ManagedPtr CheckoutOptions -> CheckoutOptions)
-> Ptr CheckoutOptions -> IO CheckoutOptions
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr CheckoutOptions -> CheckoutOptions
Ggit.CheckoutOptions.CheckoutOptions) Ptr CheckoutOptions
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
options
    CheckoutOptions -> IO CheckoutOptions
forall (m :: * -> *) a. Monad m => a -> m a
return CheckoutOptions
result'

#if defined(ENABLE_OVERLOADING)
data CherryPickOptionsGetCheckoutOptionsMethodInfo
instance (signature ~ (m Ggit.CheckoutOptions.CheckoutOptions), MonadIO m, IsCherryPickOptions a) => O.MethodInfo CherryPickOptionsGetCheckoutOptionsMethodInfo a signature where
    overloadedMethod = cherryPickOptionsGetCheckoutOptions

#endif

-- method CherryPickOptions::get_mainline
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "options"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "CherryPickOptions" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GgitCherryPickOptions."
--                 , 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 "ggit_cherry_pick_options_get_mainline" ggit_cherry_pick_options_get_mainline :: 
    Ptr CherryPickOptions ->                -- options : TInterface (Name {namespace = "Ggit", name = "CherryPickOptions"})
    IO Word32

-- | Get the mainline parent to use when cherry-picking a merge commit.
cherryPickOptionsGetMainline ::
    (B.CallStack.HasCallStack, MonadIO m, IsCherryPickOptions a) =>
    a
    -- ^ /@options@/: a t'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'.
    -> m Word32
    -- ^ __Returns:__ the mainline parent.
cherryPickOptionsGetMainline :: a -> m Word32
cherryPickOptionsGetMainline options :: a
options = 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 CherryPickOptions
options' <- a -> IO (Ptr CherryPickOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
options
    Word32
result <- Ptr CherryPickOptions -> IO Word32
ggit_cherry_pick_options_get_mainline Ptr CherryPickOptions
options'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
options
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data CherryPickOptionsGetMainlineMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsCherryPickOptions a) => O.MethodInfo CherryPickOptionsGetMainlineMethodInfo a signature where
    overloadedMethod = cherryPickOptionsGetMainline

#endif

-- method CherryPickOptions::get_merge_options
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "options"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "CherryPickOptions" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GgitCherryPickOptions."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Ggit" , name = "MergeOptions" })
-- throws : False
-- Skip return : False

foreign import ccall "ggit_cherry_pick_options_get_merge_options" ggit_cherry_pick_options_get_merge_options :: 
    Ptr CherryPickOptions ->                -- options : TInterface (Name {namespace = "Ggit", name = "CherryPickOptions"})
    IO (Ptr Ggit.MergeOptions.MergeOptions)

-- | Get the merge options.
cherryPickOptionsGetMergeOptions ::
    (B.CallStack.HasCallStack, MonadIO m, IsCherryPickOptions a) =>
    a
    -- ^ /@options@/: a t'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'.
    -> m Ggit.MergeOptions.MergeOptions
    -- ^ __Returns:__ a t'GI.Ggit.Structs.MergeOptions.MergeOptions'.
cherryPickOptionsGetMergeOptions :: a -> m MergeOptions
cherryPickOptionsGetMergeOptions options :: a
options = IO MergeOptions -> m MergeOptions
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MergeOptions -> m MergeOptions)
-> IO MergeOptions -> m MergeOptions
forall a b. (a -> b) -> a -> b
$ do
    Ptr CherryPickOptions
options' <- a -> IO (Ptr CherryPickOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
options
    Ptr MergeOptions
result <- Ptr CherryPickOptions -> IO (Ptr MergeOptions)
ggit_cherry_pick_options_get_merge_options Ptr CherryPickOptions
options'
    Text -> Ptr MergeOptions -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "cherryPickOptionsGetMergeOptions" Ptr MergeOptions
result
    MergeOptions
result' <- ((ManagedPtr MergeOptions -> MergeOptions)
-> Ptr MergeOptions -> IO MergeOptions
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr MergeOptions -> MergeOptions
Ggit.MergeOptions.MergeOptions) Ptr MergeOptions
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
options
    MergeOptions -> IO MergeOptions
forall (m :: * -> *) a. Monad m => a -> m a
return MergeOptions
result'

#if defined(ENABLE_OVERLOADING)
data CherryPickOptionsGetMergeOptionsMethodInfo
instance (signature ~ (m Ggit.MergeOptions.MergeOptions), MonadIO m, IsCherryPickOptions a) => O.MethodInfo CherryPickOptionsGetMergeOptionsMethodInfo a signature where
    overloadedMethod = cherryPickOptionsGetMergeOptions

#endif

-- method CherryPickOptions::set_checkout_options
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "options"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "CherryPickOptions" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GgitCherryPickOptions."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "checkout_options"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "CheckoutOptions" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GgitCheckoutOptions."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ggit_cherry_pick_options_set_checkout_options" ggit_cherry_pick_options_set_checkout_options :: 
    Ptr CherryPickOptions ->                -- options : TInterface (Name {namespace = "Ggit", name = "CherryPickOptions"})
    Ptr Ggit.CheckoutOptions.CheckoutOptions -> -- checkout_options : TInterface (Name {namespace = "Ggit", name = "CheckoutOptions"})
    IO ()

-- | Set the checkout options.
cherryPickOptionsSetCheckoutOptions ::
    (B.CallStack.HasCallStack, MonadIO m, IsCherryPickOptions a, Ggit.CheckoutOptions.IsCheckoutOptions b) =>
    a
    -- ^ /@options@/: a t'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'.
    -> Maybe (b)
    -- ^ /@checkoutOptions@/: a t'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions'.
    -> m ()
cherryPickOptionsSetCheckoutOptions :: a -> Maybe b -> m ()
cherryPickOptionsSetCheckoutOptions options :: a
options checkoutOptions :: Maybe b
checkoutOptions = 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 CherryPickOptions
options' <- a -> IO (Ptr CherryPickOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
options
    Ptr CheckoutOptions
maybeCheckoutOptions <- case Maybe b
checkoutOptions of
        Nothing -> Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
forall a. Ptr a
nullPtr
        Just jCheckoutOptions :: b
jCheckoutOptions -> do
            Ptr CheckoutOptions
jCheckoutOptions' <- b -> IO (Ptr CheckoutOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCheckoutOptions
            Ptr CheckoutOptions -> IO (Ptr CheckoutOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CheckoutOptions
jCheckoutOptions'
    Ptr CherryPickOptions -> Ptr CheckoutOptions -> IO ()
ggit_cherry_pick_options_set_checkout_options Ptr CherryPickOptions
options' Ptr CheckoutOptions
maybeCheckoutOptions
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
options
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
checkoutOptions b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CherryPickOptionsSetCheckoutOptionsMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsCherryPickOptions a, Ggit.CheckoutOptions.IsCheckoutOptions b) => O.MethodInfo CherryPickOptionsSetCheckoutOptionsMethodInfo a signature where
    overloadedMethod = cherryPickOptionsSetCheckoutOptions

#endif

-- method CherryPickOptions::set_mainline
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "options"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "CherryPickOptions" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GgitCherryPickOptions."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mainline"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the mainline parent."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ggit_cherry_pick_options_set_mainline" ggit_cherry_pick_options_set_mainline :: 
    Ptr CherryPickOptions ->                -- options : TInterface (Name {namespace = "Ggit", name = "CherryPickOptions"})
    Word32 ->                               -- mainline : TBasicType TUInt
    IO ()

-- | Set the mainline parent to use when cherry-picking a merge commit.
cherryPickOptionsSetMainline ::
    (B.CallStack.HasCallStack, MonadIO m, IsCherryPickOptions a) =>
    a
    -- ^ /@options@/: a t'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'.
    -> Word32
    -- ^ /@mainline@/: the mainline parent.
    -> m ()
cherryPickOptionsSetMainline :: a -> Word32 -> m ()
cherryPickOptionsSetMainline options :: a
options mainline :: Word32
mainline = 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 CherryPickOptions
options' <- a -> IO (Ptr CherryPickOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
options
    Ptr CherryPickOptions -> Word32 -> IO ()
ggit_cherry_pick_options_set_mainline Ptr CherryPickOptions
options' Word32
mainline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
options
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CherryPickOptionsSetMainlineMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsCherryPickOptions a) => O.MethodInfo CherryPickOptionsSetMainlineMethodInfo a signature where
    overloadedMethod = cherryPickOptionsSetMainline

#endif

-- method CherryPickOptions::set_merge_options
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "options"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "CherryPickOptions" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GgitCherryPickOptions."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "merge_options"
--           , argType =
--               TInterface Name { namespace = "Ggit" , name = "MergeOptions" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GgitMergeOptions."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ggit_cherry_pick_options_set_merge_options" ggit_cherry_pick_options_set_merge_options :: 
    Ptr CherryPickOptions ->                -- options : TInterface (Name {namespace = "Ggit", name = "CherryPickOptions"})
    Ptr Ggit.MergeOptions.MergeOptions ->   -- merge_options : TInterface (Name {namespace = "Ggit", name = "MergeOptions"})
    IO ()

-- | Set the merge options.
cherryPickOptionsSetMergeOptions ::
    (B.CallStack.HasCallStack, MonadIO m, IsCherryPickOptions a) =>
    a
    -- ^ /@options@/: a t'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'.
    -> Maybe (Ggit.MergeOptions.MergeOptions)
    -- ^ /@mergeOptions@/: a t'GI.Ggit.Structs.MergeOptions.MergeOptions'.
    -> m ()
cherryPickOptionsSetMergeOptions :: a -> Maybe MergeOptions -> m ()
cherryPickOptionsSetMergeOptions options :: a
options mergeOptions :: Maybe MergeOptions
mergeOptions = 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 CherryPickOptions
options' <- a -> IO (Ptr CherryPickOptions)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
options
    Ptr MergeOptions
maybeMergeOptions <- case Maybe MergeOptions
mergeOptions of
        Nothing -> Ptr MergeOptions -> IO (Ptr MergeOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MergeOptions
forall a. Ptr a
nullPtr
        Just jMergeOptions :: MergeOptions
jMergeOptions -> do
            Ptr MergeOptions
jMergeOptions' <- MergeOptions -> IO (Ptr MergeOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MergeOptions
jMergeOptions
            Ptr MergeOptions -> IO (Ptr MergeOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MergeOptions
jMergeOptions'
    Ptr CherryPickOptions -> Ptr MergeOptions -> IO ()
ggit_cherry_pick_options_set_merge_options Ptr CherryPickOptions
options' Ptr MergeOptions
maybeMergeOptions
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
options
    Maybe MergeOptions -> (MergeOptions -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe MergeOptions
mergeOptions MergeOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CherryPickOptionsSetMergeOptionsMethodInfo
instance (signature ~ (Maybe (Ggit.MergeOptions.MergeOptions) -> m ()), MonadIO m, IsCherryPickOptions a) => O.MethodInfo CherryPickOptionsSetMergeOptionsMethodInfo a signature where
    overloadedMethod = cherryPickOptionsSetMergeOptions

#endif