{-# 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.SendEmail
(
SendEmail (..),
newSendEmail,
sendEmail_configurationSetName,
sendEmail_replyToAddresses,
sendEmail_returnPath,
sendEmail_returnPathArn,
sendEmail_sourceArn,
sendEmail_tags,
sendEmail_source,
sendEmail_destination,
sendEmail_message,
SendEmailResponse (..),
newSendEmailResponse,
sendEmailResponse_httpStatus,
sendEmailResponse_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 SendEmail = SendEmail'
{
SendEmail -> Maybe Text
configurationSetName :: Prelude.Maybe Prelude.Text,
SendEmail -> Maybe [Text]
replyToAddresses :: Prelude.Maybe [Prelude.Text],
SendEmail -> Maybe Text
returnPath :: Prelude.Maybe Prelude.Text,
SendEmail -> Maybe Text
returnPathArn :: Prelude.Maybe Prelude.Text,
SendEmail -> Maybe Text
sourceArn :: Prelude.Maybe Prelude.Text,
SendEmail -> Maybe [MessageTag]
tags :: Prelude.Maybe [MessageTag],
SendEmail -> Text
source :: Prelude.Text,
SendEmail -> Destination
destination :: Destination,
SendEmail -> Message
message :: Message
}
deriving (SendEmail -> SendEmail -> Bool
(SendEmail -> SendEmail -> Bool)
-> (SendEmail -> SendEmail -> Bool) -> Eq SendEmail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SendEmail -> SendEmail -> Bool
== :: SendEmail -> SendEmail -> Bool
$c/= :: SendEmail -> SendEmail -> Bool
/= :: SendEmail -> SendEmail -> Bool
Prelude.Eq, ReadPrec [SendEmail]
ReadPrec SendEmail
Int -> ReadS SendEmail
ReadS [SendEmail]
(Int -> ReadS SendEmail)
-> ReadS [SendEmail]
-> ReadPrec SendEmail
-> ReadPrec [SendEmail]
-> Read SendEmail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS SendEmail
readsPrec :: Int -> ReadS SendEmail
$creadList :: ReadS [SendEmail]
readList :: ReadS [SendEmail]
$creadPrec :: ReadPrec SendEmail
readPrec :: ReadPrec SendEmail
$creadListPrec :: ReadPrec [SendEmail]
readListPrec :: ReadPrec [SendEmail]
Prelude.Read, Int -> SendEmail -> ShowS
[SendEmail] -> ShowS
SendEmail -> String
(Int -> SendEmail -> ShowS)
-> (SendEmail -> String)
-> ([SendEmail] -> ShowS)
-> Show SendEmail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SendEmail -> ShowS
showsPrec :: Int -> SendEmail -> ShowS
$cshow :: SendEmail -> String
show :: SendEmail -> String
$cshowList :: [SendEmail] -> ShowS
showList :: [SendEmail] -> ShowS
Prelude.Show, (forall x. SendEmail -> Rep SendEmail x)
-> (forall x. Rep SendEmail x -> SendEmail) -> Generic SendEmail
forall x. Rep SendEmail x -> SendEmail
forall x. SendEmail -> Rep SendEmail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SendEmail -> Rep SendEmail x
from :: forall x. SendEmail -> Rep SendEmail x
$cto :: forall x. Rep SendEmail x -> SendEmail
to :: forall x. Rep SendEmail x -> SendEmail
Prelude.Generic)
newSendEmail ::
Prelude.Text ->
Destination ->
Message ->
SendEmail
newSendEmail :: Text -> Destination -> Message -> SendEmail
newSendEmail Text
pSource_ Destination
pDestination_ Message
pMessage_ =
SendEmail'
{ $sel:configurationSetName:SendEmail' :: Maybe Text
configurationSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:replyToAddresses:SendEmail' :: Maybe [Text]
replyToAddresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:returnPath:SendEmail' :: Maybe Text
returnPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:returnPathArn:SendEmail' :: Maybe Text
returnPathArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceArn:SendEmail' :: Maybe Text
sourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:SendEmail' :: Maybe [MessageTag]
tags = Maybe [MessageTag]
forall a. Maybe a
Prelude.Nothing,
$sel:source:SendEmail' :: Text
source = Text
pSource_,
$sel:destination:SendEmail' :: Destination
destination = Destination
pDestination_,
$sel:message:SendEmail' :: Message
message = Message
pMessage_
}
sendEmail_configurationSetName :: Lens.Lens' SendEmail (Prelude.Maybe Prelude.Text)
sendEmail_configurationSetName :: Lens' SendEmail (Maybe Text)
sendEmail_configurationSetName = (SendEmail -> Maybe Text)
-> (SendEmail -> Maybe Text -> SendEmail)
-> Lens' SendEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmail' {Maybe Text
$sel:configurationSetName:SendEmail' :: SendEmail -> Maybe Text
configurationSetName :: Maybe Text
configurationSetName} -> Maybe Text
configurationSetName) (\s :: SendEmail
s@SendEmail' {} Maybe Text
a -> SendEmail
s {configurationSetName = a} :: SendEmail)
sendEmail_replyToAddresses :: Lens.Lens' SendEmail (Prelude.Maybe [Prelude.Text])
sendEmail_replyToAddresses :: Lens' SendEmail (Maybe [Text])
sendEmail_replyToAddresses = (SendEmail -> Maybe [Text])
-> (SendEmail -> Maybe [Text] -> SendEmail)
-> Lens' SendEmail (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmail' {Maybe [Text]
$sel:replyToAddresses:SendEmail' :: SendEmail -> Maybe [Text]
replyToAddresses :: Maybe [Text]
replyToAddresses} -> Maybe [Text]
replyToAddresses) (\s :: SendEmail
s@SendEmail' {} Maybe [Text]
a -> SendEmail
s {replyToAddresses = a} :: SendEmail) ((Maybe [Text] -> f (Maybe [Text])) -> SendEmail -> f SendEmail)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SendEmail
-> f SendEmail
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
sendEmail_returnPath :: Lens.Lens' SendEmail (Prelude.Maybe Prelude.Text)
sendEmail_returnPath :: Lens' SendEmail (Maybe Text)
sendEmail_returnPath = (SendEmail -> Maybe Text)
-> (SendEmail -> Maybe Text -> SendEmail)
-> Lens' SendEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmail' {Maybe Text
$sel:returnPath:SendEmail' :: SendEmail -> Maybe Text
returnPath :: Maybe Text
returnPath} -> Maybe Text
returnPath) (\s :: SendEmail
s@SendEmail' {} Maybe Text
a -> SendEmail
s {returnPath = a} :: SendEmail)
sendEmail_returnPathArn :: Lens.Lens' SendEmail (Prelude.Maybe Prelude.Text)
sendEmail_returnPathArn :: Lens' SendEmail (Maybe Text)
sendEmail_returnPathArn = (SendEmail -> Maybe Text)
-> (SendEmail -> Maybe Text -> SendEmail)
-> Lens' SendEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmail' {Maybe Text
$sel:returnPathArn:SendEmail' :: SendEmail -> Maybe Text
returnPathArn :: Maybe Text
returnPathArn} -> Maybe Text
returnPathArn) (\s :: SendEmail
s@SendEmail' {} Maybe Text
a -> SendEmail
s {returnPathArn = a} :: SendEmail)
sendEmail_sourceArn :: Lens.Lens' SendEmail (Prelude.Maybe Prelude.Text)
sendEmail_sourceArn :: Lens' SendEmail (Maybe Text)
sendEmail_sourceArn = (SendEmail -> Maybe Text)
-> (SendEmail -> Maybe Text -> SendEmail)
-> Lens' SendEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmail' {Maybe Text
$sel:sourceArn:SendEmail' :: SendEmail -> Maybe Text
sourceArn :: Maybe Text
sourceArn} -> Maybe Text
sourceArn) (\s :: SendEmail
s@SendEmail' {} Maybe Text
a -> SendEmail
s {sourceArn = a} :: SendEmail)
sendEmail_tags :: Lens.Lens' SendEmail (Prelude.Maybe [MessageTag])
sendEmail_tags :: Lens' SendEmail (Maybe [MessageTag])
sendEmail_tags = (SendEmail -> Maybe [MessageTag])
-> (SendEmail -> Maybe [MessageTag] -> SendEmail)
-> Lens' SendEmail (Maybe [MessageTag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmail' {Maybe [MessageTag]
$sel:tags:SendEmail' :: SendEmail -> Maybe [MessageTag]
tags :: Maybe [MessageTag]
tags} -> Maybe [MessageTag]
tags) (\s :: SendEmail
s@SendEmail' {} Maybe [MessageTag]
a -> SendEmail
s {tags = a} :: SendEmail) ((Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> SendEmail -> f SendEmail)
-> ((Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> (Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> SendEmail
-> f SendEmail
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
sendEmail_source :: Lens.Lens' SendEmail Prelude.Text
sendEmail_source :: Lens' SendEmail Text
sendEmail_source = (SendEmail -> Text)
-> (SendEmail -> Text -> SendEmail) -> Lens' SendEmail Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmail' {Text
$sel:source:SendEmail' :: SendEmail -> Text
source :: Text
source} -> Text
source) (\s :: SendEmail
s@SendEmail' {} Text
a -> SendEmail
s {source = a} :: SendEmail)
sendEmail_destination :: Lens.Lens' SendEmail Destination
sendEmail_destination :: Lens' SendEmail Destination
sendEmail_destination = (SendEmail -> Destination)
-> (SendEmail -> Destination -> SendEmail)
-> Lens' SendEmail Destination
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmail' {Destination
$sel:destination:SendEmail' :: SendEmail -> Destination
destination :: Destination
destination} -> Destination
destination) (\s :: SendEmail
s@SendEmail' {} Destination
a -> SendEmail
s {destination = a} :: SendEmail)
sendEmail_message :: Lens.Lens' SendEmail Message
sendEmail_message :: Lens' SendEmail Message
sendEmail_message = (SendEmail -> Message)
-> (SendEmail -> Message -> SendEmail) -> Lens' SendEmail Message
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmail' {Message
$sel:message:SendEmail' :: SendEmail -> Message
message :: Message
message} -> Message
message) (\s :: SendEmail
s@SendEmail' {} Message
a -> SendEmail
s {message = a} :: SendEmail)
instance Core.AWSRequest SendEmail where
type AWSResponse SendEmail = SendEmailResponse
request :: (Service -> Service) -> SendEmail -> Request SendEmail
request Service -> Service
overrides =
Service -> SendEmail -> Request SendEmail
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 SendEmail
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SendEmail)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse SendEmail))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SendEmail
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SendEmail)))
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
"SendEmailResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> Text -> SendEmailResponse
SendEmailResponse'
(Int -> Text -> SendEmailResponse)
-> Either String Int -> Either String (Text -> SendEmailResponse)
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 -> SendEmailResponse)
-> Either String Text -> Either String SendEmailResponse
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 SendEmail where
hashWithSalt :: Int -> SendEmail -> Int
hashWithSalt Int
_salt SendEmail' {Maybe [Text]
Maybe [MessageTag]
Maybe Text
Text
Destination
Message
$sel:configurationSetName:SendEmail' :: SendEmail -> Maybe Text
$sel:replyToAddresses:SendEmail' :: SendEmail -> Maybe [Text]
$sel:returnPath:SendEmail' :: SendEmail -> Maybe Text
$sel:returnPathArn:SendEmail' :: SendEmail -> Maybe Text
$sel:sourceArn:SendEmail' :: SendEmail -> Maybe Text
$sel:tags:SendEmail' :: SendEmail -> Maybe [MessageTag]
$sel:source:SendEmail' :: SendEmail -> Text
$sel:destination:SendEmail' :: SendEmail -> Destination
$sel:message:SendEmail' :: SendEmail -> Message
configurationSetName :: Maybe Text
replyToAddresses :: Maybe [Text]
returnPath :: Maybe Text
returnPathArn :: Maybe Text
sourceArn :: Maybe Text
tags :: Maybe [MessageTag]
source :: Text
destination :: Destination
message :: Message
..} =
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 -> 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 -> Message -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Message
message
instance Prelude.NFData SendEmail where
rnf :: SendEmail -> ()
rnf SendEmail' {Maybe [Text]
Maybe [MessageTag]
Maybe Text
Text
Destination
Message
$sel:configurationSetName:SendEmail' :: SendEmail -> Maybe Text
$sel:replyToAddresses:SendEmail' :: SendEmail -> Maybe [Text]
$sel:returnPath:SendEmail' :: SendEmail -> Maybe Text
$sel:returnPathArn:SendEmail' :: SendEmail -> Maybe Text
$sel:sourceArn:SendEmail' :: SendEmail -> Maybe Text
$sel:tags:SendEmail' :: SendEmail -> Maybe [MessageTag]
$sel:source:SendEmail' :: SendEmail -> Text
$sel:destination:SendEmail' :: SendEmail -> Destination
$sel:message:SendEmail' :: SendEmail -> Message
configurationSetName :: Maybe Text
replyToAddresses :: Maybe [Text]
returnPath :: Maybe Text
returnPathArn :: Maybe Text
sourceArn :: Maybe Text
tags :: Maybe [MessageTag]
source :: Text
destination :: Destination
message :: Message
..} =
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` 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` Message -> ()
forall a. NFData a => a -> ()
Prelude.rnf Message
message
instance Data.ToHeaders SendEmail where
toHeaders :: SendEmail -> ResponseHeaders
toHeaders = ResponseHeaders -> SendEmail -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath SendEmail where
toPath :: SendEmail -> ByteString
toPath = ByteString -> SendEmail -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery SendEmail where
toQuery :: SendEmail -> QueryString
toQuery SendEmail' {Maybe [Text]
Maybe [MessageTag]
Maybe Text
Text
Destination
Message
$sel:configurationSetName:SendEmail' :: SendEmail -> Maybe Text
$sel:replyToAddresses:SendEmail' :: SendEmail -> Maybe [Text]
$sel:returnPath:SendEmail' :: SendEmail -> Maybe Text
$sel:returnPathArn:SendEmail' :: SendEmail -> Maybe Text
$sel:sourceArn:SendEmail' :: SendEmail -> Maybe Text
$sel:tags:SendEmail' :: SendEmail -> Maybe [MessageTag]
$sel:source:SendEmail' :: SendEmail -> Text
$sel:destination:SendEmail' :: SendEmail -> Destination
$sel:message:SendEmail' :: SendEmail -> Message
configurationSetName :: Maybe Text
replyToAddresses :: Maybe [Text]
returnPath :: Maybe Text
returnPathArn :: Maybe Text
sourceArn :: Maybe Text
tags :: Maybe [MessageTag]
source :: Text
destination :: Destination
message :: Message
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"SendEmail" :: 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
"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
"Message" ByteString -> Message -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Message
message
]
data SendEmailResponse = SendEmailResponse'
{
SendEmailResponse -> Int
httpStatus :: Prelude.Int,
SendEmailResponse -> Text
messageId :: Prelude.Text
}
deriving (SendEmailResponse -> SendEmailResponse -> Bool
(SendEmailResponse -> SendEmailResponse -> Bool)
-> (SendEmailResponse -> SendEmailResponse -> Bool)
-> Eq SendEmailResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SendEmailResponse -> SendEmailResponse -> Bool
== :: SendEmailResponse -> SendEmailResponse -> Bool
$c/= :: SendEmailResponse -> SendEmailResponse -> Bool
/= :: SendEmailResponse -> SendEmailResponse -> Bool
Prelude.Eq, ReadPrec [SendEmailResponse]
ReadPrec SendEmailResponse
Int -> ReadS SendEmailResponse
ReadS [SendEmailResponse]
(Int -> ReadS SendEmailResponse)
-> ReadS [SendEmailResponse]
-> ReadPrec SendEmailResponse
-> ReadPrec [SendEmailResponse]
-> Read SendEmailResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS SendEmailResponse
readsPrec :: Int -> ReadS SendEmailResponse
$creadList :: ReadS [SendEmailResponse]
readList :: ReadS [SendEmailResponse]
$creadPrec :: ReadPrec SendEmailResponse
readPrec :: ReadPrec SendEmailResponse
$creadListPrec :: ReadPrec [SendEmailResponse]
readListPrec :: ReadPrec [SendEmailResponse]
Prelude.Read, Int -> SendEmailResponse -> ShowS
[SendEmailResponse] -> ShowS
SendEmailResponse -> String
(Int -> SendEmailResponse -> ShowS)
-> (SendEmailResponse -> String)
-> ([SendEmailResponse] -> ShowS)
-> Show SendEmailResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SendEmailResponse -> ShowS
showsPrec :: Int -> SendEmailResponse -> ShowS
$cshow :: SendEmailResponse -> String
show :: SendEmailResponse -> String
$cshowList :: [SendEmailResponse] -> ShowS
showList :: [SendEmailResponse] -> ShowS
Prelude.Show, (forall x. SendEmailResponse -> Rep SendEmailResponse x)
-> (forall x. Rep SendEmailResponse x -> SendEmailResponse)
-> Generic SendEmailResponse
forall x. Rep SendEmailResponse x -> SendEmailResponse
forall x. SendEmailResponse -> Rep SendEmailResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SendEmailResponse -> Rep SendEmailResponse x
from :: forall x. SendEmailResponse -> Rep SendEmailResponse x
$cto :: forall x. Rep SendEmailResponse x -> SendEmailResponse
to :: forall x. Rep SendEmailResponse x -> SendEmailResponse
Prelude.Generic)
newSendEmailResponse ::
Prelude.Int ->
Prelude.Text ->
SendEmailResponse
newSendEmailResponse :: Int -> Text -> SendEmailResponse
newSendEmailResponse Int
pHttpStatus_ Text
pMessageId_ =
SendEmailResponse'
{ $sel:httpStatus:SendEmailResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:messageId:SendEmailResponse' :: Text
messageId = Text
pMessageId_
}
sendEmailResponse_httpStatus :: Lens.Lens' SendEmailResponse Prelude.Int
sendEmailResponse_httpStatus :: Lens' SendEmailResponse Int
sendEmailResponse_httpStatus = (SendEmailResponse -> Int)
-> (SendEmailResponse -> Int -> SendEmailResponse)
-> Lens' SendEmailResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmailResponse' {Int
$sel:httpStatus:SendEmailResponse' :: SendEmailResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: SendEmailResponse
s@SendEmailResponse' {} Int
a -> SendEmailResponse
s {httpStatus = a} :: SendEmailResponse)
sendEmailResponse_messageId :: Lens.Lens' SendEmailResponse Prelude.Text
sendEmailResponse_messageId :: Lens' SendEmailResponse Text
sendEmailResponse_messageId = (SendEmailResponse -> Text)
-> (SendEmailResponse -> Text -> SendEmailResponse)
-> Lens' SendEmailResponse Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendEmailResponse' {Text
$sel:messageId:SendEmailResponse' :: SendEmailResponse -> Text
messageId :: Text
messageId} -> Text
messageId) (\s :: SendEmailResponse
s@SendEmailResponse' {} Text
a -> SendEmailResponse
s {messageId = a} :: SendEmailResponse)
instance Prelude.NFData SendEmailResponse where
rnf :: SendEmailResponse -> ()
rnf SendEmailResponse' {Int
Text
$sel:httpStatus:SendEmailResponse' :: SendEmailResponse -> Int
$sel:messageId:SendEmailResponse' :: SendEmailResponse -> 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