{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.SES.SendCustomVerificationEmail
(
sendCustomVerificationEmail
, SendCustomVerificationEmail
, scveConfigurationSetName
, scveEmailAddress
, scveTemplateName
, sendCustomVerificationEmailResponse
, SendCustomVerificationEmailResponse
, scversMessageId
, scversResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SES.Types
import Network.AWS.SES.Types.Product
data SendCustomVerificationEmail = SendCustomVerificationEmail'
{ _scveConfigurationSetName :: !(Maybe Text)
, _scveEmailAddress :: !Text
, _scveTemplateName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sendCustomVerificationEmail
:: Text
-> Text
-> SendCustomVerificationEmail
sendCustomVerificationEmail pEmailAddress_ pTemplateName_ =
SendCustomVerificationEmail'
{ _scveConfigurationSetName = Nothing
, _scveEmailAddress = pEmailAddress_
, _scveTemplateName = pTemplateName_
}
scveConfigurationSetName :: Lens' SendCustomVerificationEmail (Maybe Text)
scveConfigurationSetName = lens _scveConfigurationSetName (\ s a -> s{_scveConfigurationSetName = a})
scveEmailAddress :: Lens' SendCustomVerificationEmail Text
scveEmailAddress = lens _scveEmailAddress (\ s a -> s{_scveEmailAddress = a})
scveTemplateName :: Lens' SendCustomVerificationEmail Text
scveTemplateName = lens _scveTemplateName (\ s a -> s{_scveTemplateName = a})
instance AWSRequest SendCustomVerificationEmail where
type Rs SendCustomVerificationEmail =
SendCustomVerificationEmailResponse
request = postQuery ses
response
= receiveXMLWrapper
"SendCustomVerificationEmailResult"
(\ s h x ->
SendCustomVerificationEmailResponse' <$>
(x .@? "MessageId") <*> (pure (fromEnum s)))
instance Hashable SendCustomVerificationEmail where
instance NFData SendCustomVerificationEmail where
instance ToHeaders SendCustomVerificationEmail where
toHeaders = const mempty
instance ToPath SendCustomVerificationEmail where
toPath = const "/"
instance ToQuery SendCustomVerificationEmail where
toQuery SendCustomVerificationEmail'{..}
= mconcat
["Action" =:
("SendCustomVerificationEmail" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"ConfigurationSetName" =: _scveConfigurationSetName,
"EmailAddress" =: _scveEmailAddress,
"TemplateName" =: _scveTemplateName]
data SendCustomVerificationEmailResponse = SendCustomVerificationEmailResponse'
{ _scversMessageId :: !(Maybe Text)
, _scversResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sendCustomVerificationEmailResponse
:: Int
-> SendCustomVerificationEmailResponse
sendCustomVerificationEmailResponse pResponseStatus_ =
SendCustomVerificationEmailResponse'
{_scversMessageId = Nothing, _scversResponseStatus = pResponseStatus_}
scversMessageId :: Lens' SendCustomVerificationEmailResponse (Maybe Text)
scversMessageId = lens _scversMessageId (\ s a -> s{_scversMessageId = a})
scversResponseStatus :: Lens' SendCustomVerificationEmailResponse Int
scversResponseStatus = lens _scversResponseStatus (\ s a -> s{_scversResponseStatus = a})
instance NFData SendCustomVerificationEmailResponse
where