{-# 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_configurationSetName,
sendTemplatedEmail_replyToAddresses,
sendTemplatedEmail_returnPath,
sendTemplatedEmail_returnPathArn,
sendTemplatedEmail_sourceArn,
sendTemplatedEmail_tags,
sendTemplatedEmail_templateArn,
sendTemplatedEmail_source,
sendTemplatedEmail_destination,
sendTemplatedEmail_template,
sendTemplatedEmail_templateData,
SendTemplatedEmailResponse (..),
newSendTemplatedEmailResponse,
sendTemplatedEmailResponse_httpStatus,
sendTemplatedEmailResponse_messageId,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
configurationSetName :: Prelude.Maybe Prelude.Text,
SendTemplatedEmail -> Maybe [Text]
replyToAddresses :: Prelude.Maybe [Prelude.Text],
SendTemplatedEmail -> Maybe Text
returnPath :: Prelude.Maybe Prelude.Text,
SendTemplatedEmail -> Maybe Text
returnPathArn :: Prelude.Maybe Prelude.Text,
SendTemplatedEmail -> Maybe Text
sourceArn :: Prelude.Maybe Prelude.Text,
SendTemplatedEmail -> Maybe [MessageTag]
tags :: Prelude.Maybe [MessageTag],
SendTemplatedEmail -> Maybe Text
templateArn :: 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
$c== :: SendTemplatedEmail -> SendTemplatedEmail -> Bool
== :: SendTemplatedEmail -> SendTemplatedEmail -> Bool
$c/= :: SendTemplatedEmail -> SendTemplatedEmail -> Bool
/= :: 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
$creadsPrec :: Int -> ReadS SendTemplatedEmail
readsPrec :: Int -> ReadS SendTemplatedEmail
$creadList :: ReadS [SendTemplatedEmail]
readList :: ReadS [SendTemplatedEmail]
$creadPrec :: ReadPrec SendTemplatedEmail
readPrec :: ReadPrec SendTemplatedEmail
$creadListPrec :: ReadPrec [SendTemplatedEmail]
readListPrec :: ReadPrec [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
$cshowsPrec :: Int -> SendTemplatedEmail -> ShowS
showsPrec :: Int -> SendTemplatedEmail -> ShowS
$cshow :: SendTemplatedEmail -> String
show :: SendTemplatedEmail -> String
$cshowList :: [SendTemplatedEmail] -> ShowS
showList :: [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
$cfrom :: forall x. SendTemplatedEmail -> Rep SendTemplatedEmail x
from :: forall x. SendTemplatedEmail -> Rep SendTemplatedEmail x
$cto :: forall x. Rep SendTemplatedEmail x -> SendTemplatedEmail
to :: forall x. Rep SendTemplatedEmail x -> SendTemplatedEmail
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'
{ $sel:configurationSetName:SendTemplatedEmail' :: Maybe Text
configurationSetName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:replyToAddresses:SendTemplatedEmail' :: Maybe [Text]
replyToAddresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:returnPath:SendTemplatedEmail' :: Maybe Text
returnPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:returnPathArn:SendTemplatedEmail' :: Maybe Text
returnPathArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceArn:SendTemplatedEmail' :: Maybe Text
sourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:SendTemplatedEmail' :: Maybe [MessageTag]
tags = Maybe [MessageTag]
forall a. Maybe a
Prelude.Nothing,
$sel:templateArn:SendTemplatedEmail' :: Maybe Text
templateArn = 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_configurationSetName :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_configurationSetName :: Lens' SendTemplatedEmail (Maybe Text)
sendTemplatedEmail_configurationSetName = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
$sel:configurationSetName:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
configurationSetName :: Maybe Text
configurationSetName} -> Maybe Text
configurationSetName) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {configurationSetName = a} :: SendTemplatedEmail)
sendTemplatedEmail_replyToAddresses :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe [Prelude.Text])
sendTemplatedEmail_replyToAddresses :: Lens' SendTemplatedEmail (Maybe [Text])
sendTemplatedEmail_replyToAddresses = (SendTemplatedEmail -> Maybe [Text])
-> (SendTemplatedEmail -> Maybe [Text] -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe [Text]
$sel:replyToAddresses:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [Text]
replyToAddresses :: Maybe [Text]
replyToAddresses} -> Maybe [Text]
replyToAddresses) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe [Text]
a -> SendTemplatedEmail
s {replyToAddresses = 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
Iso [Text] [Text] [Text] [Text]
Lens.coerced
sendTemplatedEmail_returnPath :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_returnPath :: Lens' SendTemplatedEmail (Maybe Text)
sendTemplatedEmail_returnPath = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
$sel:returnPath:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
returnPath :: Maybe Text
returnPath} -> Maybe Text
returnPath) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {returnPath = a} :: SendTemplatedEmail)
sendTemplatedEmail_returnPathArn :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_returnPathArn :: Lens' SendTemplatedEmail (Maybe Text)
sendTemplatedEmail_returnPathArn = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
$sel:returnPathArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
returnPathArn :: Maybe Text
returnPathArn} -> Maybe Text
returnPathArn) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {returnPathArn = a} :: SendTemplatedEmail)
sendTemplatedEmail_sourceArn :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_sourceArn :: Lens' SendTemplatedEmail (Maybe Text)
sendTemplatedEmail_sourceArn = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
$sel:sourceArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
sourceArn :: Maybe Text
sourceArn} -> Maybe Text
sourceArn) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {sourceArn = a} :: SendTemplatedEmail)
sendTemplatedEmail_tags :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe [MessageTag])
sendTemplatedEmail_tags :: Lens' SendTemplatedEmail (Maybe [MessageTag])
sendTemplatedEmail_tags = (SendTemplatedEmail -> Maybe [MessageTag])
-> (SendTemplatedEmail -> Maybe [MessageTag] -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail (Maybe [MessageTag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe [MessageTag]
$sel:tags:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [MessageTag]
tags :: Maybe [MessageTag]
tags} -> Maybe [MessageTag]
tags) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe [MessageTag]
a -> SendTemplatedEmail
s {tags = 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
Iso [MessageTag] [MessageTag] [MessageTag] [MessageTag]
Lens.coerced
sendTemplatedEmail_templateArn :: Lens.Lens' SendTemplatedEmail (Prelude.Maybe Prelude.Text)
sendTemplatedEmail_templateArn :: Lens' SendTemplatedEmail (Maybe Text)
sendTemplatedEmail_templateArn = (SendTemplatedEmail -> Maybe Text)
-> (SendTemplatedEmail -> Maybe Text -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Maybe Text
$sel:templateArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
templateArn :: Maybe Text
templateArn} -> Maybe Text
templateArn) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Maybe Text
a -> SendTemplatedEmail
s {templateArn = a} :: SendTemplatedEmail)
sendTemplatedEmail_source :: Lens.Lens' SendTemplatedEmail Prelude.Text
sendTemplatedEmail_source :: Lens' SendTemplatedEmail Text
sendTemplatedEmail_source = (SendTemplatedEmail -> Text)
-> (SendTemplatedEmail -> Text -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Text
$sel:source:SendTemplatedEmail' :: SendTemplatedEmail -> Text
source :: Text
source} -> Text
source) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Text
a -> SendTemplatedEmail
s {source = a} :: SendTemplatedEmail)
sendTemplatedEmail_destination :: Lens.Lens' SendTemplatedEmail Destination
sendTemplatedEmail_destination :: Lens' SendTemplatedEmail Destination
sendTemplatedEmail_destination = (SendTemplatedEmail -> Destination)
-> (SendTemplatedEmail -> Destination -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail Destination
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Destination
$sel:destination:SendTemplatedEmail' :: SendTemplatedEmail -> Destination
destination :: Destination
destination} -> Destination
destination) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Destination
a -> SendTemplatedEmail
s {destination = a} :: SendTemplatedEmail)
sendTemplatedEmail_template :: Lens.Lens' SendTemplatedEmail Prelude.Text
sendTemplatedEmail_template :: Lens' SendTemplatedEmail Text
sendTemplatedEmail_template = (SendTemplatedEmail -> Text)
-> (SendTemplatedEmail -> Text -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Text
$sel:template:SendTemplatedEmail' :: SendTemplatedEmail -> Text
template :: Text
template} -> Text
template) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Text
a -> SendTemplatedEmail
s {template = a} :: SendTemplatedEmail)
sendTemplatedEmail_templateData :: Lens.Lens' SendTemplatedEmail Prelude.Text
sendTemplatedEmail_templateData :: Lens' SendTemplatedEmail Text
sendTemplatedEmail_templateData = (SendTemplatedEmail -> Text)
-> (SendTemplatedEmail -> Text -> SendTemplatedEmail)
-> Lens' SendTemplatedEmail Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmail' {Text
$sel:templateData:SendTemplatedEmail' :: SendTemplatedEmail -> Text
templateData :: Text
templateData} -> Text
templateData) (\s :: SendTemplatedEmail
s@SendTemplatedEmail' {} Text
a -> SendTemplatedEmail
s {templateData = a} :: SendTemplatedEmail)
instance Core.AWSRequest SendTemplatedEmail where
type
AWSResponse SendTemplatedEmail =
SendTemplatedEmailResponse
request :: (Service -> Service)
-> SendTemplatedEmail -> Request SendTemplatedEmail
request Service -> Service
overrides =
Service -> SendTemplatedEmail -> Request SendTemplatedEmail
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SendTemplatedEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SendTemplatedEmail)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse SendTemplatedEmail))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SendTemplatedEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SendTemplatedEmail)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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 a. a -> Either String a
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 a b.
Either String (a -> b) -> Either String a -> Either String b
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
Data..@ Text
"MessageId")
)
instance Prelude.Hashable SendTemplatedEmail where
hashWithSalt :: Int -> SendTemplatedEmail -> Int
hashWithSalt Int
_salt SendTemplatedEmail' {Maybe [Text]
Maybe [MessageTag]
Maybe Text
Text
Destination
$sel:configurationSetName:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:replyToAddresses:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [Text]
$sel:returnPath:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:returnPathArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:sourceArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:tags:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [MessageTag]
$sel:templateArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:source:SendTemplatedEmail' :: SendTemplatedEmail -> Text
$sel:destination:SendTemplatedEmail' :: SendTemplatedEmail -> Destination
$sel:template:SendTemplatedEmail' :: SendTemplatedEmail -> Text
$sel:templateData:SendTemplatedEmail' :: SendTemplatedEmail -> Text
configurationSetName :: Maybe Text
replyToAddresses :: Maybe [Text]
returnPath :: Maybe Text
returnPathArn :: Maybe Text
sourceArn :: Maybe Text
tags :: Maybe [MessageTag]
templateArn :: Maybe Text
source :: Text
destination :: Destination
template :: Text
templateData :: Text
..} =
Int
_salt
Int -> Maybe Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configurationSetName
Int -> Maybe [Text] -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
replyToAddresses
Int -> Maybe Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
returnPath
Int -> Maybe Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
returnPathArn
Int -> Maybe Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceArn
Int -> Maybe [MessageTag] -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [MessageTag]
tags
Int -> Maybe Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateArn
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
source
Int -> Destination -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Destination
destination
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
template
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateData
instance Prelude.NFData SendTemplatedEmail where
rnf :: SendTemplatedEmail -> ()
rnf SendTemplatedEmail' {Maybe [Text]
Maybe [MessageTag]
Maybe Text
Text
Destination
$sel:configurationSetName:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:replyToAddresses:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [Text]
$sel:returnPath:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:returnPathArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:sourceArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:tags:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [MessageTag]
$sel:templateArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:source:SendTemplatedEmail' :: SendTemplatedEmail -> Text
$sel:destination:SendTemplatedEmail' :: SendTemplatedEmail -> Destination
$sel:template:SendTemplatedEmail' :: SendTemplatedEmail -> Text
$sel:templateData:SendTemplatedEmail' :: SendTemplatedEmail -> Text
configurationSetName :: Maybe Text
replyToAddresses :: Maybe [Text]
returnPath :: Maybe Text
returnPathArn :: Maybe Text
sourceArn :: Maybe Text
tags :: Maybe [MessageTag]
templateArn :: Maybe Text
source :: Text
destination :: Destination
template :: Text
templateData :: Text
..} =
Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationSetName
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe [Text] -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
replyToAddresses
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
returnPath
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
returnPathArn
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceArn
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe [MessageTag] -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe [MessageTag]
tags
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateArn
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
source
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Destination -> ()
forall a. NFData a => a -> ()
Prelude.rnf Destination
destination
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
template
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
templateData
instance Data.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 Data.ToPath SendTemplatedEmail where
toPath :: SendTemplatedEmail -> ByteString
toPath = ByteString -> SendTemplatedEmail -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery SendTemplatedEmail where
toQuery :: SendTemplatedEmail -> QueryString
toQuery SendTemplatedEmail' {Maybe [Text]
Maybe [MessageTag]
Maybe Text
Text
Destination
$sel:configurationSetName:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:replyToAddresses:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [Text]
$sel:returnPath:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:returnPathArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:sourceArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:tags:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe [MessageTag]
$sel:templateArn:SendTemplatedEmail' :: SendTemplatedEmail -> Maybe Text
$sel:source:SendTemplatedEmail' :: SendTemplatedEmail -> Text
$sel:destination:SendTemplatedEmail' :: SendTemplatedEmail -> Destination
$sel:template:SendTemplatedEmail' :: SendTemplatedEmail -> Text
$sel:templateData:SendTemplatedEmail' :: SendTemplatedEmail -> Text
configurationSetName :: Maybe Text
replyToAddresses :: Maybe [Text]
returnPath :: Maybe Text
returnPathArn :: Maybe Text
sourceArn :: Maybe Text
tags :: Maybe [MessageTag]
templateArn :: Maybe Text
source :: Text
destination :: Destination
template :: Text
templateData :: Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"SendTemplatedEmail" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"ConfigurationSetName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
configurationSetName,
ByteString
"ReplyToAddresses"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Data.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.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
"ReturnPath" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
returnPath,
ByteString
"ReturnPathArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
returnPathArn,
ByteString
"SourceArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
sourceArn,
ByteString
"Tags"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Data.toQuery
(ByteString -> [MessageTag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.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
"TemplateArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
templateArn,
ByteString
"Source" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
source,
ByteString
"Destination" ByteString -> Destination -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Destination
destination,
ByteString
"Template" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
template,
ByteString
"TemplateData" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: 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
$c== :: SendTemplatedEmailResponse -> SendTemplatedEmailResponse -> Bool
== :: SendTemplatedEmailResponse -> SendTemplatedEmailResponse -> Bool
$c/= :: SendTemplatedEmailResponse -> SendTemplatedEmailResponse -> Bool
/= :: 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
$creadsPrec :: Int -> ReadS SendTemplatedEmailResponse
readsPrec :: Int -> ReadS SendTemplatedEmailResponse
$creadList :: ReadS [SendTemplatedEmailResponse]
readList :: ReadS [SendTemplatedEmailResponse]
$creadPrec :: ReadPrec SendTemplatedEmailResponse
readPrec :: ReadPrec SendTemplatedEmailResponse
$creadListPrec :: ReadPrec [SendTemplatedEmailResponse]
readListPrec :: ReadPrec [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
$cshowsPrec :: Int -> SendTemplatedEmailResponse -> ShowS
showsPrec :: Int -> SendTemplatedEmailResponse -> ShowS
$cshow :: SendTemplatedEmailResponse -> String
show :: SendTemplatedEmailResponse -> String
$cshowList :: [SendTemplatedEmailResponse] -> ShowS
showList :: [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
$cfrom :: forall x.
SendTemplatedEmailResponse -> Rep SendTemplatedEmailResponse x
from :: forall x.
SendTemplatedEmailResponse -> Rep SendTemplatedEmailResponse x
$cto :: forall x.
Rep SendTemplatedEmailResponse x -> SendTemplatedEmailResponse
to :: forall x.
Rep SendTemplatedEmailResponse x -> SendTemplatedEmailResponse
Prelude.Generic)
newSendTemplatedEmailResponse ::
Prelude.Int ->
Prelude.Text ->
SendTemplatedEmailResponse
newSendTemplatedEmailResponse :: Int -> Text -> SendTemplatedEmailResponse
newSendTemplatedEmailResponse
Int
pHttpStatus_
Text
pMessageId_ =
SendTemplatedEmailResponse'
{ $sel:httpStatus:SendTemplatedEmailResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:messageId:SendTemplatedEmailResponse' :: Text
messageId = Text
pMessageId_
}
sendTemplatedEmailResponse_httpStatus :: Lens.Lens' SendTemplatedEmailResponse Prelude.Int
sendTemplatedEmailResponse_httpStatus :: Lens' SendTemplatedEmailResponse Int
sendTemplatedEmailResponse_httpStatus = (SendTemplatedEmailResponse -> Int)
-> (SendTemplatedEmailResponse
-> Int -> SendTemplatedEmailResponse)
-> Lens' SendTemplatedEmailResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmailResponse' {Int
$sel:httpStatus:SendTemplatedEmailResponse' :: SendTemplatedEmailResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: SendTemplatedEmailResponse
s@SendTemplatedEmailResponse' {} Int
a -> SendTemplatedEmailResponse
s {httpStatus = a} :: SendTemplatedEmailResponse)
sendTemplatedEmailResponse_messageId :: Lens.Lens' SendTemplatedEmailResponse Prelude.Text
sendTemplatedEmailResponse_messageId :: Lens' SendTemplatedEmailResponse Text
sendTemplatedEmailResponse_messageId = (SendTemplatedEmailResponse -> Text)
-> (SendTemplatedEmailResponse
-> Text -> SendTemplatedEmailResponse)
-> Lens' SendTemplatedEmailResponse Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendTemplatedEmailResponse' {Text
$sel:messageId:SendTemplatedEmailResponse' :: SendTemplatedEmailResponse -> Text
messageId :: Text
messageId} -> Text
messageId) (\s :: SendTemplatedEmailResponse
s@SendTemplatedEmailResponse' {} Text
a -> SendTemplatedEmailResponse
s {messageId = a} :: SendTemplatedEmailResponse)
instance Prelude.NFData SendTemplatedEmailResponse where
rnf :: SendTemplatedEmailResponse -> ()
rnf SendTemplatedEmailResponse' {Int
Text
$sel:httpStatus:SendTemplatedEmailResponse' :: SendTemplatedEmailResponse -> Int
$sel:messageId:SendTemplatedEmailResponse' :: SendTemplatedEmailResponse -> Text
httpStatus :: Int
messageId :: Text
..} =
Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
messageId