{-# 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.UpdateReceiptRule
(
updateReceiptRule
, UpdateReceiptRule
, urrRuleSetName
, urrRule
, updateReceiptRuleResponse
, UpdateReceiptRuleResponse
, urrrsResponseStatus
) 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 UpdateReceiptRule = UpdateReceiptRule'
{ _urrRuleSetName :: !Text
, _urrRule :: !ReceiptRule
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateReceiptRule
:: Text
-> ReceiptRule
-> UpdateReceiptRule
updateReceiptRule pRuleSetName_ pRule_ =
UpdateReceiptRule' {_urrRuleSetName = pRuleSetName_, _urrRule = pRule_}
urrRuleSetName :: Lens' UpdateReceiptRule Text
urrRuleSetName = lens _urrRuleSetName (\ s a -> s{_urrRuleSetName = a})
urrRule :: Lens' UpdateReceiptRule ReceiptRule
urrRule = lens _urrRule (\ s a -> s{_urrRule = a})
instance AWSRequest UpdateReceiptRule where
type Rs UpdateReceiptRule = UpdateReceiptRuleResponse
request = postQuery ses
response
= receiveXMLWrapper "UpdateReceiptRuleResult"
(\ s h x ->
UpdateReceiptRuleResponse' <$> (pure (fromEnum s)))
instance Hashable UpdateReceiptRule where
instance NFData UpdateReceiptRule where
instance ToHeaders UpdateReceiptRule where
toHeaders = const mempty
instance ToPath UpdateReceiptRule where
toPath = const "/"
instance ToQuery UpdateReceiptRule where
toQuery UpdateReceiptRule'{..}
= mconcat
["Action" =: ("UpdateReceiptRule" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"RuleSetName" =: _urrRuleSetName, "Rule" =: _urrRule]
newtype UpdateReceiptRuleResponse = UpdateReceiptRuleResponse'
{ _urrrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateReceiptRuleResponse
:: Int
-> UpdateReceiptRuleResponse
updateReceiptRuleResponse pResponseStatus_ =
UpdateReceiptRuleResponse' {_urrrsResponseStatus = pResponseStatus_}
urrrsResponseStatus :: Lens' UpdateReceiptRuleResponse Int
urrrsResponseStatus = lens _urrrsResponseStatus (\ s a -> s{_urrrsResponseStatus = a})
instance NFData UpdateReceiptRuleResponse where