module Network.AWS.SES.SetIdentityNotificationTopic
(
setIdentityNotificationTopic
, SetIdentityNotificationTopic
, sintSNSTopic
, sintIdentity
, sintNotificationType
, setIdentityNotificationTopicResponse
, SetIdentityNotificationTopicResponse
, sintrsResponseStatus
) 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 SetIdentityNotificationTopic = SetIdentityNotificationTopic'
{ _sintSNSTopic :: !(Maybe Text)
, _sintIdentity :: !Text
, _sintNotificationType :: !NotificationType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
setIdentityNotificationTopic
:: Text
-> NotificationType
-> SetIdentityNotificationTopic
setIdentityNotificationTopic pIdentity_ pNotificationType_ =
SetIdentityNotificationTopic'
{ _sintSNSTopic = Nothing
, _sintIdentity = pIdentity_
, _sintNotificationType = pNotificationType_
}
sintSNSTopic :: Lens' SetIdentityNotificationTopic (Maybe Text)
sintSNSTopic = lens _sintSNSTopic (\ s a -> s{_sintSNSTopic = a});
sintIdentity :: Lens' SetIdentityNotificationTopic Text
sintIdentity = lens _sintIdentity (\ s a -> s{_sintIdentity = a});
sintNotificationType :: Lens' SetIdentityNotificationTopic NotificationType
sintNotificationType = lens _sintNotificationType (\ s a -> s{_sintNotificationType = a});
instance AWSRequest SetIdentityNotificationTopic
where
type Rs SetIdentityNotificationTopic =
SetIdentityNotificationTopicResponse
request = postQuery ses
response
= receiveXMLWrapper
"SetIdentityNotificationTopicResult"
(\ s h x ->
SetIdentityNotificationTopicResponse' <$>
(pure (fromEnum s)))
instance Hashable SetIdentityNotificationTopic
instance NFData SetIdentityNotificationTopic
instance ToHeaders SetIdentityNotificationTopic where
toHeaders = const mempty
instance ToPath SetIdentityNotificationTopic where
toPath = const "/"
instance ToQuery SetIdentityNotificationTopic where
toQuery SetIdentityNotificationTopic'{..}
= mconcat
["Action" =:
("SetIdentityNotificationTopic" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"SnsTopic" =: _sintSNSTopic,
"Identity" =: _sintIdentity,
"NotificationType" =: _sintNotificationType]
newtype SetIdentityNotificationTopicResponse = SetIdentityNotificationTopicResponse'
{ _sintrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
setIdentityNotificationTopicResponse
:: Int
-> SetIdentityNotificationTopicResponse
setIdentityNotificationTopicResponse pResponseStatus_ =
SetIdentityNotificationTopicResponse'
{ _sintrsResponseStatus = pResponseStatus_
}
sintrsResponseStatus :: Lens' SetIdentityNotificationTopicResponse Int
sintrsResponseStatus = lens _sintrsResponseStatus (\ s a -> s{_sintrsResponseStatus = a});
instance NFData SetIdentityNotificationTopicResponse