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

Represents the options used when doign a cherry-pick.
-}

module GI.Ggit.Objects.CherryPickOptions
    ( 

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


 -- * Methods
-- ** getCheckoutOptions #method:getCheckoutOptions#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    CherryPickOptionsGetCheckoutOptionsMethodInfo,
#endif
    cherryPickOptionsGetCheckoutOptions     ,


-- ** getMainline #method:getMainline#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    CherryPickOptionsGetMainlineMethodInfo  ,
#endif
    cherryPickOptionsGetMainline            ,


-- ** getMergeOptions #method:getMergeOptions#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    CherryPickOptionsGetMergeOptionsMethodInfo,
#endif
    cherryPickOptionsGetMergeOptions        ,


-- ** new #method:new#
    cherryPickOptionsNew                    ,


-- ** setCheckoutOptions #method:setCheckoutOptions#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    CherryPickOptionsSetCheckoutOptionsMethodInfo,
#endif
    cherryPickOptionsSetCheckoutOptions     ,


-- ** setMainline #method:setMainline#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    CherryPickOptionsSetMainlineMethodInfo  ,
#endif
    cherryPickOptionsSetMainline            ,


-- ** setMergeOptions #method:setMergeOptions#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    CherryPickOptionsSetMergeOptionsMethodInfo,
#endif
    cherryPickOptionsSetMergeOptions        ,




 -- * Properties
-- ** checkoutOptions #attr:checkoutOptions#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    CherryPickOptionsCheckoutOptionsPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    cherryPickOptionsCheckoutOptions        ,
#endif
    clearCherryPickOptionsCheckoutOptions   ,
    constructCherryPickOptionsCheckoutOptions,
    getCherryPickOptionsCheckoutOptions     ,
    setCherryPickOptionsCheckoutOptions     ,


-- ** mainline #attr:mainline#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    CherryPickOptionsMainlinePropertyInfo   ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    cherryPickOptionsMainline               ,
#endif
    constructCherryPickOptionsMainline      ,
    getCherryPickOptionsMainline            ,
    setCherryPickOptionsMainline            ,


-- ** mergeOptions #attr:mergeOptions#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    CherryPickOptionsMergeOptionsPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    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.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.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

newtype CherryPickOptions = CherryPickOptions (ManagedPtr CherryPickOptions)
foreign import ccall "ggit_cherry_pick_options_get_type"
    c_ggit_cherry_pick_options_get_type :: IO GType

instance GObject CherryPickOptions where
    gobjectType _ = c_ggit_cherry_pick_options_get_type
    

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

toCherryPickOptions :: (MonadIO m, IsCherryPickOptions o) => o -> m CherryPickOptions
toCherryPickOptions = liftIO . unsafeCastTo CherryPickOptions

noCherryPickOptions :: Maybe CherryPickOptions
noCherryPickOptions = Nothing

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 "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 "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveCherryPickOptionsMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    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 "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) => O.IsLabelProxy t (CherryPickOptions -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

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

#endif

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

getCherryPickOptionsCheckoutOptions :: (MonadIO m, IsCherryPickOptions o) => o -> m Ggit.CheckoutOptions.CheckoutOptions
getCherryPickOptionsCheckoutOptions obj = liftIO $ checkUnexpectedNothing "getCherryPickOptionsCheckoutOptions" $ getObjectPropertyObject obj "checkout-options" Ggit.CheckoutOptions.CheckoutOptions

setCherryPickOptionsCheckoutOptions :: (MonadIO m, IsCherryPickOptions o, Ggit.CheckoutOptions.IsCheckoutOptions a) => o -> a -> m ()
setCherryPickOptionsCheckoutOptions obj val = liftIO $ setObjectPropertyObject obj "checkout-options" (Just val)

constructCherryPickOptionsCheckoutOptions :: (IsCherryPickOptions o, Ggit.CheckoutOptions.IsCheckoutOptions a) => a -> IO (GValueConstruct o)
constructCherryPickOptionsCheckoutOptions val = constructObjectPropertyObject "checkout-options" (Just val)

clearCherryPickOptionsCheckoutOptions :: (MonadIO m, IsCherryPickOptions o) => o -> m ()
clearCherryPickOptionsCheckoutOptions obj = liftIO $ setObjectPropertyObject obj "checkout-options" (Nothing :: Maybe Ggit.CheckoutOptions.CheckoutOptions)

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

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

getCherryPickOptionsMainline :: (MonadIO m, IsCherryPickOptions o) => o -> m Word32
getCherryPickOptionsMainline obj = liftIO $ getObjectPropertyUInt32 obj "mainline"

setCherryPickOptionsMainline :: (MonadIO m, IsCherryPickOptions o) => o -> Word32 -> m ()
setCherryPickOptionsMainline obj val = liftIO $ setObjectPropertyUInt32 obj "mainline" val

constructCherryPickOptionsMainline :: (IsCherryPickOptions o) => Word32 -> IO (GValueConstruct o)
constructCherryPickOptionsMainline val = constructObjectPropertyUInt32 "mainline" val

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

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

getCherryPickOptionsMergeOptions :: (MonadIO m, IsCherryPickOptions o) => o -> m (Maybe Ggit.MergeOptions.MergeOptions)
getCherryPickOptionsMergeOptions obj = liftIO $ getObjectPropertyBoxed obj "merge-options" Ggit.MergeOptions.MergeOptions

setCherryPickOptionsMergeOptions :: (MonadIO m, IsCherryPickOptions o) => o -> Ggit.MergeOptions.MergeOptions -> m ()
setCherryPickOptionsMergeOptions obj val = liftIO $ setObjectPropertyBoxed obj "merge-options" (Just val)

constructCherryPickOptionsMergeOptions :: (IsCherryPickOptions o) => Ggit.MergeOptions.MergeOptions -> IO (GValueConstruct o)
constructCherryPickOptionsMergeOptions val = constructObjectPropertyBoxed "merge-options" (Just val)

clearCherryPickOptionsMergeOptions :: (MonadIO m, IsCherryPickOptions o) => o -> m ()
clearCherryPickOptionsMergeOptions obj = liftIO $ setObjectPropertyBoxed obj "merge-options" (Nothing :: Maybe Ggit.MergeOptions.MergeOptions)

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

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

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

cherryPickOptionsMainline :: AttrLabelProxy "mainline"
cherryPickOptionsMainline = AttrLabelProxy

cherryPickOptionsMergeOptions :: AttrLabelProxy "mergeOptions"
cherryPickOptionsMergeOptions = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'. -}
cherryPickOptionsNew  = liftIO $ do
    result <- ggit_cherry_pick_options_new
    checkUnexpectedReturnNULL "cherryPickOptionsNew" result
    result' <- (wrapObject CherryPickOptions) result
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#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 'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'. -}
    -> m Ggit.CheckoutOptions.CheckoutOptions
    {- ^ __Returns:__ a 'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions'. -}
cherryPickOptionsGetCheckoutOptions options = liftIO $ do
    options' <- unsafeManagedPtrCastPtr options
    result <- ggit_cherry_pick_options_get_checkout_options options'
    checkUnexpectedReturnNULL "cherryPickOptionsGetCheckoutOptions" result
    result' <- (newObject Ggit.CheckoutOptions.CheckoutOptions) result
    touchManagedPtr options
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'. -}
    -> m Word32
    {- ^ __Returns:__ the mainline parent. -}
cherryPickOptionsGetMainline options = liftIO $ do
    options' <- unsafeManagedPtrCastPtr options
    result <- ggit_cherry_pick_options_get_mainline options'
    touchManagedPtr options
    return result

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'. -}
    -> m Ggit.MergeOptions.MergeOptions
    {- ^ __Returns:__ a 'GI.Ggit.Structs.MergeOptions.MergeOptions'. -}
cherryPickOptionsGetMergeOptions options = liftIO $ do
    options' <- unsafeManagedPtrCastPtr options
    result <- ggit_cherry_pick_options_get_merge_options options'
    checkUnexpectedReturnNULL "cherryPickOptionsGetMergeOptions" result
    result' <- (wrapBoxed Ggit.MergeOptions.MergeOptions) result
    touchManagedPtr options
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'. -}
    -> Maybe (b)
    {- ^ /@checkoutOptions@/: a 'GI.Ggit.Objects.CheckoutOptions.CheckoutOptions'. -}
    -> m ()
cherryPickOptionsSetCheckoutOptions options checkoutOptions = liftIO $ do
    options' <- unsafeManagedPtrCastPtr options
    maybeCheckoutOptions <- case checkoutOptions of
        Nothing -> return nullPtr
        Just jCheckoutOptions -> do
            jCheckoutOptions' <- unsafeManagedPtrCastPtr jCheckoutOptions
            return jCheckoutOptions'
    ggit_cherry_pick_options_set_checkout_options options' maybeCheckoutOptions
    touchManagedPtr options
    whenJust checkoutOptions touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'. -}
    -> Word32
    {- ^ /@mainline@/: the mainline parent. -}
    -> m ()
cherryPickOptionsSetMainline options mainline = liftIO $ do
    options' <- unsafeManagedPtrCastPtr options
    ggit_cherry_pick_options_set_mainline options' mainline
    touchManagedPtr options
    return ()

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 'GI.Ggit.Objects.CherryPickOptions.CherryPickOptions'. -}
    -> Maybe (Ggit.MergeOptions.MergeOptions)
    {- ^ /@mergeOptions@/: a 'GI.Ggit.Structs.MergeOptions.MergeOptions'. -}
    -> m ()
cherryPickOptionsSetMergeOptions options mergeOptions = liftIO $ do
    options' <- unsafeManagedPtrCastPtr options
    maybeMergeOptions <- case mergeOptions of
        Nothing -> return nullPtr
        Just jMergeOptions -> do
            jMergeOptions' <- unsafeManagedPtrGetPtr jMergeOptions
            return jMergeOptions'
    ggit_cherry_pick_options_set_merge_options options' maybeMergeOptions
    touchManagedPtr options
    whenJust mergeOptions touchManagedPtr
    return ()

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

#endif