{-# LANGUAGE TypeApplications #-}


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

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

module GI.NM.Objects.SimpleConnection
    ( 

-- * Exported types
    SimpleConnection(..)                    ,
    IsSimpleConnection                      ,
    toSimpleConnection                      ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [addSetting]("GI.NM.Interfaces.Connection#g:method:addSetting"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [clearSecrets]("GI.NM.Interfaces.Connection#g:method:clearSecrets"), [clearSecretsWithFlags]("GI.NM.Interfaces.Connection#g:method:clearSecretsWithFlags"), [clearSettings]("GI.NM.Interfaces.Connection#g:method:clearSettings"), [compare]("GI.NM.Interfaces.Connection#g:method:compare"), [dump]("GI.NM.Interfaces.Connection#g:method:dump"), [forEachSettingValue]("GI.NM.Interfaces.Connection#g:method:forEachSettingValue"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isType]("GI.NM.Interfaces.Connection#g:method:isType"), [isVirtual]("GI.NM.Interfaces.Connection#g:method:isVirtual"), [needSecrets]("GI.NM.Interfaces.Connection#g:method:needSecrets"), [normalize]("GI.NM.Interfaces.Connection#g:method:normalize"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [removeSetting]("GI.NM.Interfaces.Connection#g:method:removeSetting"), [replaceSettings]("GI.NM.Interfaces.Connection#g:method:replaceSettings"), [replaceSettingsFromConnection]("GI.NM.Interfaces.Connection#g:method:replaceSettingsFromConnection"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [toDbus]("GI.NM.Interfaces.Connection#g:method:toDbus"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [updateSecrets]("GI.NM.Interfaces.Connection#g:method:updateSecrets"), [verify]("GI.NM.Interfaces.Connection#g:method:verify"), [verifySecrets]("GI.NM.Interfaces.Connection#g:method:verifySecrets"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getConnectionType]("GI.NM.Interfaces.Connection#g:method:getConnectionType"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getId]("GI.NM.Interfaces.Connection#g:method:getId"), [getInterfaceName]("GI.NM.Interfaces.Connection#g:method:getInterfaceName"), [getPath]("GI.NM.Interfaces.Connection#g:method:getPath"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getSetting]("GI.NM.Interfaces.Connection#g:method:getSetting"), [getSetting8021x]("GI.NM.Interfaces.Connection#g:method:getSetting8021x"), [getSettingAdsl]("GI.NM.Interfaces.Connection#g:method:getSettingAdsl"), [getSettingBluetooth]("GI.NM.Interfaces.Connection#g:method:getSettingBluetooth"), [getSettingBond]("GI.NM.Interfaces.Connection#g:method:getSettingBond"), [getSettingBridge]("GI.NM.Interfaces.Connection#g:method:getSettingBridge"), [getSettingBridgePort]("GI.NM.Interfaces.Connection#g:method:getSettingBridgePort"), [getSettingByName]("GI.NM.Interfaces.Connection#g:method:getSettingByName"), [getSettingCdma]("GI.NM.Interfaces.Connection#g:method:getSettingCdma"), [getSettingConnection]("GI.NM.Interfaces.Connection#g:method:getSettingConnection"), [getSettingDcb]("GI.NM.Interfaces.Connection#g:method:getSettingDcb"), [getSettingDummy]("GI.NM.Interfaces.Connection#g:method:getSettingDummy"), [getSettingGeneric]("GI.NM.Interfaces.Connection#g:method:getSettingGeneric"), [getSettingGsm]("GI.NM.Interfaces.Connection#g:method:getSettingGsm"), [getSettingInfiniband]("GI.NM.Interfaces.Connection#g:method:getSettingInfiniband"), [getSettingIp4Config]("GI.NM.Interfaces.Connection#g:method:getSettingIp4Config"), [getSettingIp6Config]("GI.NM.Interfaces.Connection#g:method:getSettingIp6Config"), [getSettingIpTunnel]("GI.NM.Interfaces.Connection#g:method:getSettingIpTunnel"), [getSettingMacsec]("GI.NM.Interfaces.Connection#g:method:getSettingMacsec"), [getSettingMacvlan]("GI.NM.Interfaces.Connection#g:method:getSettingMacvlan"), [getSettingOlpcMesh]("GI.NM.Interfaces.Connection#g:method:getSettingOlpcMesh"), [getSettingOvsBridge]("GI.NM.Interfaces.Connection#g:method:getSettingOvsBridge"), [getSettingOvsInterface]("GI.NM.Interfaces.Connection#g:method:getSettingOvsInterface"), [getSettingOvsPatch]("GI.NM.Interfaces.Connection#g:method:getSettingOvsPatch"), [getSettingOvsPort]("GI.NM.Interfaces.Connection#g:method:getSettingOvsPort"), [getSettingPpp]("GI.NM.Interfaces.Connection#g:method:getSettingPpp"), [getSettingPppoe]("GI.NM.Interfaces.Connection#g:method:getSettingPppoe"), [getSettingProxy]("GI.NM.Interfaces.Connection#g:method:getSettingProxy"), [getSettingSerial]("GI.NM.Interfaces.Connection#g:method:getSettingSerial"), [getSettingTcConfig]("GI.NM.Interfaces.Connection#g:method:getSettingTcConfig"), [getSettingTeam]("GI.NM.Interfaces.Connection#g:method:getSettingTeam"), [getSettingTeamPort]("GI.NM.Interfaces.Connection#g:method:getSettingTeamPort"), [getSettingTun]("GI.NM.Interfaces.Connection#g:method:getSettingTun"), [getSettingVlan]("GI.NM.Interfaces.Connection#g:method:getSettingVlan"), [getSettingVpn]("GI.NM.Interfaces.Connection#g:method:getSettingVpn"), [getSettingVxlan]("GI.NM.Interfaces.Connection#g:method:getSettingVxlan"), [getSettingWimax]("GI.NM.Interfaces.Connection#g:method:getSettingWimax"), [getSettingWired]("GI.NM.Interfaces.Connection#g:method:getSettingWired"), [getSettingWireless]("GI.NM.Interfaces.Connection#g:method:getSettingWireless"), [getSettingWirelessSecurity]("GI.NM.Interfaces.Connection#g:method:getSettingWirelessSecurity"), [getSettings]("GI.NM.Interfaces.Connection#g:method:getSettings"), [getUuid]("GI.NM.Interfaces.Connection#g:method:getUuid"), [getVirtualDeviceDescription]("GI.NM.Interfaces.Connection#g:method:getVirtualDeviceDescription").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setPath]("GI.NM.Interfaces.Connection#g:method:setPath"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveSimpleConnectionMethod           ,
#endif

-- ** new #method:new#

    simpleConnectionNew                     ,


-- ** newClone #method:newClone#

    simpleConnectionNewClone                ,


-- ** newFromDbus #method:newFromDbus#

    simpleConnectionNewFromDbus             ,




    ) 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.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.NM.Callbacks as NM.Callbacks
import {-# SOURCE #-} qualified GI.NM.Enums as NM.Enums
import {-# SOURCE #-} qualified GI.NM.Flags as NM.Flags
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection
import {-# SOURCE #-} qualified GI.NM.Objects.Setting as NM.Setting
import {-# SOURCE #-} qualified GI.NM.Objects.Setting8021x as NM.Setting8021x
import {-# SOURCE #-} qualified GI.NM.Objects.SettingAdsl as NM.SettingAdsl
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBluetooth as NM.SettingBluetooth
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBond as NM.SettingBond
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridge as NM.SettingBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridgePort as NM.SettingBridgePort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingCdma as NM.SettingCdma
import {-# SOURCE #-} qualified GI.NM.Objects.SettingConnection as NM.SettingConnection
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDcb as NM.SettingDcb
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDummy as NM.SettingDummy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGeneric as NM.SettingGeneric
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGsm as NM.SettingGsm
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP4Config as NM.SettingIP4Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP6Config as NM.SettingIP6Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPConfig as NM.SettingIPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPTunnel as NM.SettingIPTunnel
import {-# SOURCE #-} qualified GI.NM.Objects.SettingInfiniband as NM.SettingInfiniband
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacsec as NM.SettingMacsec
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacvlan as NM.SettingMacvlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOlpcMesh as NM.SettingOlpcMesh
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsBridge as NM.SettingOvsBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsInterface as NM.SettingOvsInterface
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPatch as NM.SettingOvsPatch
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPort as NM.SettingOvsPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPpp as NM.SettingPpp
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPppoe as NM.SettingPppoe
import {-# SOURCE #-} qualified GI.NM.Objects.SettingProxy as NM.SettingProxy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingSerial as NM.SettingSerial
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTCConfig as NM.SettingTCConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeam as NM.SettingTeam
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeamPort as NM.SettingTeamPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTun as NM.SettingTun
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVlan as NM.SettingVlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVpn as NM.SettingVpn
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVxlan as NM.SettingVxlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWimax as NM.SettingWimax
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWired as NM.SettingWired
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWireless as NM.SettingWireless
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWirelessSecurity as NM.SettingWirelessSecurity
import {-# SOURCE #-} qualified GI.NM.Structs.BridgeVlan as NM.BridgeVlan
import {-# SOURCE #-} qualified GI.NM.Structs.IPAddress as NM.IPAddress
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoute as NM.IPRoute
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoutingRule as NM.IPRoutingRule
import {-# SOURCE #-} qualified GI.NM.Structs.Range as NM.Range
import {-# SOURCE #-} qualified GI.NM.Structs.TCAction as NM.TCAction
import {-# SOURCE #-} qualified GI.NM.Structs.TCQdisc as NM.TCQdisc
import {-# SOURCE #-} qualified GI.NM.Structs.TCTfilter as NM.TCTfilter
import {-# SOURCE #-} qualified GI.NM.Structs.TeamLinkWatcher as NM.TeamLinkWatcher
import {-# SOURCE #-} qualified GI.NM.Structs.VariantAttributeSpec as NM.VariantAttributeSpec

#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection

#endif

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

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

foreign import ccall "nm_simple_connection_get_type"
    c_nm_simple_connection_get_type :: IO B.Types.GType

instance B.Types.TypedObject SimpleConnection where
    glibType :: IO GType
glibType = IO GType
c_nm_simple_connection_get_type

instance B.Types.GObject SimpleConnection

-- | Type class for types which can be safely cast to t'SimpleConnection', for instance with `toSimpleConnection`.
class (SP.GObject o, O.IsDescendantOf SimpleConnection o) => IsSimpleConnection o
instance (SP.GObject o, O.IsDescendantOf SimpleConnection o) => IsSimpleConnection o

instance O.HasParentTypes SimpleConnection
type instance O.ParentTypes SimpleConnection = '[GObject.Object.Object, NM.Connection.Connection]

-- | Cast to t'SimpleConnection', for types for which this is known to be safe. For general casts, use 'Data.GI.Base.ManagedPtr.castTo'.
toSimpleConnection :: (MIO.MonadIO m, IsSimpleConnection o) => o -> m SimpleConnection
toSimpleConnection :: forall (m :: * -> *) o.
(MonadIO m, IsSimpleConnection o) =>
o -> m SimpleConnection
toSimpleConnection = IO SimpleConnection -> m SimpleConnection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO SimpleConnection -> m SimpleConnection)
-> (o -> IO SimpleConnection) -> o -> m SimpleConnection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr SimpleConnection -> SimpleConnection)
-> o -> IO SimpleConnection
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr SimpleConnection -> SimpleConnection
SimpleConnection

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

#if defined(ENABLE_OVERLOADING)
type family ResolveSimpleConnectionMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveSimpleConnectionMethod "addSetting" o = NM.Connection.ConnectionAddSettingMethodInfo
    ResolveSimpleConnectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveSimpleConnectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveSimpleConnectionMethod "clearSecrets" o = NM.Connection.ConnectionClearSecretsMethodInfo
    ResolveSimpleConnectionMethod "clearSecretsWithFlags" o = NM.Connection.ConnectionClearSecretsWithFlagsMethodInfo
    ResolveSimpleConnectionMethod "clearSettings" o = NM.Connection.ConnectionClearSettingsMethodInfo
    ResolveSimpleConnectionMethod "compare" o = NM.Connection.ConnectionCompareMethodInfo
    ResolveSimpleConnectionMethod "dump" o = NM.Connection.ConnectionDumpMethodInfo
    ResolveSimpleConnectionMethod "forEachSettingValue" o = NM.Connection.ConnectionForEachSettingValueMethodInfo
    ResolveSimpleConnectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveSimpleConnectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveSimpleConnectionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveSimpleConnectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveSimpleConnectionMethod "isType" o = NM.Connection.ConnectionIsTypeMethodInfo
    ResolveSimpleConnectionMethod "isVirtual" o = NM.Connection.ConnectionIsVirtualMethodInfo
    ResolveSimpleConnectionMethod "needSecrets" o = NM.Connection.ConnectionNeedSecretsMethodInfo
    ResolveSimpleConnectionMethod "normalize" o = NM.Connection.ConnectionNormalizeMethodInfo
    ResolveSimpleConnectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveSimpleConnectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveSimpleConnectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveSimpleConnectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveSimpleConnectionMethod "removeSetting" o = NM.Connection.ConnectionRemoveSettingMethodInfo
    ResolveSimpleConnectionMethod "replaceSettings" o = NM.Connection.ConnectionReplaceSettingsMethodInfo
    ResolveSimpleConnectionMethod "replaceSettingsFromConnection" o = NM.Connection.ConnectionReplaceSettingsFromConnectionMethodInfo
    ResolveSimpleConnectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveSimpleConnectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveSimpleConnectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveSimpleConnectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveSimpleConnectionMethod "toDbus" o = NM.Connection.ConnectionToDbusMethodInfo
    ResolveSimpleConnectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveSimpleConnectionMethod "updateSecrets" o = NM.Connection.ConnectionUpdateSecretsMethodInfo
    ResolveSimpleConnectionMethod "verify" o = NM.Connection.ConnectionVerifyMethodInfo
    ResolveSimpleConnectionMethod "verifySecrets" o = NM.Connection.ConnectionVerifySecretsMethodInfo
    ResolveSimpleConnectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveSimpleConnectionMethod "getConnectionType" o = NM.Connection.ConnectionGetConnectionTypeMethodInfo
    ResolveSimpleConnectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveSimpleConnectionMethod "getId" o = NM.Connection.ConnectionGetIdMethodInfo
    ResolveSimpleConnectionMethod "getInterfaceName" o = NM.Connection.ConnectionGetInterfaceNameMethodInfo
    ResolveSimpleConnectionMethod "getPath" o = NM.Connection.ConnectionGetPathMethodInfo
    ResolveSimpleConnectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveSimpleConnectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveSimpleConnectionMethod "getSetting" o = NM.Connection.ConnectionGetSettingMethodInfo
    ResolveSimpleConnectionMethod "getSetting8021x" o = NM.Connection.ConnectionGetSetting8021xMethodInfo
    ResolveSimpleConnectionMethod "getSettingAdsl" o = NM.Connection.ConnectionGetSettingAdslMethodInfo
    ResolveSimpleConnectionMethod "getSettingBluetooth" o = NM.Connection.ConnectionGetSettingBluetoothMethodInfo
    ResolveSimpleConnectionMethod "getSettingBond" o = NM.Connection.ConnectionGetSettingBondMethodInfo
    ResolveSimpleConnectionMethod "getSettingBridge" o = NM.Connection.ConnectionGetSettingBridgeMethodInfo
    ResolveSimpleConnectionMethod "getSettingBridgePort" o = NM.Connection.ConnectionGetSettingBridgePortMethodInfo
    ResolveSimpleConnectionMethod "getSettingByName" o = NM.Connection.ConnectionGetSettingByNameMethodInfo
    ResolveSimpleConnectionMethod "getSettingCdma" o = NM.Connection.ConnectionGetSettingCdmaMethodInfo
    ResolveSimpleConnectionMethod "getSettingConnection" o = NM.Connection.ConnectionGetSettingConnectionMethodInfo
    ResolveSimpleConnectionMethod "getSettingDcb" o = NM.Connection.ConnectionGetSettingDcbMethodInfo
    ResolveSimpleConnectionMethod "getSettingDummy" o = NM.Connection.ConnectionGetSettingDummyMethodInfo
    ResolveSimpleConnectionMethod "getSettingGeneric" o = NM.Connection.ConnectionGetSettingGenericMethodInfo
    ResolveSimpleConnectionMethod "getSettingGsm" o = NM.Connection.ConnectionGetSettingGsmMethodInfo
    ResolveSimpleConnectionMethod "getSettingInfiniband" o = NM.Connection.ConnectionGetSettingInfinibandMethodInfo
    ResolveSimpleConnectionMethod "getSettingIp4Config" o = NM.Connection.ConnectionGetSettingIp4ConfigMethodInfo
    ResolveSimpleConnectionMethod "getSettingIp6Config" o = NM.Connection.ConnectionGetSettingIp6ConfigMethodInfo
    ResolveSimpleConnectionMethod "getSettingIpTunnel" o = NM.Connection.ConnectionGetSettingIpTunnelMethodInfo
    ResolveSimpleConnectionMethod "getSettingMacsec" o = NM.Connection.ConnectionGetSettingMacsecMethodInfo
    ResolveSimpleConnectionMethod "getSettingMacvlan" o = NM.Connection.ConnectionGetSettingMacvlanMethodInfo
    ResolveSimpleConnectionMethod "getSettingOlpcMesh" o = NM.Connection.ConnectionGetSettingOlpcMeshMethodInfo
    ResolveSimpleConnectionMethod "getSettingOvsBridge" o = NM.Connection.ConnectionGetSettingOvsBridgeMethodInfo
    ResolveSimpleConnectionMethod "getSettingOvsInterface" o = NM.Connection.ConnectionGetSettingOvsInterfaceMethodInfo
    ResolveSimpleConnectionMethod "getSettingOvsPatch" o = NM.Connection.ConnectionGetSettingOvsPatchMethodInfo
    ResolveSimpleConnectionMethod "getSettingOvsPort" o = NM.Connection.ConnectionGetSettingOvsPortMethodInfo
    ResolveSimpleConnectionMethod "getSettingPpp" o = NM.Connection.ConnectionGetSettingPppMethodInfo
    ResolveSimpleConnectionMethod "getSettingPppoe" o = NM.Connection.ConnectionGetSettingPppoeMethodInfo
    ResolveSimpleConnectionMethod "getSettingProxy" o = NM.Connection.ConnectionGetSettingProxyMethodInfo
    ResolveSimpleConnectionMethod "getSettingSerial" o = NM.Connection.ConnectionGetSettingSerialMethodInfo
    ResolveSimpleConnectionMethod "getSettingTcConfig" o = NM.Connection.ConnectionGetSettingTcConfigMethodInfo
    ResolveSimpleConnectionMethod "getSettingTeam" o = NM.Connection.ConnectionGetSettingTeamMethodInfo
    ResolveSimpleConnectionMethod "getSettingTeamPort" o = NM.Connection.ConnectionGetSettingTeamPortMethodInfo
    ResolveSimpleConnectionMethod "getSettingTun" o = NM.Connection.ConnectionGetSettingTunMethodInfo
    ResolveSimpleConnectionMethod "getSettingVlan" o = NM.Connection.ConnectionGetSettingVlanMethodInfo
    ResolveSimpleConnectionMethod "getSettingVpn" o = NM.Connection.ConnectionGetSettingVpnMethodInfo
    ResolveSimpleConnectionMethod "getSettingVxlan" o = NM.Connection.ConnectionGetSettingVxlanMethodInfo
    ResolveSimpleConnectionMethod "getSettingWimax" o = NM.Connection.ConnectionGetSettingWimaxMethodInfo
    ResolveSimpleConnectionMethod "getSettingWired" o = NM.Connection.ConnectionGetSettingWiredMethodInfo
    ResolveSimpleConnectionMethod "getSettingWireless" o = NM.Connection.ConnectionGetSettingWirelessMethodInfo
    ResolveSimpleConnectionMethod "getSettingWirelessSecurity" o = NM.Connection.ConnectionGetSettingWirelessSecurityMethodInfo
    ResolveSimpleConnectionMethod "getSettings" o = NM.Connection.ConnectionGetSettingsMethodInfo
    ResolveSimpleConnectionMethod "getUuid" o = NM.Connection.ConnectionGetUuidMethodInfo
    ResolveSimpleConnectionMethod "getVirtualDeviceDescription" o = NM.Connection.ConnectionGetVirtualDeviceDescriptionMethodInfo
    ResolveSimpleConnectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveSimpleConnectionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveSimpleConnectionMethod "setPath" o = NM.Connection.ConnectionSetPathMethodInfo
    ResolveSimpleConnectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveSimpleConnectionMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveSimpleConnectionMethod t SimpleConnection, O.OverloadedMethod info SimpleConnection p) => OL.IsLabel t (SimpleConnection -> 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 ~ ResolveSimpleConnectionMethod t SimpleConnection, O.OverloadedMethod info SimpleConnection p, R.HasField t SimpleConnection p) => R.HasField t SimpleConnection p where
    getField = O.overloadedMethod @info

#endif

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

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SimpleConnection
type instance O.AttributeList SimpleConnection = SimpleConnectionAttributeList
type SimpleConnectionAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList SimpleConnection = SimpleConnectionSignalList
type SimpleConnectionSignalList = ('[ '("changed", NM.Connection.ConnectionChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("secretsCleared", NM.Connection.ConnectionSecretsClearedSignalInfo), '("secretsUpdated", NM.Connection.ConnectionSecretsUpdatedSignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method SimpleConnection::new
-- method type : MemberFunction
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "Connection" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_simple_connection_new" nm_simple_connection_new :: 
    IO (Ptr NM.Connection.Connection)

-- | Creates a new t'GI.NM.Objects.SimpleConnection.SimpleConnection' object with no t'GI.NM.Objects.Setting.Setting' objects.
simpleConnectionNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m NM.Connection.Connection
    -- ^ __Returns:__ the new empty t'GI.NM.Interfaces.Connection.Connection' object
simpleConnectionNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Connection
simpleConnectionNew  = IO Connection -> m Connection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Connection -> m Connection) -> IO Connection -> m Connection
forall a b. (a -> b) -> a -> b
$ do
    Ptr Connection
result <- IO (Ptr Connection)
nm_simple_connection_new
    Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"simpleConnectionNew" Ptr Connection
result
    Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
    Connection -> IO Connection
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Connection
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method SimpleConnection::new_clone
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection to clone"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "Connection" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_simple_connection_new_clone" nm_simple_connection_new_clone :: 
    Ptr NM.Connection.Connection ->         -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    IO (Ptr NM.Connection.Connection)

-- | Clones an t'GI.NM.Interfaces.Connection.Connection' as an t'GI.NM.Objects.SimpleConnection.SimpleConnection'.
simpleConnectionNewClone ::
    (B.CallStack.HasCallStack, MonadIO m, NM.Connection.IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection' to clone
    -> m NM.Connection.Connection
    -- ^ __Returns:__ a new t'GI.NM.Interfaces.Connection.Connection' containing the same settings
    -- and properties as the source t'GI.NM.Interfaces.Connection.Connection'
simpleConnectionNewClone :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Connection
simpleConnectionNewClone a
connection = IO Connection -> m Connection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Connection -> m Connection) -> IO Connection -> m Connection
forall a b. (a -> b) -> a -> b
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    Ptr Connection
result <- Ptr Connection -> IO (Ptr Connection)
nm_simple_connection_new_clone Ptr Connection
connection'
    Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"simpleConnectionNewClone" Ptr Connection
result
    Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Connection -> IO Connection
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Connection
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method SimpleConnection::new_from_dbus
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "dict"
--           , argType = TVariant
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GVariant of type %NM_VARIANT_TYPE_CONNECTION describing the connection"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "Connection" })
-- throws : True
-- Skip return : False

foreign import ccall "nm_simple_connection_new_from_dbus" nm_simple_connection_new_from_dbus :: 
    Ptr GVariant ->                         -- dict : TVariant
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr NM.Connection.Connection)

-- | Creates a new t'GI.NM.Objects.SimpleConnection.SimpleConnection' from a hash table describing the
-- connection and normalize the connection.  See 'GI.NM.Interfaces.Connection.connectionToDbus' for a
-- description of the expected hash table.
simpleConnectionNewFromDbus ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GVariant
    -- ^ /@dict@/: a t'GVariant' of type @/NM_VARIANT_TYPE_CONNECTION/@ describing the connection
    -> m NM.Connection.Connection
    -- ^ __Returns:__ the new t'GI.NM.Objects.SimpleConnection.SimpleConnection' object, populated with
    -- settings created from the values in the hash table, or 'P.Nothing' if the
    -- connection failed to normalize. /(Can throw 'Data.GI.Base.GError.GError')/
simpleConnectionNewFromDbus :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GVariant -> m Connection
simpleConnectionNewFromDbus GVariant
dict = IO Connection -> m Connection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Connection -> m Connection) -> IO Connection -> m Connection
forall a b. (a -> b) -> a -> b
$ do
    Ptr GVariant
dict' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
dict
    IO Connection -> IO () -> IO Connection
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Connection
result <- (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection))
-> (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a b. (a -> b) -> a -> b
$ Ptr GVariant -> Ptr (Ptr GError) -> IO (Ptr Connection)
nm_simple_connection_new_from_dbus Ptr GVariant
dict'
        Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"simpleConnectionNewFromDbus" Ptr Connection
result
        Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
        GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
dict
        Connection -> IO Connection
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Connection
result'
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
#endif