{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.IoT.Types.TimeoutConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data TimeoutConfig = TimeoutConfig'
{
TimeoutConfig -> Maybe Integer
inProgressTimeoutInMinutes :: Prelude.Maybe Prelude.Integer
}
deriving (TimeoutConfig -> TimeoutConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimeoutConfig -> TimeoutConfig -> Bool
$c/= :: TimeoutConfig -> TimeoutConfig -> Bool
== :: TimeoutConfig -> TimeoutConfig -> Bool
$c== :: TimeoutConfig -> TimeoutConfig -> Bool
Prelude.Eq, ReadPrec [TimeoutConfig]
ReadPrec TimeoutConfig
Int -> ReadS TimeoutConfig
ReadS [TimeoutConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TimeoutConfig]
$creadListPrec :: ReadPrec [TimeoutConfig]
readPrec :: ReadPrec TimeoutConfig
$creadPrec :: ReadPrec TimeoutConfig
readList :: ReadS [TimeoutConfig]
$creadList :: ReadS [TimeoutConfig]
readsPrec :: Int -> ReadS TimeoutConfig
$creadsPrec :: Int -> ReadS TimeoutConfig
Prelude.Read, Int -> TimeoutConfig -> ShowS
[TimeoutConfig] -> ShowS
TimeoutConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimeoutConfig] -> ShowS
$cshowList :: [TimeoutConfig] -> ShowS
show :: TimeoutConfig -> String
$cshow :: TimeoutConfig -> String
showsPrec :: Int -> TimeoutConfig -> ShowS
$cshowsPrec :: Int -> TimeoutConfig -> ShowS
Prelude.Show, forall x. Rep TimeoutConfig x -> TimeoutConfig
forall x. TimeoutConfig -> Rep TimeoutConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TimeoutConfig x -> TimeoutConfig
$cfrom :: forall x. TimeoutConfig -> Rep TimeoutConfig x
Prelude.Generic)
newTimeoutConfig ::
TimeoutConfig
newTimeoutConfig :: TimeoutConfig
newTimeoutConfig =
TimeoutConfig'
{ $sel:inProgressTimeoutInMinutes:TimeoutConfig' :: Maybe Integer
inProgressTimeoutInMinutes =
forall a. Maybe a
Prelude.Nothing
}
timeoutConfig_inProgressTimeoutInMinutes :: Lens.Lens' TimeoutConfig (Prelude.Maybe Prelude.Integer)
timeoutConfig_inProgressTimeoutInMinutes :: Lens' TimeoutConfig (Maybe Integer)
timeoutConfig_inProgressTimeoutInMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimeoutConfig' {Maybe Integer
inProgressTimeoutInMinutes :: Maybe Integer
$sel:inProgressTimeoutInMinutes:TimeoutConfig' :: TimeoutConfig -> Maybe Integer
inProgressTimeoutInMinutes} -> Maybe Integer
inProgressTimeoutInMinutes) (\s :: TimeoutConfig
s@TimeoutConfig' {} Maybe Integer
a -> TimeoutConfig
s {$sel:inProgressTimeoutInMinutes:TimeoutConfig' :: Maybe Integer
inProgressTimeoutInMinutes = Maybe Integer
a} :: TimeoutConfig)
instance Data.FromJSON TimeoutConfig where
parseJSON :: Value -> Parser TimeoutConfig
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TimeoutConfig"
( \Object
x ->
Maybe Integer -> TimeoutConfig
TimeoutConfig'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"inProgressTimeoutInMinutes")
)
instance Prelude.Hashable TimeoutConfig where
hashWithSalt :: Int -> TimeoutConfig -> Int
hashWithSalt Int
_salt TimeoutConfig' {Maybe Integer
inProgressTimeoutInMinutes :: Maybe Integer
$sel:inProgressTimeoutInMinutes:TimeoutConfig' :: TimeoutConfig -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
inProgressTimeoutInMinutes
instance Prelude.NFData TimeoutConfig where
rnf :: TimeoutConfig -> ()
rnf TimeoutConfig' {Maybe Integer
inProgressTimeoutInMinutes :: Maybe Integer
$sel:inProgressTimeoutInMinutes:TimeoutConfig' :: TimeoutConfig -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
inProgressTimeoutInMinutes
instance Data.ToJSON TimeoutConfig where
toJSON :: TimeoutConfig -> Value
toJSON TimeoutConfig' {Maybe Integer
inProgressTimeoutInMinutes :: Maybe Integer
$sel:inProgressTimeoutInMinutes:TimeoutConfig' :: TimeoutConfig -> Maybe Integer
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"inProgressTimeoutInMinutes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
inProgressTimeoutInMinutes
]
)