{-# 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.Route53Domains.ResendContactReachabilityEmail
(
resendContactReachabilityEmail
, ResendContactReachabilityEmail
, rcreDomainName
, resendContactReachabilityEmailResponse
, ResendContactReachabilityEmailResponse
, rcrersDomainName
, rcrersEmailAddress
, rcrersIsAlreadyVerified
, rcrersResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53Domains.Types
import Network.AWS.Route53Domains.Types.Product
newtype ResendContactReachabilityEmail = ResendContactReachabilityEmail'
{ _rcreDomainName :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resendContactReachabilityEmail
:: ResendContactReachabilityEmail
resendContactReachabilityEmail =
ResendContactReachabilityEmail'
{ _rcreDomainName = Nothing
}
rcreDomainName :: Lens' ResendContactReachabilityEmail (Maybe Text)
rcreDomainName = lens _rcreDomainName (\ s a -> s{_rcreDomainName = a});
instance AWSRequest ResendContactReachabilityEmail
where
type Rs ResendContactReachabilityEmail =
ResendContactReachabilityEmailResponse
request = postJSON route53Domains
response
= receiveJSON
(\ s h x ->
ResendContactReachabilityEmailResponse' <$>
(x .?> "domainName") <*> (x .?> "emailAddress") <*>
(x .?> "isAlreadyVerified")
<*> (pure (fromEnum s)))
instance Hashable ResendContactReachabilityEmail
instance NFData ResendContactReachabilityEmail
instance ToHeaders ResendContactReachabilityEmail
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Route53Domains_v20140515.ResendContactReachabilityEmail"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON ResendContactReachabilityEmail where
toJSON ResendContactReachabilityEmail'{..}
= object
(catMaybes [("domainName" .=) <$> _rcreDomainName])
instance ToPath ResendContactReachabilityEmail where
toPath = const "/"
instance ToQuery ResendContactReachabilityEmail where
toQuery = const mempty
data ResendContactReachabilityEmailResponse = ResendContactReachabilityEmailResponse'
{ _rcrersDomainName :: !(Maybe Text)
, _rcrersEmailAddress :: !(Maybe Text)
, _rcrersIsAlreadyVerified :: !(Maybe Bool)
, _rcrersResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resendContactReachabilityEmailResponse
:: Int
-> ResendContactReachabilityEmailResponse
resendContactReachabilityEmailResponse pResponseStatus_ =
ResendContactReachabilityEmailResponse'
{ _rcrersDomainName = Nothing
, _rcrersEmailAddress = Nothing
, _rcrersIsAlreadyVerified = Nothing
, _rcrersResponseStatus = pResponseStatus_
}
rcrersDomainName :: Lens' ResendContactReachabilityEmailResponse (Maybe Text)
rcrersDomainName = lens _rcrersDomainName (\ s a -> s{_rcrersDomainName = a});
rcrersEmailAddress :: Lens' ResendContactReachabilityEmailResponse (Maybe Text)
rcrersEmailAddress = lens _rcrersEmailAddress (\ s a -> s{_rcrersEmailAddress = a});
rcrersIsAlreadyVerified :: Lens' ResendContactReachabilityEmailResponse (Maybe Bool)
rcrersIsAlreadyVerified = lens _rcrersIsAlreadyVerified (\ s a -> s{_rcrersIsAlreadyVerified = a});
rcrersResponseStatus :: Lens' ResendContactReachabilityEmailResponse Int
rcrersResponseStatus = lens _rcrersResponseStatus (\ s a -> s{_rcrersResponseStatus = a});
instance NFData
ResendContactReachabilityEmailResponse