{-# 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.DeviceEthernet
    ( 

-- * Exported types
    DeviceEthernet(..)                      ,
    IsDeviceEthernet                        ,
    toDeviceEthernet                        ,


 -- * 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.DeviceEthernet#g:method:getCarrier"), [getClient]("GI.NM.Objects.Object#g:method:getClient"), [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"), [getPermanentHwAddress]("GI.NM.Objects.DeviceEthernet#g:method:getPermanentHwAddress"), [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"), [getS390Subchannels]("GI.NM.Objects.DeviceEthernet#g:method:getS390Subchannels"), [getSettingType]("GI.NM.Objects.Device#g:method:getSettingType"), [getSpeed]("GI.NM.Objects.DeviceEthernet#g:method:getSpeed"), [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)
    ResolveDeviceEthernetMethod             ,
#endif

-- ** getCarrier #method:getCarrier#

#if defined(ENABLE_OVERLOADING)
    DeviceEthernetGetCarrierMethodInfo      ,
#endif
    deviceEthernetGetCarrier                ,


-- ** getPermanentHwAddress #method:getPermanentHwAddress#

#if defined(ENABLE_OVERLOADING)
    DeviceEthernetGetPermanentHwAddressMethodInfo,
#endif
    deviceEthernetGetPermanentHwAddress     ,


-- ** getS390Subchannels #method:getS390Subchannels#

#if defined(ENABLE_OVERLOADING)
    DeviceEthernetGetS390SubchannelsMethodInfo,
#endif
    deviceEthernetGetS390Subchannels        ,


-- ** getSpeed #method:getSpeed#

#if defined(ENABLE_OVERLOADING)
    DeviceEthernetGetSpeedMethodInfo        ,
#endif
    deviceEthernetGetSpeed                  ,




 -- * Properties


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

#if defined(ENABLE_OVERLOADING)
    DeviceEthernetCarrierPropertyInfo       ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceEthernetCarrier                   ,
#endif
    getDeviceEthernetCarrier                ,


-- ** permHwAddress #attr:permHwAddress#
-- | The permanent hardware (MAC) address of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceEthernetPermHwAddressPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceEthernetPermHwAddress             ,
#endif
    getDeviceEthernetPermHwAddress          ,


-- ** s390Subchannels #attr:s390Subchannels#
-- | Identifies subchannels of this network device used for
-- communication with z\/VM or s390 host.
-- 
-- /Since: 1.2/

#if defined(ENABLE_OVERLOADING)
    DeviceEthernetS390SubchannelsPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceEthernetS390Subchannels           ,
#endif
    getDeviceEthernetS390Subchannels        ,


-- ** speed #attr:speed#
-- | The speed of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceEthernetSpeedPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceEthernetSpeed                     ,
#endif
    getDeviceEthernetSpeed                  ,




    ) 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 DeviceEthernet = DeviceEthernet (SP.ManagedPtr DeviceEthernet)
    deriving (DeviceEthernet -> DeviceEthernet -> Bool
(DeviceEthernet -> DeviceEthernet -> Bool)
-> (DeviceEthernet -> DeviceEthernet -> Bool) -> Eq DeviceEthernet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceEthernet -> DeviceEthernet -> Bool
== :: DeviceEthernet -> DeviceEthernet -> Bool
$c/= :: DeviceEthernet -> DeviceEthernet -> Bool
/= :: DeviceEthernet -> DeviceEthernet -> Bool
Eq)

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

foreign import ccall "nm_device_ethernet_get_type"
    c_nm_device_ethernet_get_type :: IO B.Types.GType

instance B.Types.TypedObject DeviceEthernet where
    glibType :: IO GType
glibType = IO GType
c_nm_device_ethernet_get_type

instance B.Types.GObject DeviceEthernet

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

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

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

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

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

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

#endif

instance (info ~ ResolveDeviceEthernetMethod t DeviceEthernet, O.OverloadedMethodInfo info DeviceEthernet) => OL.IsLabel t (O.MethodProxy info DeviceEthernet) 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' deviceEthernet #carrier
-- @
getDeviceEthernetCarrier :: (MonadIO m, IsDeviceEthernet o) => o -> m Bool
getDeviceEthernetCarrier :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceEthernet o) =>
o -> m Bool
getDeviceEthernetCarrier 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 DeviceEthernetCarrierPropertyInfo
instance AttrInfo DeviceEthernetCarrierPropertyInfo where
    type AttrAllowedOps DeviceEthernetCarrierPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceEthernetCarrierPropertyInfo = IsDeviceEthernet
    type AttrSetTypeConstraint DeviceEthernetCarrierPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceEthernetCarrierPropertyInfo = (~) ()
    type AttrTransferType DeviceEthernetCarrierPropertyInfo = ()
    type AttrGetType DeviceEthernetCarrierPropertyInfo = Bool
    type AttrLabel DeviceEthernetCarrierPropertyInfo = "carrier"
    type AttrOrigin DeviceEthernetCarrierPropertyInfo = DeviceEthernet
    attrGet = getDeviceEthernetCarrier
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.DeviceEthernet.carrier"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceEthernet.html#g:attr:carrier"
        })
#endif

-- VVV Prop "perm-hw-address"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@perm-hw-address@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' deviceEthernet #permHwAddress
-- @
getDeviceEthernetPermHwAddress :: (MonadIO m, IsDeviceEthernet o) => o -> m (Maybe T.Text)
getDeviceEthernetPermHwAddress :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceEthernet o) =>
o -> m (Maybe Text)
getDeviceEthernetPermHwAddress o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe 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
"perm-hw-address"

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

-- VVV Prop "s390-subchannels"
   -- Type: TCArray True (-1) (-1) (TBasicType TUTF8)
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@s390-subchannels@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' deviceEthernet #s390Subchannels
-- @
getDeviceEthernetS390Subchannels :: (MonadIO m, IsDeviceEthernet o) => o -> m [T.Text]
getDeviceEthernetS390Subchannels :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceEthernet o) =>
o -> m [Text]
getDeviceEthernetS390Subchannels 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
"getDeviceEthernetS390Subchannels" (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.getObjectPropertyStringArray o
obj String
"s390-subchannels"

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

-- VVV Prop "speed"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

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

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

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DeviceEthernet
type instance O.AttributeList DeviceEthernet = DeviceEthernetAttributeList
type DeviceEthernetAttributeList = ('[ '("activeConnection", NM.Device.DeviceActiveConnectionPropertyInfo), '("autoconnect", NM.Device.DeviceAutoconnectPropertyInfo), '("availableConnections", NM.Device.DeviceAvailableConnectionsPropertyInfo), '("capabilities", NM.Device.DeviceCapabilitiesPropertyInfo), '("carrier", DeviceEthernetCarrierPropertyInfo), '("client", NM.Object.ObjectClientPropertyInfo), '("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), '("permHwAddress", DeviceEthernetPermHwAddressPropertyInfo), '("physicalPortId", NM.Device.DevicePhysicalPortIdPropertyInfo), '("ports", NM.Device.DevicePortsPropertyInfo), '("product", NM.Device.DeviceProductPropertyInfo), '("real", NM.Device.DeviceRealPropertyInfo), '("s390Subchannels", DeviceEthernetS390SubchannelsPropertyInfo), '("speed", DeviceEthernetSpeedPropertyInfo), '("state", NM.Device.DeviceStatePropertyInfo), '("stateReason", NM.Device.DeviceStateReasonPropertyInfo), '("udi", NM.Device.DeviceUdiPropertyInfo), '("vendor", NM.Device.DeviceVendorPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

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

deviceEthernetPermHwAddress :: AttrLabelProxy "permHwAddress"
deviceEthernetPermHwAddress = AttrLabelProxy

deviceEthernetS390Subchannels :: AttrLabelProxy "s390Subchannels"
deviceEthernetS390Subchannels = AttrLabelProxy

deviceEthernetSpeed :: AttrLabelProxy "speed"
deviceEthernetSpeed = AttrLabelProxy

#endif

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

#endif

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

-- | Whether the device has carrier.
deviceEthernetGetCarrier ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeviceEthernet a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.DeviceEthernet.DeviceEthernet'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the device has carrier
deviceEthernetGetCarrier :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceEthernet a) =>
a -> m Bool
deviceEthernetGetCarrier 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 DeviceEthernet
device' <- a -> IO (Ptr DeviceEthernet)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CInt
result <- Ptr DeviceEthernet -> IO CInt
nm_device_ethernet_get_carrier Ptr DeviceEthernet
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 DeviceEthernetGetCarrierMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceEthernet a) => O.OverloadedMethod DeviceEthernetGetCarrierMethodInfo a signature where
    overloadedMethod = deviceEthernetGetCarrier

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


#endif

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

-- | Gets the permanent hardware (MAC) address of the t'GI.NM.Objects.DeviceEthernet.DeviceEthernet'
deviceEthernetGetPermanentHwAddress ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeviceEthernet a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.DeviceEthernet.DeviceEthernet'
    -> m T.Text
    -- ^ __Returns:__ the permanent hardware address. This is the internal string used by the
    -- device, and must not be modified.
deviceEthernetGetPermanentHwAddress :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceEthernet a) =>
a -> m Text
deviceEthernetGetPermanentHwAddress 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 DeviceEthernet
device' <- a -> IO (Ptr DeviceEthernet)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr DeviceEthernet -> IO CString
nm_device_ethernet_get_permanent_hw_address Ptr DeviceEthernet
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceEthernetGetPermanentHwAddress" 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 DeviceEthernetGetPermanentHwAddressMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeviceEthernet a) => O.OverloadedMethod DeviceEthernetGetPermanentHwAddressMethodInfo a signature where
    overloadedMethod = deviceEthernetGetPermanentHwAddress

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


#endif

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

foreign import ccall "nm_device_ethernet_get_s390_subchannels" nm_device_ethernet_get_s390_subchannels :: 
    Ptr DeviceEthernet ->                   -- device : TInterface (Name {namespace = "NM", name = "DeviceEthernet"})
    IO (Ptr CString)

-- | Return the list of s390 subchannels if the device supports them.
-- 
-- /Since: 1.2/
deviceEthernetGetS390Subchannels ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeviceEthernet a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.DeviceEthernet.DeviceEthernet'
    -> m [T.Text]
    -- ^ __Returns:__ array of strings, each specifying
    --   one subchannel the s390 device uses to communicate to the host.
deviceEthernetGetS390Subchannels :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceEthernet a) =>
a -> m [Text]
deviceEthernetGetS390Subchannels 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 DeviceEthernet
device' <- a -> IO (Ptr DeviceEthernet)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr CString
result <- Ptr DeviceEthernet -> IO (Ptr CString)
nm_device_ethernet_get_s390_subchannels Ptr DeviceEthernet
device'
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceEthernetGetS390Subchannels" Ptr CString
result
    [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr 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 DeviceEthernetGetS390SubchannelsMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsDeviceEthernet a) => O.OverloadedMethod DeviceEthernetGetS390SubchannelsMethodInfo a signature where
    overloadedMethod = deviceEthernetGetS390Subchannels

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


#endif

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

foreign import ccall "nm_device_ethernet_get_speed" nm_device_ethernet_get_speed :: 
    Ptr DeviceEthernet ->                   -- device : TInterface (Name {namespace = "NM", name = "DeviceEthernet"})
    IO Word32

-- | Gets the speed of the t'GI.NM.Objects.DeviceEthernet.DeviceEthernet' in Mbit\/s.
deviceEthernetGetSpeed ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeviceEthernet a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.DeviceEthernet.DeviceEthernet'
    -> m Word32
    -- ^ __Returns:__ the speed of the device in Mbit\/s
deviceEthernetGetSpeed :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceEthernet a) =>
a -> m Word32
deviceEthernetGetSpeed a
device = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr DeviceEthernet
device' <- a -> IO (Ptr DeviceEthernet)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Word32
result <- Ptr DeviceEthernet -> IO Word32
nm_device_ethernet_get_speed Ptr DeviceEthernet
device'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data DeviceEthernetGetSpeedMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsDeviceEthernet a) => O.OverloadedMethod DeviceEthernetGetSpeedMethodInfo a signature where
    overloadedMethod = deviceEthernetGetSpeed

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


#endif