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