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