{-# 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.AwsJobTimeoutConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsJobTimeoutConfig = AwsJobTimeoutConfig'
{
AwsJobTimeoutConfig -> Maybe Integer
inProgressTimeoutInMinutes :: Prelude.Maybe Prelude.Integer
}
deriving (AwsJobTimeoutConfig -> AwsJobTimeoutConfig -> Bool
(AwsJobTimeoutConfig -> AwsJobTimeoutConfig -> Bool)
-> (AwsJobTimeoutConfig -> AwsJobTimeoutConfig -> Bool)
-> Eq AwsJobTimeoutConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsJobTimeoutConfig -> AwsJobTimeoutConfig -> Bool
$c/= :: AwsJobTimeoutConfig -> AwsJobTimeoutConfig -> Bool
== :: AwsJobTimeoutConfig -> AwsJobTimeoutConfig -> Bool
$c== :: AwsJobTimeoutConfig -> AwsJobTimeoutConfig -> Bool
Prelude.Eq, ReadPrec [AwsJobTimeoutConfig]
ReadPrec AwsJobTimeoutConfig
Int -> ReadS AwsJobTimeoutConfig
ReadS [AwsJobTimeoutConfig]
(Int -> ReadS AwsJobTimeoutConfig)
-> ReadS [AwsJobTimeoutConfig]
-> ReadPrec AwsJobTimeoutConfig
-> ReadPrec [AwsJobTimeoutConfig]
-> Read AwsJobTimeoutConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsJobTimeoutConfig]
$creadListPrec :: ReadPrec [AwsJobTimeoutConfig]
readPrec :: ReadPrec AwsJobTimeoutConfig
$creadPrec :: ReadPrec AwsJobTimeoutConfig
readList :: ReadS [AwsJobTimeoutConfig]
$creadList :: ReadS [AwsJobTimeoutConfig]
readsPrec :: Int -> ReadS AwsJobTimeoutConfig
$creadsPrec :: Int -> ReadS AwsJobTimeoutConfig
Prelude.Read, Int -> AwsJobTimeoutConfig -> ShowS
[AwsJobTimeoutConfig] -> ShowS
AwsJobTimeoutConfig -> String
(Int -> AwsJobTimeoutConfig -> ShowS)
-> (AwsJobTimeoutConfig -> String)
-> ([AwsJobTimeoutConfig] -> ShowS)
-> Show AwsJobTimeoutConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsJobTimeoutConfig] -> ShowS
$cshowList :: [AwsJobTimeoutConfig] -> ShowS
show :: AwsJobTimeoutConfig -> String
$cshow :: AwsJobTimeoutConfig -> String
showsPrec :: Int -> AwsJobTimeoutConfig -> ShowS
$cshowsPrec :: Int -> AwsJobTimeoutConfig -> ShowS
Prelude.Show, (forall x. AwsJobTimeoutConfig -> Rep AwsJobTimeoutConfig x)
-> (forall x. Rep AwsJobTimeoutConfig x -> AwsJobTimeoutConfig)
-> Generic AwsJobTimeoutConfig
forall x. Rep AwsJobTimeoutConfig x -> AwsJobTimeoutConfig
forall x. AwsJobTimeoutConfig -> Rep AwsJobTimeoutConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AwsJobTimeoutConfig x -> AwsJobTimeoutConfig
$cfrom :: forall x. AwsJobTimeoutConfig -> Rep AwsJobTimeoutConfig x
Prelude.Generic)
newAwsJobTimeoutConfig ::
AwsJobTimeoutConfig
newAwsJobTimeoutConfig :: AwsJobTimeoutConfig
newAwsJobTimeoutConfig =
AwsJobTimeoutConfig' :: Maybe Integer -> AwsJobTimeoutConfig
AwsJobTimeoutConfig'
{ $sel:inProgressTimeoutInMinutes:AwsJobTimeoutConfig' :: Maybe Integer
inProgressTimeoutInMinutes =
Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
awsJobTimeoutConfig_inProgressTimeoutInMinutes :: Lens.Lens' AwsJobTimeoutConfig (Prelude.Maybe Prelude.Integer)
awsJobTimeoutConfig_inProgressTimeoutInMinutes :: (Maybe Integer -> f (Maybe Integer))
-> AwsJobTimeoutConfig -> f AwsJobTimeoutConfig
awsJobTimeoutConfig_inProgressTimeoutInMinutes = (AwsJobTimeoutConfig -> Maybe Integer)
-> (AwsJobTimeoutConfig -> Maybe Integer -> AwsJobTimeoutConfig)
-> Lens
AwsJobTimeoutConfig
AwsJobTimeoutConfig
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsJobTimeoutConfig' {Maybe Integer
inProgressTimeoutInMinutes :: Maybe Integer
$sel:inProgressTimeoutInMinutes:AwsJobTimeoutConfig' :: AwsJobTimeoutConfig -> Maybe Integer
inProgressTimeoutInMinutes} -> Maybe Integer
inProgressTimeoutInMinutes) (\s :: AwsJobTimeoutConfig
s@AwsJobTimeoutConfig' {} Maybe Integer
a -> AwsJobTimeoutConfig
s {$sel:inProgressTimeoutInMinutes:AwsJobTimeoutConfig' :: Maybe Integer
inProgressTimeoutInMinutes = Maybe Integer
a} :: AwsJobTimeoutConfig)
instance Prelude.Hashable AwsJobTimeoutConfig
instance Prelude.NFData AwsJobTimeoutConfig
instance Core.ToJSON AwsJobTimeoutConfig where
toJSON :: AwsJobTimeoutConfig -> Value
toJSON AwsJobTimeoutConfig' {Maybe Integer
inProgressTimeoutInMinutes :: Maybe Integer
$sel:inProgressTimeoutInMinutes:AwsJobTimeoutConfig' :: AwsJobTimeoutConfig -> Maybe Integer
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"inProgressTimeoutInMinutes" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Integer -> Pair) -> Maybe Integer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
inProgressTimeoutInMinutes
]
)