{-# 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.VerifyEmailIdentity
(
verifyEmailIdentity
, VerifyEmailIdentity
, veiEmailAddress
, verifyEmailIdentityResponse
, VerifyEmailIdentityResponse
, veirsResponseStatus
) 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
newtype VerifyEmailIdentity = VerifyEmailIdentity'
{ _veiEmailAddress :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
verifyEmailIdentity
:: Text
-> VerifyEmailIdentity
verifyEmailIdentity pEmailAddress_ =
VerifyEmailIdentity' {_veiEmailAddress = pEmailAddress_}
veiEmailAddress :: Lens' VerifyEmailIdentity Text
veiEmailAddress = lens _veiEmailAddress (\ s a -> s{_veiEmailAddress = a})
instance AWSRequest VerifyEmailIdentity where
type Rs VerifyEmailIdentity =
VerifyEmailIdentityResponse
request = postQuery ses
response
= receiveXMLWrapper "VerifyEmailIdentityResult"
(\ s h x ->
VerifyEmailIdentityResponse' <$> (pure (fromEnum s)))
instance Hashable VerifyEmailIdentity where
instance NFData VerifyEmailIdentity where
instance ToHeaders VerifyEmailIdentity where
toHeaders = const mempty
instance ToPath VerifyEmailIdentity where
toPath = const "/"
instance ToQuery VerifyEmailIdentity where
toQuery VerifyEmailIdentity'{..}
= mconcat
["Action" =: ("VerifyEmailIdentity" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"EmailAddress" =: _veiEmailAddress]
newtype VerifyEmailIdentityResponse = VerifyEmailIdentityResponse'
{ _veirsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
verifyEmailIdentityResponse
:: Int
-> VerifyEmailIdentityResponse
verifyEmailIdentityResponse pResponseStatus_ =
VerifyEmailIdentityResponse' {_veirsResponseStatus = pResponseStatus_}
veirsResponseStatus :: Lens' VerifyEmailIdentityResponse Int
veirsResponseStatus = lens _veirsResponseStatus (\ s a -> s{_veirsResponseStatus = a})
instance NFData VerifyEmailIdentityResponse where