{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SES.SendTemplatedEmail
(
SendTemplatedEmail (..),
newSendTemplatedEmail,
sendTemplatedEmail_returnPath,
sendTemplatedEmail_configurationSetName,
sendTemplatedEmail_sourceArn,
sendTemplatedEmail_returnPathArn,
sendTemplatedEmail_templateArn,
sendTemplatedEmail_tags,
sendTemplatedEmail_replyToAddresses,
sendTemplatedEmail_source,
sendTemplatedEmail_destination,
sendTemplatedEmail_template,
sendTemplatedEmail_templateData,
SendTemplatedEmailResponse (..),
newSendTemplatedEmailResponse,
sendTemplatedEmailResponse_httpStatus,
sendTemplatedEmailResponse_messageId,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types
data SendTemplatedEmail = SendTemplatedEmail'
{
SendTemplatedEmail -> Maybe Text
returnPath :: Prelude.Maybe Prelude.Text,
SendTemplatedEmail -> Maybe Text
configurationSetName :: Prelude.Maybe Prelude.Text,
SendTemplatedEmail -> Maybe Text
sourceArn :: Prelude.Maybe Prelude.Text,
SendTemplatedEmail -> Maybe Text
returnPathArn :: Prelude.Maybe Prelude.Text,
SendTemplatedEmail -> Maybe Text
templateArn :: Prelude.Maybe Prelude.Text,
SendTemplatedEmail -> Maybe [MessageTag]
tags :: Prelude.Maybe [MessageTag],
SendTemplatedEmail -> Maybe [Text]
replyToAddresses :: Prelude.Maybe [Prelude.Text],
SendTemplatedEmail -> Text
source :: Prelude.Text,
SendTemplatedEmail -> Destination
destination :: Destination,
SendTemplatedEmail -> Text
template :: Prelude.Text,
SendTemplatedEmail -> Text
templateData :: Prelude.Text
}
deriving (SendTemplatedEmail -> SendTemplatedEmail -> Bool
(SendTemplatedEmail -> SendTemplatedEmail -> Bool)
-> (SendTemplatedEmail -> SendTemplatedEmail -> Bool)
-> Eq SendTemplatedEmail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendTemplatedEmail -> SendTemplatedEmail -> Bool
$c/= :: SendTemplatedEmail -> SendTemplatedEmail -> Bool
== :: SendTemplatedEmail -> SendTemplatedEmail -> Bool
$c== :: SendTemplatedEmail -> SendTemplatedEmail -> Bool
Prelude.Eq, ReadPrec [SendTemplatedEmail]
ReadPrec SendTemplatedEmail
Int -> ReadS SendTemplatedEmail
ReadS [SendTemplatedEmail]
(Int -> ReadS SendTemplatedEmail)
-> ReadS [SendTemplatedEmail]
-> ReadPrec SendTemplatedEmail
-> ReadPrec [SendTemplatedEmail]
-> Read SendTemplatedEmail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendTemplatedEmail]
$creadListPrec :: ReadPrec [SendTemplatedEmail]
readPrec :: ReadPrec SendTemplatedEmail
$creadPrec :: ReadPrec SendTemplatedEmail
readList :: ReadS [SendTemplatedEmail]
$creadList :: ReadS [SendTemplatedEmail]
readsPrec :: Int -> ReadS SendTemplatedEmail
$creadsPrec :: Int -> ReadS SendTemplatedEmail
Prelude.Read, Int -> SendTemplatedEmail -> ShowS
[SendTemplatedEmail] -> ShowS
SendTemplatedEmail -> String
(Int -> SendTemplatedEmail -> ShowS)
-> (SendTemplatedEmail -> String)
-> ([SendTemplatedEmail] -> ShowS)
-> Show SendTemplatedEmail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendTemplatedEmail] -> ShowS
$cshowList :: [SendTemplatedEmail] -> ShowS
show :: SendTemplatedEmail -> String
$cshow :: SendTemplatedEmail -> String
showsPrec :: Int -> SendTemplatedEmail -> ShowS
$cshowsPrec :: Int -> SendTemplatedEmail -> ShowS
Prelude.Show, (forall x. SendTemplatedEmail -> Rep SendTemplatedEmail x)
-> (forall x. Rep SendTemplatedEmail x -> SendTemplatedEmail)
-> Generic SendTemplatedEmail
forall x. Rep SendTemplatedEmail x -> SendTemplatedEmail
forall x. SendTemplatedEmail -> Rep SendTemplatedEmail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendTemplatedEmail x -> SendTemplatedEmail
$cfrom :: forall x. SendTemplatedEmail -> Rep SendTemplatedEmail x
Prelude.Generic)
newSendTemplatedEmail ::
Prelude.Text ->
Destination ->
Prelude.Text ->
Prelude.Text ->
SendTemplatedEmail
newSendTemplatedEmail :: Text -> Destination -> Text -> Text -> SendTemplatedEmail
newSendTemplatedEmail
Text
pSource_
Destination
pDestination_
Text
pTemplate_
Text
pTemplateData_ =
SendTemplatedEmail' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [MessageTag]
-> Maybe [Text]
-> Text
-> Destination
-> Text
-> Text
-> SendTemplatedEmail
SendTemplatedEmail'
{ $sel:returnPath:SendTemplatedEmail' :: Maybe Text
returnPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configurationSetName:SendTemplatedEmail' :: Maybe Text
configurationSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceArn:SendTemplatedEmail' :: Maybe Text
sourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:returnPathArn:SendTemplatedEmail' :: Maybe Text
returnPathArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:templateArn:SendTemplatedEmail' :: Maybe Text
templateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:SendTemplatedEmail' :: Maybe [MessageTag]
tags = Maybe [MessageTag]
forall a. Maybe a
Prelude.Nothing,
$sel:replyToAddresses:SendTemplatedEmail' :: Maybe [Text]
replyToAddresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:source:SendTemplatedEmail' :: Text
source = Text
pSource_,
$sel:destination:SendTemplatedEmail' :: Destination
destination = Destination
pDestination_,
$sel:template:SendTemplatedEmail' :: Text
template = Text
pTemplate_,
$sel:templateData:SendTemplatedEmail' :: Text
templateData = Text
pTemplateData_
}
sendTemplatedEmail_returnPath :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_returnPath :: (Maybe Text -> f (Maybe Text))
-> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_returnPath = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens
SendTemplatedEmail SendTemplatedEmail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
returnPath :: Maybe Text
$sel:returnPath:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
returnPath} -> Maybe Text
returnPath) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {$sel:returnPath:SendTemplatedEmail' :: Maybe Text
returnPath = Maybe Text
a} :: SendTemplatedEmail)
sendTemplatedEmail_configurationSetName :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_configurationSetName :: (Maybe Text -> f (Maybe Text))
-> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_configurationSetName = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens
SendTemplatedEmail SendTemplatedEmail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
configurationSetName :: Maybe Text
$sel:configurationSetName:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
configurationSetName} -> Maybe Text
configurationSetName) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {$sel:configurationSetName:SendTemplatedEmail' :: Maybe Text
configurationSetName = Maybe Text
a} :: SendTemplatedEmail)
sendTemplatedEmail_sourceArn :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_sourceArn :: (Maybe Text -> f (Maybe Text))
-> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_sourceArn = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens
SendTemplatedEmail SendTemplatedEmail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
sourceArn :: Maybe Text
$sel:sourceArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
sourceArn} -> Maybe Text
sourceArn) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {$sel:sourceArn:SendTemplatedEmail' :: Maybe Text
sourceArn = Maybe Text
a} :: SendTemplatedEmail)
sendTemplatedEmail_returnPathArn :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_returnPathArn :: (Maybe Text -> f (Maybe Text))
-> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_returnPathArn = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens
SendTemplatedEmail SendTemplatedEmail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
returnPathArn :: Maybe Text
$sel:returnPathArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
returnPathArn} -> Maybe Text
returnPathArn) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {$sel:returnPathArn:SendTemplatedEmail' :: Maybe Text
returnPathArn = Maybe Text
a} :: SendTemplatedEmail)
sendTemplatedEmail_templateArn :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_templateArn :: (Maybe Text -> f (Maybe Text))
-> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_templateArn = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens
SendTemplatedEmail SendTemplatedEmail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
templateArn :: Maybe Text
$sel:templateArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
templateArn} -> Maybe Text
templateArn) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {$sel:templateArn:SendTemplatedEmail' :: Maybe Text
templateArn = Maybe Text
a} :: SendTemplatedEmail)
sendTemplatedEmail_tags :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe [MessageTag])
sendTemplatedEmail_tags :: (Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_tags = (SendTemplatedEmail -> Maybe [MessageTag])
-> (SendTemplatedEmail -> Maybe [MessageTag] -> SendTemplatedEmail)
-> Lens
SendTemplatedEmail
SendTemplatedEmail
(Maybe [MessageTag])
(Maybe [MessageTag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe [MessageTag]
tags :: Maybe [MessageTag]
$sel:tags:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [MessageTag]
tags} -> Maybe [MessageTag]
tags) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe [MessageTag]
a -> SendTemplatedEmail
s {$sel:tags:SendTemplatedEmail' :: Maybe [MessageTag]
tags = Maybe [MessageTag]
a} :: SendTemplatedEmail) ((Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> SendTemplatedEmail -> f SendTemplatedEmail)
-> ((Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> (Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> SendTemplatedEmail
-> f SendTemplatedEmail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MessageTag] [MessageTag] [MessageTag] [MessageTag]
-> Iso
(Maybe [MessageTag])
(Maybe [MessageTag])
(Maybe [MessageTag])
(Maybe [MessageTag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [MessageTag] [MessageTag] [MessageTag] [MessageTag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendTemplatedEmail_replyToAddresses :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe [Prelude.Text])
sendTemplatedEmail_replyToAddresses :: (Maybe [Text] -> f (Maybe [Text]))
-> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_replyToAddresses = (SendTemplatedEmail -> Maybe [Text])
-> (SendTemplatedEmail -> Maybe [Text] -> SendTemplatedEmail)
-> Lens
SendTemplatedEmail SendTemplatedEmail (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe [Text]
replyToAddresses :: Maybe [Text]
$sel:replyToAddresses:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [Text]
replyToAddresses} -> Maybe [Text]
replyToAddresses) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe [Text]
a -> SendTemplatedEmail
s {$sel:replyToAddresses:SendTemplatedEmail' :: Maybe [Text]
replyToAddresses = Maybe [Text]
a} :: SendTemplatedEmail) ((Maybe [Text] -> f (Maybe [Text]))
-> SendTemplatedEmail -> f SendTemplatedEmail)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SendTemplatedEmail
-> f SendTemplatedEmail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendTemplatedEmail_source :: Lens.Lens' SendTemplatedEmail Prelude.Text
sendTemplatedEmail_source :: (Text -> f Text) -> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_source = (SendTemplatedEmail -> Text)
-> (SendTemplatedEmail -> Text -> SendTemplatedEmail)
-> Lens SendTemplatedEmail SendTemplatedEmail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Text
source :: Text
$sel:source:SendTemplatedEmail' :: SendTemplatedEmail -> Text
source} -> Text
source) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Text
a -> SendTemplatedEmail
s {$sel:source:SendTemplatedEmail' :: Text
source = Text
a} :: SendTemplatedEmail)
sendTemplatedEmail_destination :: Lens.Lens' SendTemplatedEmail Destination
sendTemplatedEmail_destination :: (Destination -> f Destination)
-> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_destination = (SendTemplatedEmail -> Destination)
-> (SendTemplatedEmail -> Destination -> SendTemplatedEmail)
-> Lens
SendTemplatedEmail SendTemplatedEmail Destination Destination
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Destination
destination :: Destination
$sel:destination:SendTemplatedEmail' :: SendTemplatedEmail -> Destination
destination} -> Destination
destination) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Destination
a -> SendTemplatedEmail
s {$sel:destination:SendTemplatedEmail' :: Destination
destination = Destination
a} :: SendTemplatedEmail)
sendTemplatedEmail_template :: Lens.Lens' SendTemplatedEmail Prelude.Text
sendTemplatedEmail_template :: (Text -> f Text) -> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_template = (SendTemplatedEmail -> Text)
-> (SendTemplatedEmail -> Text -> SendTemplatedEmail)
-> Lens SendTemplatedEmail SendTemplatedEmail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Text
template :: Text
$sel:template:SendTemplatedEmail' :: SendTemplatedEmail -> Text
template} -> Text
template) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Text
a -> SendTemplatedEmail
s {$sel:template:SendTemplatedEmail' :: Text
template = Text
a} :: SendTemplatedEmail)
sendTemplatedEmail_templateData :: Lens.Lens' SendTemplatedEmail Prelude.Text
sendTemplatedEmail_templateData :: (Text -> f Text) -> SendTemplatedEmail -> f SendTemplatedEmail
sendTemplatedEmail_templateData = (SendTemplatedEmail -> Text)
-> (SendTemplatedEmail -> Text -> SendTemplatedEmail)
-> Lens SendTemplatedEmail SendTemplatedEmail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Text
templateData :: Text
$sel:templateData:SendTemplatedEmail' :: SendTemplatedEmail -> Text
templateData} -> Text
templateData) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Text
a -> SendTemplatedEmail
s {$sel:templateData:SendTemplatedEmail' :: Text
templateData = Text
a} :: SendTemplatedEmail)
instance Core.AWSRequest SendTemplatedEmail where
type
AWSResponse SendTemplatedEmail =
SendTemplatedEmailResponse
request :: SendTemplatedEmail -> Request SendTemplatedEmail
request = Service -> SendTemplatedEmail -> Request SendTemplatedEmail
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SendTemplatedEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SendTemplatedEmail)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse SendTemplatedEmail))
-> Logger
-> Service
-> Proxy SendTemplatedEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SendTemplatedEmail)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"SendTemplatedEmailResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> Text -> SendTemplatedEmailResponse
SendTemplatedEmailResponse'
(Int -> Text -> SendTemplatedEmailResponse)
-> Either String Int
-> Either String (Text -> SendTemplatedEmailResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (Text -> SendTemplatedEmailResponse)
-> Either String Text -> Either String SendTemplatedEmailResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MessageId")
)
instance Prelude.Hashable SendTemplatedEmail
instance Prelude.NFData SendTemplatedEmail
instance Core.ToHeaders SendTemplatedEmail where
toHeaders :: SendTemplatedEmail -> ResponseHeaders
toHeaders = ResponseHeaders -> SendTemplatedEmail -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath SendTemplatedEmail where
toPath :: SendTemplatedEmail -> ByteString
toPath = ByteString -> SendTemplatedEmail -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SendTemplatedEmail where
toQuery :: SendTemplatedEmail -> QueryString
toQuery SendTemplatedEmail' {Maybe [Text]
Maybe [MessageTag]
Maybe Text
Text
Destination
templateData :: Text
template :: Text
destination :: Destination
source :: Text
replyToAddresses :: Maybe [Text]
tags :: Maybe [MessageTag]
templateArn :: Maybe Text
returnPathArn :: Maybe Text
sourceArn :: Maybe Text
configurationSetName :: Maybe Text
returnPath :: Maybe Text
$sel:templateData:SendTemplatedEmail' :: SendTemplatedEmail -> Text
$sel:template:SendTemplatedEmail' :: SendTemplatedEmail -> Text
$sel:destination:SendTemplatedEmail' :: SendTemplatedEmail -> Destination
$sel:source:SendTemplatedEmail' :: SendTemplatedEmail -> Text
$sel:replyToAddresses:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [Text]
$sel:tags:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [MessageTag]
$sel:templateArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:returnPathArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:sourceArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:configurationSetName:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:returnPath:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"SendTemplatedEmail" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"ReturnPath" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
returnPath,
ByteString
"ConfigurationSetName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
configurationSetName,
ByteString
"SourceArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
sourceArn,
ByteString
"ReturnPathArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
returnPathArn,
ByteString
"TemplateArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateArn,
ByteString
"Tags"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [MessageTag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([MessageTag] -> QueryString)
-> Maybe [MessageTag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MessageTag]
tags),
ByteString
"ReplyToAddresses"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
replyToAddresses
),
ByteString
"Source" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
source,
ByteString
"Destination" ByteString -> Destination -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Destination
destination,
ByteString
"Template" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
template,
ByteString
"TemplateData" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
templateData
]
data SendTemplatedEmailResponse = SendTemplatedEmailResponse'
{
SendTemplatedEmailResponse -> Int
httpStatus :: Prelude.Int,
SendTemplatedEmailResponse -> Text
messageId :: Prelude.Text
}
deriving (SendTemplatedEmailResponse -> SendTemplatedEmailResponse -> Bool
(SendTemplatedEmailResponse -> SendTemplatedEmailResponse -> Bool)
-> (SendTemplatedEmailResponse
-> SendTemplatedEmailResponse -> Bool)
-> Eq SendTemplatedEmailResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendTemplatedEmailResponse -> SendTemplatedEmailResponse -> Bool
$c/= :: SendTemplatedEmailResponse -> SendTemplatedEmailResponse -> Bool
== :: SendTemplatedEmailResponse -> SendTemplatedEmailResponse -> Bool
$c== :: SendTemplatedEmailResponse -> SendTemplatedEmailResponse -> Bool
Prelude.Eq, ReadPrec [SendTemplatedEmailResponse]
ReadPrec SendTemplatedEmailResponse
Int -> ReadS SendTemplatedEmailResponse
ReadS [SendTemplatedEmailResponse]
(Int -> ReadS SendTemplatedEmailResponse)
-> ReadS [SendTemplatedEmailResponse]
-> ReadPrec SendTemplatedEmailResponse
-> ReadPrec [SendTemplatedEmailResponse]
-> Read SendTemplatedEmailResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendTemplatedEmailResponse]
$creadListPrec :: ReadPrec [SendTemplatedEmailResponse]
readPrec :: ReadPrec SendTemplatedEmailResponse
$creadPrec :: ReadPrec SendTemplatedEmailResponse
readList :: ReadS [SendTemplatedEmailResponse]
$creadList :: ReadS [SendTemplatedEmailResponse]
readsPrec :: Int -> ReadS SendTemplatedEmailResponse
$creadsPrec :: Int -> ReadS SendTemplatedEmailResponse
Prelude.Read, Int -> SendTemplatedEmailResponse -> ShowS
[SendTemplatedEmailResponse] -> ShowS
SendTemplatedEmailResponse -> String
(Int -> SendTemplatedEmailResponse -> ShowS)
-> (SendTemplatedEmailResponse -> String)
-> ([SendTemplatedEmailResponse] -> ShowS)
-> Show SendTemplatedEmailResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendTemplatedEmailResponse] -> ShowS
$cshowList :: [SendTemplatedEmailResponse] -> ShowS
show :: SendTemplatedEmailResponse -> String
$cshow :: SendTemplatedEmailResponse -> String
showsPrec :: Int -> SendTemplatedEmailResponse -> ShowS
$cshowsPrec :: Int -> SendTemplatedEmailResponse -> ShowS
Prelude.Show, (forall x.
SendTemplatedEmailResponse -> Rep SendTemplatedEmailResponse x)
-> (forall x.
Rep SendTemplatedEmailResponse x -> SendTemplatedEmailResponse)
-> Generic SendTemplatedEmailResponse
forall x.
Rep SendTemplatedEmailResponse x -> SendTemplatedEmailResponse
forall x.
SendTemplatedEmailResponse -> Rep SendTemplatedEmailResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SendTemplatedEmailResponse x -> SendTemplatedEmailResponse
$cfrom :: forall x.
SendTemplatedEmailResponse -> Rep SendTemplatedEmailResponse x
Prelude.Generic)
newSendTemplatedEmailResponse ::
Prelude.Int ->
Prelude.Text ->
SendTemplatedEmailResponse
newSendTemplatedEmailResponse :: Int -> Text -> SendTemplatedEmailResponse
newSendTemplatedEmailResponse
Int
pHttpStatus_
Text
pMessageId_ =
SendTemplatedEmailResponse' :: Int -> Text -> SendTemplatedEmailResponse
SendTemplatedEmailResponse'
{ $sel:httpStatus:SendTemplatedEmailResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:messageId:SendTemplatedEmailResponse' :: Text
messageId = Text
pMessageId_
}
sendTemplatedEmailResponse_httpStatus :: Lens.Lens' SendTemplatedEmailResponse Prelude.Int
sendTemplatedEmailResponse_httpStatus :: (Int -> f Int)
-> SendTemplatedEmailResponse -> f SendTemplatedEmailResponse
sendTemplatedEmailResponse_httpStatus = (SendTemplatedEmailResponse -> Int)
-> (SendTemplatedEmailResponse
-> Int -> SendTemplatedEmailResponse)
-> Lens
SendTemplatedEmailResponse SendTemplatedEmailResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmailResponse' {Int
httpStatus :: Int
$sel:httpStatus:SendTemplatedEmailResponse' :: SendTemplatedEmailResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SendTemplatedEmailResponse
s@SendTemplatedEmailResponse' {} Int
a -> SendTemplatedEmailResponse
s {$sel:httpStatus:SendTemplatedEmailResponse' :: Int
httpStatus = Int
a} :: SendTemplatedEmailResponse)
sendTemplatedEmailResponse_messageId :: Lens.Lens' SendTemplatedEmailResponse Prelude.Text
sendTemplatedEmailResponse_messageId :: (Text -> f Text)
-> SendTemplatedEmailResponse -> f SendTemplatedEmailResponse
sendTemplatedEmailResponse_messageId = (SendTemplatedEmailResponse -> Text)
-> (SendTemplatedEmailResponse
-> Text -> SendTemplatedEmailResponse)
-> Lens
SendTemplatedEmailResponse SendTemplatedEmailResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmailResponse' {Text
messageId :: Text
$sel:messageId:SendTemplatedEmailResponse' :: SendTemplatedEmailResponse -> Text
messageId} -> Text
messageId) (\s :: SendTemplatedEmailResponse
s@SendTemplatedEmailResponse' {} Text
a -> SendTemplatedEmailResponse
s {$sel:messageId:SendTemplatedEmailResponse' :: Text
messageId = Text
a} :: SendTemplatedEmailResponse)
instance Prelude.NFData SendTemplatedEmailResponse