{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Serial Link Settings

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

module GI.NM.Objects.SettingSerial
    ( 

-- * Exported types
    SettingSerial(..)                       ,
    IsSettingSerial                         ,
    toSettingSerial                         ,


 -- * 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"), [compare]("GI.NM.Objects.Setting#g:method:compare"), [diff]("GI.NM.Objects.Setting#g:method:diff"), [duplicate]("GI.NM.Objects.Setting#g:method:duplicate"), [enumerateValues]("GI.NM.Objects.Setting#g:method:enumerateValues"), [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"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [optionClearByName]("GI.NM.Objects.Setting#g:method:optionClearByName"), [optionGet]("GI.NM.Objects.Setting#g:method:optionGet"), [optionGetAllNames]("GI.NM.Objects.Setting#g:method:optionGetAllNames"), [optionGetBoolean]("GI.NM.Objects.Setting#g:method:optionGetBoolean"), [optionGetUint32]("GI.NM.Objects.Setting#g:method:optionGetUint32"), [optionSet]("GI.NM.Objects.Setting#g:method:optionSet"), [optionSetBoolean]("GI.NM.Objects.Setting#g:method:optionSetBoolean"), [optionSetUint32]("GI.NM.Objects.Setting#g:method:optionSetUint32"), [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"), [toString]("GI.NM.Objects.Setting#g:method:toString"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [verify]("GI.NM.Objects.Setting#g:method:verify"), [verifySecrets]("GI.NM.Objects.Setting#g:method:verifySecrets"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getBaud]("GI.NM.Objects.SettingSerial#g:method:getBaud"), [getBits]("GI.NM.Objects.SettingSerial#g:method:getBits"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDbusPropertyType]("GI.NM.Objects.Setting#g:method:getDbusPropertyType"), [getName]("GI.NM.Objects.Setting#g:method:getName"), [getParity]("GI.NM.Objects.SettingSerial#g:method:getParity"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getSecretFlags]("GI.NM.Objects.Setting#g:method:getSecretFlags"), [getSendDelay]("GI.NM.Objects.SettingSerial#g:method:getSendDelay"), [getStopbits]("GI.NM.Objects.SettingSerial#g:method:getStopbits").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setSecretFlags]("GI.NM.Objects.Setting#g:method:setSecretFlags").

#if defined(ENABLE_OVERLOADING)
    ResolveSettingSerialMethod              ,
#endif

-- ** getBaud #method:getBaud#

#if defined(ENABLE_OVERLOADING)
    SettingSerialGetBaudMethodInfo          ,
#endif
    settingSerialGetBaud                    ,


-- ** getBits #method:getBits#

#if defined(ENABLE_OVERLOADING)
    SettingSerialGetBitsMethodInfo          ,
#endif
    settingSerialGetBits                    ,


-- ** getParity #method:getParity#

#if defined(ENABLE_OVERLOADING)
    SettingSerialGetParityMethodInfo        ,
#endif
    settingSerialGetParity                  ,


-- ** getSendDelay #method:getSendDelay#

#if defined(ENABLE_OVERLOADING)
    SettingSerialGetSendDelayMethodInfo     ,
#endif
    settingSerialGetSendDelay               ,


-- ** getStopbits #method:getStopbits#

#if defined(ENABLE_OVERLOADING)
    SettingSerialGetStopbitsMethodInfo      ,
#endif
    settingSerialGetStopbits                ,


-- ** new #method:new#

    settingSerialNew                        ,




 -- * Properties


-- ** baud #attr:baud#
-- | Speed to use for communication over the serial port.  Note that this
-- value usually has no effect for mobile broadband modems as they generally
-- ignore speed settings and use the highest available speed.

#if defined(ENABLE_OVERLOADING)
    SettingSerialBaudPropertyInfo           ,
#endif
    constructSettingSerialBaud              ,
    getSettingSerialBaud                    ,
    setSettingSerialBaud                    ,
#if defined(ENABLE_OVERLOADING)
    settingSerialBaud                       ,
#endif


-- ** bits #attr:bits#
-- | Byte-width of the serial communication. The 8 in \"8n1\" for example.

#if defined(ENABLE_OVERLOADING)
    SettingSerialBitsPropertyInfo           ,
#endif
    constructSettingSerialBits              ,
    getSettingSerialBits                    ,
    setSettingSerialBits                    ,
#if defined(ENABLE_OVERLOADING)
    settingSerialBits                       ,
#endif


-- ** parity #attr:parity#
-- | Parity setting of the serial port.

#if defined(ENABLE_OVERLOADING)
    SettingSerialParityPropertyInfo         ,
#endif
    constructSettingSerialParity            ,
    getSettingSerialParity                  ,
    setSettingSerialParity                  ,
#if defined(ENABLE_OVERLOADING)
    settingSerialParity                     ,
#endif


-- ** sendDelay #attr:sendDelay#
-- | Time to delay between each byte sent to the modem, in microseconds.

#if defined(ENABLE_OVERLOADING)
    SettingSerialSendDelayPropertyInfo      ,
#endif
    constructSettingSerialSendDelay         ,
    getSettingSerialSendDelay               ,
    setSettingSerialSendDelay               ,
#if defined(ENABLE_OVERLOADING)
    settingSerialSendDelay                  ,
#endif


-- ** stopbits #attr:stopbits#
-- | Number of stop bits for communication on the serial port.  Either 1 or 2.
-- The 1 in \"8n1\" for example.

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

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

#endif

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

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

foreign import ccall "nm_setting_serial_get_type"
    c_nm_setting_serial_get_type :: IO B.Types.GType

instance B.Types.TypedObject SettingSerial where
    glibType :: IO GType
glibType = IO GType
c_nm_setting_serial_get_type

instance B.Types.GObject SettingSerial

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

instance O.HasParentTypes SettingSerial
type instance O.ParentTypes SettingSerial = '[NM.Setting.Setting, GObject.Object.Object]

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

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

#if defined(ENABLE_OVERLOADING)
type family ResolveSettingSerialMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveSettingSerialMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveSettingSerialMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveSettingSerialMethod "compare" o = NM.Setting.SettingCompareMethodInfo
    ResolveSettingSerialMethod "diff" o = NM.Setting.SettingDiffMethodInfo
    ResolveSettingSerialMethod "duplicate" o = NM.Setting.SettingDuplicateMethodInfo
    ResolveSettingSerialMethod "enumerateValues" o = NM.Setting.SettingEnumerateValuesMethodInfo
    ResolveSettingSerialMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveSettingSerialMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveSettingSerialMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveSettingSerialMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveSettingSerialMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveSettingSerialMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveSettingSerialMethod "optionClearByName" o = NM.Setting.SettingOptionClearByNameMethodInfo
    ResolveSettingSerialMethod "optionGet" o = NM.Setting.SettingOptionGetMethodInfo
    ResolveSettingSerialMethod "optionGetAllNames" o = NM.Setting.SettingOptionGetAllNamesMethodInfo
    ResolveSettingSerialMethod "optionGetBoolean" o = NM.Setting.SettingOptionGetBooleanMethodInfo
    ResolveSettingSerialMethod "optionGetUint32" o = NM.Setting.SettingOptionGetUint32MethodInfo
    ResolveSettingSerialMethod "optionSet" o = NM.Setting.SettingOptionSetMethodInfo
    ResolveSettingSerialMethod "optionSetBoolean" o = NM.Setting.SettingOptionSetBooleanMethodInfo
    ResolveSettingSerialMethod "optionSetUint32" o = NM.Setting.SettingOptionSetUint32MethodInfo
    ResolveSettingSerialMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveSettingSerialMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveSettingSerialMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveSettingSerialMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveSettingSerialMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveSettingSerialMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveSettingSerialMethod "toString" o = NM.Setting.SettingToStringMethodInfo
    ResolveSettingSerialMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveSettingSerialMethod "verify" o = NM.Setting.SettingVerifyMethodInfo
    ResolveSettingSerialMethod "verifySecrets" o = NM.Setting.SettingVerifySecretsMethodInfo
    ResolveSettingSerialMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveSettingSerialMethod "getBaud" o = SettingSerialGetBaudMethodInfo
    ResolveSettingSerialMethod "getBits" o = SettingSerialGetBitsMethodInfo
    ResolveSettingSerialMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveSettingSerialMethod "getDbusPropertyType" o = NM.Setting.SettingGetDbusPropertyTypeMethodInfo
    ResolveSettingSerialMethod "getName" o = NM.Setting.SettingGetNameMethodInfo
    ResolveSettingSerialMethod "getParity" o = SettingSerialGetParityMethodInfo
    ResolveSettingSerialMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveSettingSerialMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveSettingSerialMethod "getSecretFlags" o = NM.Setting.SettingGetSecretFlagsMethodInfo
    ResolveSettingSerialMethod "getSendDelay" o = SettingSerialGetSendDelayMethodInfo
    ResolveSettingSerialMethod "getStopbits" o = SettingSerialGetStopbitsMethodInfo
    ResolveSettingSerialMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveSettingSerialMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveSettingSerialMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveSettingSerialMethod "setSecretFlags" o = NM.Setting.SettingSetSecretFlagsMethodInfo
    ResolveSettingSerialMethod l o = O.MethodResolutionFailed l o

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

#endif

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

#endif

-- VVV Prop "baud"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@baud@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' settingSerial #baud
-- @
getSettingSerialBaud :: (MonadIO m, IsSettingSerial o) => o -> m Word32
getSettingSerialBaud :: forall (m :: * -> *) o.
(MonadIO m, IsSettingSerial o) =>
o -> m Word32
getSettingSerialBaud 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
"baud"

-- | Set the value of the “@baud@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' settingSerial [ #baud 'Data.GI.Base.Attributes.:=' value ]
-- @
setSettingSerialBaud :: (MonadIO m, IsSettingSerial o) => o -> Word32 -> m ()
setSettingSerialBaud :: forall (m :: * -> *) o.
(MonadIO m, IsSettingSerial o) =>
o -> Word32 -> m ()
setSettingSerialBaud o
obj Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"baud" Word32
val

-- | Construct a t'GValueConstruct' with valid value for the “@baud@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSettingSerialBaud :: (IsSettingSerial o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructSettingSerialBaud :: forall o (m :: * -> *).
(IsSettingSerial o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructSettingSerialBaud Word32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"baud" Word32
val

#if defined(ENABLE_OVERLOADING)
data SettingSerialBaudPropertyInfo
instance AttrInfo SettingSerialBaudPropertyInfo where
    type AttrAllowedOps SettingSerialBaudPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SettingSerialBaudPropertyInfo = IsSettingSerial
    type AttrSetTypeConstraint SettingSerialBaudPropertyInfo = (~) Word32
    type AttrTransferTypeConstraint SettingSerialBaudPropertyInfo = (~) Word32
    type AttrTransferType SettingSerialBaudPropertyInfo = Word32
    type AttrGetType SettingSerialBaudPropertyInfo = Word32
    type AttrLabel SettingSerialBaudPropertyInfo = "baud"
    type AttrOrigin SettingSerialBaudPropertyInfo = SettingSerial
    attrGet = getSettingSerialBaud
    attrSet = setSettingSerialBaud
    attrTransfer _ v = do
        return v
    attrConstruct = constructSettingSerialBaud
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.SettingSerial.baud"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingSerial.html#g:attr:baud"
        })
#endif

-- VVV Prop "bits"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@bits@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' settingSerial #bits
-- @
getSettingSerialBits :: (MonadIO m, IsSettingSerial o) => o -> m Word32
getSettingSerialBits :: forall (m :: * -> *) o.
(MonadIO m, IsSettingSerial o) =>
o -> m Word32
getSettingSerialBits 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
"bits"

-- | Set the value of the “@bits@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' settingSerial [ #bits 'Data.GI.Base.Attributes.:=' value ]
-- @
setSettingSerialBits :: (MonadIO m, IsSettingSerial o) => o -> Word32 -> m ()
setSettingSerialBits :: forall (m :: * -> *) o.
(MonadIO m, IsSettingSerial o) =>
o -> Word32 -> m ()
setSettingSerialBits o
obj Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"bits" Word32
val

-- | Construct a t'GValueConstruct' with valid value for the “@bits@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSettingSerialBits :: (IsSettingSerial o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructSettingSerialBits :: forall o (m :: * -> *).
(IsSettingSerial o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructSettingSerialBits Word32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"bits" Word32
val

#if defined(ENABLE_OVERLOADING)
data SettingSerialBitsPropertyInfo
instance AttrInfo SettingSerialBitsPropertyInfo where
    type AttrAllowedOps SettingSerialBitsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SettingSerialBitsPropertyInfo = IsSettingSerial
    type AttrSetTypeConstraint SettingSerialBitsPropertyInfo = (~) Word32
    type AttrTransferTypeConstraint SettingSerialBitsPropertyInfo = (~) Word32
    type AttrTransferType SettingSerialBitsPropertyInfo = Word32
    type AttrGetType SettingSerialBitsPropertyInfo = Word32
    type AttrLabel SettingSerialBitsPropertyInfo = "bits"
    type AttrOrigin SettingSerialBitsPropertyInfo = SettingSerial
    attrGet = getSettingSerialBits
    attrSet = setSettingSerialBits
    attrTransfer _ v = do
        return v
    attrConstruct = constructSettingSerialBits
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.SettingSerial.bits"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingSerial.html#g:attr:bits"
        })
#endif

-- VVV Prop "parity"
   -- Type: TInterface (Name {namespace = "NM", name = "SettingSerialParity"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@parity@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' settingSerial #parity
-- @
getSettingSerialParity :: (MonadIO m, IsSettingSerial o) => o -> m NM.Enums.SettingSerialParity
getSettingSerialParity :: forall (m :: * -> *) o.
(MonadIO m, IsSettingSerial o) =>
o -> m SettingSerialParity
getSettingSerialParity o
obj = IO SettingSerialParity -> m SettingSerialParity
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO SettingSerialParity -> m SettingSerialParity)
-> IO SettingSerialParity -> m SettingSerialParity
forall a b. (a -> b) -> a -> b
$ o -> String -> IO SettingSerialParity
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"parity"

-- | Set the value of the “@parity@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' settingSerial [ #parity 'Data.GI.Base.Attributes.:=' value ]
-- @
setSettingSerialParity :: (MonadIO m, IsSettingSerial o) => o -> NM.Enums.SettingSerialParity -> m ()
setSettingSerialParity :: forall (m :: * -> *) o.
(MonadIO m, IsSettingSerial o) =>
o -> SettingSerialParity -> m ()
setSettingSerialParity o
obj SettingSerialParity
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> SettingSerialParity -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"parity" SettingSerialParity
val

-- | Construct a t'GValueConstruct' with valid value for the “@parity@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSettingSerialParity :: (IsSettingSerial o, MIO.MonadIO m) => NM.Enums.SettingSerialParity -> m (GValueConstruct o)
constructSettingSerialParity :: forall o (m :: * -> *).
(IsSettingSerial o, MonadIO m) =>
SettingSerialParity -> m (GValueConstruct o)
constructSettingSerialParity SettingSerialParity
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> SettingSerialParity -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"parity" SettingSerialParity
val

#if defined(ENABLE_OVERLOADING)
data SettingSerialParityPropertyInfo
instance AttrInfo SettingSerialParityPropertyInfo where
    type AttrAllowedOps SettingSerialParityPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SettingSerialParityPropertyInfo = IsSettingSerial
    type AttrSetTypeConstraint SettingSerialParityPropertyInfo = (~) NM.Enums.SettingSerialParity
    type AttrTransferTypeConstraint SettingSerialParityPropertyInfo = (~) NM.Enums.SettingSerialParity
    type AttrTransferType SettingSerialParityPropertyInfo = NM.Enums.SettingSerialParity
    type AttrGetType SettingSerialParityPropertyInfo = NM.Enums.SettingSerialParity
    type AttrLabel SettingSerialParityPropertyInfo = "parity"
    type AttrOrigin SettingSerialParityPropertyInfo = SettingSerial
    attrGet = getSettingSerialParity
    attrSet = setSettingSerialParity
    attrTransfer _ v = do
        return v
    attrConstruct = constructSettingSerialParity
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.SettingSerial.parity"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingSerial.html#g:attr:parity"
        })
#endif

-- VVV Prop "send-delay"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Nothing)

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

-- | Set the value of the “@send-delay@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' settingSerial [ #sendDelay 'Data.GI.Base.Attributes.:=' value ]
-- @
setSettingSerialSendDelay :: (MonadIO m, IsSettingSerial o) => o -> Word64 -> m ()
setSettingSerialSendDelay :: forall (m :: * -> *) o.
(MonadIO m, IsSettingSerial o) =>
o -> Word64 -> m ()
setSettingSerialSendDelay o
obj Word64
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Word64 -> IO ()
forall a. GObject a => a -> String -> Word64 -> IO ()
B.Properties.setObjectPropertyUInt64 o
obj String
"send-delay" Word64
val

-- | Construct a t'GValueConstruct' with valid value for the “@send-delay@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSettingSerialSendDelay :: (IsSettingSerial o, MIO.MonadIO m) => Word64 -> m (GValueConstruct o)
constructSettingSerialSendDelay :: forall o (m :: * -> *).
(IsSettingSerial o, MonadIO m) =>
Word64 -> m (GValueConstruct o)
constructSettingSerialSendDelay Word64
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word64 -> IO (GValueConstruct o)
forall o. String -> Word64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt64 String
"send-delay" Word64
val

#if defined(ENABLE_OVERLOADING)
data SettingSerialSendDelayPropertyInfo
instance AttrInfo SettingSerialSendDelayPropertyInfo where
    type AttrAllowedOps SettingSerialSendDelayPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SettingSerialSendDelayPropertyInfo = IsSettingSerial
    type AttrSetTypeConstraint SettingSerialSendDelayPropertyInfo = (~) Word64
    type AttrTransferTypeConstraint SettingSerialSendDelayPropertyInfo = (~) Word64
    type AttrTransferType SettingSerialSendDelayPropertyInfo = Word64
    type AttrGetType SettingSerialSendDelayPropertyInfo = Word64
    type AttrLabel SettingSerialSendDelayPropertyInfo = "send-delay"
    type AttrOrigin SettingSerialSendDelayPropertyInfo = SettingSerial
    attrGet = getSettingSerialSendDelay
    attrSet = setSettingSerialSendDelay
    attrTransfer _ v = do
        return v
    attrConstruct = constructSettingSerialSendDelay
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.SettingSerial.sendDelay"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingSerial.html#g:attr:sendDelay"
        })
#endif

-- VVV Prop "stopbits"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@stopbits@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' settingSerial #stopbits
-- @
getSettingSerialStopbits :: (MonadIO m, IsSettingSerial o) => o -> m Word32
getSettingSerialStopbits :: forall (m :: * -> *) o.
(MonadIO m, IsSettingSerial o) =>
o -> m Word32
getSettingSerialStopbits 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
"stopbits"

-- | Set the value of the “@stopbits@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' settingSerial [ #stopbits 'Data.GI.Base.Attributes.:=' value ]
-- @
setSettingSerialStopbits :: (MonadIO m, IsSettingSerial o) => o -> Word32 -> m ()
setSettingSerialStopbits :: forall (m :: * -> *) o.
(MonadIO m, IsSettingSerial o) =>
o -> Word32 -> m ()
setSettingSerialStopbits o
obj Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"stopbits" Word32
val

-- | Construct a t'GValueConstruct' with valid value for the “@stopbits@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSettingSerialStopbits :: (IsSettingSerial o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructSettingSerialStopbits :: forall o (m :: * -> *).
(IsSettingSerial o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructSettingSerialStopbits Word32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"stopbits" Word32
val

#if defined(ENABLE_OVERLOADING)
data SettingSerialStopbitsPropertyInfo
instance AttrInfo SettingSerialStopbitsPropertyInfo where
    type AttrAllowedOps SettingSerialStopbitsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SettingSerialStopbitsPropertyInfo = IsSettingSerial
    type AttrSetTypeConstraint SettingSerialStopbitsPropertyInfo = (~) Word32
    type AttrTransferTypeConstraint SettingSerialStopbitsPropertyInfo = (~) Word32
    type AttrTransferType SettingSerialStopbitsPropertyInfo = Word32
    type AttrGetType SettingSerialStopbitsPropertyInfo = Word32
    type AttrLabel SettingSerialStopbitsPropertyInfo = "stopbits"
    type AttrOrigin SettingSerialStopbitsPropertyInfo = SettingSerial
    attrGet = getSettingSerialStopbits
    attrSet = setSettingSerialStopbits
    attrTransfer _ v = do
        return v
    attrConstruct = constructSettingSerialStopbits
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.SettingSerial.stopbits"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingSerial.html#g:attr:stopbits"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SettingSerial
type instance O.AttributeList SettingSerial = SettingSerialAttributeList
type SettingSerialAttributeList = ('[ '("baud", SettingSerialBaudPropertyInfo), '("bits", SettingSerialBitsPropertyInfo), '("name", NM.Setting.SettingNamePropertyInfo), '("parity", SettingSerialParityPropertyInfo), '("sendDelay", SettingSerialSendDelayPropertyInfo), '("stopbits", SettingSerialStopbitsPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
settingSerialBaud :: AttrLabelProxy "baud"
settingSerialBaud = AttrLabelProxy

settingSerialBits :: AttrLabelProxy "bits"
settingSerialBits = AttrLabelProxy

settingSerialParity :: AttrLabelProxy "parity"
settingSerialParity = AttrLabelProxy

settingSerialSendDelay :: AttrLabelProxy "sendDelay"
settingSerialSendDelay = AttrLabelProxy

settingSerialStopbits :: AttrLabelProxy "stopbits"
settingSerialStopbits = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList SettingSerial = SettingSerialSignalList
type SettingSerialSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

#endif

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

foreign import ccall "nm_setting_serial_new" nm_setting_serial_new :: 
    IO (Ptr SettingSerial)

-- | Creates a new t'GI.NM.Objects.SettingSerial.SettingSerial' object with default values.
settingSerialNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m SettingSerial
    -- ^ __Returns:__ the new empty t'GI.NM.Objects.SettingSerial.SettingSerial' object
settingSerialNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m SettingSerial
settingSerialNew  = IO SettingSerial -> m SettingSerial
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingSerial -> m SettingSerial)
-> IO SettingSerial -> m SettingSerial
forall a b. (a -> b) -> a -> b
$ do
    Ptr SettingSerial
result <- IO (Ptr SettingSerial)
nm_setting_serial_new
    Text -> Ptr SettingSerial -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"settingSerialNew" Ptr SettingSerial
result
    SettingSerial
result' <- ((ManagedPtr SettingSerial -> SettingSerial)
-> Ptr SettingSerial -> IO SettingSerial
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SettingSerial -> SettingSerial
SettingSerial) Ptr SettingSerial
result
    SettingSerial -> IO SettingSerial
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingSerial
result'

#if defined(ENABLE_OVERLOADING)
#endif

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

foreign import ccall "nm_setting_serial_get_baud" nm_setting_serial_get_baud :: 
    Ptr SettingSerial ->                    -- setting : TInterface (Name {namespace = "NM", name = "SettingSerial"})
    IO Word32

-- | /No description available in the introspection data./
settingSerialGetBaud ::
    (B.CallStack.HasCallStack, MonadIO m, IsSettingSerial a) =>
    a
    -- ^ /@setting@/: the t'GI.NM.Objects.SettingSerial.SettingSerial'
    -> m Word32
    -- ^ __Returns:__ the [SettingSerial:baud]("GI.NM.Objects.SettingSerial#g:attr:baud") property of the setting
settingSerialGetBaud :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingSerial a) =>
a -> m Word32
settingSerialGetBaud a
setting = 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 SettingSerial
setting' <- a -> IO (Ptr SettingSerial)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
    Word32
result <- Ptr SettingSerial -> IO Word32
nm_setting_serial_get_baud Ptr SettingSerial
setting'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data SettingSerialGetBaudMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsSettingSerial a) => O.OverloadedMethod SettingSerialGetBaudMethodInfo a signature where
    overloadedMethod = settingSerialGetBaud

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


#endif

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

foreign import ccall "nm_setting_serial_get_bits" nm_setting_serial_get_bits :: 
    Ptr SettingSerial ->                    -- setting : TInterface (Name {namespace = "NM", name = "SettingSerial"})
    IO Word32

-- | /No description available in the introspection data./
settingSerialGetBits ::
    (B.CallStack.HasCallStack, MonadIO m, IsSettingSerial a) =>
    a
    -- ^ /@setting@/: the t'GI.NM.Objects.SettingSerial.SettingSerial'
    -> m Word32
    -- ^ __Returns:__ the [SettingSerial:bits]("GI.NM.Objects.SettingSerial#g:attr:bits") property of the setting
settingSerialGetBits :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingSerial a) =>
a -> m Word32
settingSerialGetBits a
setting = 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 SettingSerial
setting' <- a -> IO (Ptr SettingSerial)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
    Word32
result <- Ptr SettingSerial -> IO Word32
nm_setting_serial_get_bits Ptr SettingSerial
setting'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data SettingSerialGetBitsMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsSettingSerial a) => O.OverloadedMethod SettingSerialGetBitsMethodInfo a signature where
    overloadedMethod = settingSerialGetBits

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


#endif

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

foreign import ccall "nm_setting_serial_get_parity" nm_setting_serial_get_parity :: 
    Ptr SettingSerial ->                    -- setting : TInterface (Name {namespace = "NM", name = "SettingSerial"})
    IO CUInt

-- | /No description available in the introspection data./
settingSerialGetParity ::
    (B.CallStack.HasCallStack, MonadIO m, IsSettingSerial a) =>
    a
    -- ^ /@setting@/: the t'GI.NM.Objects.SettingSerial.SettingSerial'
    -> m NM.Enums.SettingSerialParity
    -- ^ __Returns:__ the [SettingSerial:parity]("GI.NM.Objects.SettingSerial#g:attr:parity") property of the setting
settingSerialGetParity :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingSerial a) =>
a -> m SettingSerialParity
settingSerialGetParity a
setting = IO SettingSerialParity -> m SettingSerialParity
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingSerialParity -> m SettingSerialParity)
-> IO SettingSerialParity -> m SettingSerialParity
forall a b. (a -> b) -> a -> b
$ do
    Ptr SettingSerial
setting' <- a -> IO (Ptr SettingSerial)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
    CUInt
result <- Ptr SettingSerial -> IO CUInt
nm_setting_serial_get_parity Ptr SettingSerial
setting'
    let result' :: SettingSerialParity
result' = (Int -> SettingSerialParity
forall a. Enum a => Int -> a
toEnum (Int -> SettingSerialParity)
-> (CUInt -> Int) -> CUInt -> SettingSerialParity
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
    SettingSerialParity -> IO SettingSerialParity
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingSerialParity
result'

#if defined(ENABLE_OVERLOADING)
data SettingSerialGetParityMethodInfo
instance (signature ~ (m NM.Enums.SettingSerialParity), MonadIO m, IsSettingSerial a) => O.OverloadedMethod SettingSerialGetParityMethodInfo a signature where
    overloadedMethod = settingSerialGetParity

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


#endif

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

foreign import ccall "nm_setting_serial_get_send_delay" nm_setting_serial_get_send_delay :: 
    Ptr SettingSerial ->                    -- setting : TInterface (Name {namespace = "NM", name = "SettingSerial"})
    IO Word64

-- | /No description available in the introspection data./
settingSerialGetSendDelay ::
    (B.CallStack.HasCallStack, MonadIO m, IsSettingSerial a) =>
    a
    -- ^ /@setting@/: the t'GI.NM.Objects.SettingSerial.SettingSerial'
    -> m Word64
    -- ^ __Returns:__ the [SettingSerial:sendDelay]("GI.NM.Objects.SettingSerial#g:attr:sendDelay") property of the setting
settingSerialGetSendDelay :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingSerial a) =>
a -> m Word64
settingSerialGetSendDelay a
setting = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr SettingSerial
setting' <- a -> IO (Ptr SettingSerial)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
    Word64
result <- Ptr SettingSerial -> IO Word64
nm_setting_serial_get_send_delay Ptr SettingSerial
setting'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data SettingSerialGetSendDelayMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsSettingSerial a) => O.OverloadedMethod SettingSerialGetSendDelayMethodInfo a signature where
    overloadedMethod = settingSerialGetSendDelay

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


#endif

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

foreign import ccall "nm_setting_serial_get_stopbits" nm_setting_serial_get_stopbits :: 
    Ptr SettingSerial ->                    -- setting : TInterface (Name {namespace = "NM", name = "SettingSerial"})
    IO Word32

-- | /No description available in the introspection data./
settingSerialGetStopbits ::
    (B.CallStack.HasCallStack, MonadIO m, IsSettingSerial a) =>
    a
    -- ^ /@setting@/: the t'GI.NM.Objects.SettingSerial.SettingSerial'
    -> m Word32
    -- ^ __Returns:__ the [SettingSerial:stopbits]("GI.NM.Objects.SettingSerial#g:attr:stopbits") property of the setting
settingSerialGetStopbits :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingSerial a) =>
a -> m Word32
settingSerialGetStopbits a
setting = 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 SettingSerial
setting' <- a -> IO (Ptr SettingSerial)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
    Word32
result <- Ptr SettingSerial -> IO Word32
nm_setting_serial_get_stopbits Ptr SettingSerial
setting'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data SettingSerialGetStopbitsMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsSettingSerial a) => O.OverloadedMethod SettingSerialGetStopbitsMethodInfo a signature where
    overloadedMethod = settingSerialGetStopbits

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


#endif