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