    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- Virtual table for handling subtrees registered with 'GI.Gio.Objects.DBusConnection.dBusConnectionRegisterSubtree'.
    --
    -- /Since: 2.26/

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

    module GI.Gio.Structs.DBusSubtreeVTable
        (

    -- * Exported types
        DBusSubtreeVTable(..)                   ,
        newZeroDBusSubtreeVTable                ,

     -- * Methods

    #if defined(ENABLE_OVERLOADING)
        ResolveDBusSubtreeVTableMethod          ,
    #endif

     -- * Properties

    -- ** dispatch #attr:dispatch#
    -- | Function for dispatching a remote call on a child node.

        clearDBusSubtreeVTableDispatch          ,
    #if defined(ENABLE_OVERLOADING)
        dBusSubtreeVTable_dispatch              ,
    #endif
        getDBusSubtreeVTableDispatch            ,
        setDBusSubtreeVTableDispatch            ,

    -- ** enumerate #attr:enumerate#
    -- | Function for enumerating child nodes.

        clearDBusSubtreeVTableEnumerate         ,
    #if defined(ENABLE_OVERLOADING)
        dBusSubtreeVTable_enumerate             ,
    #endif
        getDBusSubtreeVTableEnumerate           ,
        setDBusSubtreeVTableEnumerate           ,

    -- ** introspect #attr:introspect#
    -- | Function for introspecting a child node.

        clearDBusSubtreeVTableIntrospect        ,
    #if defined(ENABLE_OVERLOADING)
        dBusSubtreeVTable_introspect            ,
    #endif
        getDBusSubtreeVTableIntrospect          ,
        setDBusSubtreeVTableIntrospect          ,

        ) where

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

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

    -- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
    #if MIN_VERSION_base(4,18,0)
    import qualified GI.Gio.Callbacks as Gio.Callbacks

    #else
    import qualified GI.Gio.Callbacks as Gio.Callbacks

    #endif

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

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

    instance BoxedPtr DBusSubtreeVTable where
        boxedPtrCopy :: DBusSubtreeVTable -> IO DBusSubtreeVTable
    boxedPtrCopy = \DBusSubtreeVTable
    p -> DBusSubtreeVTable
    -> (Ptr DBusSubtreeVTable -> IO DBusSubtreeVTable)
    -> IO DBusSubtreeVTable
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr DBusSubtreeVTable
    p (Int -> Ptr DBusSubtreeVTable -> IO (Ptr DBusSubtreeVTable)
    forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
    copyBytes Int
    88 (Ptr DBusSubtreeVTable -> IO (Ptr DBusSubtreeVTable))
    -> (Ptr DBusSubtreeVTable -> IO DBusSubtreeVTable)
    -> Ptr DBusSubtreeVTable
    -> IO DBusSubtreeVTable
    forall (m :: * -> *) a b c.
    Monad m =>
    (a -> m b) -> (b -> m c) -> a -> m c
    >=> (ManagedPtr DBusSubtreeVTable -> DBusSubtreeVTable)
    -> Ptr DBusSubtreeVTable -> IO DBusSubtreeVTable
    forall a.
    (HasCallStack, BoxedPtr a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    B.ManagedPtr.wrapPtr ManagedPtr DBusSubtreeVTable -> DBusSubtreeVTable
    DBusSubtreeVTable)
        boxedPtrFree :: DBusSubtreeVTable -> IO ()
    boxedPtrFree = \DBusSubtreeVTable
    x -> DBusSubtreeVTable -> (Ptr DBusSubtreeVTable -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    SP.withManagedPtr DBusSubtreeVTable
    x Ptr DBusSubtreeVTable -> IO ()
    forall a. Ptr a -> IO ()
    SP.freeMem
    instance CallocPtr DBusSubtreeVTable where
        boxedPtrCalloc :: IO (Ptr DBusSubtreeVTable)
    boxedPtrCalloc = Int -> IO (Ptr DBusSubtreeVTable)
    forall a. Int -> IO (Ptr a)
    callocBytes Int
    88

    -- | Construct a `DBusSubtreeVTable` struct initialized to zero.
    newZeroDBusSubtreeVTable :: MonadIO m => m DBusSubtreeVTable
    newZeroDBusSubtreeVTable :: forall (m :: * -> *). MonadIO m => m DBusSubtreeVTable
    newZeroDBusSubtreeVTable = IO DBusSubtreeVTable -> m DBusSubtreeVTable
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO DBusSubtreeVTable -> m DBusSubtreeVTable)
    -> IO DBusSubtreeVTable -> m DBusSubtreeVTable
    forall a b. (a -> b) -> a -> b
    $ IO (Ptr DBusSubtreeVTable)
    forall a. CallocPtr a => IO (Ptr a)
    boxedPtrCalloc IO (Ptr DBusSubtreeVTable)
    -> (Ptr DBusSubtreeVTable -> IO DBusSubtreeVTable)
    -> IO DBusSubtreeVTable
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (ManagedPtr DBusSubtreeVTable -> DBusSubtreeVTable)
    -> Ptr DBusSubtreeVTable -> IO DBusSubtreeVTable
    forall a.
    (HasCallStack, BoxedPtr a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    wrapPtr ManagedPtr DBusSubtreeVTable -> DBusSubtreeVTable
    DBusSubtreeVTable

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

    -- | Get the value of the “@enumerate@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' dBusSubtreeVTable #enumerate
    -- @
    getDBusSubtreeVTableEnumerate :: MonadIO m => DBusSubtreeVTable -> m (Maybe Gio.Callbacks.DBusSubtreeEnumerateFunc_WithClosures)
    getDBusSubtreeVTableEnumerate :: forall (m :: * -> *).
    MonadIO m =>
    DBusSubtreeVTable
    -> m (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    getDBusSubtreeVTableEnumerate DBusSubtreeVTable
    s = IO (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    -> m (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe DBusSubtreeEnumerateFunc_WithClosures)
     -> m (Maybe DBusSubtreeEnumerateFunc_WithClosures))
    -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    -> m (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ DBusSubtreeVTable
    -> (Ptr DBusSubtreeVTable
        -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures))
    -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr DBusSubtreeVTable
    s ((Ptr DBusSubtreeVTable
      -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures))
     -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures))
    -> (Ptr DBusSubtreeVTable
        -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures))
    -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \Ptr DBusSubtreeVTable
    ptr -> do
        FunPtr C_DBusSubtreeEnumerateFunc
    val <- Ptr (FunPtr C_DBusSubtreeEnumerateFunc)
    -> IO (FunPtr C_DBusSubtreeEnumerateFunc)
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr DBusSubtreeVTable
    ptr Ptr DBusSubtreeVTable
    -> Int -> Ptr (FunPtr C_DBusSubtreeEnumerateFunc)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    0) :: IO (FunPtr Gio.Callbacks.C_DBusSubtreeEnumerateFunc)
        Maybe DBusSubtreeEnumerateFunc_WithClosures
    result <- FunPtr C_DBusSubtreeEnumerateFunc
    -> (FunPtr C_DBusSubtreeEnumerateFunc
        -> IO DBusSubtreeEnumerateFunc_WithClosures)
    -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
    SP.convertFunPtrIfNonNull FunPtr C_DBusSubtreeEnumerateFunc
    val ((FunPtr C_DBusSubtreeEnumerateFunc
      -> IO DBusSubtreeEnumerateFunc_WithClosures)
     -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures))
    -> (FunPtr C_DBusSubtreeEnumerateFunc
        -> IO DBusSubtreeEnumerateFunc_WithClosures)
    -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \FunPtr C_DBusSubtreeEnumerateFunc
    val' -> do
            let val'' :: DBusSubtreeEnumerateFunc_WithClosures
    val'' = FunPtr C_DBusSubtreeEnumerateFunc
    -> DBusSubtreeEnumerateFunc_WithClosures
    forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsDBusConnection a) =>
    FunPtr C_DBusSubtreeEnumerateFunc
    -> a -> Text -> Text -> Ptr () -> m [Text]
    Gio.Callbacks.dynamic_DBusSubtreeEnumerateFunc FunPtr C_DBusSubtreeEnumerateFunc
    val'
            DBusSubtreeEnumerateFunc_WithClosures
    -> IO DBusSubtreeEnumerateFunc_WithClosures
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return DBusSubtreeEnumerateFunc_WithClosures
    val''
        Maybe DBusSubtreeEnumerateFunc_WithClosures
    -> IO (Maybe DBusSubtreeEnumerateFunc_WithClosures)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe DBusSubtreeEnumerateFunc_WithClosures
    result

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

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

    #if defined(ENABLE_OVERLOADING)
    data DBusSubtreeVTableEnumerateFieldInfo
    instance AttrInfo DBusSubtreeVTableEnumerateFieldInfo where
        type AttrBaseTypeConstraint DBusSubtreeVTableEnumerateFieldInfo = (~) DBusSubtreeVTable
        type AttrAllowedOps DBusSubtreeVTableEnumerateFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
        type AttrSetTypeConstraint DBusSubtreeVTableEnumerateFieldInfo = (~) (FunPtr Gio.Callbacks.C_DBusSubtreeEnumerateFunc)
        type AttrTransferTypeConstraint DBusSubtreeVTableEnumerateFieldInfo = (~)Gio.Callbacks.DBusSubtreeEnumerateFunc_WithClosures
        type AttrTransferType DBusSubtreeVTableEnumerateFieldInfo = (FunPtr Gio.Callbacks.C_DBusSubtreeEnumerateFunc)
        type AttrGetType DBusSubtreeVTableEnumerateFieldInfo = Maybe Gio.Callbacks.DBusSubtreeEnumerateFunc_WithClosures
        type AttrLabel DBusSubtreeVTableEnumerateFieldInfo = "enumerate"
        type AttrOrigin DBusSubtreeVTableEnumerateFieldInfo = DBusSubtreeVTable
        attrGet = getDBusSubtreeVTableEnumerate
        attrSet = setDBusSubtreeVTableEnumerate
        attrConstruct = undefined
        attrClear = clearDBusSubtreeVTableEnumerate
        attrTransfer _ v = do
            Gio.Callbacks.mk_DBusSubtreeEnumerateFunc (Gio.Callbacks.wrap_DBusSubtreeEnumerateFunc Nothing v)
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Structs.DBusSubtreeVTable.enumerate"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusSubtreeVTable.html#g:attr:enumerate"
            })

    dBusSubtreeVTable_enumerate :: AttrLabelProxy "enumerate"
    dBusSubtreeVTable_enumerate = AttrLabelProxy

    #endif

    -- | Get the value of the “@introspect@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' dBusSubtreeVTable #introspect
    -- @
    getDBusSubtreeVTableIntrospect :: MonadIO m => DBusSubtreeVTable -> m (Maybe Gio.Callbacks.DBusSubtreeIntrospectFunc_WithClosures)
    getDBusSubtreeVTableIntrospect :: forall (m :: * -> *).
    MonadIO m =>
    DBusSubtreeVTable
    -> m (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    getDBusSubtreeVTableIntrospect DBusSubtreeVTable
    s = IO (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    -> m (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe DBusSubtreeIntrospectFunc_WithClosures)
     -> m (Maybe DBusSubtreeIntrospectFunc_WithClosures))
    -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    -> m (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ DBusSubtreeVTable
    -> (Ptr DBusSubtreeVTable
        -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures))
    -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr DBusSubtreeVTable
    s ((Ptr DBusSubtreeVTable
      -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures))
     -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures))
    -> (Ptr DBusSubtreeVTable
        -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures))
    -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \Ptr DBusSubtreeVTable
    ptr -> do
        FunPtr C_DBusSubtreeIntrospectFunc
    val <- Ptr (FunPtr C_DBusSubtreeIntrospectFunc)
    -> IO (FunPtr C_DBusSubtreeIntrospectFunc)
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr DBusSubtreeVTable
    ptr Ptr DBusSubtreeVTable
    -> Int -> Ptr (FunPtr C_DBusSubtreeIntrospectFunc)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    8) :: IO (FunPtr Gio.Callbacks.C_DBusSubtreeIntrospectFunc)
        Maybe DBusSubtreeIntrospectFunc_WithClosures
    result <- FunPtr C_DBusSubtreeIntrospectFunc
    -> (FunPtr C_DBusSubtreeIntrospectFunc
        -> IO DBusSubtreeIntrospectFunc_WithClosures)
    -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
    SP.convertFunPtrIfNonNull FunPtr C_DBusSubtreeIntrospectFunc
    val ((FunPtr C_DBusSubtreeIntrospectFunc
      -> IO DBusSubtreeIntrospectFunc_WithClosures)
     -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures))
    -> (FunPtr C_DBusSubtreeIntrospectFunc
        -> IO DBusSubtreeIntrospectFunc_WithClosures)
    -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \FunPtr C_DBusSubtreeIntrospectFunc
    val' -> do
            let val'' :: DBusSubtreeIntrospectFunc_WithClosures
    val'' = FunPtr C_DBusSubtreeIntrospectFunc
    -> DBusSubtreeIntrospectFunc_WithClosures
    forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsDBusConnection a) =>
    FunPtr C_DBusSubtreeIntrospectFunc
    -> a
    -> Text
    -> Text
    -> Text
    -> Ptr ()
    -> m (Maybe [DBusInterfaceInfo])
    Gio.Callbacks.dynamic_DBusSubtreeIntrospectFunc FunPtr C_DBusSubtreeIntrospectFunc
    val'
            DBusSubtreeIntrospectFunc_WithClosures
    -> IO DBusSubtreeIntrospectFunc_WithClosures
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return DBusSubtreeIntrospectFunc_WithClosures
    val''
        Maybe DBusSubtreeIntrospectFunc_WithClosures
    -> IO (Maybe DBusSubtreeIntrospectFunc_WithClosures)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe DBusSubtreeIntrospectFunc_WithClosures
    result

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

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

    #if defined(ENABLE_OVERLOADING)
    data DBusSubtreeVTableIntrospectFieldInfo
    instance AttrInfo DBusSubtreeVTableIntrospectFieldInfo where
        type AttrBaseTypeConstraint DBusSubtreeVTableIntrospectFieldInfo = (~) DBusSubtreeVTable
        type AttrAllowedOps DBusSubtreeVTableIntrospectFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
        type AttrSetTypeConstraint DBusSubtreeVTableIntrospectFieldInfo = (~) (FunPtr Gio.Callbacks.C_DBusSubtreeIntrospectFunc)
        type AttrTransferTypeConstraint DBusSubtreeVTableIntrospectFieldInfo = (~)Gio.Callbacks.DBusSubtreeIntrospectFunc_WithClosures
        type AttrTransferType DBusSubtreeVTableIntrospectFieldInfo = (FunPtr Gio.Callbacks.C_DBusSubtreeIntrospectFunc)
        type AttrGetType DBusSubtreeVTableIntrospectFieldInfo = Maybe Gio.Callbacks.DBusSubtreeIntrospectFunc_WithClosures
        type AttrLabel DBusSubtreeVTableIntrospectFieldInfo = "introspect"
        type AttrOrigin DBusSubtreeVTableIntrospectFieldInfo = DBusSubtreeVTable
        attrGet = getDBusSubtreeVTableIntrospect
        attrSet = setDBusSubtreeVTableIntrospect
        attrConstruct = undefined
        attrClear = clearDBusSubtreeVTableIntrospect
        attrTransfer _ v = do
            Gio.Callbacks.mk_DBusSubtreeIntrospectFunc (Gio.Callbacks.wrap_DBusSubtreeIntrospectFunc Nothing v)
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Structs.DBusSubtreeVTable.introspect"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusSubtreeVTable.html#g:attr:introspect"
            })

    dBusSubtreeVTable_introspect :: AttrLabelProxy "introspect"
    dBusSubtreeVTable_introspect = AttrLabelProxy

    #endif

    -- | Get the value of the “@dispatch@” field.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' dBusSubtreeVTable #dispatch
    -- @
    getDBusSubtreeVTableDispatch :: MonadIO m => DBusSubtreeVTable -> m (Maybe Gio.Callbacks.DBusSubtreeDispatchFunc_WithClosures)
    getDBusSubtreeVTableDispatch :: forall (m :: * -> *).
    MonadIO m =>
    DBusSubtreeVTable -> m (Maybe DBusSubtreeDispatchFunc_WithClosures)
    getDBusSubtreeVTableDispatch DBusSubtreeVTable
    s = IO (Maybe DBusSubtreeDispatchFunc_WithClosures)
    -> m (Maybe DBusSubtreeDispatchFunc_WithClosures)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe DBusSubtreeDispatchFunc_WithClosures)
     -> m (Maybe DBusSubtreeDispatchFunc_WithClosures))
    -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures)
    -> m (Maybe DBusSubtreeDispatchFunc_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ DBusSubtreeVTable
    -> (Ptr DBusSubtreeVTable
        -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures))
    -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures)
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr DBusSubtreeVTable
    s ((Ptr DBusSubtreeVTable
      -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures))
     -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures))
    -> (Ptr DBusSubtreeVTable
        -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures))
    -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \Ptr DBusSubtreeVTable
    ptr -> do
        FunPtr C_DBusSubtreeDispatchFunc
    val <- Ptr (FunPtr C_DBusSubtreeDispatchFunc)
    -> IO (FunPtr C_DBusSubtreeDispatchFunc)
    forall a. Storable a => Ptr a -> IO a
    peek (Ptr DBusSubtreeVTable
    ptr Ptr DBusSubtreeVTable
    -> Int -> Ptr (FunPtr C_DBusSubtreeDispatchFunc)
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` Int
    16) :: IO (FunPtr Gio.Callbacks.C_DBusSubtreeDispatchFunc)
        Maybe DBusSubtreeDispatchFunc_WithClosures
    result <- FunPtr C_DBusSubtreeDispatchFunc
    -> (FunPtr C_DBusSubtreeDispatchFunc
        -> IO DBusSubtreeDispatchFunc_WithClosures)
    -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures)
    forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
    SP.convertFunPtrIfNonNull FunPtr C_DBusSubtreeDispatchFunc
    val ((FunPtr C_DBusSubtreeDispatchFunc
      -> IO DBusSubtreeDispatchFunc_WithClosures)
     -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures))
    -> (FunPtr C_DBusSubtreeDispatchFunc
        -> IO DBusSubtreeDispatchFunc_WithClosures)
    -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures)
    forall a b. (a -> b) -> a -> b
    $ \FunPtr C_DBusSubtreeDispatchFunc
    val' -> do
            let val'' :: DBusSubtreeDispatchFunc_WithClosures
    val'' = FunPtr C_DBusSubtreeDispatchFunc
    -> DBusSubtreeDispatchFunc_WithClosures
    forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsDBusConnection a) =>
    FunPtr C_DBusSubtreeDispatchFunc
    -> a
    -> Text
    -> Text
    -> Text
    -> Text
    -> Ptr ()
    -> Ptr ()
    -> m (Maybe DBusInterfaceVTable)
    Gio.Callbacks.dynamic_DBusSubtreeDispatchFunc FunPtr C_DBusSubtreeDispatchFunc
    val'
            DBusSubtreeDispatchFunc_WithClosures
    -> IO DBusSubtreeDispatchFunc_WithClosures
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return DBusSubtreeDispatchFunc_WithClosures
    val''
        Maybe DBusSubtreeDispatchFunc_WithClosures
    -> IO (Maybe DBusSubtreeDispatchFunc_WithClosures)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe DBusSubtreeDispatchFunc_WithClosures
    result

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

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

    #if defined(ENABLE_OVERLOADING)
    data DBusSubtreeVTableDispatchFieldInfo
    instance AttrInfo DBusSubtreeVTableDispatchFieldInfo where
        type AttrBaseTypeConstraint DBusSubtreeVTableDispatchFieldInfo = (~) DBusSubtreeVTable
        type AttrAllowedOps DBusSubtreeVTableDispatchFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
        type AttrSetTypeConstraint DBusSubtreeVTableDispatchFieldInfo = (~) (FunPtr Gio.Callbacks.C_DBusSubtreeDispatchFunc)
        type AttrTransferTypeConstraint DBusSubtreeVTableDispatchFieldInfo = (~)Gio.Callbacks.DBusSubtreeDispatchFunc_WithClosures
        type AttrTransferType DBusSubtreeVTableDispatchFieldInfo = (FunPtr Gio.Callbacks.C_DBusSubtreeDispatchFunc)
        type AttrGetType DBusSubtreeVTableDispatchFieldInfo = Maybe Gio.Callbacks.DBusSubtreeDispatchFunc_WithClosures
        type AttrLabel DBusSubtreeVTableDispatchFieldInfo = "dispatch"
        type AttrOrigin DBusSubtreeVTableDispatchFieldInfo = DBusSubtreeVTable
        attrGet = getDBusSubtreeVTableDispatch
        attrSet = setDBusSubtreeVTableDispatch
        attrConstruct = undefined
        attrClear = clearDBusSubtreeVTableDispatch
        attrTransfer _ v = do
            Gio.Callbacks.mk_DBusSubtreeDispatchFunc (Gio.Callbacks.wrap_DBusSubtreeDispatchFunc Nothing v)
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Structs.DBusSubtreeVTable.dispatch"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Structs-DBusSubtreeVTable.html#g:attr:dispatch"
            })

    dBusSubtreeVTable_dispatch :: AttrLabelProxy "dispatch"
    dBusSubtreeVTable_dispatch = AttrLabelProxy

    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList DBusSubtreeVTable
    type instance O.AttributeList DBusSubtreeVTable = DBusSubtreeVTableAttributeList
    type DBusSubtreeVTableAttributeList = ('[ '("enumerate", DBusSubtreeVTableEnumerateFieldInfo), '("introspect", DBusSubtreeVTableIntrospectFieldInfo), '("dispatch", DBusSubtreeVTableDispatchFieldInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    type family ResolveDBusSubtreeVTableMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveDBusSubtreeVTableMethod l o = O.MethodResolutionFailed l o

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

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

    #endif

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

    #endif