{-# 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.SendCustomVerificationEmail
(
SendCustomVerificationEmail (..),
newSendCustomVerificationEmail,
sendCustomVerificationEmail_configurationSetName,
sendCustomVerificationEmail_emailAddress,
sendCustomVerificationEmail_templateName,
SendCustomVerificationEmailResponse (..),
newSendCustomVerificationEmailResponse,
sendCustomVerificationEmailResponse_messageId,
sendCustomVerificationEmailResponse_httpStatus,
)
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 SendCustomVerificationEmail = SendCustomVerificationEmail'
{
SendCustomVerificationEmail -> Maybe Text
configurationSetName :: Prelude.Maybe Prelude.Text,
SendCustomVerificationEmail -> Text
emailAddress :: Prelude.Text,
SendCustomVerificationEmail -> Text
templateName :: Prelude.Text
}
deriving (SendCustomVerificationEmail -> SendCustomVerificationEmail -> Bool
(SendCustomVerificationEmail
-> SendCustomVerificationEmail -> Bool)
-> (SendCustomVerificationEmail
-> SendCustomVerificationEmail -> Bool)
-> Eq SendCustomVerificationEmail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SendCustomVerificationEmail -> SendCustomVerificationEmail -> Bool
== :: SendCustomVerificationEmail -> SendCustomVerificationEmail -> Bool
$c/= :: SendCustomVerificationEmail -> SendCustomVerificationEmail -> Bool
/= :: SendCustomVerificationEmail -> SendCustomVerificationEmail -> Bool
Prelude.Eq, ReadPrec [SendCustomVerificationEmail]
ReadPrec SendCustomVerificationEmail
Int -> ReadS SendCustomVerificationEmail
ReadS [SendCustomVerificationEmail]
(Int -> ReadS SendCustomVerificationEmail)
-> ReadS [SendCustomVerificationEmail]
-> ReadPrec SendCustomVerificationEmail
-> ReadPrec [SendCustomVerificationEmail]
-> Read SendCustomVerificationEmail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS SendCustomVerificationEmail
readsPrec :: Int -> ReadS SendCustomVerificationEmail
$creadList :: ReadS [SendCustomVerificationEmail]
readList :: ReadS [SendCustomVerificationEmail]
$creadPrec :: ReadPrec SendCustomVerificationEmail
readPrec :: ReadPrec SendCustomVerificationEmail
$creadListPrec :: ReadPrec [SendCustomVerificationEmail]
readListPrec :: ReadPrec [SendCustomVerificationEmail]
Prelude.Read, Int -> SendCustomVerificationEmail -> ShowS
[SendCustomVerificationEmail] -> ShowS
SendCustomVerificationEmail -> String
(Int -> SendCustomVerificationEmail -> ShowS)
-> (SendCustomVerificationEmail -> String)
-> ([SendCustomVerificationEmail] -> ShowS)
-> Show SendCustomVerificationEmail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SendCustomVerificationEmail -> ShowS
showsPrec :: Int -> SendCustomVerificationEmail -> ShowS
$cshow :: SendCustomVerificationEmail -> String
show :: SendCustomVerificationEmail -> String
$cshowList :: [SendCustomVerificationEmail] -> ShowS
showList :: [SendCustomVerificationEmail] -> ShowS
Prelude.Show, (forall x.
SendCustomVerificationEmail -> Rep SendCustomVerificationEmail x)
-> (forall x.
Rep SendCustomVerificationEmail x -> SendCustomVerificationEmail)
-> Generic SendCustomVerificationEmail
forall x.
Rep SendCustomVerificationEmail x -> SendCustomVerificationEmail
forall x.
SendCustomVerificationEmail -> Rep SendCustomVerificationEmail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SendCustomVerificationEmail -> Rep SendCustomVerificationEmail x
from :: forall x.
SendCustomVerificationEmail -> Rep SendCustomVerificationEmail x
$cto :: forall x.
Rep SendCustomVerificationEmail x -> SendCustomVerificationEmail
to :: forall x.
Rep SendCustomVerificationEmail x -> SendCustomVerificationEmail
Prelude.Generic)
newSendCustomVerificationEmail ::
Prelude.Text ->
Prelude.Text ->
SendCustomVerificationEmail
newSendCustomVerificationEmail :: Text -> Text -> SendCustomVerificationEmail
newSendCustomVerificationEmail
Text
pEmailAddress_
Text
pTemplateName_ =
SendCustomVerificationEmail'
{ $sel:configurationSetName:SendCustomVerificationEmail' :: Maybe Text
configurationSetName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:emailAddress:SendCustomVerificationEmail' :: Text
emailAddress = Text
pEmailAddress_,
$sel:templateName:SendCustomVerificationEmail' :: Text
templateName = Text
pTemplateName_
}
sendCustomVerificationEmail_configurationSetName :: Lens.Lens' SendCustomVerificationEmail (Prelude.Maybe Prelude.Text)
sendCustomVerificationEmail_configurationSetName :: Lens' SendCustomVerificationEmail (Maybe Text)
sendCustomVerificationEmail_configurationSetName = (SendCustomVerificationEmail -> Maybe Text)
-> (SendCustomVerificationEmail
-> Maybe Text -> SendCustomVerificationEmail)
-> Lens' SendCustomVerificationEmail (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCustomVerificationEmail' {Maybe Text
$sel:configurationSetName:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Maybe Text
configurationSetName :: Maybe Text
configurationSetName} -> Maybe Text
configurationSetName) (\s :: SendCustomVerificationEmail
s@SendCustomVerificationEmail' {} Maybe Text
a -> SendCustomVerificationEmail
s {configurationSetName = a} :: SendCustomVerificationEmail)
sendCustomVerificationEmail_emailAddress :: Lens.Lens' SendCustomVerificationEmail Prelude.Text
sendCustomVerificationEmail_emailAddress :: Lens' SendCustomVerificationEmail Text
sendCustomVerificationEmail_emailAddress = (SendCustomVerificationEmail -> Text)
-> (SendCustomVerificationEmail
-> Text -> SendCustomVerificationEmail)
-> Lens' SendCustomVerificationEmail Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCustomVerificationEmail' {Text
$sel:emailAddress:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Text
emailAddress :: Text
emailAddress} -> Text
emailAddress) (\s :: SendCustomVerificationEmail
s@SendCustomVerificationEmail' {} Text
a -> SendCustomVerificationEmail
s {emailAddress = a} :: SendCustomVerificationEmail)
sendCustomVerificationEmail_templateName :: Lens.Lens' SendCustomVerificationEmail Prelude.Text
sendCustomVerificationEmail_templateName :: Lens' SendCustomVerificationEmail Text
sendCustomVerificationEmail_templateName = (SendCustomVerificationEmail -> Text)
-> (SendCustomVerificationEmail
-> Text -> SendCustomVerificationEmail)
-> Lens' SendCustomVerificationEmail Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCustomVerificationEmail' {Text
$sel:templateName:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Text
templateName :: Text
templateName} -> Text
templateName) (\s :: SendCustomVerificationEmail
s@SendCustomVerificationEmail' {} Text
a -> SendCustomVerificationEmail
s {templateName = a} :: SendCustomVerificationEmail)
instance Core.AWSRequest SendCustomVerificationEmail where
type
AWSResponse SendCustomVerificationEmail =
SendCustomVerificationEmailResponse
request :: (Service -> Service)
-> SendCustomVerificationEmail
-> Request SendCustomVerificationEmail
request Service -> Service
overrides =
Service
-> SendCustomVerificationEmail
-> Request SendCustomVerificationEmail
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 SendCustomVerificationEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SendCustomVerificationEmail)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse SendCustomVerificationEmail))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SendCustomVerificationEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SendCustomVerificationEmail)))
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
"SendCustomVerificationEmailResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text -> Int -> SendCustomVerificationEmailResponse
SendCustomVerificationEmailResponse'
(Maybe Text -> Int -> SendCustomVerificationEmailResponse)
-> Either String (Maybe Text)
-> Either String (Int -> SendCustomVerificationEmailResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"MessageId")
Either String (Int -> SendCustomVerificationEmailResponse)
-> Either String Int
-> Either String SendCustomVerificationEmailResponse
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.<*> (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))
)
instance Prelude.Hashable SendCustomVerificationEmail where
hashWithSalt :: Int -> SendCustomVerificationEmail -> Int
hashWithSalt Int
_salt SendCustomVerificationEmail' {Maybe Text
Text
$sel:configurationSetName:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Maybe Text
$sel:emailAddress:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Text
$sel:templateName:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Text
configurationSetName :: Maybe Text
emailAddress :: Text
templateName :: Text
..} =
Int
_salt
Int -> Maybe Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configurationSetName
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
emailAddress
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateName
instance Prelude.NFData SendCustomVerificationEmail where
rnf :: SendCustomVerificationEmail -> ()
rnf SendCustomVerificationEmail' {Maybe Text
Text
$sel:configurationSetName:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Maybe Text
$sel:emailAddress:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Text
$sel:templateName:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Text
configurationSetName :: Maybe Text
emailAddress :: Text
templateName :: Text
..} =
Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationSetName
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
emailAddress
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
templateName
instance Data.ToHeaders SendCustomVerificationEmail where
toHeaders :: SendCustomVerificationEmail -> ResponseHeaders
toHeaders = ResponseHeaders -> SendCustomVerificationEmail -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath SendCustomVerificationEmail where
toPath :: SendCustomVerificationEmail -> ByteString
toPath = ByteString -> SendCustomVerificationEmail -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery SendCustomVerificationEmail where
toQuery :: SendCustomVerificationEmail -> QueryString
toQuery SendCustomVerificationEmail' {Maybe Text
Text
$sel:configurationSetName:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Maybe Text
$sel:emailAddress:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Text
$sel:templateName:SendCustomVerificationEmail' :: SendCustomVerificationEmail -> Text
configurationSetName :: Maybe Text
emailAddress :: Text
templateName :: 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
"SendCustomVerificationEmail" ::
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
"EmailAddress" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
emailAddress,
ByteString
"TemplateName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
templateName
]
data SendCustomVerificationEmailResponse = SendCustomVerificationEmailResponse'
{
SendCustomVerificationEmailResponse -> Maybe Text
messageId :: Prelude.Maybe Prelude.Text,
SendCustomVerificationEmailResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SendCustomVerificationEmailResponse
-> SendCustomVerificationEmailResponse -> Bool
(SendCustomVerificationEmailResponse
-> SendCustomVerificationEmailResponse -> Bool)
-> (SendCustomVerificationEmailResponse
-> SendCustomVerificationEmailResponse -> Bool)
-> Eq SendCustomVerificationEmailResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SendCustomVerificationEmailResponse
-> SendCustomVerificationEmailResponse -> Bool
== :: SendCustomVerificationEmailResponse
-> SendCustomVerificationEmailResponse -> Bool
$c/= :: SendCustomVerificationEmailResponse
-> SendCustomVerificationEmailResponse -> Bool
/= :: SendCustomVerificationEmailResponse
-> SendCustomVerificationEmailResponse -> Bool
Prelude.Eq, ReadPrec [SendCustomVerificationEmailResponse]
ReadPrec SendCustomVerificationEmailResponse
Int -> ReadS SendCustomVerificationEmailResponse
ReadS [SendCustomVerificationEmailResponse]
(Int -> ReadS SendCustomVerificationEmailResponse)
-> ReadS [SendCustomVerificationEmailResponse]
-> ReadPrec SendCustomVerificationEmailResponse
-> ReadPrec [SendCustomVerificationEmailResponse]
-> Read SendCustomVerificationEmailResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS SendCustomVerificationEmailResponse
readsPrec :: Int -> ReadS SendCustomVerificationEmailResponse
$creadList :: ReadS [SendCustomVerificationEmailResponse]
readList :: ReadS [SendCustomVerificationEmailResponse]
$creadPrec :: ReadPrec SendCustomVerificationEmailResponse
readPrec :: ReadPrec SendCustomVerificationEmailResponse
$creadListPrec :: ReadPrec [SendCustomVerificationEmailResponse]
readListPrec :: ReadPrec [SendCustomVerificationEmailResponse]
Prelude.Read, Int -> SendCustomVerificationEmailResponse -> ShowS
[SendCustomVerificationEmailResponse] -> ShowS
SendCustomVerificationEmailResponse -> String
(Int -> SendCustomVerificationEmailResponse -> ShowS)
-> (SendCustomVerificationEmailResponse -> String)
-> ([SendCustomVerificationEmailResponse] -> ShowS)
-> Show SendCustomVerificationEmailResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SendCustomVerificationEmailResponse -> ShowS
showsPrec :: Int -> SendCustomVerificationEmailResponse -> ShowS
$cshow :: SendCustomVerificationEmailResponse -> String
show :: SendCustomVerificationEmailResponse -> String
$cshowList :: [SendCustomVerificationEmailResponse] -> ShowS
showList :: [SendCustomVerificationEmailResponse] -> ShowS
Prelude.Show, (forall x.
SendCustomVerificationEmailResponse
-> Rep SendCustomVerificationEmailResponse x)
-> (forall x.
Rep SendCustomVerificationEmailResponse x
-> SendCustomVerificationEmailResponse)
-> Generic SendCustomVerificationEmailResponse
forall x.
Rep SendCustomVerificationEmailResponse x
-> SendCustomVerificationEmailResponse
forall x.
SendCustomVerificationEmailResponse
-> Rep SendCustomVerificationEmailResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SendCustomVerificationEmailResponse
-> Rep SendCustomVerificationEmailResponse x
from :: forall x.
SendCustomVerificationEmailResponse
-> Rep SendCustomVerificationEmailResponse x
$cto :: forall x.
Rep SendCustomVerificationEmailResponse x
-> SendCustomVerificationEmailResponse
to :: forall x.
Rep SendCustomVerificationEmailResponse x
-> SendCustomVerificationEmailResponse
Prelude.Generic)
newSendCustomVerificationEmailResponse ::
Prelude.Int ->
SendCustomVerificationEmailResponse
newSendCustomVerificationEmailResponse :: Int -> SendCustomVerificationEmailResponse
newSendCustomVerificationEmailResponse Int
pHttpStatus_ =
SendCustomVerificationEmailResponse'
{ $sel:messageId:SendCustomVerificationEmailResponse' :: Maybe Text
messageId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SendCustomVerificationEmailResponse' :: Int
httpStatus = Int
pHttpStatus_
}
sendCustomVerificationEmailResponse_messageId :: Lens.Lens' SendCustomVerificationEmailResponse (Prelude.Maybe Prelude.Text)
sendCustomVerificationEmailResponse_messageId :: Lens' SendCustomVerificationEmailResponse (Maybe Text)
sendCustomVerificationEmailResponse_messageId = (SendCustomVerificationEmailResponse -> Maybe Text)
-> (SendCustomVerificationEmailResponse
-> Maybe Text -> SendCustomVerificationEmailResponse)
-> Lens' SendCustomVerificationEmailResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCustomVerificationEmailResponse' {Maybe Text
$sel:messageId:SendCustomVerificationEmailResponse' :: SendCustomVerificationEmailResponse -> Maybe Text
messageId :: Maybe Text
messageId} -> Maybe Text
messageId) (\s :: SendCustomVerificationEmailResponse
s@SendCustomVerificationEmailResponse' {} Maybe Text
a -> SendCustomVerificationEmailResponse
s {messageId = a} :: SendCustomVerificationEmailResponse)
sendCustomVerificationEmailResponse_httpStatus :: Lens.Lens' SendCustomVerificationEmailResponse Prelude.Int
sendCustomVerificationEmailResponse_httpStatus :: Lens' SendCustomVerificationEmailResponse Int
sendCustomVerificationEmailResponse_httpStatus = (SendCustomVerificationEmailResponse -> Int)
-> (SendCustomVerificationEmailResponse
-> Int -> SendCustomVerificationEmailResponse)
-> Lens' SendCustomVerificationEmailResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCustomVerificationEmailResponse' {Int
$sel:httpStatus:SendCustomVerificationEmailResponse' :: SendCustomVerificationEmailResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: SendCustomVerificationEmailResponse
s@SendCustomVerificationEmailResponse' {} Int
a -> SendCustomVerificationEmailResponse
s {httpStatus = a} :: SendCustomVerificationEmailResponse)
instance
Prelude.NFData
SendCustomVerificationEmailResponse
where
rnf :: SendCustomVerificationEmailResponse -> ()
rnf SendCustomVerificationEmailResponse' {Int
Maybe Text
$sel:messageId:SendCustomVerificationEmailResponse' :: SendCustomVerificationEmailResponse -> Maybe Text
$sel:httpStatus:SendCustomVerificationEmailResponse' :: SendCustomVerificationEmailResponse -> Int
messageId :: Maybe Text
httpStatus :: Int
..} =
Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
messageId
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus