{-# LANGUAGE TypeApplications #-}


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

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

module GI.NM.Objects.DeviceTeam
    ( 

-- * Exported types
    DeviceTeam(..)                          ,
    IsDeviceTeam                            ,
    toDeviceTeam                            ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [connectionCompatible]("GI.NM.Objects.Device#g:method:connectionCompatible"), [connectionValid]("GI.NM.Objects.Device#g:method:connectionValid"), [delete]("GI.NM.Objects.Device#g:method:delete"), [deleteAsync]("GI.NM.Objects.Device#g:method:deleteAsync"), [deleteFinish]("GI.NM.Objects.Device#g:method:deleteFinish"), [disconnect]("GI.NM.Objects.Device#g:method:disconnect"), [disconnectAsync]("GI.NM.Objects.Device#g:method:disconnectAsync"), [disconnectFinish]("GI.NM.Objects.Device#g:method:disconnectFinish"), [filterConnections]("GI.NM.Objects.Device#g:method:filterConnections"), [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"), [isReal]("GI.NM.Objects.Device#g:method:isReal"), [isSoftware]("GI.NM.Objects.Device#g:method:isSoftware"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [reapply]("GI.NM.Objects.Device#g:method:reapply"), [reapplyAsync]("GI.NM.Objects.Device#g:method:reapplyAsync"), [reapplyFinish]("GI.NM.Objects.Device#g:method:reapplyFinish"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [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"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getActiveConnection]("GI.NM.Objects.Device#g:method:getActiveConnection"), [getAppliedConnection]("GI.NM.Objects.Device#g:method:getAppliedConnection"), [getAppliedConnectionAsync]("GI.NM.Objects.Device#g:method:getAppliedConnectionAsync"), [getAppliedConnectionFinish]("GI.NM.Objects.Device#g:method:getAppliedConnectionFinish"), [getAutoconnect]("GI.NM.Objects.Device#g:method:getAutoconnect"), [getAvailableConnections]("GI.NM.Objects.Device#g:method:getAvailableConnections"), [getCapabilities]("GI.NM.Objects.Device#g:method:getCapabilities"), [getCarrier]("GI.NM.Objects.DeviceTeam#g:method:getCarrier"), [getClient]("GI.NM.Objects.Object#g:method:getClient"), [getConfig]("GI.NM.Objects.DeviceTeam#g:method:getConfig"), [getConnectivity]("GI.NM.Objects.Device#g:method:getConnectivity"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDescription]("GI.NM.Objects.Device#g:method:getDescription"), [getDeviceType]("GI.NM.Objects.Device#g:method:getDeviceType"), [getDhcp4Config]("GI.NM.Objects.Device#g:method:getDhcp4Config"), [getDhcp6Config]("GI.NM.Objects.Device#g:method:getDhcp6Config"), [getDriver]("GI.NM.Objects.Device#g:method:getDriver"), [getDriverVersion]("GI.NM.Objects.Device#g:method:getDriverVersion"), [getFirmwareMissing]("GI.NM.Objects.Device#g:method:getFirmwareMissing"), [getFirmwareVersion]("GI.NM.Objects.Device#g:method:getFirmwareVersion"), [getHwAddress]("GI.NM.Objects.Device#g:method:getHwAddress"), [getIface]("GI.NM.Objects.Device#g:method:getIface"), [getInterfaceFlags]("GI.NM.Objects.Device#g:method:getInterfaceFlags"), [getIp4Config]("GI.NM.Objects.Device#g:method:getIp4Config"), [getIp6Config]("GI.NM.Objects.Device#g:method:getIp6Config"), [getIpIface]("GI.NM.Objects.Device#g:method:getIpIface"), [getLldpNeighbors]("GI.NM.Objects.Device#g:method:getLldpNeighbors"), [getManaged]("GI.NM.Objects.Device#g:method:getManaged"), [getMetered]("GI.NM.Objects.Device#g:method:getMetered"), [getMtu]("GI.NM.Objects.Device#g:method:getMtu"), [getNmPluginMissing]("GI.NM.Objects.Device#g:method:getNmPluginMissing"), [getPath]("GI.NM.Objects.Device#g:method:getPath"), [getPhysicalPortId]("GI.NM.Objects.Device#g:method:getPhysicalPortId"), [getPorts]("GI.NM.Objects.Device#g:method:getPorts"), [getProduct]("GI.NM.Objects.Device#g:method:getProduct"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getSettingType]("GI.NM.Objects.Device#g:method:getSettingType"), [getSlaves]("GI.NM.Objects.DeviceTeam#g:method:getSlaves"), [getState]("GI.NM.Objects.Device#g:method:getState"), [getStateReason]("GI.NM.Objects.Device#g:method:getStateReason"), [getTypeDescription]("GI.NM.Objects.Device#g:method:getTypeDescription"), [getUdi]("GI.NM.Objects.Device#g:method:getUdi"), [getVendor]("GI.NM.Objects.Device#g:method:getVendor").
-- 
-- ==== Setters
-- [setAutoconnect]("GI.NM.Objects.Device#g:method:setAutoconnect"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setManaged]("GI.NM.Objects.Device#g:method:setManaged"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveDeviceTeamMethod                 ,
#endif

-- ** getCarrier #method:getCarrier#

#if defined(ENABLE_OVERLOADING)
    DeviceTeamGetCarrierMethodInfo          ,
#endif
    deviceTeamGetCarrier                    ,


-- ** getConfig #method:getConfig#

#if defined(ENABLE_OVERLOADING)
    DeviceTeamGetConfigMethodInfo           ,
#endif
    deviceTeamGetConfig                     ,


-- ** getSlaves #method:getSlaves#

#if defined(ENABLE_OVERLOADING)
    DeviceTeamGetSlavesMethodInfo           ,
#endif
    deviceTeamGetSlaves                     ,




 -- * Properties


-- ** carrier #attr:carrier#
-- | Whether the device has carrier.

#if defined(ENABLE_OVERLOADING)
    DeviceTeamCarrierPropertyInfo           ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceTeamCarrier                       ,
#endif
    getDeviceTeamCarrier                    ,


-- ** config #attr:config#
-- | The current JSON configuration of the device.
-- 
-- /Since: 1.4/

#if defined(ENABLE_OVERLOADING)
    DeviceTeamConfigPropertyInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceTeamConfig                        ,
#endif
    getDeviceTeamConfig                     ,


-- ** slaves #attr:slaves#

#if defined(ENABLE_OVERLOADING)
    DeviceTeamSlavesPropertyInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceTeamSlaves                        ,
#endif




    ) 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.MainContext as GLib.MainContext
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import qualified GI.NM.Callbacks as NM.Callbacks
import {-# SOURCE #-} qualified GI.NM.Enums as NM.Enums
import {-# SOURCE #-} qualified GI.NM.Flags as NM.Flags
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection
import {-# SOURCE #-} qualified GI.NM.Objects.ActiveConnection as NM.ActiveConnection
import {-# SOURCE #-} qualified GI.NM.Objects.Checkpoint as NM.Checkpoint
import {-# SOURCE #-} qualified GI.NM.Objects.Client as NM.Client
import {-# SOURCE #-} qualified GI.NM.Objects.Device as NM.Device
import {-# SOURCE #-} qualified GI.NM.Objects.DhcpConfig as NM.DhcpConfig
import {-# SOURCE #-} qualified GI.NM.Objects.IPConfig as NM.IPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object
import {-# SOURCE #-} qualified GI.NM.Objects.RemoteConnection as NM.RemoteConnection
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.DnsEntry as NM.DnsEntry
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.LldpNeighbor as NM.LldpNeighbor
import {-# SOURCE #-} qualified GI.NM.Structs.Range as NM.Range
import {-# SOURCE #-} qualified GI.NM.Structs.TCAction as NM.TCAction
import {-# SOURCE #-} qualified GI.NM.Structs.TCQdisc as NM.TCQdisc
import {-# SOURCE #-} qualified GI.NM.Structs.TCTfilter as NM.TCTfilter
import {-# SOURCE #-} qualified GI.NM.Structs.TeamLinkWatcher as NM.TeamLinkWatcher
import {-# SOURCE #-} qualified GI.NM.Structs.VariantAttributeSpec as NM.VariantAttributeSpec

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

#endif

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

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

foreign import ccall "nm_device_team_get_type"
    c_nm_device_team_get_type :: IO B.Types.GType

instance B.Types.TypedObject DeviceTeam where
    glibType :: IO GType
glibType = IO GType
c_nm_device_team_get_type

instance B.Types.GObject DeviceTeam

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

instance O.HasParentTypes DeviceTeam
type instance O.ParentTypes DeviceTeam = '[NM.Device.Device, NM.Object.Object, GObject.Object.Object]

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

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

#if defined(ENABLE_OVERLOADING)
type family ResolveDeviceTeamMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveDeviceTeamMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDeviceTeamMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDeviceTeamMethod "connectionCompatible" o = NM.Device.DeviceConnectionCompatibleMethodInfo
    ResolveDeviceTeamMethod "connectionValid" o = NM.Device.DeviceConnectionValidMethodInfo
    ResolveDeviceTeamMethod "delete" o = NM.Device.DeviceDeleteMethodInfo
    ResolveDeviceTeamMethod "deleteAsync" o = NM.Device.DeviceDeleteAsyncMethodInfo
    ResolveDeviceTeamMethod "deleteFinish" o = NM.Device.DeviceDeleteFinishMethodInfo
    ResolveDeviceTeamMethod "disconnect" o = NM.Device.DeviceDisconnectMethodInfo
    ResolveDeviceTeamMethod "disconnectAsync" o = NM.Device.DeviceDisconnectAsyncMethodInfo
    ResolveDeviceTeamMethod "disconnectFinish" o = NM.Device.DeviceDisconnectFinishMethodInfo
    ResolveDeviceTeamMethod "filterConnections" o = NM.Device.DeviceFilterConnectionsMethodInfo
    ResolveDeviceTeamMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDeviceTeamMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDeviceTeamMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveDeviceTeamMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDeviceTeamMethod "isReal" o = NM.Device.DeviceIsRealMethodInfo
    ResolveDeviceTeamMethod "isSoftware" o = NM.Device.DeviceIsSoftwareMethodInfo
    ResolveDeviceTeamMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDeviceTeamMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDeviceTeamMethod "reapply" o = NM.Device.DeviceReapplyMethodInfo
    ResolveDeviceTeamMethod "reapplyAsync" o = NM.Device.DeviceReapplyAsyncMethodInfo
    ResolveDeviceTeamMethod "reapplyFinish" o = NM.Device.DeviceReapplyFinishMethodInfo
    ResolveDeviceTeamMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDeviceTeamMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDeviceTeamMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDeviceTeamMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDeviceTeamMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDeviceTeamMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDeviceTeamMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDeviceTeamMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDeviceTeamMethod "getActiveConnection" o = NM.Device.DeviceGetActiveConnectionMethodInfo
    ResolveDeviceTeamMethod "getAppliedConnection" o = NM.Device.DeviceGetAppliedConnectionMethodInfo
    ResolveDeviceTeamMethod "getAppliedConnectionAsync" o = NM.Device.DeviceGetAppliedConnectionAsyncMethodInfo
    ResolveDeviceTeamMethod "getAppliedConnectionFinish" o = NM.Device.DeviceGetAppliedConnectionFinishMethodInfo
    ResolveDeviceTeamMethod "getAutoconnect" o = NM.Device.DeviceGetAutoconnectMethodInfo
    ResolveDeviceTeamMethod "getAvailableConnections" o = NM.Device.DeviceGetAvailableConnectionsMethodInfo
    ResolveDeviceTeamMethod "getCapabilities" o = NM.Device.DeviceGetCapabilitiesMethodInfo
    ResolveDeviceTeamMethod "getCarrier" o = DeviceTeamGetCarrierMethodInfo
    ResolveDeviceTeamMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
    ResolveDeviceTeamMethod "getConfig" o = DeviceTeamGetConfigMethodInfo
    ResolveDeviceTeamMethod "getConnectivity" o = NM.Device.DeviceGetConnectivityMethodInfo
    ResolveDeviceTeamMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDeviceTeamMethod "getDescription" o = NM.Device.DeviceGetDescriptionMethodInfo
    ResolveDeviceTeamMethod "getDeviceType" o = NM.Device.DeviceGetDeviceTypeMethodInfo
    ResolveDeviceTeamMethod "getDhcp4Config" o = NM.Device.DeviceGetDhcp4ConfigMethodInfo
    ResolveDeviceTeamMethod "getDhcp6Config" o = NM.Device.DeviceGetDhcp6ConfigMethodInfo
    ResolveDeviceTeamMethod "getDriver" o = NM.Device.DeviceGetDriverMethodInfo
    ResolveDeviceTeamMethod "getDriverVersion" o = NM.Device.DeviceGetDriverVersionMethodInfo
    ResolveDeviceTeamMethod "getFirmwareMissing" o = NM.Device.DeviceGetFirmwareMissingMethodInfo
    ResolveDeviceTeamMethod "getFirmwareVersion" o = NM.Device.DeviceGetFirmwareVersionMethodInfo
    ResolveDeviceTeamMethod "getHwAddress" o = NM.Device.DeviceGetHwAddressMethodInfo
    ResolveDeviceTeamMethod "getIface" o = NM.Device.DeviceGetIfaceMethodInfo
    ResolveDeviceTeamMethod "getInterfaceFlags" o = NM.Device.DeviceGetInterfaceFlagsMethodInfo
    ResolveDeviceTeamMethod "getIp4Config" o = NM.Device.DeviceGetIp4ConfigMethodInfo
    ResolveDeviceTeamMethod "getIp6Config" o = NM.Device.DeviceGetIp6ConfigMethodInfo
    ResolveDeviceTeamMethod "getIpIface" o = NM.Device.DeviceGetIpIfaceMethodInfo
    ResolveDeviceTeamMethod "getLldpNeighbors" o = NM.Device.DeviceGetLldpNeighborsMethodInfo
    ResolveDeviceTeamMethod "getManaged" o = NM.Device.DeviceGetManagedMethodInfo
    ResolveDeviceTeamMethod "getMetered" o = NM.Device.DeviceGetMeteredMethodInfo
    ResolveDeviceTeamMethod "getMtu" o = NM.Device.DeviceGetMtuMethodInfo
    ResolveDeviceTeamMethod "getNmPluginMissing" o = NM.Device.DeviceGetNmPluginMissingMethodInfo
    ResolveDeviceTeamMethod "getPath" o = NM.Device.DeviceGetPathMethodInfo
    ResolveDeviceTeamMethod "getPhysicalPortId" o = NM.Device.DeviceGetPhysicalPortIdMethodInfo
    ResolveDeviceTeamMethod "getPorts" o = NM.Device.DeviceGetPortsMethodInfo
    ResolveDeviceTeamMethod "getProduct" o = NM.Device.DeviceGetProductMethodInfo
    ResolveDeviceTeamMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDeviceTeamMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDeviceTeamMethod "getSettingType" o = NM.Device.DeviceGetSettingTypeMethodInfo
    ResolveDeviceTeamMethod "getSlaves" o = DeviceTeamGetSlavesMethodInfo
    ResolveDeviceTeamMethod "getState" o = NM.Device.DeviceGetStateMethodInfo
    ResolveDeviceTeamMethod "getStateReason" o = NM.Device.DeviceGetStateReasonMethodInfo
    ResolveDeviceTeamMethod "getTypeDescription" o = NM.Device.DeviceGetTypeDescriptionMethodInfo
    ResolveDeviceTeamMethod "getUdi" o = NM.Device.DeviceGetUdiMethodInfo
    ResolveDeviceTeamMethod "getVendor" o = NM.Device.DeviceGetVendorMethodInfo
    ResolveDeviceTeamMethod "setAutoconnect" o = NM.Device.DeviceSetAutoconnectMethodInfo
    ResolveDeviceTeamMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDeviceTeamMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveDeviceTeamMethod "setManaged" o = NM.Device.DeviceSetManagedMethodInfo
    ResolveDeviceTeamMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDeviceTeamMethod l o = O.MethodResolutionFailed l o

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

#endif

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

#endif

--- XXX Duplicated object with different types:
  --- Name {namespace = "NM", name = "Device"} -> Property {propName = "path", propType = TBasicType TUTF8, propFlags = [PropertyReadable], propReadNullable = Just False, propWriteNullable = Nothing, propSetter = Nothing, propGetter = Just "get_path", propTransfer = TransferNothing, propDoc = Documentation {rawDocText = Just "The device path as exposed by the udev property ID_PATH.\n\nThe string is backslash escaped (C escaping) for invalid\ncharacters. The escaping can be reverted with g_strcompress(),\nhowever the result may not be valid UTF-8.", sinceVersion = Just "1.26"}, propDeprecated = Nothing}
  --- Name {namespace = "NM", name = "Object"} -> Property {propName = "path", propType = TBasicType TUTF8, propFlags = [PropertyReadable], propReadNullable = Just False, propWriteNullable = Nothing, propSetter = Nothing, propGetter = Just "get_path", propTransfer = TransferNothing, propDoc = Documentation {rawDocText = Just "The D-Bus object path.\n\nThe D-Bus path of an object instance never changes, even if the object\ngets removed from the cache. To see whether the object is still in the\ncache, check NMObject:client.", sinceVersion = Nothing}, propDeprecated = Nothing}
-- VVV Prop "carrier"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@carrier@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' deviceTeam #carrier
-- @
getDeviceTeamCarrier :: (MonadIO m, IsDeviceTeam o) => o -> m Bool
getDeviceTeamCarrier :: forall (m :: * -> *) o. (MonadIO m, IsDeviceTeam o) => o -> m Bool
getDeviceTeamCarrier o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"carrier"

#if defined(ENABLE_OVERLOADING)
data DeviceTeamCarrierPropertyInfo
instance AttrInfo DeviceTeamCarrierPropertyInfo where
    type AttrAllowedOps DeviceTeamCarrierPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceTeamCarrierPropertyInfo = IsDeviceTeam
    type AttrSetTypeConstraint DeviceTeamCarrierPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceTeamCarrierPropertyInfo = (~) ()
    type AttrTransferType DeviceTeamCarrierPropertyInfo = ()
    type AttrGetType DeviceTeamCarrierPropertyInfo = Bool
    type AttrLabel DeviceTeamCarrierPropertyInfo = "carrier"
    type AttrOrigin DeviceTeamCarrierPropertyInfo = DeviceTeam
    attrGet = getDeviceTeamCarrier
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.DeviceTeam.carrier"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTeam.html#g:attr:carrier"
        })
#endif

-- VVV Prop "config"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@config@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' deviceTeam #config
-- @
getDeviceTeamConfig :: (MonadIO m, IsDeviceTeam o) => o -> m T.Text
getDeviceTeamConfig :: forall (m :: * -> *) o. (MonadIO m, IsDeviceTeam o) => o -> m Text
getDeviceTeamConfig o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceTeamConfig" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"config"

#if defined(ENABLE_OVERLOADING)
data DeviceTeamConfigPropertyInfo
instance AttrInfo DeviceTeamConfigPropertyInfo where
    type AttrAllowedOps DeviceTeamConfigPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceTeamConfigPropertyInfo = IsDeviceTeam
    type AttrSetTypeConstraint DeviceTeamConfigPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceTeamConfigPropertyInfo = (~) ()
    type AttrTransferType DeviceTeamConfigPropertyInfo = ()
    type AttrGetType DeviceTeamConfigPropertyInfo = T.Text
    type AttrLabel DeviceTeamConfigPropertyInfo = "config"
    type AttrOrigin DeviceTeamConfigPropertyInfo = DeviceTeam
    attrGet = getDeviceTeamConfig
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.DeviceTeam.config"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTeam.html#g:attr:config"
        })
#endif

-- XXX Generation of property "slaves" of object "DeviceTeam" failed.
-- Not implemented: Don't know how to handle properties of type TPtrArray (TInterface (Name {namespace = "NM", name = "Device"}))
#if defined(ENABLE_OVERLOADING)
-- XXX Placeholder
data DeviceTeamSlavesPropertyInfo
instance AttrInfo DeviceTeamSlavesPropertyInfo where
    type AttrAllowedOps DeviceTeamSlavesPropertyInfo = '[]
    type AttrSetTypeConstraint DeviceTeamSlavesPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceTeamSlavesPropertyInfo = (~) ()
    type AttrTransferType DeviceTeamSlavesPropertyInfo = ()
    type AttrBaseTypeConstraint DeviceTeamSlavesPropertyInfo = (~) ()
    type AttrGetType DeviceTeamSlavesPropertyInfo = ()
    type AttrLabel DeviceTeamSlavesPropertyInfo = ""
    type AttrOrigin DeviceTeamSlavesPropertyInfo = DeviceTeam
    attrGet = undefined
    attrSet = undefined
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DeviceTeam
type instance O.AttributeList DeviceTeam = DeviceTeamAttributeList
type DeviceTeamAttributeList = ('[ '("activeConnection", NM.Device.DeviceActiveConnectionPropertyInfo), '("autoconnect", NM.Device.DeviceAutoconnectPropertyInfo), '("availableConnections", NM.Device.DeviceAvailableConnectionsPropertyInfo), '("capabilities", NM.Device.DeviceCapabilitiesPropertyInfo), '("carrier", DeviceTeamCarrierPropertyInfo), '("client", NM.Object.ObjectClientPropertyInfo), '("config", DeviceTeamConfigPropertyInfo), '("deviceType", NM.Device.DeviceDeviceTypePropertyInfo), '("dhcp4Config", NM.Device.DeviceDhcp4ConfigPropertyInfo), '("dhcp6Config", NM.Device.DeviceDhcp6ConfigPropertyInfo), '("driver", NM.Device.DeviceDriverPropertyInfo), '("driverVersion", NM.Device.DeviceDriverVersionPropertyInfo), '("firmwareMissing", NM.Device.DeviceFirmwareMissingPropertyInfo), '("firmwareVersion", NM.Device.DeviceFirmwareVersionPropertyInfo), '("hwAddress", NM.Device.DeviceHwAddressPropertyInfo), '("interface", NM.Device.DeviceInterfacePropertyInfo), '("interfaceFlags", NM.Device.DeviceInterfaceFlagsPropertyInfo), '("ipInterface", NM.Device.DeviceIpInterfacePropertyInfo), '("ip4Config", NM.Device.DeviceIp4ConfigPropertyInfo), '("ip4Connectivity", NM.Device.DeviceIp4ConnectivityPropertyInfo), '("ip6Config", NM.Device.DeviceIp6ConfigPropertyInfo), '("ip6Connectivity", NM.Device.DeviceIp6ConnectivityPropertyInfo), '("lldpNeighbors", NM.Device.DeviceLldpNeighborsPropertyInfo), '("managed", NM.Device.DeviceManagedPropertyInfo), '("metered", NM.Device.DeviceMeteredPropertyInfo), '("mtu", NM.Device.DeviceMtuPropertyInfo), '("nmPluginMissing", NM.Device.DeviceNmPluginMissingPropertyInfo), '("path", NM.Device.DevicePathPropertyInfo), '("physicalPortId", NM.Device.DevicePhysicalPortIdPropertyInfo), '("ports", NM.Device.DevicePortsPropertyInfo), '("product", NM.Device.DeviceProductPropertyInfo), '("real", NM.Device.DeviceRealPropertyInfo), '("slaves", DeviceTeamSlavesPropertyInfo), '("state", NM.Device.DeviceStatePropertyInfo), '("stateReason", NM.Device.DeviceStateReasonPropertyInfo), '("udi", NM.Device.DeviceUdiPropertyInfo), '("vendor", NM.Device.DeviceVendorPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
deviceTeamCarrier :: AttrLabelProxy "carrier"
deviceTeamCarrier = AttrLabelProxy

deviceTeamConfig :: AttrLabelProxy "config"
deviceTeamConfig = AttrLabelProxy

deviceTeamSlaves :: AttrLabelProxy "slaves"
deviceTeamSlaves = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DeviceTeam = DeviceTeamSignalList
type DeviceTeamSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("stateChanged", NM.Device.DeviceStateChangedSignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method DeviceTeam::get_carrier
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "DeviceTeam" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDeviceTeam" , 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_device_team_get_carrier" nm_device_team_get_carrier :: 
    Ptr DeviceTeam ->                       -- device : TInterface (Name {namespace = "NM", name = "DeviceTeam"})
    IO CInt

-- | Whether the device has carrier.
deviceTeamGetCarrier ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeviceTeam a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.DeviceTeam.DeviceTeam'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the device has carrier
deviceTeamGetCarrier :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceTeam a) =>
a -> m Bool
deviceTeamGetCarrier a
device = 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 DeviceTeam
device' <- a -> IO (Ptr DeviceTeam)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CInt
result <- Ptr DeviceTeam -> IO CInt
nm_device_team_get_carrier Ptr DeviceTeam
device'
    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
device
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeviceTeamGetCarrierMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceTeam a) => O.OverloadedMethod DeviceTeamGetCarrierMethodInfo a signature where
    overloadedMethod = deviceTeamGetCarrier

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


#endif

-- method DeviceTeam::get_config
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "DeviceTeam" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDeviceTeam" , 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_device_team_get_config" nm_device_team_get_config :: 
    Ptr DeviceTeam ->                       -- device : TInterface (Name {namespace = "NM", name = "DeviceTeam"})
    IO CString

-- | Gets the current JSON configuration of the t'GI.NM.Objects.DeviceTeam.DeviceTeam'
-- 
-- /Since: 1.4/
deviceTeamGetConfig ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeviceTeam a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.DeviceTeam.DeviceTeam'
    -> m T.Text
    -- ^ __Returns:__ the current configuration. This is the internal string used by the
    -- device, and must not be modified.
deviceTeamGetConfig :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceTeam a) =>
a -> m Text
deviceTeamGetConfig a
device = 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 DeviceTeam
device' <- a -> IO (Ptr DeviceTeam)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr DeviceTeam -> IO CString
nm_device_team_get_config Ptr DeviceTeam
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceTeamGetConfig" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceTeamGetConfigMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeviceTeam a) => O.OverloadedMethod DeviceTeamGetConfigMethodInfo a signature where
    overloadedMethod = deviceTeamGetConfig

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


#endif

-- method DeviceTeam::get_slaves
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "DeviceTeam" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDeviceTeam" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TPtrArray
--                  (TInterface Name { namespace = "NM" , name = "Device" }))
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_team_get_slaves" nm_device_team_get_slaves :: 
    Ptr DeviceTeam ->                       -- device : TInterface (Name {namespace = "NM", name = "DeviceTeam"})
    IO (Ptr (GPtrArray (Ptr NM.Device.Device)))

{-# DEPRECATED deviceTeamGetSlaves ["(Since version 1.34)","Use 'GI.NM.Objects.Device.deviceGetPorts' instead."] #-}
-- | Gets the devices currently attach as port to /@device@/.
deviceTeamGetSlaves ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeviceTeam a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.DeviceTeam.DeviceTeam'
    -> m [NM.Device.Device]
    -- ^ __Returns:__ the t'GI.GLib.Structs.PtrArray.PtrArray' containing
    -- @/NMDevices/@ that are ports of /@device@/. This is the internal
    -- copy used by the device, and must not be modified.
deviceTeamGetSlaves :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceTeam a) =>
a -> m [Device]
deviceTeamGetSlaves a
device = IO [Device] -> m [Device]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Device] -> m [Device]) -> IO [Device] -> m [Device]
forall a b. (a -> b) -> a -> b
$ do
    Ptr DeviceTeam
device' <- a -> IO (Ptr DeviceTeam)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr (GPtrArray (Ptr Device))
result <- Ptr DeviceTeam -> IO (Ptr (GPtrArray (Ptr Device)))
nm_device_team_get_slaves Ptr DeviceTeam
device'
    Text -> Ptr (GPtrArray (Ptr Device)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceTeamGetSlaves" Ptr (GPtrArray (Ptr Device))
result
    [Ptr Device]
result' <- Ptr (GPtrArray (Ptr Device)) -> IO [Ptr Device]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr Device))
result
    [Device]
result'' <- (Ptr Device -> IO Device) -> [Ptr Device] -> IO [Device]
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 Device -> Device) -> Ptr Device -> IO Device
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Device -> Device
NM.Device.Device) [Ptr Device]
result'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    [Device] -> IO [Device]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Device]
result''

#if defined(ENABLE_OVERLOADING)
data DeviceTeamGetSlavesMethodInfo
instance (signature ~ (m [NM.Device.Device]), MonadIO m, IsDeviceTeam a) => O.OverloadedMethod DeviceTeamGetSlavesMethodInfo a signature where
    overloadedMethod = deviceTeamGetSlaves

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


#endif