{- |
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 blame options.
-}

module GI.Ggit.Structs.BlameOptions
    ( 

-- * Exported types
    BlameOptions(..)                        ,
    noBlameOptions                          ,


 -- * Methods
-- ** copy #method:copy#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsCopyMethodInfo              ,
#endif
    blameOptionsCopy                        ,


-- ** free #method:free#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsFreeMethodInfo              ,
#endif
    blameOptionsFree                        ,


-- ** getMaximumLine #method:getMaximumLine#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsGetMaximumLineMethodInfo    ,
#endif
    blameOptionsGetMaximumLine              ,


-- ** getMinimumLine #method:getMinimumLine#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsGetMinimumLineMethodInfo    ,
#endif
    blameOptionsGetMinimumLine              ,


-- ** getMinimumMatchCharacters #method:getMinimumMatchCharacters#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsGetMinimumMatchCharactersMethodInfo,
#endif
    blameOptionsGetMinimumMatchCharacters   ,


-- ** getNewestCommit #method:getNewestCommit#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsGetNewestCommitMethodInfo   ,
#endif
    blameOptionsGetNewestCommit             ,


-- ** getOldestCommit #method:getOldestCommit#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsGetOldestCommitMethodInfo   ,
#endif
    blameOptionsGetOldestCommit             ,


-- ** new #method:new#
    blameOptionsNew                         ,


-- ** setMaximumLine #method:setMaximumLine#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsSetMaximumLineMethodInfo    ,
#endif
    blameOptionsSetMaximumLine              ,


-- ** setMinimumLine #method:setMinimumLine#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsSetMinimumLineMethodInfo    ,
#endif
    blameOptionsSetMinimumLine              ,


-- ** setMinimumMatchCharacters #method:setMinimumMatchCharacters#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsSetMinimumMatchCharactersMethodInfo,
#endif
    blameOptionsSetMinimumMatchCharacters   ,


-- ** setNewestCommit #method:setNewestCommit#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsSetNewestCommitMethodInfo   ,
#endif
    blameOptionsSetNewestCommit             ,


-- ** setOldestCommit #method:setOldestCommit#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    BlameOptionsSetOldestCommitMethodInfo   ,
#endif
    blameOptionsSetOldestCommit             ,




    ) 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 {-# SOURCE #-} qualified GI.Ggit.Structs.OId as Ggit.OId

newtype BlameOptions = BlameOptions (ManagedPtr BlameOptions)
foreign import ccall "ggit_blame_options_get_type" c_ggit_blame_options_get_type :: 
    IO GType

instance BoxedObject BlameOptions where
    boxedType _ = c_ggit_blame_options_get_type

noBlameOptions :: Maybe BlameOptions
noBlameOptions = Nothing


#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
instance O.HasAttributeList BlameOptions
type instance O.AttributeList BlameOptions = BlameOptionsAttributeList
type BlameOptionsAttributeList = ('[ ] :: [(Symbol, *)])
#endif

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

foreign import ccall "ggit_blame_options_new" ggit_blame_options_new :: 
    IO (Ptr BlameOptions)

{- |
Create a new, empty 'GI.Ggit.Structs.BlameOptions.BlameOptions'.
-}
blameOptionsNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m BlameOptions
    {- ^ __Returns:__ a newly allocated 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
blameOptionsNew  = liftIO $ do
    result <- ggit_blame_options_new
    checkUnexpectedReturnNULL "blameOptionsNew" result
    result' <- (wrapBoxed BlameOptions) result
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#endif

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

foreign import ccall "ggit_blame_options_copy" ggit_blame_options_copy :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    IO (Ptr BlameOptions)

{- |
Copies /@blameOptions@/ into a newly allocated 'GI.Ggit.Structs.BlameOptions.BlameOptions'.
-}
blameOptionsCopy ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> m BlameOptions
    {- ^ __Returns:__ a newly allocated 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
blameOptionsCopy blameOptions = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    result <- ggit_blame_options_copy blameOptions'
    checkUnexpectedReturnNULL "blameOptionsCopy" result
    result' <- (wrapBoxed BlameOptions) result
    touchManagedPtr blameOptions
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsCopyMethodInfo
instance (signature ~ (m BlameOptions), MonadIO m) => O.MethodInfo BlameOptionsCopyMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsCopy

#endif

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

foreign import ccall "ggit_blame_options_free" ggit_blame_options_free :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    IO ()

{- |
Frees /@blameOptions@/.
-}
blameOptionsFree ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> m ()
blameOptionsFree blameOptions = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    ggit_blame_options_free blameOptions'
    touchManagedPtr blameOptions
    return ()

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo BlameOptionsFreeMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsFree

#endif

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

foreign import ccall "ggit_blame_options_get_maximum_line" ggit_blame_options_get_maximum_line :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    IO Word32

{- |
Get the last line in the file to consider. The default is 1.
-}
blameOptionsGetMaximumLine ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> m Word32
    {- ^ __Returns:__ the last line to consider. -}
blameOptionsGetMaximumLine blameOptions = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    result <- ggit_blame_options_get_maximum_line blameOptions'
    touchManagedPtr blameOptions
    return result

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsGetMaximumLineMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo BlameOptionsGetMaximumLineMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsGetMaximumLine

#endif

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

foreign import ccall "ggit_blame_options_get_minimum_line" ggit_blame_options_get_minimum_line :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    IO Word32

{- |
Get the first line in the file to consider. The default is 1.
-}
blameOptionsGetMinimumLine ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> m Word32
    {- ^ __Returns:__ the first line to consider. -}
blameOptionsGetMinimumLine blameOptions = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    result <- ggit_blame_options_get_minimum_line blameOptions'
    touchManagedPtr blameOptions
    return result

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsGetMinimumLineMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo BlameOptionsGetMinimumLineMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsGetMinimumLine

#endif

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

foreign import ccall "ggit_blame_options_get_minimum_match_characters" ggit_blame_options_get_minimum_match_characters :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    IO Word16

{- |
Get the minimum number of characters that must be detected as moving\/copying
within a file for it to associate those lines with a parent commit. This is
only used when any of the @/GGIT_BLAME_TRACK_COPIES_SAME_FILE/@ flag is
specified. The default value is 20.
-}
blameOptionsGetMinimumMatchCharacters ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> m Word16
    {- ^ __Returns:__ the minimum number of characters. -}
blameOptionsGetMinimumMatchCharacters blameOptions = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    result <- ggit_blame_options_get_minimum_match_characters blameOptions'
    touchManagedPtr blameOptions
    return result

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsGetMinimumMatchCharactersMethodInfo
instance (signature ~ (m Word16), MonadIO m) => O.MethodInfo BlameOptionsGetMinimumMatchCharactersMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsGetMinimumMatchCharacters

#endif

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

foreign import ccall "ggit_blame_options_get_newest_commit" ggit_blame_options_get_newest_commit :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    IO (Ptr Ggit.OId.OId)

{- |
Get the id of the newest commit to consider in the blame. The default
value of 'Nothing' indicates to use HEAD.
-}
blameOptionsGetNewestCommit ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> m Ggit.OId.OId
    {- ^ __Returns:__ a 'GI.Ggit.Structs.OId.OId' or 'Nothing'. -}
blameOptionsGetNewestCommit blameOptions = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    result <- ggit_blame_options_get_newest_commit blameOptions'
    checkUnexpectedReturnNULL "blameOptionsGetNewestCommit" result
    result' <- (wrapBoxed Ggit.OId.OId) result
    touchManagedPtr blameOptions
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsGetNewestCommitMethodInfo
instance (signature ~ (m Ggit.OId.OId), MonadIO m) => O.MethodInfo BlameOptionsGetNewestCommitMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsGetNewestCommit

#endif

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

foreign import ccall "ggit_blame_options_get_oldest_commit" ggit_blame_options_get_oldest_commit :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    IO (Ptr Ggit.OId.OId)

{- |
Get the id of the oldest commit to consider in the blame. Teh default value
of 'Nothing' indicates to used HEAD.
-}
blameOptionsGetOldestCommit ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> m Ggit.OId.OId
    {- ^ __Returns:__ a 'GI.Ggit.Structs.OId.OId'. -}
blameOptionsGetOldestCommit blameOptions = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    result <- ggit_blame_options_get_oldest_commit blameOptions'
    checkUnexpectedReturnNULL "blameOptionsGetOldestCommit" result
    result' <- (wrapBoxed Ggit.OId.OId) result
    touchManagedPtr blameOptions
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsGetOldestCommitMethodInfo
instance (signature ~ (m Ggit.OId.OId), MonadIO m) => O.MethodInfo BlameOptionsGetOldestCommitMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsGetOldestCommit

#endif

-- method BlameOptions::set_maximum_line
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "blame_options", argType = TInterface (Name {namespace = "Ggit", name = "BlameOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitBlameOptions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the last line to consider.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ggit_blame_options_set_maximum_line" ggit_blame_options_set_maximum_line :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    Word32 ->                               -- line : TBasicType TUInt32
    IO ()

{- |
Set the last line in the file to consider. Lines start at 1.
-}
blameOptionsSetMaximumLine ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> Word32
    {- ^ /@line@/: the last line to consider. -}
    -> m ()
blameOptionsSetMaximumLine blameOptions line = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    ggit_blame_options_set_maximum_line blameOptions' line
    touchManagedPtr blameOptions
    return ()

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsSetMaximumLineMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetMaximumLineMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsSetMaximumLine

#endif

-- method BlameOptions::set_minimum_line
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "blame_options", argType = TInterface (Name {namespace = "Ggit", name = "BlameOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitBlameOptions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the first line to consider.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ggit_blame_options_set_minimum_line" ggit_blame_options_set_minimum_line :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    Word32 ->                               -- line : TBasicType TUInt32
    IO ()

{- |
Set the first line in the file to consider. Lines start at 1.
-}
blameOptionsSetMinimumLine ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> Word32
    {- ^ /@line@/: the first line to consider. -}
    -> m ()
blameOptionsSetMinimumLine blameOptions line = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    ggit_blame_options_set_minimum_line blameOptions' line
    touchManagedPtr blameOptions
    return ()

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsSetMinimumLineMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetMinimumLineMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsSetMinimumLine

#endif

-- method BlameOptions::set_minimum_match_characters
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "blame_options", argType = TInterface (Name {namespace = "Ggit", name = "BlameOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitBlameOptions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "characters", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the minimum number of characters.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ggit_blame_options_set_minimum_match_characters" ggit_blame_options_set_minimum_match_characters :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    Word16 ->                               -- characters : TBasicType TUInt16
    IO ()

{- |
Set the minimum number of characters that must be detected as moving\/copying
within a file for it to associate those lines with a parent commit. This is
only used when any of the @/GGIT_BLAME_TRACK_COPIES_/@ flags are specified. The
default value is 20.
-}
blameOptionsSetMinimumMatchCharacters ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> Word16
    {- ^ /@characters@/: the minimum number of characters. -}
    -> m ()
blameOptionsSetMinimumMatchCharacters blameOptions characters = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    ggit_blame_options_set_minimum_match_characters blameOptions' characters
    touchManagedPtr blameOptions
    return ()

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsSetMinimumMatchCharactersMethodInfo
instance (signature ~ (Word16 -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetMinimumMatchCharactersMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsSetMinimumMatchCharacters

#endif

-- method BlameOptions::set_newest_commit
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "blame_options", argType = TInterface (Name {namespace = "Ggit", name = "BlameOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitBlameOptions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "oid", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitOId or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ggit_blame_options_set_newest_commit" ggit_blame_options_set_newest_commit :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    Ptr Ggit.OId.OId ->                     -- oid : TInterface (Name {namespace = "Ggit", name = "OId"})
    IO ()

{- |
Set the id of the newest commit to consider in the blame. Specify 'Nothing' to
set the default value which indicates to use HEAD.
-}
blameOptionsSetNewestCommit ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> Maybe (Ggit.OId.OId)
    {- ^ /@oid@/: a 'GI.Ggit.Structs.OId.OId' or 'Nothing'. -}
    -> m ()
blameOptionsSetNewestCommit blameOptions oid = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    maybeOid <- case oid of
        Nothing -> return nullPtr
        Just jOid -> do
            jOid' <- unsafeManagedPtrGetPtr jOid
            return jOid'
    ggit_blame_options_set_newest_commit blameOptions' maybeOid
    touchManagedPtr blameOptions
    whenJust oid touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsSetNewestCommitMethodInfo
instance (signature ~ (Maybe (Ggit.OId.OId) -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetNewestCommitMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsSetNewestCommit

#endif

-- method BlameOptions::set_oldest_commit
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "blame_options", argType = TInterface (Name {namespace = "Ggit", name = "BlameOptions"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitBlameOptions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "oid", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GgitOId.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "ggit_blame_options_set_oldest_commit" ggit_blame_options_set_oldest_commit :: 
    Ptr BlameOptions ->                     -- blame_options : TInterface (Name {namespace = "Ggit", name = "BlameOptions"})
    Ptr Ggit.OId.OId ->                     -- oid : TInterface (Name {namespace = "Ggit", name = "OId"})
    IO ()

{- |
Set the id of the oldest commit to consider in the blame. Specify 'Nothing' to
set the default value which indicates to consider the first commit without
a parent.
-}
blameOptionsSetOldestCommit ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    BlameOptions
    {- ^ /@blameOptions@/: a 'GI.Ggit.Structs.BlameOptions.BlameOptions'. -}
    -> Maybe (Ggit.OId.OId)
    {- ^ /@oid@/: a 'GI.Ggit.Structs.OId.OId'. -}
    -> m ()
blameOptionsSetOldestCommit blameOptions oid = liftIO $ do
    blameOptions' <- unsafeManagedPtrGetPtr blameOptions
    maybeOid <- case oid of
        Nothing -> return nullPtr
        Just jOid -> do
            jOid' <- unsafeManagedPtrGetPtr jOid
            return jOid'
    ggit_blame_options_set_oldest_commit blameOptions' maybeOid
    touchManagedPtr blameOptions
    whenJust oid touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data BlameOptionsSetOldestCommitMethodInfo
instance (signature ~ (Maybe (Ggit.OId.OId) -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetOldestCommitMethodInfo BlameOptions signature where
    overloadedMethod _ = blameOptionsSetOldestCommit

#endif

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type family ResolveBlameOptionsMethod (t :: Symbol) (o :: *) :: * where
    ResolveBlameOptionsMethod "copy" o = BlameOptionsCopyMethodInfo
    ResolveBlameOptionsMethod "free" o = BlameOptionsFreeMethodInfo
    ResolveBlameOptionsMethod "getMaximumLine" o = BlameOptionsGetMaximumLineMethodInfo
    ResolveBlameOptionsMethod "getMinimumLine" o = BlameOptionsGetMinimumLineMethodInfo
    ResolveBlameOptionsMethod "getMinimumMatchCharacters" o = BlameOptionsGetMinimumMatchCharactersMethodInfo
    ResolveBlameOptionsMethod "getNewestCommit" o = BlameOptionsGetNewestCommitMethodInfo
    ResolveBlameOptionsMethod "getOldestCommit" o = BlameOptionsGetOldestCommitMethodInfo
    ResolveBlameOptionsMethod "setMaximumLine" o = BlameOptionsSetMaximumLineMethodInfo
    ResolveBlameOptionsMethod "setMinimumLine" o = BlameOptionsSetMinimumLineMethodInfo
    ResolveBlameOptionsMethod "setMinimumMatchCharacters" o = BlameOptionsSetMinimumMatchCharactersMethodInfo
    ResolveBlameOptionsMethod "setNewestCommit" o = BlameOptionsSetNewestCommitMethodInfo
    ResolveBlameOptionsMethod "setOldestCommit" o = BlameOptionsSetOldestCommitMethodInfo
    ResolveBlameOptionsMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveBlameOptionsMethod t BlameOptions, O.MethodInfo info BlameOptions p) => O.IsLabelProxy t (BlameOptions -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveBlameOptionsMethod t BlameOptions, O.MethodInfo info BlameOptions p) => O.IsLabel t (BlameOptions -> 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