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