{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Hostname settings
-- 
-- /Since: 1.30/

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

module GI.NM.Objects.SettingHostname
    ( 

-- * Exported types
    SettingHostname(..)                     ,
    IsSettingHostname                       ,
    toSettingHostname                       ,


 -- * 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
-- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDbusPropertyType]("GI.NM.Objects.Setting#g:method:getDbusPropertyType"), [getFromDhcp]("GI.NM.Objects.SettingHostname#g:method:getFromDhcp"), [getFromDnsLookup]("GI.NM.Objects.SettingHostname#g:method:getFromDnsLookup"), [getName]("GI.NM.Objects.Setting#g:method:getName"), [getOnlyFromDefault]("GI.NM.Objects.SettingHostname#g:method:getOnlyFromDefault"), [getPriority]("GI.NM.Objects.SettingHostname#g:method:getPriority"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getSecretFlags]("GI.NM.Objects.Setting#g:method:getSecretFlags").
-- 
-- ==== 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)
    ResolveSettingHostnameMethod            ,
#endif

-- ** getFromDhcp #method:getFromDhcp#

#if defined(ENABLE_OVERLOADING)
    SettingHostnameGetFromDhcpMethodInfo    ,
#endif
    settingHostnameGetFromDhcp              ,


-- ** getFromDnsLookup #method:getFromDnsLookup#

#if defined(ENABLE_OVERLOADING)
    SettingHostnameGetFromDnsLookupMethodInfo,
#endif
    settingHostnameGetFromDnsLookup         ,


-- ** getOnlyFromDefault #method:getOnlyFromDefault#

#if defined(ENABLE_OVERLOADING)
    SettingHostnameGetOnlyFromDefaultMethodInfo,
#endif
    settingHostnameGetOnlyFromDefault       ,


-- ** getPriority #method:getPriority#

#if defined(ENABLE_OVERLOADING)
    SettingHostnameGetPriorityMethodInfo    ,
#endif
    settingHostnameGetPriority              ,


-- ** new #method:new#

    settingHostnameNew                      ,




 -- * Properties


-- ** fromDhcp #attr:fromDhcp#
-- | Whether the system hostname can be determined from DHCP on
-- this connection.
-- 
-- When set to 'GI.NM.Enums.TernaryDefault', the value from global configuration
-- is used. If the property doesn\'t have a value in the global
-- configuration, NetworkManager assumes the value to be 'GI.NM.Enums.TernaryTrue'.
-- 
-- /Since: 1.30/

#if defined(ENABLE_OVERLOADING)
    SettingHostnameFromDhcpPropertyInfo     ,
#endif
    constructSettingHostnameFromDhcp        ,
    getSettingHostnameFromDhcp              ,
    setSettingHostnameFromDhcp              ,
#if defined(ENABLE_OVERLOADING)
    settingHostnameFromDhcp                 ,
#endif


-- ** fromDnsLookup #attr:fromDnsLookup#
-- | Whether the system hostname can be determined from reverse
-- DNS lookup of addresses on this device.
-- 
-- When set to 'GI.NM.Enums.TernaryDefault', the value from global configuration
-- is used. If the property doesn\'t have a value in the global
-- configuration, NetworkManager assumes the value to be 'GI.NM.Enums.TernaryTrue'.
-- 
-- /Since: 1.30/

#if defined(ENABLE_OVERLOADING)
    SettingHostnameFromDnsLookupPropertyInfo,
#endif
    constructSettingHostnameFromDnsLookup   ,
    getSettingHostnameFromDnsLookup         ,
    setSettingHostnameFromDnsLookup         ,
#if defined(ENABLE_OVERLOADING)
    settingHostnameFromDnsLookup            ,
#endif


-- ** onlyFromDefault #attr:onlyFromDefault#
-- | If set to 'GI.NM.Enums.TernaryTrue', NetworkManager attempts to get
-- the hostname via DHCPv4\/DHCPv6 or reverse DNS lookup on this
-- device only when the device has the default route for the given
-- address family (IPv4\/IPv6).
-- 
-- If set to 'GI.NM.Enums.TernaryFalse', the hostname can be set from this
-- device even if it doesn\'t have the default route.
-- 
-- When set to 'GI.NM.Enums.TernaryDefault', the value from global configuration
-- is used. If the property doesn\'t have a value in the global
-- configuration, NetworkManager assumes the value to be 'GI.NM.Enums.TernaryFalse'.
-- 
-- /Since: 1.30/

#if defined(ENABLE_OVERLOADING)
    SettingHostnameOnlyFromDefaultPropertyInfo,
#endif
    constructSettingHostnameOnlyFromDefault ,
    getSettingHostnameOnlyFromDefault       ,
    setSettingHostnameOnlyFromDefault       ,
#if defined(ENABLE_OVERLOADING)
    settingHostnameOnlyFromDefault          ,
#endif


-- ** priority #attr:priority#
-- | The relative priority of this connection to determine the
-- system hostname. A lower numerical value is better (higher
-- priority).  A connection with higher priority is considered
-- before connections with lower priority.
-- 
-- If the value is zero, it can be overridden by a global value
-- from NetworkManager configuration. If the property doesn\'t have
-- a value in the global configuration, the value is assumed to be
-- 100.
-- 
-- Negative values have the special effect of excluding other
-- connections with a greater numerical priority value; so in
-- presence of at least one negative priority, only connections
-- with the lowest priority value will be used to determine the
-- hostname.
-- 
-- /Since: 1.30/

#if defined(ENABLE_OVERLOADING)
    SettingHostnamePriorityPropertyInfo     ,
#endif
    constructSettingHostnamePriority        ,
    getSettingHostnamePriority              ,
    setSettingHostnamePriority              ,
#if defined(ENABLE_OVERLOADING)
    settingHostnamePriority                 ,
#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.SettingSerial as NM.SettingSerial
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTCConfig as NM.SettingTCConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeam as NM.SettingTeam
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeamPort as NM.SettingTeamPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTun as NM.SettingTun
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVlan as NM.SettingVlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVpn as NM.SettingVpn
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVxlan as NM.SettingVxlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWimax as NM.SettingWimax
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWired as NM.SettingWired
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWireless as NM.SettingWireless
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWirelessSecurity as NM.SettingWirelessSecurity
import {-# SOURCE #-} qualified GI.NM.Structs.BridgeVlan as NM.BridgeVlan
import {-# SOURCE #-} qualified GI.NM.Structs.IPAddress as NM.IPAddress
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoute as NM.IPRoute
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoutingRule as NM.IPRoutingRule
import {-# SOURCE #-} qualified GI.NM.Structs.Range as NM.Range
import {-# SOURCE #-} qualified GI.NM.Structs.TCAction as NM.TCAction
import {-# SOURCE #-} qualified GI.NM.Structs.TCQdisc as NM.TCQdisc
import {-# SOURCE #-} qualified GI.NM.Structs.TCTfilter as NM.TCTfilter
import {-# SOURCE #-} qualified GI.NM.Structs.TeamLinkWatcher as NM.TeamLinkWatcher
import {-# SOURCE #-} qualified GI.NM.Structs.VariantAttributeSpec as NM.VariantAttributeSpec

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

#endif

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

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

foreign import ccall "nm_setting_hostname_get_type"
    c_nm_setting_hostname_get_type :: IO B.Types.GType

instance B.Types.TypedObject SettingHostname where
    glibType :: IO GType
glibType = IO GType
c_nm_setting_hostname_get_type

instance B.Types.GObject SettingHostname

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

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

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

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

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

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

#endif

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

#endif

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

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

-- | Set the value of the “@from-dhcp@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' settingHostname [ #fromDhcp 'Data.GI.Base.Attributes.:=' value ]
-- @
setSettingHostnameFromDhcp :: (MonadIO m, IsSettingHostname o) => o -> NM.Enums.Ternary -> m ()
setSettingHostnameFromDhcp :: forall (m :: * -> *) o.
(MonadIO m, IsSettingHostname o) =>
o -> Ternary -> m ()
setSettingHostnameFromDhcp o
obj Ternary
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 -> Ternary -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"from-dhcp" Ternary
val

-- | Construct a t'GValueConstruct' with valid value for the “@from-dhcp@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSettingHostnameFromDhcp :: (IsSettingHostname o, MIO.MonadIO m) => NM.Enums.Ternary -> m (GValueConstruct o)
constructSettingHostnameFromDhcp :: forall o (m :: * -> *).
(IsSettingHostname o, MonadIO m) =>
Ternary -> m (GValueConstruct o)
constructSettingHostnameFromDhcp Ternary
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 -> Ternary -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"from-dhcp" Ternary
val

#if defined(ENABLE_OVERLOADING)
data SettingHostnameFromDhcpPropertyInfo
instance AttrInfo SettingHostnameFromDhcpPropertyInfo where
    type AttrAllowedOps SettingHostnameFromDhcpPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SettingHostnameFromDhcpPropertyInfo = IsSettingHostname
    type AttrSetTypeConstraint SettingHostnameFromDhcpPropertyInfo = (~) NM.Enums.Ternary
    type AttrTransferTypeConstraint SettingHostnameFromDhcpPropertyInfo = (~) NM.Enums.Ternary
    type AttrTransferType SettingHostnameFromDhcpPropertyInfo = NM.Enums.Ternary
    type AttrGetType SettingHostnameFromDhcpPropertyInfo = NM.Enums.Ternary
    type AttrLabel SettingHostnameFromDhcpPropertyInfo = "from-dhcp"
    type AttrOrigin SettingHostnameFromDhcpPropertyInfo = SettingHostname
    attrGet = getSettingHostnameFromDhcp
    attrSet = setSettingHostnameFromDhcp
    attrTransfer _ v = do
        return v
    attrConstruct = constructSettingHostnameFromDhcp
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.SettingHostname.fromDhcp"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingHostname.html#g:attr:fromDhcp"
        })
#endif

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

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

-- | Set the value of the “@from-dns-lookup@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' settingHostname [ #fromDnsLookup 'Data.GI.Base.Attributes.:=' value ]
-- @
setSettingHostnameFromDnsLookup :: (MonadIO m, IsSettingHostname o) => o -> NM.Enums.Ternary -> m ()
setSettingHostnameFromDnsLookup :: forall (m :: * -> *) o.
(MonadIO m, IsSettingHostname o) =>
o -> Ternary -> m ()
setSettingHostnameFromDnsLookup o
obj Ternary
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 -> Ternary -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"from-dns-lookup" Ternary
val

-- | Construct a t'GValueConstruct' with valid value for the “@from-dns-lookup@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSettingHostnameFromDnsLookup :: (IsSettingHostname o, MIO.MonadIO m) => NM.Enums.Ternary -> m (GValueConstruct o)
constructSettingHostnameFromDnsLookup :: forall o (m :: * -> *).
(IsSettingHostname o, MonadIO m) =>
Ternary -> m (GValueConstruct o)
constructSettingHostnameFromDnsLookup Ternary
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 -> Ternary -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"from-dns-lookup" Ternary
val

#if defined(ENABLE_OVERLOADING)
data SettingHostnameFromDnsLookupPropertyInfo
instance AttrInfo SettingHostnameFromDnsLookupPropertyInfo where
    type AttrAllowedOps SettingHostnameFromDnsLookupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SettingHostnameFromDnsLookupPropertyInfo = IsSettingHostname
    type AttrSetTypeConstraint SettingHostnameFromDnsLookupPropertyInfo = (~) NM.Enums.Ternary
    type AttrTransferTypeConstraint SettingHostnameFromDnsLookupPropertyInfo = (~) NM.Enums.Ternary
    type AttrTransferType SettingHostnameFromDnsLookupPropertyInfo = NM.Enums.Ternary
    type AttrGetType SettingHostnameFromDnsLookupPropertyInfo = NM.Enums.Ternary
    type AttrLabel SettingHostnameFromDnsLookupPropertyInfo = "from-dns-lookup"
    type AttrOrigin SettingHostnameFromDnsLookupPropertyInfo = SettingHostname
    attrGet = getSettingHostnameFromDnsLookup
    attrSet = setSettingHostnameFromDnsLookup
    attrTransfer _ v = do
        return v
    attrConstruct = constructSettingHostnameFromDnsLookup
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.SettingHostname.fromDnsLookup"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingHostname.html#g:attr:fromDnsLookup"
        })
#endif

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

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

-- | Set the value of the “@only-from-default@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' settingHostname [ #onlyFromDefault 'Data.GI.Base.Attributes.:=' value ]
-- @
setSettingHostnameOnlyFromDefault :: (MonadIO m, IsSettingHostname o) => o -> NM.Enums.Ternary -> m ()
setSettingHostnameOnlyFromDefault :: forall (m :: * -> *) o.
(MonadIO m, IsSettingHostname o) =>
o -> Ternary -> m ()
setSettingHostnameOnlyFromDefault o
obj Ternary
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 -> Ternary -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"only-from-default" Ternary
val

-- | Construct a t'GValueConstruct' with valid value for the “@only-from-default@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSettingHostnameOnlyFromDefault :: (IsSettingHostname o, MIO.MonadIO m) => NM.Enums.Ternary -> m (GValueConstruct o)
constructSettingHostnameOnlyFromDefault :: forall o (m :: * -> *).
(IsSettingHostname o, MonadIO m) =>
Ternary -> m (GValueConstruct o)
constructSettingHostnameOnlyFromDefault Ternary
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 -> Ternary -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"only-from-default" Ternary
val

#if defined(ENABLE_OVERLOADING)
data SettingHostnameOnlyFromDefaultPropertyInfo
instance AttrInfo SettingHostnameOnlyFromDefaultPropertyInfo where
    type AttrAllowedOps SettingHostnameOnlyFromDefaultPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SettingHostnameOnlyFromDefaultPropertyInfo = IsSettingHostname
    type AttrSetTypeConstraint SettingHostnameOnlyFromDefaultPropertyInfo = (~) NM.Enums.Ternary
    type AttrTransferTypeConstraint SettingHostnameOnlyFromDefaultPropertyInfo = (~) NM.Enums.Ternary
    type AttrTransferType SettingHostnameOnlyFromDefaultPropertyInfo = NM.Enums.Ternary
    type AttrGetType SettingHostnameOnlyFromDefaultPropertyInfo = NM.Enums.Ternary
    type AttrLabel SettingHostnameOnlyFromDefaultPropertyInfo = "only-from-default"
    type AttrOrigin SettingHostnameOnlyFromDefaultPropertyInfo = SettingHostname
    attrGet = getSettingHostnameOnlyFromDefault
    attrSet = setSettingHostnameOnlyFromDefault
    attrTransfer _ v = do
        return v
    attrConstruct = constructSettingHostnameOnlyFromDefault
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.SettingHostname.onlyFromDefault"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingHostname.html#g:attr:onlyFromDefault"
        })
#endif

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

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

-- | Set the value of the “@priority@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' settingHostname [ #priority 'Data.GI.Base.Attributes.:=' value ]
-- @
setSettingHostnamePriority :: (MonadIO m, IsSettingHostname o) => o -> Int32 -> m ()
setSettingHostnamePriority :: forall (m :: * -> *) o.
(MonadIO m, IsSettingHostname o) =>
o -> Int32 -> m ()
setSettingHostnamePriority o
obj Int32
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 -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"priority" Int32
val

-- | Construct a t'GValueConstruct' with valid value for the “@priority@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSettingHostnamePriority :: (IsSettingHostname o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructSettingHostnamePriority :: forall o (m :: * -> *).
(IsSettingHostname o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructSettingHostnamePriority Int32
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 -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"priority" Int32
val

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

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SettingHostname
type instance O.AttributeList SettingHostname = SettingHostnameAttributeList
type SettingHostnameAttributeList = ('[ '("fromDhcp", SettingHostnameFromDhcpPropertyInfo), '("fromDnsLookup", SettingHostnameFromDnsLookupPropertyInfo), '("name", NM.Setting.SettingNamePropertyInfo), '("onlyFromDefault", SettingHostnameOnlyFromDefaultPropertyInfo), '("priority", SettingHostnamePriorityPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
settingHostnameFromDhcp :: AttrLabelProxy "fromDhcp"
settingHostnameFromDhcp = AttrLabelProxy

settingHostnameFromDnsLookup :: AttrLabelProxy "fromDnsLookup"
settingHostnameFromDnsLookup = AttrLabelProxy

settingHostnameOnlyFromDefault :: AttrLabelProxy "onlyFromDefault"
settingHostnameOnlyFromDefault = AttrLabelProxy

settingHostnamePriority :: AttrLabelProxy "priority"
settingHostnamePriority = AttrLabelProxy

#endif

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

#endif

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

foreign import ccall "nm_setting_hostname_new" nm_setting_hostname_new :: 
    IO (Ptr SettingHostname)

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

#if defined(ENABLE_OVERLOADING)
#endif

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

foreign import ccall "nm_setting_hostname_get_from_dhcp" nm_setting_hostname_get_from_dhcp :: 
    Ptr SettingHostname ->                  -- setting : TInterface (Name {namespace = "NM", name = "SettingHostname"})
    IO CInt

-- | Returns the value contained in the [SettingHostname:fromDhcp]("GI.NM.Objects.SettingHostname#g:attr:fromDhcp")
-- property.
-- 
-- /Since: 1.30/
settingHostnameGetFromDhcp ::
    (B.CallStack.HasCallStack, MonadIO m, IsSettingHostname a) =>
    a
    -- ^ /@setting@/: the t'GI.NM.Objects.SettingHostname.SettingHostname'
    -> m NM.Enums.Ternary
    -- ^ __Returns:__ the \'from-dhcp\' property value
settingHostnameGetFromDhcp :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingHostname a) =>
a -> m Ternary
settingHostnameGetFromDhcp a
setting = IO Ternary -> m Ternary
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Ternary -> m Ternary) -> IO Ternary -> m Ternary
forall a b. (a -> b) -> a -> b
$ do
    Ptr SettingHostname
setting' <- a -> IO (Ptr SettingHostname)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
    CInt
result <- Ptr SettingHostname -> IO CInt
nm_setting_hostname_get_from_dhcp Ptr SettingHostname
setting'
    let result' :: Ternary
result' = (Int -> Ternary
forall a. Enum a => Int -> a
toEnum (Int -> Ternary) -> (CInt -> Int) -> CInt -> Ternary
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
    Ternary -> IO Ternary
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ternary
result'

#if defined(ENABLE_OVERLOADING)
data SettingHostnameGetFromDhcpMethodInfo
instance (signature ~ (m NM.Enums.Ternary), MonadIO m, IsSettingHostname a) => O.OverloadedMethod SettingHostnameGetFromDhcpMethodInfo a signature where
    overloadedMethod = settingHostnameGetFromDhcp

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


#endif

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

foreign import ccall "nm_setting_hostname_get_from_dns_lookup" nm_setting_hostname_get_from_dns_lookup :: 
    Ptr SettingHostname ->                  -- setting : TInterface (Name {namespace = "NM", name = "SettingHostname"})
    IO CInt

-- | Returns the value contained in the [SettingHostname:fromDnsLookup]("GI.NM.Objects.SettingHostname#g:attr:fromDnsLookup")
-- property.
-- 
-- /Since: 1.30/
settingHostnameGetFromDnsLookup ::
    (B.CallStack.HasCallStack, MonadIO m, IsSettingHostname a) =>
    a
    -- ^ /@setting@/: the t'GI.NM.Objects.SettingHostname.SettingHostname'
    -> m NM.Enums.Ternary
    -- ^ __Returns:__ the \'from-dns-lookup\' property value
settingHostnameGetFromDnsLookup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingHostname a) =>
a -> m Ternary
settingHostnameGetFromDnsLookup a
setting = IO Ternary -> m Ternary
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Ternary -> m Ternary) -> IO Ternary -> m Ternary
forall a b. (a -> b) -> a -> b
$ do
    Ptr SettingHostname
setting' <- a -> IO (Ptr SettingHostname)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
    CInt
result <- Ptr SettingHostname -> IO CInt
nm_setting_hostname_get_from_dns_lookup Ptr SettingHostname
setting'
    let result' :: Ternary
result' = (Int -> Ternary
forall a. Enum a => Int -> a
toEnum (Int -> Ternary) -> (CInt -> Int) -> CInt -> Ternary
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
    Ternary -> IO Ternary
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ternary
result'

#if defined(ENABLE_OVERLOADING)
data SettingHostnameGetFromDnsLookupMethodInfo
instance (signature ~ (m NM.Enums.Ternary), MonadIO m, IsSettingHostname a) => O.OverloadedMethod SettingHostnameGetFromDnsLookupMethodInfo a signature where
    overloadedMethod = settingHostnameGetFromDnsLookup

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


#endif

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

foreign import ccall "nm_setting_hostname_get_only_from_default" nm_setting_hostname_get_only_from_default :: 
    Ptr SettingHostname ->                  -- setting : TInterface (Name {namespace = "NM", name = "SettingHostname"})
    IO CInt

-- | Returns the value contained in the [SettingHostname:onlyFromDefault]("GI.NM.Objects.SettingHostname#g:attr:onlyFromDefault")
-- property.
-- 
-- /Since: 1.30/
settingHostnameGetOnlyFromDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsSettingHostname a) =>
    a
    -- ^ /@setting@/: the t'GI.NM.Objects.SettingHostname.SettingHostname'
    -> m NM.Enums.Ternary
    -- ^ __Returns:__ the \'only-from-default\' property value
settingHostnameGetOnlyFromDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingHostname a) =>
a -> m Ternary
settingHostnameGetOnlyFromDefault a
setting = IO Ternary -> m Ternary
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Ternary -> m Ternary) -> IO Ternary -> m Ternary
forall a b. (a -> b) -> a -> b
$ do
    Ptr SettingHostname
setting' <- a -> IO (Ptr SettingHostname)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
    CInt
result <- Ptr SettingHostname -> IO CInt
nm_setting_hostname_get_only_from_default Ptr SettingHostname
setting'
    let result' :: Ternary
result' = (Int -> Ternary
forall a. Enum a => Int -> a
toEnum (Int -> Ternary) -> (CInt -> Int) -> CInt -> Ternary
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
    Ternary -> IO Ternary
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ternary
result'

#if defined(ENABLE_OVERLOADING)
data SettingHostnameGetOnlyFromDefaultMethodInfo
instance (signature ~ (m NM.Enums.Ternary), MonadIO m, IsSettingHostname a) => O.OverloadedMethod SettingHostnameGetOnlyFromDefaultMethodInfo a signature where
    overloadedMethod = settingHostnameGetOnlyFromDefault

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


#endif

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

foreign import ccall "nm_setting_hostname_get_priority" nm_setting_hostname_get_priority :: 
    Ptr SettingHostname ->                  -- setting : TInterface (Name {namespace = "NM", name = "SettingHostname"})
    IO Int32

-- | Returns the value contained in the [SettingHostname:priority]("GI.NM.Objects.SettingHostname#g:attr:priority")
-- property.
-- 
-- /Since: 1.30/
settingHostnameGetPriority ::
    (B.CallStack.HasCallStack, MonadIO m, IsSettingHostname a) =>
    a
    -- ^ /@setting@/: the t'GI.NM.Objects.SettingHostname.SettingHostname'
    -> m Int32
    -- ^ __Returns:__ the \'priority\' property value
settingHostnameGetPriority :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingHostname a) =>
a -> m Int32
settingHostnameGetPriority a
setting = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr SettingHostname
setting' <- a -> IO (Ptr SettingHostname)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
    Int32
result <- Ptr SettingHostname -> IO Int32
nm_setting_hostname_get_priority Ptr SettingHostname
setting'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
    Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data SettingHostnameGetPriorityMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSettingHostname a) => O.OverloadedMethod SettingHostnameGetPriorityMethodInfo a signature where
    overloadedMethod = settingHostnameGetPriority

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


#endif