{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- NMConnection is the interface implemented by t'GI.NM.Objects.RemoteConnection.RemoteConnection' on the
-- client side, and @/NMSettingsConnection/@ on the daemon side.

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

module GI.NM.Interfaces.Connection
    ( 

-- * Exported types
    Connection(..)                          ,
    IsConnection                            ,
    toConnection                            ,


 -- * 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)
    ResolveConnectionMethod                 ,
#endif

-- ** addSetting #method:addSetting#

#if defined(ENABLE_OVERLOADING)
    ConnectionAddSettingMethodInfo          ,
#endif
    connectionAddSetting                    ,


-- ** clearSecrets #method:clearSecrets#

#if defined(ENABLE_OVERLOADING)
    ConnectionClearSecretsMethodInfo        ,
#endif
    connectionClearSecrets                  ,


-- ** clearSecretsWithFlags #method:clearSecretsWithFlags#

#if defined(ENABLE_OVERLOADING)
    ConnectionClearSecretsWithFlagsMethodInfo,
#endif
    connectionClearSecretsWithFlags         ,


-- ** clearSettings #method:clearSettings#

#if defined(ENABLE_OVERLOADING)
    ConnectionClearSettingsMethodInfo       ,
#endif
    connectionClearSettings                 ,


-- ** compare #method:compare#

#if defined(ENABLE_OVERLOADING)
    ConnectionCompareMethodInfo             ,
#endif
    connectionCompare                       ,


-- ** dump #method:dump#

#if defined(ENABLE_OVERLOADING)
    ConnectionDumpMethodInfo                ,
#endif
    connectionDump                          ,


-- ** forEachSettingValue #method:forEachSettingValue#

#if defined(ENABLE_OVERLOADING)
    ConnectionForEachSettingValueMethodInfo ,
#endif
    connectionForEachSettingValue           ,


-- ** getConnectionType #method:getConnectionType#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetConnectionTypeMethodInfo   ,
#endif
    connectionGetConnectionType             ,


-- ** getId #method:getId#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetIdMethodInfo               ,
#endif
    connectionGetId                         ,


-- ** getInterfaceName #method:getInterfaceName#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetInterfaceNameMethodInfo    ,
#endif
    connectionGetInterfaceName              ,


-- ** getPath #method:getPath#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetPathMethodInfo             ,
#endif
    connectionGetPath                       ,


-- ** getSetting #method:getSetting#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingMethodInfo          ,
#endif
    connectionGetSetting                    ,


-- ** getSetting8021x #method:getSetting8021x#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSetting8021xMethodInfo     ,
#endif
    connectionGetSetting8021x               ,


-- ** getSettingAdsl #method:getSettingAdsl#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingAdslMethodInfo      ,
#endif
    connectionGetSettingAdsl                ,


-- ** getSettingBluetooth #method:getSettingBluetooth#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingBluetoothMethodInfo ,
#endif
    connectionGetSettingBluetooth           ,


-- ** getSettingBond #method:getSettingBond#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingBondMethodInfo      ,
#endif
    connectionGetSettingBond                ,


-- ** getSettingBridge #method:getSettingBridge#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingBridgeMethodInfo    ,
#endif
    connectionGetSettingBridge              ,


-- ** getSettingBridgePort #method:getSettingBridgePort#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingBridgePortMethodInfo,
#endif
    connectionGetSettingBridgePort          ,


-- ** getSettingByName #method:getSettingByName#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingByNameMethodInfo    ,
#endif
    connectionGetSettingByName              ,


-- ** getSettingCdma #method:getSettingCdma#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingCdmaMethodInfo      ,
#endif
    connectionGetSettingCdma                ,


-- ** getSettingConnection #method:getSettingConnection#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingConnectionMethodInfo,
#endif
    connectionGetSettingConnection          ,


-- ** getSettingDcb #method:getSettingDcb#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingDcbMethodInfo       ,
#endif
    connectionGetSettingDcb                 ,


-- ** getSettingDummy #method:getSettingDummy#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingDummyMethodInfo     ,
#endif
    connectionGetSettingDummy               ,


-- ** getSettingGeneric #method:getSettingGeneric#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingGenericMethodInfo   ,
#endif
    connectionGetSettingGeneric             ,


-- ** getSettingGsm #method:getSettingGsm#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingGsmMethodInfo       ,
#endif
    connectionGetSettingGsm                 ,


-- ** getSettingInfiniband #method:getSettingInfiniband#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingInfinibandMethodInfo,
#endif
    connectionGetSettingInfiniband          ,


-- ** getSettingIp4Config #method:getSettingIp4Config#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingIp4ConfigMethodInfo ,
#endif
    connectionGetSettingIp4Config           ,


-- ** getSettingIp6Config #method:getSettingIp6Config#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingIp6ConfigMethodInfo ,
#endif
    connectionGetSettingIp6Config           ,


-- ** getSettingIpTunnel #method:getSettingIpTunnel#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingIpTunnelMethodInfo  ,
#endif
    connectionGetSettingIpTunnel            ,


-- ** getSettingMacsec #method:getSettingMacsec#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingMacsecMethodInfo    ,
#endif
    connectionGetSettingMacsec              ,


-- ** getSettingMacvlan #method:getSettingMacvlan#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingMacvlanMethodInfo   ,
#endif
    connectionGetSettingMacvlan             ,


-- ** getSettingOlpcMesh #method:getSettingOlpcMesh#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingOlpcMeshMethodInfo  ,
#endif
    connectionGetSettingOlpcMesh            ,


-- ** getSettingOvsBridge #method:getSettingOvsBridge#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingOvsBridgeMethodInfo ,
#endif
    connectionGetSettingOvsBridge           ,


-- ** getSettingOvsInterface #method:getSettingOvsInterface#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingOvsInterfaceMethodInfo,
#endif
    connectionGetSettingOvsInterface        ,


-- ** getSettingOvsPatch #method:getSettingOvsPatch#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingOvsPatchMethodInfo  ,
#endif
    connectionGetSettingOvsPatch            ,


-- ** getSettingOvsPort #method:getSettingOvsPort#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingOvsPortMethodInfo   ,
#endif
    connectionGetSettingOvsPort             ,


-- ** getSettingPpp #method:getSettingPpp#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingPppMethodInfo       ,
#endif
    connectionGetSettingPpp                 ,


-- ** getSettingPppoe #method:getSettingPppoe#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingPppoeMethodInfo     ,
#endif
    connectionGetSettingPppoe               ,


-- ** getSettingProxy #method:getSettingProxy#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingProxyMethodInfo     ,
#endif
    connectionGetSettingProxy               ,


-- ** getSettingSerial #method:getSettingSerial#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingSerialMethodInfo    ,
#endif
    connectionGetSettingSerial              ,


-- ** getSettingTcConfig #method:getSettingTcConfig#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingTcConfigMethodInfo  ,
#endif
    connectionGetSettingTcConfig            ,


-- ** getSettingTeam #method:getSettingTeam#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingTeamMethodInfo      ,
#endif
    connectionGetSettingTeam                ,


-- ** getSettingTeamPort #method:getSettingTeamPort#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingTeamPortMethodInfo  ,
#endif
    connectionGetSettingTeamPort            ,


-- ** getSettingTun #method:getSettingTun#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingTunMethodInfo       ,
#endif
    connectionGetSettingTun                 ,


-- ** getSettingVlan #method:getSettingVlan#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingVlanMethodInfo      ,
#endif
    connectionGetSettingVlan                ,


-- ** getSettingVpn #method:getSettingVpn#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingVpnMethodInfo       ,
#endif
    connectionGetSettingVpn                 ,


-- ** getSettingVxlan #method:getSettingVxlan#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingVxlanMethodInfo     ,
#endif
    connectionGetSettingVxlan               ,


-- ** getSettingWimax #method:getSettingWimax#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingWimaxMethodInfo     ,
#endif
    connectionGetSettingWimax               ,


-- ** getSettingWired #method:getSettingWired#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingWiredMethodInfo     ,
#endif
    connectionGetSettingWired               ,


-- ** getSettingWireless #method:getSettingWireless#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingWirelessMethodInfo  ,
#endif
    connectionGetSettingWireless            ,


-- ** getSettingWirelessSecurity #method:getSettingWirelessSecurity#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingWirelessSecurityMethodInfo,
#endif
    connectionGetSettingWirelessSecurity    ,


-- ** getSettings #method:getSettings#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetSettingsMethodInfo         ,
#endif
    connectionGetSettings                   ,


-- ** getUuid #method:getUuid#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetUuidMethodInfo             ,
#endif
    connectionGetUuid                       ,


-- ** getVirtualDeviceDescription #method:getVirtualDeviceDescription#

#if defined(ENABLE_OVERLOADING)
    ConnectionGetVirtualDeviceDescriptionMethodInfo,
#endif
    connectionGetVirtualDeviceDescription   ,


-- ** isType #method:isType#

#if defined(ENABLE_OVERLOADING)
    ConnectionIsTypeMethodInfo              ,
#endif
    connectionIsType                        ,


-- ** isVirtual #method:isVirtual#

#if defined(ENABLE_OVERLOADING)
    ConnectionIsVirtualMethodInfo           ,
#endif
    connectionIsVirtual                     ,


-- ** needSecrets #method:needSecrets#

#if defined(ENABLE_OVERLOADING)
    ConnectionNeedSecretsMethodInfo         ,
#endif
    connectionNeedSecrets                   ,


-- ** normalize #method:normalize#

#if defined(ENABLE_OVERLOADING)
    ConnectionNormalizeMethodInfo           ,
#endif
    connectionNormalize                     ,


-- ** removeSetting #method:removeSetting#

#if defined(ENABLE_OVERLOADING)
    ConnectionRemoveSettingMethodInfo       ,
#endif
    connectionRemoveSetting                 ,


-- ** replaceSettings #method:replaceSettings#

#if defined(ENABLE_OVERLOADING)
    ConnectionReplaceSettingsMethodInfo     ,
#endif
    connectionReplaceSettings               ,


-- ** replaceSettingsFromConnection #method:replaceSettingsFromConnection#

#if defined(ENABLE_OVERLOADING)
    ConnectionReplaceSettingsFromConnectionMethodInfo,
#endif
    connectionReplaceSettingsFromConnection ,


-- ** setPath #method:setPath#

#if defined(ENABLE_OVERLOADING)
    ConnectionSetPathMethodInfo             ,
#endif
    connectionSetPath                       ,


-- ** toDbus #method:toDbus#

#if defined(ENABLE_OVERLOADING)
    ConnectionToDbusMethodInfo              ,
#endif
    connectionToDbus                        ,


-- ** updateSecrets #method:updateSecrets#

#if defined(ENABLE_OVERLOADING)
    ConnectionUpdateSecretsMethodInfo       ,
#endif
    connectionUpdateSecrets                 ,


-- ** verify #method:verify#

#if defined(ENABLE_OVERLOADING)
    ConnectionVerifyMethodInfo              ,
#endif
    connectionVerify                        ,


-- ** verifySecrets #method:verifySecrets#

#if defined(ENABLE_OVERLOADING)
    ConnectionVerifySecretsMethodInfo       ,
#endif
    connectionVerifySecrets                 ,




 -- * Signals


-- ** changed #signal:changed#

    ConnectionChangedCallback               ,
#if defined(ENABLE_OVERLOADING)
    ConnectionChangedSignalInfo             ,
#endif
    afterConnectionChanged                  ,
    onConnectionChanged                     ,


-- ** secretsCleared #signal:secretsCleared#

    ConnectionSecretsClearedCallback        ,
#if defined(ENABLE_OVERLOADING)
    ConnectionSecretsClearedSignalInfo      ,
#endif
    afterConnectionSecretsCleared           ,
    onConnectionSecretsCleared              ,


-- ** secretsUpdated #signal:secretsUpdated#

    ConnectionSecretsUpdatedCallback        ,
#if defined(ENABLE_OVERLOADING)
    ConnectionSecretsUpdatedSignalInfo      ,
#endif
    afterConnectionSecretsUpdated           ,
    onConnectionSecretsUpdated              ,




    ) 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.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 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.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.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

#endif

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

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

foreign import ccall "nm_connection_get_type"
    c_nm_connection_get_type :: IO B.Types.GType

instance B.Types.TypedObject Connection where
    glibType :: IO GType
glibType = IO GType
c_nm_connection_get_type

instance B.Types.GObject Connection

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

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

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

-- | Convert t'Connection' 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 Connection) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_connection_get_type
    gvalueSet_ :: Ptr GValue -> Maybe Connection -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Connection
P.Nothing = Ptr GValue -> Ptr Connection -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Connection
forall a. Ptr a
FP.nullPtr :: FP.Ptr Connection)
    gvalueSet_ Ptr GValue
gv (P.Just Connection
obj) = Connection -> (Ptr Connection -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Connection
obj (Ptr GValue -> Ptr Connection -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe Connection)
gvalueGet_ Ptr GValue
gv = do
        Ptr Connection
ptr <- Ptr GValue -> IO (Ptr Connection)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Connection)
        if Ptr Connection
ptr Ptr Connection -> Ptr Connection -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Connection
forall a. Ptr a
FP.nullPtr
        then Connection -> Maybe Connection
forall a. a -> Maybe a
P.Just (Connection -> Maybe Connection)
-> IO Connection -> IO (Maybe Connection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Connection -> Connection
Connection Ptr Connection
ptr
        else Maybe Connection -> IO (Maybe Connection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Connection
forall a. Maybe a
P.Nothing
        
    

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

#if defined(ENABLE_OVERLOADING)
#endif

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

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

#endif

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

#endif

-- method Connection::add_setting
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "setting"
--           , argType = TInterface Name { namespace = "NM" , name = "Setting" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the #NMSetting to add to the connection object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Adds a t'GI.NM.Objects.Setting.Setting' to the connection, replacing any previous t'GI.NM.Objects.Setting.Setting' of the
-- same name which has previously been added to the t'GI.NM.Interfaces.Connection.Connection'.  The
-- connection takes ownership of the t'GI.NM.Objects.Setting.Setting' object and does not increase
-- the setting object\'s reference count.
connectionAddSetting ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a, NM.Setting.IsSetting b) =>
    a
    -- ^ /@connection@/: a t'GI.NM.Interfaces.Connection.Connection'
    -> b
    -- ^ /@setting@/: the t'GI.NM.Objects.Setting.Setting' to add to the connection object
    -> m ()
connectionAddSetting :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsConnection a, IsSetting b) =>
a -> b -> m ()
connectionAddSetting a
connection b
setting = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    Ptr Setting
setting' <- b -> IO (Ptr Setting)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
setting
    Ptr Connection -> Ptr Setting -> IO ()
nm_connection_add_setting Ptr Connection
connection' Ptr Setting
setting'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
setting
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ConnectionAddSettingMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsConnection a, NM.Setting.IsSetting b) => O.OverloadedMethod ConnectionAddSettingMethodInfo a signature where
    overloadedMethod = connectionAddSetting

instance O.OverloadedMethodInfo ConnectionAddSettingMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionAddSetting",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionAddSetting"
        })


#endif

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

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

-- | Clears and frees any secrets that may be stored in the connection, to avoid
-- keeping secret data in memory when not needed.
connectionClearSecrets ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m ()
connectionClearSecrets :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m ()
connectionClearSecrets a
connection = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    Ptr Connection -> IO ()
nm_connection_clear_secrets Ptr Connection
connection'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ConnectionClearSecretsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionClearSecretsMethodInfo a signature where
    overloadedMethod = connectionClearSecrets

instance O.OverloadedMethodInfo ConnectionClearSecretsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionClearSecrets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionClearSecrets"
        })


#endif

-- method Connection::clear_secrets_with_flags
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface
--                 Name { namespace = "NM" , name = "SettingClearSecretsWithFlagsFn" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "function to be called to determine whether a\n    specific secret should be cleared or not. If %NULL, all secrets are cleared."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeCall
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "caller-supplied data passed to @func"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_clear_secrets_with_flags" nm_connection_clear_secrets_with_flags :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    FunPtr NM.Callbacks.C_SettingClearSecretsWithFlagsFn -> -- func : TInterface (Name {namespace = "NM", name = "SettingClearSecretsWithFlagsFn"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Clears and frees secrets determined by /@func@/.
connectionClearSecretsWithFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> Maybe (NM.Callbacks.SettingClearSecretsWithFlagsFn)
    -- ^ /@func@/: function to be called to determine whether a
    --     specific secret should be cleared or not. If 'P.Nothing', all secrets are cleared.
    -> m ()
connectionClearSecretsWithFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> Maybe SettingClearSecretsWithFlagsFn -> m ()
connectionClearSecretsWithFlags a
connection Maybe SettingClearSecretsWithFlagsFn
func = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    FunPtr C_SettingClearSecretsWithFlagsFn
maybeFunc <- case Maybe SettingClearSecretsWithFlagsFn
func of
        Maybe SettingClearSecretsWithFlagsFn
Nothing -> FunPtr C_SettingClearSecretsWithFlagsFn
-> IO (FunPtr C_SettingClearSecretsWithFlagsFn)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_SettingClearSecretsWithFlagsFn
forall a. FunPtr a
FP.nullFunPtr
        Just SettingClearSecretsWithFlagsFn
jFunc -> do
            FunPtr C_SettingClearSecretsWithFlagsFn
jFunc' <- C_SettingClearSecretsWithFlagsFn
-> IO (FunPtr C_SettingClearSecretsWithFlagsFn)
NM.Callbacks.mk_SettingClearSecretsWithFlagsFn (Maybe (Ptr (FunPtr C_SettingClearSecretsWithFlagsFn))
-> SettingClearSecretsWithFlagsFn_WithClosures
-> C_SettingClearSecretsWithFlagsFn
NM.Callbacks.wrap_SettingClearSecretsWithFlagsFn Maybe (Ptr (FunPtr C_SettingClearSecretsWithFlagsFn))
forall a. Maybe a
Nothing (SettingClearSecretsWithFlagsFn
-> SettingClearSecretsWithFlagsFn_WithClosures
NM.Callbacks.drop_closures_SettingClearSecretsWithFlagsFn SettingClearSecretsWithFlagsFn
jFunc))
            FunPtr C_SettingClearSecretsWithFlagsFn
-> IO (FunPtr C_SettingClearSecretsWithFlagsFn)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_SettingClearSecretsWithFlagsFn
jFunc'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr Connection
-> FunPtr C_SettingClearSecretsWithFlagsFn -> Ptr () -> IO ()
nm_connection_clear_secrets_with_flags Ptr Connection
connection' FunPtr C_SettingClearSecretsWithFlagsFn
maybeFunc Ptr ()
forall a. Ptr a
userData
    Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_SettingClearSecretsWithFlagsFn -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_SettingClearSecretsWithFlagsFn
maybeFunc
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ConnectionClearSecretsWithFlagsMethodInfo
instance (signature ~ (Maybe (NM.Callbacks.SettingClearSecretsWithFlagsFn) -> m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionClearSecretsWithFlagsMethodInfo a signature where
    overloadedMethod = connectionClearSecretsWithFlags

instance O.OverloadedMethodInfo ConnectionClearSecretsWithFlagsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionClearSecretsWithFlags",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionClearSecretsWithFlags"
        })


#endif

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

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

-- | Deletes all of /@connection@/\'s settings.
connectionClearSettings ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: a t'GI.NM.Interfaces.Connection.Connection'
    -> m ()
connectionClearSettings :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m ()
connectionClearSettings a
connection = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    Ptr Connection -> IO ()
nm_connection_clear_settings Ptr Connection
connection'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ConnectionClearSettingsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionClearSettingsMethodInfo a signature where
    overloadedMethod = connectionClearSettings

instance O.OverloadedMethodInfo ConnectionClearSettingsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionClearSettings",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionClearSettings"
        })


#endif

-- method Connection::compare
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "a"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a second #NMConnection to compare with the first"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "SettingCompareFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "compare flags, e.g. %NM_SETTING_COMPARE_FLAG_EXACT"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_compare" nm_connection_compare :: 
    Ptr Connection ->                       -- a : TInterface (Name {namespace = "NM", name = "Connection"})
    Ptr Connection ->                       -- b : TInterface (Name {namespace = "NM", name = "Connection"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "NM", name = "SettingCompareFlags"})
    IO CInt

-- | Compares two t'GI.NM.Interfaces.Connection.Connection' objects for similarity, with comparison behavior
-- modified by a set of flags.  See 'GI.NM.Objects.Setting.settingCompare' for a description of
-- each flag\'s behavior.
connectionCompare ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a, IsConnection b) =>
    a
    -- ^ /@a@/: a t'GI.NM.Interfaces.Connection.Connection'
    -> b
    -- ^ /@b@/: a second t'GI.NM.Interfaces.Connection.Connection' to compare with the first
    -> NM.Enums.SettingCompareFlags
    -- ^ /@flags@/: compare flags, e.g. 'GI.NM.Enums.SettingCompareFlagsExact'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the comparison succeeds, 'P.False' if it does not
connectionCompare :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsConnection a, IsConnection b) =>
a -> b -> SettingCompareFlags -> m Bool
connectionCompare a
a b
b SettingCompareFlags
flags = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Connection
a' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
a
    Ptr Connection
b' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
b
    let flags' :: CUInt
flags' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (SettingCompareFlags -> Int) -> SettingCompareFlags -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SettingCompareFlags -> Int
forall a. Enum a => a -> Int
fromEnum) SettingCompareFlags
flags
    CInt
result <- Ptr Connection -> Ptr Connection -> CUInt -> IO CInt
nm_connection_compare Ptr Connection
a' Ptr Connection
b' CUInt
flags'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
a
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
b
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionCompareMethodInfo
instance (signature ~ (b -> NM.Enums.SettingCompareFlags -> m Bool), MonadIO m, IsConnection a, IsConnection b) => O.OverloadedMethod ConnectionCompareMethodInfo a signature where
    overloadedMethod = connectionCompare

instance O.OverloadedMethodInfo ConnectionCompareMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionCompare",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionCompare"
        })


#endif

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

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

-- | Print the connection (including secrets!) to stdout. For debugging
-- purposes ONLY, should NOT be used for serialization of the setting,
-- or machine-parsed in any way. The output format is not guaranteed to
-- be stable and may change at any time.
connectionDump ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m ()
connectionDump :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m ()
connectionDump a
connection = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    Ptr Connection -> IO ()
nm_connection_dump Ptr Connection
connection'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ConnectionDumpMethodInfo
instance (signature ~ (m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionDumpMethodInfo a signature where
    overloadedMethod = connectionDump

instance O.OverloadedMethodInfo ConnectionDumpMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionDump",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionDump"
        })


#endif

-- method Connection::for_each_setting_value
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "func"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "SettingValueIterFn" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "user-supplied function called for each setting's property"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeCall
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data passed to @func at each invocation"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_for_each_setting_value" nm_connection_for_each_setting_value :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    FunPtr NM.Callbacks.C_SettingValueIterFn -> -- func : TInterface (Name {namespace = "NM", name = "SettingValueIterFn"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Iterates over the properties of each t'GI.NM.Objects.Setting.Setting' object in the t'GI.NM.Interfaces.Connection.Connection',
-- calling the supplied user function for each property.
connectionForEachSettingValue ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> NM.Callbacks.SettingValueIterFn
    -- ^ /@func@/: user-supplied function called for each setting\'s property
    -> m ()
connectionForEachSettingValue :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> SettingValueIterFn -> m ()
connectionForEachSettingValue a
connection SettingValueIterFn
func = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    FunPtr C_SettingValueIterFn
func' <- C_SettingValueIterFn -> IO (FunPtr C_SettingValueIterFn)
NM.Callbacks.mk_SettingValueIterFn (Maybe (Ptr (FunPtr C_SettingValueIterFn))
-> SettingValueIterFn_WithClosures -> C_SettingValueIterFn
NM.Callbacks.wrap_SettingValueIterFn Maybe (Ptr (FunPtr C_SettingValueIterFn))
forall a. Maybe a
Nothing (SettingValueIterFn -> SettingValueIterFn_WithClosures
NM.Callbacks.drop_closures_SettingValueIterFn SettingValueIterFn
func))
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr Connection -> FunPtr C_SettingValueIterFn -> Ptr () -> IO ()
nm_connection_for_each_setting_value Ptr Connection
connection' FunPtr C_SettingValueIterFn
func' Ptr ()
forall a. Ptr a
userData
    Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_SettingValueIterFn -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_SettingValueIterFn
func'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ConnectionForEachSettingValueMethodInfo
instance (signature ~ (NM.Callbacks.SettingValueIterFn -> m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionForEachSettingValueMethodInfo a signature where
    overloadedMethod = connectionForEachSettingValue

instance O.OverloadedMethodInfo ConnectionForEachSettingValueMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionForEachSettingValue",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionForEachSettingValue"
        })


#endif

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

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

-- | A shortcut to return the type from the connection\'s t'GI.NM.Objects.SettingConnection.SettingConnection'.
connectionGetConnectionType ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m T.Text
    -- ^ __Returns:__ the type from the connection\'s \'connection\' setting
connectionGetConnectionType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Text
connectionGetConnectionType a
connection = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Connection -> IO CString
nm_connection_get_connection_type Ptr Connection
connection'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetConnectionType" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetConnectionTypeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetConnectionTypeMethodInfo a signature where
    overloadedMethod = connectionGetConnectionType

instance O.OverloadedMethodInfo ConnectionGetConnectionTypeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetConnectionType",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetConnectionType"
        })


#endif

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

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

-- | A shortcut to return the ID from the connection\'s t'GI.NM.Objects.SettingConnection.SettingConnection'.
connectionGetId ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m T.Text
    -- ^ __Returns:__ the ID from the connection\'s \'connection\' setting
connectionGetId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Text
connectionGetId a
connection = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Connection -> IO CString
nm_connection_get_id Ptr Connection
connection'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetId" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetIdMethodInfo a signature where
    overloadedMethod = connectionGetId

instance O.OverloadedMethodInfo ConnectionGetIdMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetId",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetId"
        })


#endif

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

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

-- | Returns the interface name as stored in NMSettingConnection:interface_name.
-- If the connection contains no NMSettingConnection, it will return 'P.Nothing'.
-- 
-- For hardware devices and software devices created outside of NetworkManager,
-- this name is used to match the device. for software devices created by
-- NetworkManager, this is the name of the created interface.
connectionGetInterfaceName ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: The t'GI.NM.Interfaces.Connection.Connection'
    -> m T.Text
    -- ^ __Returns:__ Name of the kernel interface or 'P.Nothing'
connectionGetInterfaceName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Text
connectionGetInterfaceName a
connection = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Connection -> IO CString
nm_connection_get_interface_name Ptr Connection
connection'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetInterfaceName" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetInterfaceNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetInterfaceNameMethodInfo a signature where
    overloadedMethod = connectionGetInterfaceName

instance O.OverloadedMethodInfo ConnectionGetInterfaceNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetInterfaceName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetInterfaceName"
        })


#endif

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

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

-- | Returns the connection\'s D-Bus path.
connectionGetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m T.Text
    -- ^ __Returns:__ the D-Bus path of the connection, previously set by a call to
    -- 'GI.NM.Interfaces.Connection.connectionSetPath'.
connectionGetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Text
connectionGetPath a
connection = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Connection -> IO CString
nm_connection_get_path Ptr Connection
connection'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetPath" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetPathMethodInfo a signature where
    overloadedMethod = connectionGetPath

instance O.OverloadedMethodInfo ConnectionGetPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetPath"
        })


#endif

-- method Connection::get_setting
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "setting_type"
--           , argType = TBasicType TGType
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GType of the setting object to return"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "Setting" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_get_setting" nm_connection_get_setting :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    CGType ->                               -- setting_type : TBasicType TGType
    IO (Ptr NM.Setting.Setting)

-- | Gets the t'GI.NM.Objects.Setting.Setting' with the given t'GType', if one has been previously added
-- to the t'GI.NM.Interfaces.Connection.Connection'.
connectionGetSetting ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: a t'GI.NM.Interfaces.Connection.Connection'
    -> GType
    -- ^ /@settingType@/: the t'GType' of the setting object to return
    -> m NM.Setting.Setting
    -- ^ __Returns:__ the t'GI.NM.Objects.Setting.Setting', or 'P.Nothing' if no setting of that type was previously
    -- added to the t'GI.NM.Interfaces.Connection.Connection'
connectionGetSetting :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> GType -> m Setting
connectionGetSetting a
connection GType
settingType = IO Setting -> m Setting
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Setting -> m Setting) -> IO Setting -> m Setting
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
    let settingType' :: CGType
settingType' = GType -> CGType
gtypeToCGType GType
settingType
    Ptr Setting
result <- Ptr Connection -> CGType -> IO (Ptr Setting)
nm_connection_get_setting Ptr Connection
connection' CGType
settingType'
    Text -> Ptr Setting -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSetting" Ptr Setting
result
    Setting
result' <- ((ManagedPtr Setting -> Setting) -> Ptr Setting -> IO Setting
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Setting -> Setting
NM.Setting.Setting) Ptr Setting
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Setting -> IO Setting
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Setting
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingMethodInfo
instance (signature ~ (GType -> m NM.Setting.Setting), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingMethodInfo a signature where
    overloadedMethod = connectionGetSetting

instance O.OverloadedMethodInfo ConnectionGetSettingMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSetting",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSetting"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.Setting8021x.Setting8021x' the connection might contain.
connectionGetSetting8021x ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.Setting8021x.Setting8021x
    -- ^ __Returns:__ an t'GI.NM.Objects.Setting8021x.Setting8021x' if the connection contains one, otherwise 'P.Nothing'
connectionGetSetting8021x :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Setting8021x
connectionGetSetting8021x a
connection = IO Setting8021x -> m Setting8021x
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Setting8021x -> m Setting8021x)
-> IO Setting8021x -> m Setting8021x
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 Setting8021x
result <- Ptr Connection -> IO (Ptr Setting8021x)
nm_connection_get_setting_802_1x Ptr Connection
connection'
    Text -> Ptr Setting8021x -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSetting8021x" Ptr Setting8021x
result
    Setting8021x
result' <- ((ManagedPtr Setting8021x -> Setting8021x)
-> Ptr Setting8021x -> IO Setting8021x
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Setting8021x -> Setting8021x
NM.Setting8021x.Setting8021x) Ptr Setting8021x
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Setting8021x -> IO Setting8021x
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Setting8021x
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSetting8021xMethodInfo
instance (signature ~ (m NM.Setting8021x.Setting8021x), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSetting8021xMethodInfo a signature where
    overloadedMethod = connectionGetSetting8021x

instance O.OverloadedMethodInfo ConnectionGetSetting8021xMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSetting8021x",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSetting8021x"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingAdsl.SettingAdsl' the connection might contain.
connectionGetSettingAdsl ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingAdsl.SettingAdsl
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingAdsl.SettingAdsl' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingAdsl :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingAdsl
connectionGetSettingAdsl a
connection = IO SettingAdsl -> m SettingAdsl
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingAdsl -> m SettingAdsl)
-> IO SettingAdsl -> m SettingAdsl
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 SettingAdsl
result <- Ptr Connection -> IO (Ptr SettingAdsl)
nm_connection_get_setting_adsl Ptr Connection
connection'
    Text -> Ptr SettingAdsl -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingAdsl" Ptr SettingAdsl
result
    SettingAdsl
result' <- ((ManagedPtr SettingAdsl -> SettingAdsl)
-> Ptr SettingAdsl -> IO SettingAdsl
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingAdsl -> SettingAdsl
NM.SettingAdsl.SettingAdsl) Ptr SettingAdsl
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingAdsl -> IO SettingAdsl
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingAdsl
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingAdslMethodInfo
instance (signature ~ (m NM.SettingAdsl.SettingAdsl), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingAdslMethodInfo a signature where
    overloadedMethod = connectionGetSettingAdsl

instance O.OverloadedMethodInfo ConnectionGetSettingAdslMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingAdsl",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingAdsl"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingBluetooth.SettingBluetooth' the connection might contain.
connectionGetSettingBluetooth ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingBluetooth.SettingBluetooth
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingBluetooth.SettingBluetooth' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingBluetooth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingBluetooth
connectionGetSettingBluetooth a
connection = IO SettingBluetooth -> m SettingBluetooth
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingBluetooth -> m SettingBluetooth)
-> IO SettingBluetooth -> m SettingBluetooth
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 SettingBluetooth
result <- Ptr Connection -> IO (Ptr SettingBluetooth)
nm_connection_get_setting_bluetooth Ptr Connection
connection'
    Text -> Ptr SettingBluetooth -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingBluetooth" Ptr SettingBluetooth
result
    SettingBluetooth
result' <- ((ManagedPtr SettingBluetooth -> SettingBluetooth)
-> Ptr SettingBluetooth -> IO SettingBluetooth
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingBluetooth -> SettingBluetooth
NM.SettingBluetooth.SettingBluetooth) Ptr SettingBluetooth
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingBluetooth -> IO SettingBluetooth
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingBluetooth
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingBluetoothMethodInfo
instance (signature ~ (m NM.SettingBluetooth.SettingBluetooth), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingBluetoothMethodInfo a signature where
    overloadedMethod = connectionGetSettingBluetooth

instance O.OverloadedMethodInfo ConnectionGetSettingBluetoothMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingBluetooth",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingBluetooth"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingBond.SettingBond' the connection might contain.
connectionGetSettingBond ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingBond.SettingBond
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingBond.SettingBond' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingBond :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingBond
connectionGetSettingBond a
connection = IO SettingBond -> m SettingBond
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingBond -> m SettingBond)
-> IO SettingBond -> m SettingBond
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 SettingBond
result <- Ptr Connection -> IO (Ptr SettingBond)
nm_connection_get_setting_bond Ptr Connection
connection'
    Text -> Ptr SettingBond -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingBond" Ptr SettingBond
result
    SettingBond
result' <- ((ManagedPtr SettingBond -> SettingBond)
-> Ptr SettingBond -> IO SettingBond
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingBond -> SettingBond
NM.SettingBond.SettingBond) Ptr SettingBond
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingBond -> IO SettingBond
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingBond
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingBondMethodInfo
instance (signature ~ (m NM.SettingBond.SettingBond), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingBondMethodInfo a signature where
    overloadedMethod = connectionGetSettingBond

instance O.OverloadedMethodInfo ConnectionGetSettingBondMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingBond",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingBond"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingBridge.SettingBridge' the connection might contain.
connectionGetSettingBridge ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingBridge.SettingBridge
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingBridge.SettingBridge' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingBridge :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingBridge
connectionGetSettingBridge a
connection = IO SettingBridge -> m SettingBridge
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingBridge -> m SettingBridge)
-> IO SettingBridge -> m SettingBridge
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 SettingBridge
result <- Ptr Connection -> IO (Ptr SettingBridge)
nm_connection_get_setting_bridge Ptr Connection
connection'
    Text -> Ptr SettingBridge -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingBridge" Ptr SettingBridge
result
    SettingBridge
result' <- ((ManagedPtr SettingBridge -> SettingBridge)
-> Ptr SettingBridge -> IO SettingBridge
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingBridge -> SettingBridge
NM.SettingBridge.SettingBridge) Ptr SettingBridge
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingBridge -> IO SettingBridge
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingBridge
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingBridgeMethodInfo
instance (signature ~ (m NM.SettingBridge.SettingBridge), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingBridgeMethodInfo a signature where
    overloadedMethod = connectionGetSettingBridge

instance O.OverloadedMethodInfo ConnectionGetSettingBridgeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingBridge",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingBridge"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingBridgePort.SettingBridgePort' the connection might contain.
connectionGetSettingBridgePort ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingBridgePort.SettingBridgePort
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingBridgePort.SettingBridgePort' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingBridgePort :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingBridgePort
connectionGetSettingBridgePort a
connection = IO SettingBridgePort -> m SettingBridgePort
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingBridgePort -> m SettingBridgePort)
-> IO SettingBridgePort -> m SettingBridgePort
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 SettingBridgePort
result <- Ptr Connection -> IO (Ptr SettingBridgePort)
nm_connection_get_setting_bridge_port Ptr Connection
connection'
    Text -> Ptr SettingBridgePort -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingBridgePort" Ptr SettingBridgePort
result
    SettingBridgePort
result' <- ((ManagedPtr SettingBridgePort -> SettingBridgePort)
-> Ptr SettingBridgePort -> IO SettingBridgePort
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingBridgePort -> SettingBridgePort
NM.SettingBridgePort.SettingBridgePort) Ptr SettingBridgePort
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingBridgePort -> IO SettingBridgePort
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingBridgePort
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingBridgePortMethodInfo
instance (signature ~ (m NM.SettingBridgePort.SettingBridgePort), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingBridgePortMethodInfo a signature where
    overloadedMethod = connectionGetSettingBridgePort

instance O.OverloadedMethodInfo ConnectionGetSettingBridgePortMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingBridgePort",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingBridgePort"
        })


#endif

-- method Connection::get_setting_by_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a setting name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "Setting" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_get_setting_by_name" nm_connection_get_setting_by_name :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr NM.Setting.Setting)

-- | Gets the t'GI.NM.Objects.Setting.Setting' with the given name, if one has been previously added
-- the t'GI.NM.Interfaces.Connection.Connection'.
connectionGetSettingByName ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: a t'GI.NM.Interfaces.Connection.Connection'
    -> T.Text
    -- ^ /@name@/: a setting name
    -> m NM.Setting.Setting
    -- ^ __Returns:__ the t'GI.NM.Objects.Setting.Setting', or 'P.Nothing' if no setting with that name was previously
    -- added to the t'GI.NM.Interfaces.Connection.Connection'
connectionGetSettingByName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> Text -> m Setting
connectionGetSettingByName a
connection Text
name = IO Setting -> m Setting
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Setting -> m Setting) -> IO Setting -> m Setting
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
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Setting
result <- Ptr Connection -> CString -> IO (Ptr Setting)
nm_connection_get_setting_by_name Ptr Connection
connection' CString
name'
    Text -> Ptr Setting -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingByName" Ptr Setting
result
    Setting
result' <- ((ManagedPtr Setting -> Setting) -> Ptr Setting -> IO Setting
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Setting -> Setting
NM.Setting.Setting) Ptr Setting
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Setting -> IO Setting
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Setting
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingByNameMethodInfo
instance (signature ~ (T.Text -> m NM.Setting.Setting), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingByNameMethodInfo a signature where
    overloadedMethod = connectionGetSettingByName

instance O.OverloadedMethodInfo ConnectionGetSettingByNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingByName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingByName"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingCdma.SettingCdma' the connection might contain.
connectionGetSettingCdma ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingCdma.SettingCdma
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingCdma.SettingCdma' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingCdma :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingCdma
connectionGetSettingCdma a
connection = IO SettingCdma -> m SettingCdma
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingCdma -> m SettingCdma)
-> IO SettingCdma -> m SettingCdma
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 SettingCdma
result <- Ptr Connection -> IO (Ptr SettingCdma)
nm_connection_get_setting_cdma Ptr Connection
connection'
    Text -> Ptr SettingCdma -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingCdma" Ptr SettingCdma
result
    SettingCdma
result' <- ((ManagedPtr SettingCdma -> SettingCdma)
-> Ptr SettingCdma -> IO SettingCdma
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingCdma -> SettingCdma
NM.SettingCdma.SettingCdma) Ptr SettingCdma
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingCdma -> IO SettingCdma
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingCdma
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingCdmaMethodInfo
instance (signature ~ (m NM.SettingCdma.SettingCdma), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingCdmaMethodInfo a signature where
    overloadedMethod = connectionGetSettingCdma

instance O.OverloadedMethodInfo ConnectionGetSettingCdmaMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingCdma",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingCdma"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingConnection.SettingConnection' the connection might contain.
connectionGetSettingConnection ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingConnection.SettingConnection
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingConnection.SettingConnection' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingConnection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingConnection
connectionGetSettingConnection a
connection = IO SettingConnection -> m SettingConnection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingConnection -> m SettingConnection)
-> IO SettingConnection -> m SettingConnection
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 SettingConnection
result <- Ptr Connection -> IO (Ptr SettingConnection)
nm_connection_get_setting_connection Ptr Connection
connection'
    Text -> Ptr SettingConnection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingConnection" Ptr SettingConnection
result
    SettingConnection
result' <- ((ManagedPtr SettingConnection -> SettingConnection)
-> Ptr SettingConnection -> IO SettingConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingConnection -> SettingConnection
NM.SettingConnection.SettingConnection) Ptr SettingConnection
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingConnection -> IO SettingConnection
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingConnection
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingConnectionMethodInfo
instance (signature ~ (m NM.SettingConnection.SettingConnection), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingConnectionMethodInfo a signature where
    overloadedMethod = connectionGetSettingConnection

instance O.OverloadedMethodInfo ConnectionGetSettingConnectionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingConnection",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingConnection"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingDcb.SettingDcb' the connection might contain.
connectionGetSettingDcb ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingDcb.SettingDcb
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingDcb.SettingDcb' if the connection contains one, otherwise NULL
connectionGetSettingDcb :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingDcb
connectionGetSettingDcb a
connection = IO SettingDcb -> m SettingDcb
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingDcb -> m SettingDcb) -> IO SettingDcb -> m SettingDcb
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 SettingDcb
result <- Ptr Connection -> IO (Ptr SettingDcb)
nm_connection_get_setting_dcb Ptr Connection
connection'
    Text -> Ptr SettingDcb -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingDcb" Ptr SettingDcb
result
    SettingDcb
result' <- ((ManagedPtr SettingDcb -> SettingDcb)
-> Ptr SettingDcb -> IO SettingDcb
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingDcb -> SettingDcb
NM.SettingDcb.SettingDcb) Ptr SettingDcb
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingDcb -> IO SettingDcb
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingDcb
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingDcbMethodInfo
instance (signature ~ (m NM.SettingDcb.SettingDcb), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingDcbMethodInfo a signature where
    overloadedMethod = connectionGetSettingDcb

instance O.OverloadedMethodInfo ConnectionGetSettingDcbMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingDcb",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingDcb"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingDummy.SettingDummy' the connection might contain.
-- 
-- /Since: 1.8/
connectionGetSettingDummy ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingDummy.SettingDummy
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingDummy.SettingDummy' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingDummy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingDummy
connectionGetSettingDummy a
connection = IO SettingDummy -> m SettingDummy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingDummy -> m SettingDummy)
-> IO SettingDummy -> m SettingDummy
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 SettingDummy
result <- Ptr Connection -> IO (Ptr SettingDummy)
nm_connection_get_setting_dummy Ptr Connection
connection'
    Text -> Ptr SettingDummy -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingDummy" Ptr SettingDummy
result
    SettingDummy
result' <- ((ManagedPtr SettingDummy -> SettingDummy)
-> Ptr SettingDummy -> IO SettingDummy
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingDummy -> SettingDummy
NM.SettingDummy.SettingDummy) Ptr SettingDummy
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingDummy -> IO SettingDummy
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingDummy
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingDummyMethodInfo
instance (signature ~ (m NM.SettingDummy.SettingDummy), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingDummyMethodInfo a signature where
    overloadedMethod = connectionGetSettingDummy

instance O.OverloadedMethodInfo ConnectionGetSettingDummyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingDummy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingDummy"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingGeneric.SettingGeneric' the connection might contain.
connectionGetSettingGeneric ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingGeneric.SettingGeneric
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingGeneric.SettingGeneric' if the connection contains one, otherwise NULL
connectionGetSettingGeneric :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingGeneric
connectionGetSettingGeneric a
connection = IO SettingGeneric -> m SettingGeneric
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingGeneric -> m SettingGeneric)
-> IO SettingGeneric -> m SettingGeneric
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 SettingGeneric
result <- Ptr Connection -> IO (Ptr SettingGeneric)
nm_connection_get_setting_generic Ptr Connection
connection'
    Text -> Ptr SettingGeneric -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingGeneric" Ptr SettingGeneric
result
    SettingGeneric
result' <- ((ManagedPtr SettingGeneric -> SettingGeneric)
-> Ptr SettingGeneric -> IO SettingGeneric
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingGeneric -> SettingGeneric
NM.SettingGeneric.SettingGeneric) Ptr SettingGeneric
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingGeneric -> IO SettingGeneric
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingGeneric
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingGenericMethodInfo
instance (signature ~ (m NM.SettingGeneric.SettingGeneric), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingGenericMethodInfo a signature where
    overloadedMethod = connectionGetSettingGeneric

instance O.OverloadedMethodInfo ConnectionGetSettingGenericMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingGeneric",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingGeneric"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingGsm.SettingGsm' the connection might contain.
connectionGetSettingGsm ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingGsm.SettingGsm
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingGsm.SettingGsm' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingGsm :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingGsm
connectionGetSettingGsm a
connection = IO SettingGsm -> m SettingGsm
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingGsm -> m SettingGsm) -> IO SettingGsm -> m SettingGsm
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 SettingGsm
result <- Ptr Connection -> IO (Ptr SettingGsm)
nm_connection_get_setting_gsm Ptr Connection
connection'
    Text -> Ptr SettingGsm -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingGsm" Ptr SettingGsm
result
    SettingGsm
result' <- ((ManagedPtr SettingGsm -> SettingGsm)
-> Ptr SettingGsm -> IO SettingGsm
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingGsm -> SettingGsm
NM.SettingGsm.SettingGsm) Ptr SettingGsm
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingGsm -> IO SettingGsm
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingGsm
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingGsmMethodInfo
instance (signature ~ (m NM.SettingGsm.SettingGsm), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingGsmMethodInfo a signature where
    overloadedMethod = connectionGetSettingGsm

instance O.OverloadedMethodInfo ConnectionGetSettingGsmMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingGsm",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingGsm"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingInfiniband.SettingInfiniband' the connection might contain.
connectionGetSettingInfiniband ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingInfiniband.SettingInfiniband
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingInfiniband.SettingInfiniband' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingInfiniband :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingInfiniband
connectionGetSettingInfiniband a
connection = IO SettingInfiniband -> m SettingInfiniband
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingInfiniband -> m SettingInfiniband)
-> IO SettingInfiniband -> m SettingInfiniband
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 SettingInfiniband
result <- Ptr Connection -> IO (Ptr SettingInfiniband)
nm_connection_get_setting_infiniband Ptr Connection
connection'
    Text -> Ptr SettingInfiniband -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingInfiniband" Ptr SettingInfiniband
result
    SettingInfiniband
result' <- ((ManagedPtr SettingInfiniband -> SettingInfiniband)
-> Ptr SettingInfiniband -> IO SettingInfiniband
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingInfiniband -> SettingInfiniband
NM.SettingInfiniband.SettingInfiniband) Ptr SettingInfiniband
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingInfiniband -> IO SettingInfiniband
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingInfiniband
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingInfinibandMethodInfo
instance (signature ~ (m NM.SettingInfiniband.SettingInfiniband), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingInfinibandMethodInfo a signature where
    overloadedMethod = connectionGetSettingInfiniband

instance O.OverloadedMethodInfo ConnectionGetSettingInfinibandMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingInfiniband",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingInfiniband"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingIP4Config.SettingIP4Config' the connection might contain.
-- 
-- Note that it returns the value as type t'GI.NM.Objects.SettingIPConfig.SettingIPConfig', since the vast
-- majority of IPv4-setting-related methods are on that type, not
-- t'GI.NM.Objects.SettingIP4Config.SettingIP4Config'.
connectionGetSettingIp4Config ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingIP4Config.SettingIP4Config
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingIP4Config.SettingIP4Config' if the
    -- connection contains one, otherwise 'P.Nothing'
connectionGetSettingIp4Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingIP4Config
connectionGetSettingIp4Config a
connection = IO SettingIP4Config -> m SettingIP4Config
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingIP4Config -> m SettingIP4Config)
-> IO SettingIP4Config -> m SettingIP4Config
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 SettingIP4Config
result <- Ptr Connection -> IO (Ptr SettingIP4Config)
nm_connection_get_setting_ip4_config Ptr Connection
connection'
    Text -> Ptr SettingIP4Config -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingIp4Config" Ptr SettingIP4Config
result
    SettingIP4Config
result' <- ((ManagedPtr SettingIP4Config -> SettingIP4Config)
-> Ptr SettingIP4Config -> IO SettingIP4Config
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingIP4Config -> SettingIP4Config
NM.SettingIP4Config.SettingIP4Config) Ptr SettingIP4Config
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingIP4Config -> IO SettingIP4Config
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingIP4Config
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingIp4ConfigMethodInfo
instance (signature ~ (m NM.SettingIP4Config.SettingIP4Config), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingIp4ConfigMethodInfo a signature where
    overloadedMethod = connectionGetSettingIp4Config

instance O.OverloadedMethodInfo ConnectionGetSettingIp4ConfigMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingIp4Config",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingIp4Config"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingIP6Config.SettingIP6Config' the connection might contain.
-- 
-- Note that it returns the value as type t'GI.NM.Objects.SettingIPConfig.SettingIPConfig', since the vast
-- majority of IPv6-setting-related methods are on that type, not
-- t'GI.NM.Objects.SettingIP6Config.SettingIP6Config'.
connectionGetSettingIp6Config ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingIP6Config.SettingIP6Config
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingIP6Config.SettingIP6Config' if the
    -- connection contains one, otherwise 'P.Nothing'
connectionGetSettingIp6Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingIP6Config
connectionGetSettingIp6Config a
connection = IO SettingIP6Config -> m SettingIP6Config
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingIP6Config -> m SettingIP6Config)
-> IO SettingIP6Config -> m SettingIP6Config
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 SettingIP6Config
result <- Ptr Connection -> IO (Ptr SettingIP6Config)
nm_connection_get_setting_ip6_config Ptr Connection
connection'
    Text -> Ptr SettingIP6Config -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingIp6Config" Ptr SettingIP6Config
result
    SettingIP6Config
result' <- ((ManagedPtr SettingIP6Config -> SettingIP6Config)
-> Ptr SettingIP6Config -> IO SettingIP6Config
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingIP6Config -> SettingIP6Config
NM.SettingIP6Config.SettingIP6Config) Ptr SettingIP6Config
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingIP6Config -> IO SettingIP6Config
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingIP6Config
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingIp6ConfigMethodInfo
instance (signature ~ (m NM.SettingIP6Config.SettingIP6Config), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingIp6ConfigMethodInfo a signature where
    overloadedMethod = connectionGetSettingIp6Config

instance O.OverloadedMethodInfo ConnectionGetSettingIp6ConfigMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingIp6Config",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingIp6Config"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingIPTunnel.SettingIPTunnel' the connection might contain.
-- 
-- /Since: 1.2/
connectionGetSettingIpTunnel ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingIPTunnel.SettingIPTunnel
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingIPTunnel.SettingIPTunnel' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingIpTunnel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingIPTunnel
connectionGetSettingIpTunnel a
connection = IO SettingIPTunnel -> m SettingIPTunnel
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingIPTunnel -> m SettingIPTunnel)
-> IO SettingIPTunnel -> m SettingIPTunnel
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 SettingIPTunnel
result <- Ptr Connection -> IO (Ptr SettingIPTunnel)
nm_connection_get_setting_ip_tunnel Ptr Connection
connection'
    Text -> Ptr SettingIPTunnel -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingIpTunnel" Ptr SettingIPTunnel
result
    SettingIPTunnel
result' <- ((ManagedPtr SettingIPTunnel -> SettingIPTunnel)
-> Ptr SettingIPTunnel -> IO SettingIPTunnel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingIPTunnel -> SettingIPTunnel
NM.SettingIPTunnel.SettingIPTunnel) Ptr SettingIPTunnel
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingIPTunnel -> IO SettingIPTunnel
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingIPTunnel
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingIpTunnelMethodInfo
instance (signature ~ (m NM.SettingIPTunnel.SettingIPTunnel), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingIpTunnelMethodInfo a signature where
    overloadedMethod = connectionGetSettingIpTunnel

instance O.OverloadedMethodInfo ConnectionGetSettingIpTunnelMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingIpTunnel",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingIpTunnel"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingMacsec.SettingMacsec' the connection might contain.
-- 
-- /Since: 1.6/
connectionGetSettingMacsec ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingMacsec.SettingMacsec
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingMacsec.SettingMacsec' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingMacsec :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingMacsec
connectionGetSettingMacsec a
connection = IO SettingMacsec -> m SettingMacsec
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingMacsec -> m SettingMacsec)
-> IO SettingMacsec -> m SettingMacsec
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 SettingMacsec
result <- Ptr Connection -> IO (Ptr SettingMacsec)
nm_connection_get_setting_macsec Ptr Connection
connection'
    Text -> Ptr SettingMacsec -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingMacsec" Ptr SettingMacsec
result
    SettingMacsec
result' <- ((ManagedPtr SettingMacsec -> SettingMacsec)
-> Ptr SettingMacsec -> IO SettingMacsec
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingMacsec -> SettingMacsec
NM.SettingMacsec.SettingMacsec) Ptr SettingMacsec
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingMacsec -> IO SettingMacsec
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingMacsec
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingMacsecMethodInfo
instance (signature ~ (m NM.SettingMacsec.SettingMacsec), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingMacsecMethodInfo a signature where
    overloadedMethod = connectionGetSettingMacsec

instance O.OverloadedMethodInfo ConnectionGetSettingMacsecMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingMacsec",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingMacsec"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingMacvlan.SettingMacvlan' the connection might contain.
-- 
-- /Since: 1.2/
connectionGetSettingMacvlan ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingMacvlan.SettingMacvlan
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingMacvlan.SettingMacvlan' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingMacvlan :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingMacvlan
connectionGetSettingMacvlan a
connection = IO SettingMacvlan -> m SettingMacvlan
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingMacvlan -> m SettingMacvlan)
-> IO SettingMacvlan -> m SettingMacvlan
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 SettingMacvlan
result <- Ptr Connection -> IO (Ptr SettingMacvlan)
nm_connection_get_setting_macvlan Ptr Connection
connection'
    Text -> Ptr SettingMacvlan -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingMacvlan" Ptr SettingMacvlan
result
    SettingMacvlan
result' <- ((ManagedPtr SettingMacvlan -> SettingMacvlan)
-> Ptr SettingMacvlan -> IO SettingMacvlan
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingMacvlan -> SettingMacvlan
NM.SettingMacvlan.SettingMacvlan) Ptr SettingMacvlan
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingMacvlan -> IO SettingMacvlan
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingMacvlan
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingMacvlanMethodInfo
instance (signature ~ (m NM.SettingMacvlan.SettingMacvlan), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingMacvlanMethodInfo a signature where
    overloadedMethod = connectionGetSettingMacvlan

instance O.OverloadedMethodInfo ConnectionGetSettingMacvlanMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingMacvlan",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingMacvlan"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingOlpcMesh.SettingOlpcMesh' the connection might contain.
connectionGetSettingOlpcMesh ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingOlpcMesh.SettingOlpcMesh
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingOlpcMesh.SettingOlpcMesh' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingOlpcMesh :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingOlpcMesh
connectionGetSettingOlpcMesh a
connection = IO SettingOlpcMesh -> m SettingOlpcMesh
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingOlpcMesh -> m SettingOlpcMesh)
-> IO SettingOlpcMesh -> m SettingOlpcMesh
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 SettingOlpcMesh
result <- Ptr Connection -> IO (Ptr SettingOlpcMesh)
nm_connection_get_setting_olpc_mesh Ptr Connection
connection'
    Text -> Ptr SettingOlpcMesh -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingOlpcMesh" Ptr SettingOlpcMesh
result
    SettingOlpcMesh
result' <- ((ManagedPtr SettingOlpcMesh -> SettingOlpcMesh)
-> Ptr SettingOlpcMesh -> IO SettingOlpcMesh
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingOlpcMesh -> SettingOlpcMesh
NM.SettingOlpcMesh.SettingOlpcMesh) Ptr SettingOlpcMesh
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingOlpcMesh -> IO SettingOlpcMesh
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingOlpcMesh
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingOlpcMeshMethodInfo
instance (signature ~ (m NM.SettingOlpcMesh.SettingOlpcMesh), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingOlpcMeshMethodInfo a signature where
    overloadedMethod = connectionGetSettingOlpcMesh

instance O.OverloadedMethodInfo ConnectionGetSettingOlpcMeshMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingOlpcMesh",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingOlpcMesh"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingOvsBridge.SettingOvsBridge' the connection might contain.
-- 
-- /Since: 1.14/
connectionGetSettingOvsBridge ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingOvsBridge.SettingOvsBridge
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingOvsBridge.SettingOvsBridge' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingOvsBridge :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingOvsBridge
connectionGetSettingOvsBridge a
connection = IO SettingOvsBridge -> m SettingOvsBridge
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingOvsBridge -> m SettingOvsBridge)
-> IO SettingOvsBridge -> m SettingOvsBridge
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 SettingOvsBridge
result <- Ptr Connection -> IO (Ptr SettingOvsBridge)
nm_connection_get_setting_ovs_bridge Ptr Connection
connection'
    Text -> Ptr SettingOvsBridge -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingOvsBridge" Ptr SettingOvsBridge
result
    SettingOvsBridge
result' <- ((ManagedPtr SettingOvsBridge -> SettingOvsBridge)
-> Ptr SettingOvsBridge -> IO SettingOvsBridge
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingOvsBridge -> SettingOvsBridge
NM.SettingOvsBridge.SettingOvsBridge) Ptr SettingOvsBridge
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingOvsBridge -> IO SettingOvsBridge
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingOvsBridge
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingOvsBridgeMethodInfo
instance (signature ~ (m NM.SettingOvsBridge.SettingOvsBridge), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingOvsBridgeMethodInfo a signature where
    overloadedMethod = connectionGetSettingOvsBridge

instance O.OverloadedMethodInfo ConnectionGetSettingOvsBridgeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingOvsBridge",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingOvsBridge"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingOvsInterface.SettingOvsInterface' the connection might contain.
-- 
-- /Since: 1.14/
connectionGetSettingOvsInterface ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingOvsInterface.SettingOvsInterface
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingOvsInterface.SettingOvsInterface' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingOvsInterface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingOvsInterface
connectionGetSettingOvsInterface a
connection = IO SettingOvsInterface -> m SettingOvsInterface
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingOvsInterface -> m SettingOvsInterface)
-> IO SettingOvsInterface -> m SettingOvsInterface
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 SettingOvsInterface
result <- Ptr Connection -> IO (Ptr SettingOvsInterface)
nm_connection_get_setting_ovs_interface Ptr Connection
connection'
    Text -> Ptr SettingOvsInterface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingOvsInterface" Ptr SettingOvsInterface
result
    SettingOvsInterface
result' <- ((ManagedPtr SettingOvsInterface -> SettingOvsInterface)
-> Ptr SettingOvsInterface -> IO SettingOvsInterface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingOvsInterface -> SettingOvsInterface
NM.SettingOvsInterface.SettingOvsInterface) Ptr SettingOvsInterface
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingOvsInterface -> IO SettingOvsInterface
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingOvsInterface
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingOvsInterfaceMethodInfo
instance (signature ~ (m NM.SettingOvsInterface.SettingOvsInterface), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingOvsInterfaceMethodInfo a signature where
    overloadedMethod = connectionGetSettingOvsInterface

instance O.OverloadedMethodInfo ConnectionGetSettingOvsInterfaceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingOvsInterface",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingOvsInterface"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingOvsPatch.SettingOvsPatch' the connection might contain.
-- 
-- /Since: 1.14/
connectionGetSettingOvsPatch ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingOvsPatch.SettingOvsPatch
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingOvsPatch.SettingOvsPatch' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingOvsPatch :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingOvsPatch
connectionGetSettingOvsPatch a
connection = IO SettingOvsPatch -> m SettingOvsPatch
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingOvsPatch -> m SettingOvsPatch)
-> IO SettingOvsPatch -> m SettingOvsPatch
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 SettingOvsPatch
result <- Ptr Connection -> IO (Ptr SettingOvsPatch)
nm_connection_get_setting_ovs_patch Ptr Connection
connection'
    Text -> Ptr SettingOvsPatch -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingOvsPatch" Ptr SettingOvsPatch
result
    SettingOvsPatch
result' <- ((ManagedPtr SettingOvsPatch -> SettingOvsPatch)
-> Ptr SettingOvsPatch -> IO SettingOvsPatch
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingOvsPatch -> SettingOvsPatch
NM.SettingOvsPatch.SettingOvsPatch) Ptr SettingOvsPatch
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingOvsPatch -> IO SettingOvsPatch
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingOvsPatch
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingOvsPatchMethodInfo
instance (signature ~ (m NM.SettingOvsPatch.SettingOvsPatch), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingOvsPatchMethodInfo a signature where
    overloadedMethod = connectionGetSettingOvsPatch

instance O.OverloadedMethodInfo ConnectionGetSettingOvsPatchMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingOvsPatch",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingOvsPatch"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingOvsPort.SettingOvsPort' the connection might contain.
-- 
-- /Since: 1.14/
connectionGetSettingOvsPort ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingOvsPort.SettingOvsPort
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingOvsPort.SettingOvsPort' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingOvsPort :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingOvsPort
connectionGetSettingOvsPort a
connection = IO SettingOvsPort -> m SettingOvsPort
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingOvsPort -> m SettingOvsPort)
-> IO SettingOvsPort -> m SettingOvsPort
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 SettingOvsPort
result <- Ptr Connection -> IO (Ptr SettingOvsPort)
nm_connection_get_setting_ovs_port Ptr Connection
connection'
    Text -> Ptr SettingOvsPort -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingOvsPort" Ptr SettingOvsPort
result
    SettingOvsPort
result' <- ((ManagedPtr SettingOvsPort -> SettingOvsPort)
-> Ptr SettingOvsPort -> IO SettingOvsPort
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingOvsPort -> SettingOvsPort
NM.SettingOvsPort.SettingOvsPort) Ptr SettingOvsPort
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingOvsPort -> IO SettingOvsPort
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingOvsPort
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingOvsPortMethodInfo
instance (signature ~ (m NM.SettingOvsPort.SettingOvsPort), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingOvsPortMethodInfo a signature where
    overloadedMethod = connectionGetSettingOvsPort

instance O.OverloadedMethodInfo ConnectionGetSettingOvsPortMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingOvsPort",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingOvsPort"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingPpp.SettingPpp' the connection might contain.
connectionGetSettingPpp ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingPpp.SettingPpp
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingPpp.SettingPpp' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingPpp :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingPpp
connectionGetSettingPpp a
connection = IO SettingPpp -> m SettingPpp
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingPpp -> m SettingPpp) -> IO SettingPpp -> m SettingPpp
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 SettingPpp
result <- Ptr Connection -> IO (Ptr SettingPpp)
nm_connection_get_setting_ppp Ptr Connection
connection'
    Text -> Ptr SettingPpp -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingPpp" Ptr SettingPpp
result
    SettingPpp
result' <- ((ManagedPtr SettingPpp -> SettingPpp)
-> Ptr SettingPpp -> IO SettingPpp
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingPpp -> SettingPpp
NM.SettingPpp.SettingPpp) Ptr SettingPpp
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingPpp -> IO SettingPpp
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingPpp
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingPppMethodInfo
instance (signature ~ (m NM.SettingPpp.SettingPpp), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingPppMethodInfo a signature where
    overloadedMethod = connectionGetSettingPpp

instance O.OverloadedMethodInfo ConnectionGetSettingPppMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingPpp",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingPpp"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingPppoe.SettingPppoe' the connection might contain.
connectionGetSettingPppoe ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingPppoe.SettingPppoe
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingPppoe.SettingPppoe' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingPppoe :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingPppoe
connectionGetSettingPppoe a
connection = IO SettingPppoe -> m SettingPppoe
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingPppoe -> m SettingPppoe)
-> IO SettingPppoe -> m SettingPppoe
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 SettingPppoe
result <- Ptr Connection -> IO (Ptr SettingPppoe)
nm_connection_get_setting_pppoe Ptr Connection
connection'
    Text -> Ptr SettingPppoe -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingPppoe" Ptr SettingPppoe
result
    SettingPppoe
result' <- ((ManagedPtr SettingPppoe -> SettingPppoe)
-> Ptr SettingPppoe -> IO SettingPppoe
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingPppoe -> SettingPppoe
NM.SettingPppoe.SettingPppoe) Ptr SettingPppoe
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingPppoe -> IO SettingPppoe
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingPppoe
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingPppoeMethodInfo
instance (signature ~ (m NM.SettingPppoe.SettingPppoe), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingPppoeMethodInfo a signature where
    overloadedMethod = connectionGetSettingPppoe

instance O.OverloadedMethodInfo ConnectionGetSettingPppoeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingPppoe",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingPppoe"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingProxy.SettingProxy' the connection might contain.
-- 
-- /Since: 1.6/
connectionGetSettingProxy ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingProxy.SettingProxy
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingProxy.SettingProxy' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingProxy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingProxy
connectionGetSettingProxy a
connection = IO SettingProxy -> m SettingProxy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingProxy -> m SettingProxy)
-> IO SettingProxy -> m SettingProxy
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 SettingProxy
result <- Ptr Connection -> IO (Ptr SettingProxy)
nm_connection_get_setting_proxy Ptr Connection
connection'
    Text -> Ptr SettingProxy -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingProxy" Ptr SettingProxy
result
    SettingProxy
result' <- ((ManagedPtr SettingProxy -> SettingProxy)
-> Ptr SettingProxy -> IO SettingProxy
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingProxy -> SettingProxy
NM.SettingProxy.SettingProxy) Ptr SettingProxy
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingProxy -> IO SettingProxy
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingProxy
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingProxyMethodInfo
instance (signature ~ (m NM.SettingProxy.SettingProxy), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingProxyMethodInfo a signature where
    overloadedMethod = connectionGetSettingProxy

instance O.OverloadedMethodInfo ConnectionGetSettingProxyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingProxy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingProxy"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingSerial.SettingSerial' the connection might contain.
connectionGetSettingSerial ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingSerial.SettingSerial
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingSerial.SettingSerial' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingSerial :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingSerial
connectionGetSettingSerial a
connection = IO SettingSerial -> m SettingSerial
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingSerial -> m SettingSerial)
-> IO SettingSerial -> m SettingSerial
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 SettingSerial
result <- Ptr Connection -> IO (Ptr SettingSerial)
nm_connection_get_setting_serial Ptr Connection
connection'
    Text -> Ptr SettingSerial -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingSerial" Ptr SettingSerial
result
    SettingSerial
result' <- ((ManagedPtr SettingSerial -> SettingSerial)
-> Ptr SettingSerial -> IO SettingSerial
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingSerial -> SettingSerial
NM.SettingSerial.SettingSerial) Ptr SettingSerial
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingSerial -> IO SettingSerial
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingSerial
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingSerialMethodInfo
instance (signature ~ (m NM.SettingSerial.SettingSerial), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingSerialMethodInfo a signature where
    overloadedMethod = connectionGetSettingSerial

instance O.OverloadedMethodInfo ConnectionGetSettingSerialMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingSerial",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingSerial"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingTCConfig.SettingTCConfig' the connection might contain.
-- 
-- /Since: 1.12/
connectionGetSettingTcConfig ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingTCConfig.SettingTCConfig
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingTCConfig.SettingTCConfig' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingTcConfig :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingTCConfig
connectionGetSettingTcConfig a
connection = IO SettingTCConfig -> m SettingTCConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingTCConfig -> m SettingTCConfig)
-> IO SettingTCConfig -> m SettingTCConfig
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 SettingTCConfig
result <- Ptr Connection -> IO (Ptr SettingTCConfig)
nm_connection_get_setting_tc_config Ptr Connection
connection'
    Text -> Ptr SettingTCConfig -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingTcConfig" Ptr SettingTCConfig
result
    SettingTCConfig
result' <- ((ManagedPtr SettingTCConfig -> SettingTCConfig)
-> Ptr SettingTCConfig -> IO SettingTCConfig
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingTCConfig -> SettingTCConfig
NM.SettingTCConfig.SettingTCConfig) Ptr SettingTCConfig
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingTCConfig -> IO SettingTCConfig
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingTCConfig
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingTcConfigMethodInfo
instance (signature ~ (m NM.SettingTCConfig.SettingTCConfig), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingTcConfigMethodInfo a signature where
    overloadedMethod = connectionGetSettingTcConfig

instance O.OverloadedMethodInfo ConnectionGetSettingTcConfigMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingTcConfig",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingTcConfig"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingTeam.SettingTeam' the connection might contain.
connectionGetSettingTeam ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingTeam.SettingTeam
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingTeam.SettingTeam' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingTeam :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingTeam
connectionGetSettingTeam a
connection = IO SettingTeam -> m SettingTeam
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingTeam -> m SettingTeam)
-> IO SettingTeam -> m SettingTeam
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 SettingTeam
result <- Ptr Connection -> IO (Ptr SettingTeam)
nm_connection_get_setting_team Ptr Connection
connection'
    Text -> Ptr SettingTeam -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingTeam" Ptr SettingTeam
result
    SettingTeam
result' <- ((ManagedPtr SettingTeam -> SettingTeam)
-> Ptr SettingTeam -> IO SettingTeam
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingTeam -> SettingTeam
NM.SettingTeam.SettingTeam) Ptr SettingTeam
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingTeam -> IO SettingTeam
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingTeam
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingTeamMethodInfo
instance (signature ~ (m NM.SettingTeam.SettingTeam), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingTeamMethodInfo a signature where
    overloadedMethod = connectionGetSettingTeam

instance O.OverloadedMethodInfo ConnectionGetSettingTeamMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingTeam",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingTeam"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingTeamPort.SettingTeamPort' the connection might contain.
connectionGetSettingTeamPort ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingTeamPort.SettingTeamPort
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingTeamPort.SettingTeamPort' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingTeamPort :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingTeamPort
connectionGetSettingTeamPort a
connection = IO SettingTeamPort -> m SettingTeamPort
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingTeamPort -> m SettingTeamPort)
-> IO SettingTeamPort -> m SettingTeamPort
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 SettingTeamPort
result <- Ptr Connection -> IO (Ptr SettingTeamPort)
nm_connection_get_setting_team_port Ptr Connection
connection'
    Text -> Ptr SettingTeamPort -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingTeamPort" Ptr SettingTeamPort
result
    SettingTeamPort
result' <- ((ManagedPtr SettingTeamPort -> SettingTeamPort)
-> Ptr SettingTeamPort -> IO SettingTeamPort
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingTeamPort -> SettingTeamPort
NM.SettingTeamPort.SettingTeamPort) Ptr SettingTeamPort
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingTeamPort -> IO SettingTeamPort
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingTeamPort
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingTeamPortMethodInfo
instance (signature ~ (m NM.SettingTeamPort.SettingTeamPort), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingTeamPortMethodInfo a signature where
    overloadedMethod = connectionGetSettingTeamPort

instance O.OverloadedMethodInfo ConnectionGetSettingTeamPortMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingTeamPort",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingTeamPort"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingTun.SettingTun' the connection might contain.
-- 
-- /Since: 1.14/
connectionGetSettingTun ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingTun.SettingTun
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingTun.SettingTun' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingTun :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingTun
connectionGetSettingTun a
connection = IO SettingTun -> m SettingTun
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingTun -> m SettingTun) -> IO SettingTun -> m SettingTun
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 SettingTun
result <- Ptr Connection -> IO (Ptr SettingTun)
nm_connection_get_setting_tun Ptr Connection
connection'
    Text -> Ptr SettingTun -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingTun" Ptr SettingTun
result
    SettingTun
result' <- ((ManagedPtr SettingTun -> SettingTun)
-> Ptr SettingTun -> IO SettingTun
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingTun -> SettingTun
NM.SettingTun.SettingTun) Ptr SettingTun
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingTun -> IO SettingTun
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingTun
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingTunMethodInfo
instance (signature ~ (m NM.SettingTun.SettingTun), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingTunMethodInfo a signature where
    overloadedMethod = connectionGetSettingTun

instance O.OverloadedMethodInfo ConnectionGetSettingTunMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingTun",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingTun"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingVlan.SettingVlan' the connection might contain.
connectionGetSettingVlan ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingVlan.SettingVlan
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingVlan.SettingVlan' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingVlan :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingVlan
connectionGetSettingVlan a
connection = IO SettingVlan -> m SettingVlan
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingVlan -> m SettingVlan)
-> IO SettingVlan -> m SettingVlan
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 SettingVlan
result <- Ptr Connection -> IO (Ptr SettingVlan)
nm_connection_get_setting_vlan Ptr Connection
connection'
    Text -> Ptr SettingVlan -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingVlan" Ptr SettingVlan
result
    SettingVlan
result' <- ((ManagedPtr SettingVlan -> SettingVlan)
-> Ptr SettingVlan -> IO SettingVlan
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingVlan -> SettingVlan
NM.SettingVlan.SettingVlan) Ptr SettingVlan
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingVlan -> IO SettingVlan
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingVlan
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingVlanMethodInfo
instance (signature ~ (m NM.SettingVlan.SettingVlan), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingVlanMethodInfo a signature where
    overloadedMethod = connectionGetSettingVlan

instance O.OverloadedMethodInfo ConnectionGetSettingVlanMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingVlan",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingVlan"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingVpn.SettingVpn' the connection might contain.
connectionGetSettingVpn ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingVpn.SettingVpn
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingVpn.SettingVpn' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingVpn :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingVpn
connectionGetSettingVpn a
connection = IO SettingVpn -> m SettingVpn
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingVpn -> m SettingVpn) -> IO SettingVpn -> m SettingVpn
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 SettingVpn
result <- Ptr Connection -> IO (Ptr SettingVpn)
nm_connection_get_setting_vpn Ptr Connection
connection'
    Text -> Ptr SettingVpn -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingVpn" Ptr SettingVpn
result
    SettingVpn
result' <- ((ManagedPtr SettingVpn -> SettingVpn)
-> Ptr SettingVpn -> IO SettingVpn
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingVpn -> SettingVpn
NM.SettingVpn.SettingVpn) Ptr SettingVpn
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingVpn -> IO SettingVpn
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingVpn
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingVpnMethodInfo
instance (signature ~ (m NM.SettingVpn.SettingVpn), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingVpnMethodInfo a signature where
    overloadedMethod = connectionGetSettingVpn

instance O.OverloadedMethodInfo ConnectionGetSettingVpnMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingVpn",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingVpn"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingVxlan.SettingVxlan' the connection might contain.
-- 
-- /Since: 1.2/
connectionGetSettingVxlan ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingVxlan.SettingVxlan
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingVxlan.SettingVxlan' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingVxlan :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingVxlan
connectionGetSettingVxlan a
connection = IO SettingVxlan -> m SettingVxlan
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingVxlan -> m SettingVxlan)
-> IO SettingVxlan -> m SettingVxlan
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 SettingVxlan
result <- Ptr Connection -> IO (Ptr SettingVxlan)
nm_connection_get_setting_vxlan Ptr Connection
connection'
    Text -> Ptr SettingVxlan -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingVxlan" Ptr SettingVxlan
result
    SettingVxlan
result' <- ((ManagedPtr SettingVxlan -> SettingVxlan)
-> Ptr SettingVxlan -> IO SettingVxlan
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingVxlan -> SettingVxlan
NM.SettingVxlan.SettingVxlan) Ptr SettingVxlan
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingVxlan -> IO SettingVxlan
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingVxlan
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingVxlanMethodInfo
instance (signature ~ (m NM.SettingVxlan.SettingVxlan), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingVxlanMethodInfo a signature where
    overloadedMethod = connectionGetSettingVxlan

instance O.OverloadedMethodInfo ConnectionGetSettingVxlanMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingVxlan",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingVxlan"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingWimax.SettingWimax' the connection might contain.
connectionGetSettingWimax ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingWimax.SettingWimax
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingWimax.SettingWimax' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingWimax :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingWimax
connectionGetSettingWimax a
connection = IO SettingWimax -> m SettingWimax
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingWimax -> m SettingWimax)
-> IO SettingWimax -> m SettingWimax
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 SettingWimax
result <- Ptr Connection -> IO (Ptr SettingWimax)
nm_connection_get_setting_wimax Ptr Connection
connection'
    Text -> Ptr SettingWimax -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingWimax" Ptr SettingWimax
result
    SettingWimax
result' <- ((ManagedPtr SettingWimax -> SettingWimax)
-> Ptr SettingWimax -> IO SettingWimax
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingWimax -> SettingWimax
NM.SettingWimax.SettingWimax) Ptr SettingWimax
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingWimax -> IO SettingWimax
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingWimax
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingWimaxMethodInfo
instance (signature ~ (m NM.SettingWimax.SettingWimax), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingWimaxMethodInfo a signature where
    overloadedMethod = connectionGetSettingWimax

instance O.OverloadedMethodInfo ConnectionGetSettingWimaxMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingWimax",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingWimax"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingWired.SettingWired' the connection might contain.
connectionGetSettingWired ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingWired.SettingWired
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingWired.SettingWired' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingWired :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingWired
connectionGetSettingWired a
connection = IO SettingWired -> m SettingWired
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingWired -> m SettingWired)
-> IO SettingWired -> m SettingWired
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 SettingWired
result <- Ptr Connection -> IO (Ptr SettingWired)
nm_connection_get_setting_wired Ptr Connection
connection'
    Text -> Ptr SettingWired -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingWired" Ptr SettingWired
result
    SettingWired
result' <- ((ManagedPtr SettingWired -> SettingWired)
-> Ptr SettingWired -> IO SettingWired
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingWired -> SettingWired
NM.SettingWired.SettingWired) Ptr SettingWired
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingWired -> IO SettingWired
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingWired
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingWiredMethodInfo
instance (signature ~ (m NM.SettingWired.SettingWired), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingWiredMethodInfo a signature where
    overloadedMethod = connectionGetSettingWired

instance O.OverloadedMethodInfo ConnectionGetSettingWiredMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingWired",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingWired"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingWireless.SettingWireless' the connection might contain.
connectionGetSettingWireless ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingWireless.SettingWireless
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingWireless.SettingWireless' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingWireless :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingWireless
connectionGetSettingWireless a
connection = IO SettingWireless -> m SettingWireless
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingWireless -> m SettingWireless)
-> IO SettingWireless -> m SettingWireless
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 SettingWireless
result <- Ptr Connection -> IO (Ptr SettingWireless)
nm_connection_get_setting_wireless Ptr Connection
connection'
    Text -> Ptr SettingWireless -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingWireless" Ptr SettingWireless
result
    SettingWireless
result' <- ((ManagedPtr SettingWireless -> SettingWireless)
-> Ptr SettingWireless -> IO SettingWireless
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingWireless -> SettingWireless
NM.SettingWireless.SettingWireless) Ptr SettingWireless
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingWireless -> IO SettingWireless
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingWireless
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingWirelessMethodInfo
instance (signature ~ (m NM.SettingWireless.SettingWireless), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingWirelessMethodInfo a signature where
    overloadedMethod = connectionGetSettingWireless

instance O.OverloadedMethodInfo ConnectionGetSettingWirelessMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingWireless",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingWireless"
        })


#endif

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

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

-- | A shortcut to return any t'GI.NM.Objects.SettingWirelessSecurity.SettingWirelessSecurity' the connection might contain.
connectionGetSettingWirelessSecurity ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m NM.SettingWirelessSecurity.SettingWirelessSecurity
    -- ^ __Returns:__ an t'GI.NM.Objects.SettingWirelessSecurity.SettingWirelessSecurity' if the connection contains one, otherwise 'P.Nothing'
connectionGetSettingWirelessSecurity :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m SettingWirelessSecurity
connectionGetSettingWirelessSecurity a
connection = IO SettingWirelessSecurity -> m SettingWirelessSecurity
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingWirelessSecurity -> m SettingWirelessSecurity)
-> IO SettingWirelessSecurity -> m SettingWirelessSecurity
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 SettingWirelessSecurity
result <- Ptr Connection -> IO (Ptr SettingWirelessSecurity)
nm_connection_get_setting_wireless_security Ptr Connection
connection'
    Text -> Ptr SettingWirelessSecurity -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetSettingWirelessSecurity" Ptr SettingWirelessSecurity
result
    SettingWirelessSecurity
result' <- ((ManagedPtr SettingWirelessSecurity -> SettingWirelessSecurity)
-> Ptr SettingWirelessSecurity -> IO SettingWirelessSecurity
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SettingWirelessSecurity -> SettingWirelessSecurity
NM.SettingWirelessSecurity.SettingWirelessSecurity) Ptr SettingWirelessSecurity
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    SettingWirelessSecurity -> IO SettingWirelessSecurity
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingWirelessSecurity
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingWirelessSecurityMethodInfo
instance (signature ~ (m NM.SettingWirelessSecurity.SettingWirelessSecurity), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingWirelessSecurityMethodInfo a signature where
    overloadedMethod = connectionGetSettingWirelessSecurity

instance O.OverloadedMethodInfo ConnectionGetSettingWirelessSecurityMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettingWirelessSecurity",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettingWirelessSecurity"
        })


#endif

-- method Connection::get_settings
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the length of the returned array"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "out_length"
--              , argType = TBasicType TUInt
--              , direction = DirectionOut
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the length of the returned array"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , argCallbackUserData = False
--              , transfer = TransferEverything
--              }
--          ]
-- returnType: Just
--               (TCArray
--                  False
--                  (-1)
--                  1
--                  (TInterface Name { namespace = "NM" , name = "Setting" }))
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_get_settings" nm_connection_get_settings :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    Ptr Word32 ->                           -- out_length : TBasicType TUInt
    IO (Ptr (Ptr NM.Setting.Setting))

-- | Retrieves the settings in /@connection@/.
-- 
-- The returned array is 'P.Nothing'-terminated.
-- 
-- /Since: 1.10/
connectionGetSettings ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection' instance
    -> m (Maybe [NM.Setting.Setting])
    -- ^ __Returns:__ a
    --   'P.Nothing'-terminated array containing every setting of /@connection@/.
    --   If the connection has no settings, 'P.Nothing' is returned.
connectionGetSettings :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m (Maybe [Setting])
connectionGetSettings a
connection = IO (Maybe [Setting]) -> m (Maybe [Setting])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Setting]) -> m (Maybe [Setting]))
-> IO (Maybe [Setting]) -> m (Maybe [Setting])
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 Word32
outLength <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr (Ptr Setting)
result <- Ptr Connection -> Ptr Word32 -> IO (Ptr (Ptr Setting))
nm_connection_get_settings Ptr Connection
connection' Ptr Word32
outLength
    Word32
outLength' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
outLength
    Maybe [Setting]
maybeResult <- Ptr (Ptr Setting)
-> (Ptr (Ptr Setting) -> IO [Setting]) -> IO (Maybe [Setting])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr (Ptr Setting)
result ((Ptr (Ptr Setting) -> IO [Setting]) -> IO (Maybe [Setting]))
-> (Ptr (Ptr Setting) -> IO [Setting]) -> IO (Maybe [Setting])
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr Setting)
result' -> do
        [Ptr Setting]
result'' <- (Word32 -> Ptr (Ptr Setting) -> IO [Ptr Setting]
forall a b. Integral a => a -> Ptr (Ptr b) -> IO [Ptr b]
unpackPtrArrayWithLength Word32
outLength') Ptr (Ptr Setting)
result'
        [Setting]
result''' <- (Ptr Setting -> IO Setting) -> [Ptr Setting] -> IO [Setting]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr Setting -> Setting) -> Ptr Setting -> IO Setting
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Setting -> Setting
NM.Setting.Setting) [Ptr Setting]
result''
        Ptr (Ptr Setting) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Setting)
result'
        [Setting] -> IO [Setting]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Setting]
result'''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
outLength
    Maybe [Setting] -> IO (Maybe [Setting])
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Setting]
maybeResult

#if defined(ENABLE_OVERLOADING)
data ConnectionGetSettingsMethodInfo
instance (signature ~ (m (Maybe [NM.Setting.Setting])), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetSettingsMethodInfo a signature where
    overloadedMethod = connectionGetSettings

instance O.OverloadedMethodInfo ConnectionGetSettingsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetSettings",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetSettings"
        })


#endif

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

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

-- | A shortcut to return the UUID from the connection\'s t'GI.NM.Objects.SettingConnection.SettingConnection'.
connectionGetUuid ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m T.Text
    -- ^ __Returns:__ the UUID from the connection\'s \'connection\' setting
connectionGetUuid :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Text
connectionGetUuid a
connection = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Connection -> IO CString
nm_connection_get_uuid Ptr Connection
connection'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetUuid" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetUuidMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetUuidMethodInfo a signature where
    overloadedMethod = connectionGetUuid

instance O.OverloadedMethodInfo ConnectionGetUuidMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetUuid",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetUuid"
        })


#endif

-- method Connection::get_virtual_device_description
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #NMConnection for a virtual device type"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

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

-- | Returns the name that 'GI.NM.Objects.Device.deviceDisambiguateNames' would
-- return for the virtual device that would be created for /@connection@/.
-- Eg, \"VLAN (eth1.1)\".
connectionGetVirtualDeviceDescription ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: an t'GI.NM.Interfaces.Connection.Connection' for a virtual device type
    -> m T.Text
    -- ^ __Returns:__ the name of /@connection@/\'s device,
    --   or 'P.Nothing' if /@connection@/ is not a virtual connection type
connectionGetVirtualDeviceDescription :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Text
connectionGetVirtualDeviceDescription a
connection = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
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
    CString
result <- Ptr Connection -> IO CString
nm_connection_get_virtual_device_description Ptr Connection
connection'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionGetVirtualDeviceDescription" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionGetVirtualDeviceDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionGetVirtualDeviceDescriptionMethodInfo a signature where
    overloadedMethod = connectionGetVirtualDeviceDescription

instance O.OverloadedMethodInfo ConnectionGetVirtualDeviceDescriptionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionGetVirtualDeviceDescription",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionGetVirtualDeviceDescription"
        })


#endif

-- method Connection::is_type
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "type"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a setting name to check the connection's type against (like\n%NM_SETTING_WIRELESS_SETTING_NAME or %NM_SETTING_WIRED_SETTING_NAME)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_is_type" nm_connection_is_type :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    CString ->                              -- type : TBasicType TUTF8
    IO CInt

-- | A convenience function to check if the given /@connection@/ is a particular
-- type (ie wired, Wi-Fi, ppp, etc). Checks the [SettingConnection:type]("GI.NM.Objects.SettingConnection#g:attr:type")
-- property of the connection and matches that against /@type@/.
connectionIsType ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> T.Text
    -- ^ /@type@/: a setting name to check the connection\'s type against (like
    -- 'GI.NM.Constants.SETTING_WIRELESS_SETTING_NAME' or 'GI.NM.Constants.SETTING_WIRED_SETTING_NAME')
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the connection is of the given /@type@/, 'P.False' if not
connectionIsType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> Text -> m Bool
connectionIsType a
connection Text
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
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
    CString
type_' <- Text -> IO CString
textToCString Text
type_
    CInt
result <- Ptr Connection -> CString -> IO CInt
nm_connection_is_type Ptr Connection
connection' CString
type_'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
type_'
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionIsTypeMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionIsTypeMethodInfo a signature where
    overloadedMethod = connectionIsType

instance O.OverloadedMethodInfo ConnectionIsTypeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionIsType",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionIsType"
        })


#endif

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

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

-- | Checks if /@connection@/ refers to a virtual device (and thus can potentially be
-- activated even if the device it refers to doesn\'t exist).
connectionIsVirtual ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: an t'GI.NM.Interfaces.Connection.Connection'
    -> m Bool
    -- ^ __Returns:__ whether /@connection@/ refers to a virtual device
connectionIsVirtual :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Bool
connectionIsVirtual a
connection = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
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
    CInt
result <- Ptr Connection -> IO CInt
nm_connection_is_virtual Ptr Connection
connection'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionIsVirtualMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionIsVirtualMethodInfo a signature where
    overloadedMethod = connectionIsVirtual

instance O.OverloadedMethodInfo ConnectionIsVirtualMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionIsVirtual",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionIsVirtual"
        })


#endif

-- method Connection::need_secrets
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "hints"
--           , argType = TPtrArray (TBasicType TUTF8)
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "\n  the address of a pointer to a #GPtrArray, initialized to %NULL, which on\n  return points to an allocated #GPtrArray containing the property names of\n  secrets of the #NMSetting which may be required; the caller owns the array\n  and must free the array itself with g_ptr_array_free(), but not free its\n  elements"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferContainer
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_need_secrets" nm_connection_need_secrets :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    Ptr (Ptr (GPtrArray CString)) ->        -- hints : TPtrArray (TBasicType TUTF8)
    IO CString

-- | Returns the name of the first setting object in the connection which would
-- need secrets to make a successful connection.  The returned hints are only
-- intended as a guide to what secrets may be required, because in some
-- circumstances, there is no way to conclusively determine exactly which
-- secrets are needed.
connectionNeedSecrets ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> m ((Maybe T.Text, Maybe [T.Text]))
    -- ^ __Returns:__ the setting name of the t'GI.NM.Objects.Setting.Setting' object which has
    --   invalid or missing secrets
connectionNeedSecrets :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m (Maybe Text, Maybe [Text])
connectionNeedSecrets a
connection = IO (Maybe Text, Maybe [Text]) -> m (Maybe Text, Maybe [Text])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text, Maybe [Text]) -> m (Maybe Text, Maybe [Text]))
-> IO (Maybe Text, Maybe [Text]) -> m (Maybe Text, Maybe [Text])
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 (Ptr (GPtrArray CString))
hints <- IO (Ptr (Ptr (GPtrArray CString)))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr (GPtrArray CString)))
    CString
result <- Ptr Connection -> Ptr (Ptr (GPtrArray CString)) -> IO CString
nm_connection_need_secrets Ptr Connection
connection' Ptr (Ptr (GPtrArray CString))
hints
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    Ptr (GPtrArray CString)
hints' <- Ptr (Ptr (GPtrArray CString)) -> IO (Ptr (GPtrArray CString))
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr (GPtrArray CString))
hints
    Maybe [Text]
maybeHints' <- Ptr (GPtrArray CString)
-> (Ptr (GPtrArray CString) -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr (GPtrArray CString)
hints' ((Ptr (GPtrArray CString) -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr (GPtrArray CString) -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr (GPtrArray CString)
hints'' -> do
        [CString]
hints''' <- Ptr (GPtrArray CString) -> IO [CString]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray CString)
hints''
        [Text]
hints'''' <- (CString -> IO Text) -> [CString] -> IO [Text]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
hints'''
        [Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
hints''''
    Ptr (GPtrArray CString) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray CString)
hints'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    Ptr (Ptr (GPtrArray CString)) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr (GPtrArray CString))
hints
    (Maybe Text, Maybe [Text]) -> IO (Maybe Text, Maybe [Text])
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Text
maybeResult, Maybe [Text]
maybeHints')

#if defined(ENABLE_OVERLOADING)
data ConnectionNeedSecretsMethodInfo
instance (signature ~ (m ((Maybe T.Text, Maybe [T.Text]))), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionNeedSecretsMethodInfo a signature where
    overloadedMethod = connectionNeedSecrets

instance O.OverloadedMethodInfo ConnectionNeedSecretsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionNeedSecrets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionNeedSecrets"
        })


#endif

-- method Connection::normalize
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection to normalize"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parameters"
--           , argType = TGHash (TBasicType TUTF8) (TBasicType TPtr)
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GHashTable with\nnormalization parameters to allow customization of the normalization by providing\nspecific arguments. Unknown arguments will be ignored and the default will be\nused. The keys must be strings compared with g_str_equal() function.\nThe values are opaque and depend on the parameter name."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "modified"
--           , argType = TBasicType TBoolean
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "outputs whether any settings were modified."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "nm_connection_normalize" nm_connection_normalize :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    Ptr (GHashTable CString (Ptr ())) ->    -- parameters : TGHash (TBasicType TUTF8) (TBasicType TPtr)
    Ptr CInt ->                             -- modified : TBasicType TBoolean
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Does some basic normalization and fixup of well known inconsistencies
-- and deprecated fields. If the connection was modified in any way,
-- the output parameter /@modified@/ is set 'P.True'.
-- 
-- Finally the connection will be verified and 'P.True' returns if the connection
-- is valid. As this function only performs some specific normalization steps
-- it cannot repair all connections. If the connection has errors that
-- cannot be normalized, the connection will not be modified.
connectionNormalize ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection' to normalize
    -> Maybe (Map.Map T.Text (Ptr ()))
    -- ^ /@parameters@/: a t'GI.GLib.Structs.HashTable.HashTable' with
    -- normalization parameters to allow customization of the normalization by providing
    -- specific arguments. Unknown arguments will be ignored and the default will be
    -- used. The keys must be strings compared with 'GI.GLib.Functions.strEqual' function.
    -- The values are opaque and depend on the parameter name.
    -> m (Bool)
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
connectionNormalize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> Maybe (Map Text (Ptr ())) -> m Bool
connectionNormalize a
connection Maybe (Map Text (Ptr ()))
parameters = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
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 (GHashTable CString (Ptr ()))
maybeParameters <- case Maybe (Map Text (Ptr ()))
parameters of
        Maybe (Map Text (Ptr ()))
Nothing -> Ptr (GHashTable CString (Ptr ()))
-> IO (Ptr (GHashTable CString (Ptr ())))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GHashTable CString (Ptr ()))
forall a. Ptr a
FP.nullPtr
        Just Map Text (Ptr ())
jParameters -> do
            let jParameters' :: [(Text, Ptr ())]
jParameters' = Map Text (Ptr ()) -> [(Text, Ptr ())]
forall k a. Map k a -> [(k, a)]
Map.toList Map Text (Ptr ())
jParameters
            [(CString, Ptr ())]
jParameters'' <- (Text -> IO CString) -> [(Text, Ptr ())] -> IO [(CString, Ptr ())]
forall (f :: * -> *) a c b.
Applicative f =>
(a -> f c) -> [(a, b)] -> f [(c, b)]
mapFirstA Text -> IO CString
textToCString [(Text, Ptr ())]
jParameters'
            let jParameters''' :: [(PtrWrapped CString, Ptr ())]
jParameters''' = (CString -> PtrWrapped CString)
-> [(CString, Ptr ())] -> [(PtrWrapped CString, Ptr ())]
forall a c b. (a -> c) -> [(a, b)] -> [(c, b)]
mapFirst CString -> PtrWrapped CString
B.GHT.cstringPackPtr [(CString, Ptr ())]
jParameters''
            let jParameters'''' :: [(PtrWrapped CString, PtrWrapped (Ptr ()))]
jParameters'''' = (Ptr () -> PtrWrapped (Ptr ()))
-> [(PtrWrapped CString, Ptr ())]
-> [(PtrWrapped CString, PtrWrapped (Ptr ()))]
forall b c a. (b -> c) -> [(a, b)] -> [(a, c)]
mapSecond Ptr () -> PtrWrapped (Ptr ())
forall a. Ptr a -> PtrWrapped (Ptr a)
B.GHT.ptrPackPtr [(PtrWrapped CString, Ptr ())]
jParameters'''
            Ptr (GHashTable CString (Ptr ()))
jParameters''''' <- GHashFunc CString
-> GEqualFunc CString
-> Maybe (GDestroyNotify CString)
-> Maybe (GDestroyNotify (Ptr ()))
-> [(PtrWrapped CString, PtrWrapped (Ptr ()))]
-> IO (Ptr (GHashTable CString (Ptr ())))
forall a b.
GHashFunc a
-> GEqualFunc a
-> Maybe (GDestroyNotify a)
-> Maybe (GDestroyNotify b)
-> [(PtrWrapped a, PtrWrapped b)]
-> IO (Ptr (GHashTable a b))
packGHashTable GHashFunc CString
gStrHash GEqualFunc CString
gStrEqual (GDestroyNotify CString -> Maybe (GDestroyNotify CString)
forall a. a -> Maybe a
Just GDestroyNotify CString
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free) Maybe (GDestroyNotify (Ptr ()))
forall a. Maybe a
Nothing [(PtrWrapped CString, PtrWrapped (Ptr ()))]
jParameters''''
            Ptr (GHashTable CString (Ptr ()))
-> IO (Ptr (GHashTable CString (Ptr ())))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GHashTable CString (Ptr ()))
jParameters'''''
    Ptr CInt
modified <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
    IO Bool -> IO () -> IO Bool
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Connection
-> Ptr (GHashTable CString (Ptr ()))
-> Ptr CInt
-> Ptr (Ptr GError)
-> IO CInt
nm_connection_normalize Ptr Connection
connection' Ptr (GHashTable CString (Ptr ()))
maybeParameters Ptr CInt
modified
        CInt
modified' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
modified
        let modified'' :: Bool
modified'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
modified'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
        Ptr (GHashTable CString (Ptr ())) -> IO ()
forall a b. Ptr (GHashTable a b) -> IO ()
unrefGHashTable Ptr (GHashTable CString (Ptr ()))
maybeParameters
        Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
modified
        Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
modified''
     ) (do
        Ptr (GHashTable CString (Ptr ())) -> IO ()
forall a b. Ptr (GHashTable a b) -> IO ()
unrefGHashTable Ptr (GHashTable CString (Ptr ()))
maybeParameters
        Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
modified
     )

#if defined(ENABLE_OVERLOADING)
data ConnectionNormalizeMethodInfo
instance (signature ~ (Maybe (Map.Map T.Text (Ptr ())) -> m (Bool)), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionNormalizeMethodInfo a signature where
    overloadedMethod = connectionNormalize

instance O.OverloadedMethodInfo ConnectionNormalizeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionNormalize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionNormalize"
        })


#endif

-- method Connection::remove_setting
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "setting_type"
--           , argType = TBasicType TGType
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GType of the setting object to remove"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_remove_setting" nm_connection_remove_setting :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    CGType ->                               -- setting_type : TBasicType TGType
    IO ()

-- | Removes the t'GI.NM.Objects.Setting.Setting' with the given t'GType' from the t'GI.NM.Interfaces.Connection.Connection'.  This
-- operation dereferences the t'GI.NM.Objects.Setting.Setting' object.
connectionRemoveSetting ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: a t'GI.NM.Interfaces.Connection.Connection'
    -> GType
    -- ^ /@settingType@/: the t'GType' of the setting object to remove
    -> m ()
connectionRemoveSetting :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> GType -> m ()
connectionRemoveSetting a
connection GType
settingType = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    let settingType' :: CGType
settingType' = GType -> CGType
gtypeToCGType GType
settingType
    Ptr Connection -> CGType -> IO ()
nm_connection_remove_setting Ptr Connection
connection' CGType
settingType'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ConnectionRemoveSettingMethodInfo
instance (signature ~ (GType -> m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionRemoveSettingMethodInfo a signature where
    overloadedMethod = connectionRemoveSetting

instance O.OverloadedMethodInfo ConnectionRemoveSettingMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionRemoveSetting",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionRemoveSetting"
        })


#endif

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

foreign import ccall "nm_connection_replace_settings" nm_connection_replace_settings :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    Ptr GVariant ->                         -- new_settings : TVariant
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Replaces /@connection@/\'s settings with /@newSettings@/ (which must be
-- syntactically valid, and describe a known type of connection, but does not
-- need to result in a connection that passes 'GI.NM.Interfaces.Connection.connectionVerify').
connectionReplaceSettings ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: a t'GI.NM.Interfaces.Connection.Connection'
    -> GVariant
    -- ^ /@newSettings@/: a t'GVariant' of type @/NM_VARIANT_TYPE_CONNECTION/@, with the new settings
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
connectionReplaceSettings :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> GVariant -> m ()
connectionReplaceSettings a
connection GVariant
newSettings = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    Ptr GVariant
newSettings' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
newSettings
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Connection -> Ptr GVariant -> Ptr (Ptr GError) -> IO CInt
nm_connection_replace_settings Ptr Connection
connection' Ptr GVariant
newSettings'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
        GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
newSettings
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data ConnectionReplaceSettingsMethodInfo
instance (signature ~ (GVariant -> m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionReplaceSettingsMethodInfo a signature where
    overloadedMethod = connectionReplaceSettings

instance O.OverloadedMethodInfo ConnectionReplaceSettingsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionReplaceSettings",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionReplaceSettings"
        })


#endif

-- method Connection::replace_settings_from_connection
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "new_connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #NMConnection to replace the settings of @connection with"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Deep-copies the settings of /@newConnection@/ and replaces the settings of /@connection@/
-- with the copied settings.
connectionReplaceSettingsFromConnection ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a, IsConnection b) =>
    a
    -- ^ /@connection@/: a t'GI.NM.Interfaces.Connection.Connection'
    -> b
    -- ^ /@newConnection@/: a t'GI.NM.Interfaces.Connection.Connection' to replace the settings of /@connection@/ with
    -> m ()
connectionReplaceSettingsFromConnection :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsConnection a, IsConnection b) =>
a -> b -> m ()
connectionReplaceSettingsFromConnection a
connection b
newConnection = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    Ptr Connection
newConnection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
newConnection
    Ptr Connection -> Ptr Connection -> IO ()
nm_connection_replace_settings_from_connection Ptr Connection
connection' Ptr Connection
newConnection'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
newConnection
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ConnectionReplaceSettingsFromConnectionMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsConnection a, IsConnection b) => O.OverloadedMethod ConnectionReplaceSettingsFromConnectionMethodInfo a signature where
    overloadedMethod = connectionReplaceSettingsFromConnection

instance O.OverloadedMethodInfo ConnectionReplaceSettingsFromConnectionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionReplaceSettingsFromConnection",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionReplaceSettingsFromConnection"
        })


#endif

-- method Connection::set_path
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the D-Bus path of the connection as given by the settings service\nwhich provides the connection"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_set_path" nm_connection_set_path :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    CString ->                              -- path : TBasicType TUTF8
    IO ()

-- | Sets the D-Bus path of the connection.  This property is not serialized, and
-- is only for the reference of the caller.  Sets the t'GI.NM.Interfaces.Connection.Connection':@/path/@
-- property.
connectionSetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> T.Text
    -- ^ /@path@/: the D-Bus path of the connection as given by the settings service
    -- which provides the connection
    -> m ()
connectionSetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> Text -> m ()
connectionSetPath a
connection Text
path = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    CString
path' <- Text -> IO CString
textToCString Text
path
    Ptr Connection -> CString -> IO ()
nm_connection_set_path Ptr Connection
connection' CString
path'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ConnectionSetPathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionSetPathMethodInfo a signature where
    overloadedMethod = connectionSetPath

instance O.OverloadedMethodInfo ConnectionSetPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionSetPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionSetPath"
        })


#endif

-- method Connection::to_dbus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface
--                 Name { namespace = "NM" , name = "ConnectionSerializationFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "serialization flags, e.g. %NM_CONNECTION_SERIALIZE_ALL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just TVariant
-- throws : False
-- Skip return : False

foreign import ccall "nm_connection_to_dbus" nm_connection_to_dbus :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "NM", name = "ConnectionSerializationFlags"})
    IO (Ptr GVariant)

-- | Converts the t'GI.NM.Interfaces.Connection.Connection' into a t'GVariant' of type
-- @/NM_VARIANT_TYPE_CONNECTION/@ describing the connection, suitable for
-- marshalling over D-Bus or otherwise serializing.
connectionToDbus ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> [NM.Flags.ConnectionSerializationFlags]
    -- ^ /@flags@/: serialization flags, e.g. 'GI.NM.Flags.ConnectionSerializationFlagsAll'
    -> m GVariant
    -- ^ __Returns:__ a new floating t'GVariant' describing the connection,
    -- its settings, and each setting\'s properties.
connectionToDbus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> [ConnectionSerializationFlags] -> m GVariant
connectionToDbus a
connection [ConnectionSerializationFlags]
flags = IO GVariant -> m GVariant
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
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
    let flags' :: CUInt
flags' = [ConnectionSerializationFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ConnectionSerializationFlags]
flags
    Ptr GVariant
result <- Ptr Connection -> CUInt -> IO (Ptr GVariant)
nm_connection_to_dbus Ptr Connection
connection' CUInt
flags'
    Text -> Ptr GVariant -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"connectionToDbus" Ptr GVariant
result
    GVariant
result' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
    GVariant -> IO GVariant
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
result'

#if defined(ENABLE_OVERLOADING)
data ConnectionToDbusMethodInfo
instance (signature ~ ([NM.Flags.ConnectionSerializationFlags] -> m GVariant), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionToDbusMethodInfo a signature where
    overloadedMethod = connectionToDbus

instance O.OverloadedMethodInfo ConnectionToDbusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionToDbus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionToDbus"
        })


#endif

-- method Connection::update_secrets
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #NMConnection" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "setting_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the setting object name to which the secrets apply"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "secrets"
--           , argType = TVariant
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GVariant of secrets, of type %NM_VARIANT_TYPE_CONNECTION\n  or %NM_VARIANT_TYPE_SETTING"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "nm_connection_update_secrets" nm_connection_update_secrets :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    CString ->                              -- setting_name : TBasicType TUTF8
    Ptr GVariant ->                         -- secrets : TVariant
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Update the specified setting\'s secrets, given a dictionary of secrets
-- intended for that setting (deserialized from D-Bus for example).  Will also
-- extract the given setting\'s secrets hash if given a connection dictionary.
-- If /@settingName@/ is 'P.Nothing', expects a fully serialized t'GI.NM.Interfaces.Connection.Connection' as
-- returned by 'GI.NM.Interfaces.Connection.connectionToDbus' and will update all secrets from all
-- settings contained in /@secrets@/.
connectionUpdateSecrets ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection'
    -> T.Text
    -- ^ /@settingName@/: the setting object name to which the secrets apply
    -> GVariant
    -- ^ /@secrets@/: a t'GVariant' of secrets, of type @/NM_VARIANT_TYPE_CONNECTION/@
    --   or @/NM_VARIANT_TYPE_SETTING/@
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
connectionUpdateSecrets :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> Text -> GVariant -> m ()
connectionUpdateSecrets a
connection Text
settingName GVariant
secrets = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    CString
settingName' <- Text -> IO CString
textToCString Text
settingName
    Ptr GVariant
secrets' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
secrets
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Connection
-> CString -> Ptr GVariant -> Ptr (Ptr GError) -> IO CInt
nm_connection_update_secrets Ptr Connection
connection' CString
settingName' Ptr GVariant
secrets'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
        GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
secrets
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
settingName'
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
settingName'
     )

#if defined(ENABLE_OVERLOADING)
data ConnectionUpdateSecretsMethodInfo
instance (signature ~ (T.Text -> GVariant -> m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionUpdateSecretsMethodInfo a signature where
    overloadedMethod = connectionUpdateSecrets

instance O.OverloadedMethodInfo ConnectionUpdateSecretsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionUpdateSecrets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionUpdateSecrets"
        })


#endif

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

foreign import ccall "nm_connection_verify" nm_connection_verify :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Validates the connection and all its settings.  Each setting\'s properties
-- have allowed values, and some values are dependent on other values.  For
-- example, if a Wi-Fi connection is security enabled, the t'GI.NM.Objects.SettingWireless.SettingWireless'
-- setting object\'s \'security\' property must contain the setting name of the
-- t'GI.NM.Objects.SettingWirelessSecurity.SettingWirelessSecurity' object, which must also be present in the
-- connection for the connection to be valid.  As another example, the
-- t'GI.NM.Objects.SettingWired.SettingWired' object\'s \'mac-address\' property must be a validly formatted
-- MAC address.  The returned t'GError' contains information about which
-- setting and which property failed validation, and how it failed validation.
connectionVerify ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection' to verify
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
connectionVerify :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m ()
connectionVerify a
connection = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Connection -> Ptr (Ptr GError) -> IO CInt
nm_connection_verify Ptr Connection
connection'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data ConnectionVerifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionVerifyMethodInfo a signature where
    overloadedMethod = connectionVerify

instance O.OverloadedMethodInfo ConnectionVerifyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionVerify",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionVerify"
        })


#endif

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

foreign import ccall "nm_connection_verify_secrets" nm_connection_verify_secrets :: 
    Ptr Connection ->                       -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Verifies the secrets in the connection.
-- 
-- /Since: 1.2/
connectionVerifySecrets ::
    (B.CallStack.HasCallStack, MonadIO m, IsConnection a) =>
    a
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection' to verify in
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
connectionVerifySecrets :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m ()
connectionVerifySecrets a
connection = 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
$ do
    Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Connection -> Ptr (Ptr GError) -> IO CInt
nm_connection_verify_secrets Ptr Connection
connection'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data ConnectionVerifySecretsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsConnection a) => O.OverloadedMethod ConnectionVerifySecretsMethodInfo a signature where
    overloadedMethod = connectionVerifySecrets

instance O.OverloadedMethodInfo ConnectionVerifySecretsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection.connectionVerifySecrets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#v:connectionVerifySecrets"
        })


#endif

-- signal Connection::changed
-- | The [changed](#g:signal:changed) signal is emitted when any property (including secrets)
-- of any setting of the connection is modified, or when settings are
-- added or removed.
type ConnectionChangedCallback =
    IO ()

type C_ConnectionChangedCallback =
    Ptr Connection ->                       -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ConnectionChangedCallback`.
foreign import ccall "wrapper"
    mk_ConnectionChangedCallback :: C_ConnectionChangedCallback -> IO (FunPtr C_ConnectionChangedCallback)

wrap_ConnectionChangedCallback :: 
    GObject a => (a -> ConnectionChangedCallback) ->
    C_ConnectionChangedCallback
wrap_ConnectionChangedCallback :: forall a. GObject a => (a -> IO ()) -> C_ConnectionChangedCallback
wrap_ConnectionChangedCallback a -> IO ()
gi'cb Ptr Connection
gi'selfPtr Ptr ()
_ = do
    Ptr Connection -> (Connection -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Connection
gi'selfPtr ((Connection -> IO ()) -> IO ()) -> (Connection -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Connection
gi'self -> a -> IO ()
gi'cb (Connection -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Connection
gi'self) 


-- | Connect a signal handler for the [changed](#signal:changed) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' connection #changed callback
-- @
-- 
-- 
onConnectionChanged :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionChangedCallback) -> m SignalHandlerId
onConnectionChanged :: forall a (m :: * -> *).
(IsConnection a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onConnectionChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ConnectionChangedCallback
wrapped' = (a -> IO ()) -> C_ConnectionChangedCallback
forall a. GObject a => (a -> IO ()) -> C_ConnectionChangedCallback
wrap_ConnectionChangedCallback a -> IO ()
wrapped
    FunPtr C_ConnectionChangedCallback
wrapped'' <- C_ConnectionChangedCallback
-> IO (FunPtr C_ConnectionChangedCallback)
mk_ConnectionChangedCallback C_ConnectionChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_ConnectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"changed" FunPtr C_ConnectionChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [changed](#signal:changed) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' connection #changed callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterConnectionChanged :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionChangedCallback) -> m SignalHandlerId
afterConnectionChanged :: forall a (m :: * -> *).
(IsConnection a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterConnectionChanged a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ConnectionChangedCallback
wrapped' = (a -> IO ()) -> C_ConnectionChangedCallback
forall a. GObject a => (a -> IO ()) -> C_ConnectionChangedCallback
wrap_ConnectionChangedCallback a -> IO ()
wrapped
    FunPtr C_ConnectionChangedCallback
wrapped'' <- C_ConnectionChangedCallback
-> IO (FunPtr C_ConnectionChangedCallback)
mk_ConnectionChangedCallback C_ConnectionChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_ConnectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"changed" FunPtr C_ConnectionChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ConnectionChangedSignalInfo
instance SignalInfo ConnectionChangedSignalInfo where
    type HaskellCallbackType ConnectionChangedSignalInfo = ConnectionChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ConnectionChangedCallback cb
        cb'' <- mk_ConnectionChangedCallback cb'
        connectSignalFunPtr obj "changed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection::changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#g:signal:changed"})

#endif

-- signal Connection::secrets-cleared
-- | The [secretsCleared](#g:signal:secretsCleared) signal is emitted when the secrets of a connection
-- are cleared.
type ConnectionSecretsClearedCallback =
    IO ()

type C_ConnectionSecretsClearedCallback =
    Ptr Connection ->                       -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ConnectionSecretsClearedCallback`.
foreign import ccall "wrapper"
    mk_ConnectionSecretsClearedCallback :: C_ConnectionSecretsClearedCallback -> IO (FunPtr C_ConnectionSecretsClearedCallback)

wrap_ConnectionSecretsClearedCallback :: 
    GObject a => (a -> ConnectionSecretsClearedCallback) ->
    C_ConnectionSecretsClearedCallback
wrap_ConnectionSecretsClearedCallback :: forall a. GObject a => (a -> IO ()) -> C_ConnectionChangedCallback
wrap_ConnectionSecretsClearedCallback a -> IO ()
gi'cb Ptr Connection
gi'selfPtr Ptr ()
_ = do
    Ptr Connection -> (Connection -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Connection
gi'selfPtr ((Connection -> IO ()) -> IO ()) -> (Connection -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Connection
gi'self -> a -> IO ()
gi'cb (Connection -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Connection
gi'self) 


-- | Connect a signal handler for the [secretsCleared](#signal:secretsCleared) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' connection #secretsCleared callback
-- @
-- 
-- 
onConnectionSecretsCleared :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsClearedCallback) -> m SignalHandlerId
onConnectionSecretsCleared :: forall a (m :: * -> *).
(IsConnection a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onConnectionSecretsCleared a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ConnectionChangedCallback
wrapped' = (a -> IO ()) -> C_ConnectionChangedCallback
forall a. GObject a => (a -> IO ()) -> C_ConnectionChangedCallback
wrap_ConnectionSecretsClearedCallback a -> IO ()
wrapped
    FunPtr C_ConnectionChangedCallback
wrapped'' <- C_ConnectionChangedCallback
-> IO (FunPtr C_ConnectionChangedCallback)
mk_ConnectionSecretsClearedCallback C_ConnectionChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_ConnectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"secrets-cleared" FunPtr C_ConnectionChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [secretsCleared](#signal:secretsCleared) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' connection #secretsCleared callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterConnectionSecretsCleared :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsClearedCallback) -> m SignalHandlerId
afterConnectionSecretsCleared :: forall a (m :: * -> *).
(IsConnection a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterConnectionSecretsCleared a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_ConnectionChangedCallback
wrapped' = (a -> IO ()) -> C_ConnectionChangedCallback
forall a. GObject a => (a -> IO ()) -> C_ConnectionChangedCallback
wrap_ConnectionSecretsClearedCallback a -> IO ()
wrapped
    FunPtr C_ConnectionChangedCallback
wrapped'' <- C_ConnectionChangedCallback
-> IO (FunPtr C_ConnectionChangedCallback)
mk_ConnectionSecretsClearedCallback C_ConnectionChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_ConnectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"secrets-cleared" FunPtr C_ConnectionChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ConnectionSecretsClearedSignalInfo
instance SignalInfo ConnectionSecretsClearedSignalInfo where
    type HaskellCallbackType ConnectionSecretsClearedSignalInfo = ConnectionSecretsClearedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ConnectionSecretsClearedCallback cb
        cb'' <- mk_ConnectionSecretsClearedCallback cb'
        connectSignalFunPtr obj "secrets-cleared" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection::secrets-cleared"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#g:signal:secretsCleared"})

#endif

-- signal Connection::secrets-updated
-- | The [secretsUpdated](#g:signal:secretsUpdated) signal is emitted when the secrets of a setting
-- have been changed.
type ConnectionSecretsUpdatedCallback =
    T.Text
    -- ^ /@settingName@/: the setting name of the t'GI.NM.Objects.Setting.Setting' for which secrets were
    -- updated
    -> IO ()

type C_ConnectionSecretsUpdatedCallback =
    Ptr Connection ->                       -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ConnectionSecretsUpdatedCallback`.
foreign import ccall "wrapper"
    mk_ConnectionSecretsUpdatedCallback :: C_ConnectionSecretsUpdatedCallback -> IO (FunPtr C_ConnectionSecretsUpdatedCallback)

wrap_ConnectionSecretsUpdatedCallback :: 
    GObject a => (a -> ConnectionSecretsUpdatedCallback) ->
    C_ConnectionSecretsUpdatedCallback
wrap_ConnectionSecretsUpdatedCallback :: forall a.
GObject a =>
(a -> ConnectionSecretsUpdatedCallback)
-> C_ConnectionSecretsUpdatedCallback
wrap_ConnectionSecretsUpdatedCallback a -> ConnectionSecretsUpdatedCallback
gi'cb Ptr Connection
gi'selfPtr CString
settingName Ptr ()
_ = do
    Text
settingName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
settingName
    Ptr Connection -> (Connection -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Connection
gi'selfPtr ((Connection -> IO ()) -> IO ()) -> (Connection -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Connection
gi'self -> a -> ConnectionSecretsUpdatedCallback
gi'cb (Connection -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Connection
gi'self)  Text
settingName'


-- | Connect a signal handler for the [secretsUpdated](#signal:secretsUpdated) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' connection #secretsUpdated callback
-- @
-- 
-- 
onConnectionSecretsUpdated :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsUpdatedCallback) -> m SignalHandlerId
onConnectionSecretsUpdated :: forall a (m :: * -> *).
(IsConnection a, MonadIO m) =>
a
-> ((?self::a) => ConnectionSecretsUpdatedCallback)
-> m SignalHandlerId
onConnectionSecretsUpdated a
obj (?self::a) => ConnectionSecretsUpdatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ConnectionSecretsUpdatedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ConnectionSecretsUpdatedCallback
ConnectionSecretsUpdatedCallback
cb
    let wrapped' :: C_ConnectionSecretsUpdatedCallback
wrapped' = (a -> ConnectionSecretsUpdatedCallback)
-> C_ConnectionSecretsUpdatedCallback
forall a.
GObject a =>
(a -> ConnectionSecretsUpdatedCallback)
-> C_ConnectionSecretsUpdatedCallback
wrap_ConnectionSecretsUpdatedCallback a -> ConnectionSecretsUpdatedCallback
wrapped
    FunPtr C_ConnectionSecretsUpdatedCallback
wrapped'' <- C_ConnectionSecretsUpdatedCallback
-> IO (FunPtr C_ConnectionSecretsUpdatedCallback)
mk_ConnectionSecretsUpdatedCallback C_ConnectionSecretsUpdatedCallback
wrapped'
    a
-> Text
-> FunPtr C_ConnectionSecretsUpdatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"secrets-updated" FunPtr C_ConnectionSecretsUpdatedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [secretsUpdated](#signal:secretsUpdated) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' connection #secretsUpdated callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterConnectionSecretsUpdated :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsUpdatedCallback) -> m SignalHandlerId
afterConnectionSecretsUpdated :: forall a (m :: * -> *).
(IsConnection a, MonadIO m) =>
a
-> ((?self::a) => ConnectionSecretsUpdatedCallback)
-> m SignalHandlerId
afterConnectionSecretsUpdated a
obj (?self::a) => ConnectionSecretsUpdatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> ConnectionSecretsUpdatedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ConnectionSecretsUpdatedCallback
ConnectionSecretsUpdatedCallback
cb
    let wrapped' :: C_ConnectionSecretsUpdatedCallback
wrapped' = (a -> ConnectionSecretsUpdatedCallback)
-> C_ConnectionSecretsUpdatedCallback
forall a.
GObject a =>
(a -> ConnectionSecretsUpdatedCallback)
-> C_ConnectionSecretsUpdatedCallback
wrap_ConnectionSecretsUpdatedCallback a -> ConnectionSecretsUpdatedCallback
wrapped
    FunPtr C_ConnectionSecretsUpdatedCallback
wrapped'' <- C_ConnectionSecretsUpdatedCallback
-> IO (FunPtr C_ConnectionSecretsUpdatedCallback)
mk_ConnectionSecretsUpdatedCallback C_ConnectionSecretsUpdatedCallback
wrapped'
    a
-> Text
-> FunPtr C_ConnectionSecretsUpdatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"secrets-updated" FunPtr C_ConnectionSecretsUpdatedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ConnectionSecretsUpdatedSignalInfo
instance SignalInfo ConnectionSecretsUpdatedSignalInfo where
    type HaskellCallbackType ConnectionSecretsUpdatedSignalInfo = ConnectionSecretsUpdatedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ConnectionSecretsUpdatedCallback cb
        cb'' <- mk_ConnectionSecretsUpdatedCallback cb'
        connectSignalFunPtr obj "secrets-updated" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Interfaces.Connection::secrets-updated"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Interfaces-Connection.html#g:signal:secretsUpdated"})

#endif

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

#endif