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