{-# 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.SetReceiptRulePosition
    (
    
      setReceiptRulePosition
    , SetReceiptRulePosition
    
    , srrpAfter
    , srrpRuleSetName
    , srrpRuleName
    
    , setReceiptRulePositionResponse
    , SetReceiptRulePositionResponse
    
    , srrprsResponseStatus
    ) 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 SetReceiptRulePosition = SetReceiptRulePosition'
    { _srrpAfter       :: !(Maybe Text)
    , _srrpRuleSetName :: !Text
    , _srrpRuleName    :: !Text
    } deriving (Eq,Read,Show,Data,Typeable,Generic)
setReceiptRulePosition
    :: Text 
    -> Text 
    -> SetReceiptRulePosition
setReceiptRulePosition pRuleSetName_ pRuleName_ =
    SetReceiptRulePosition'
    { _srrpAfter = Nothing
    , _srrpRuleSetName = pRuleSetName_
    , _srrpRuleName = pRuleName_
    }
srrpAfter :: Lens' SetReceiptRulePosition (Maybe Text)
srrpAfter = lens _srrpAfter (\ s a -> s{_srrpAfter = a});
srrpRuleSetName :: Lens' SetReceiptRulePosition Text
srrpRuleSetName = lens _srrpRuleSetName (\ s a -> s{_srrpRuleSetName = a});
srrpRuleName :: Lens' SetReceiptRulePosition Text
srrpRuleName = lens _srrpRuleName (\ s a -> s{_srrpRuleName = a});
instance AWSRequest SetReceiptRulePosition where
        type Rs SetReceiptRulePosition =
             SetReceiptRulePositionResponse
        request = postQuery ses
        response
          = receiveXMLWrapper "SetReceiptRulePositionResult"
              (\ s h x ->
                 SetReceiptRulePositionResponse' <$>
                   (pure (fromEnum s)))
instance Hashable SetReceiptRulePosition
instance NFData SetReceiptRulePosition
instance ToHeaders SetReceiptRulePosition where
        toHeaders = const mempty
instance ToPath SetReceiptRulePosition where
        toPath = const "/"
instance ToQuery SetReceiptRulePosition where
        toQuery SetReceiptRulePosition'{..}
          = mconcat
              ["Action" =:
                 ("SetReceiptRulePosition" :: ByteString),
               "Version" =: ("2010-12-01" :: ByteString),
               "After" =: _srrpAfter,
               "RuleSetName" =: _srrpRuleSetName,
               "RuleName" =: _srrpRuleName]
newtype SetReceiptRulePositionResponse = SetReceiptRulePositionResponse'
    { _srrprsResponseStatus :: Int
    } deriving (Eq,Read,Show,Data,Typeable,Generic)
setReceiptRulePositionResponse
    :: Int 
    -> SetReceiptRulePositionResponse
setReceiptRulePositionResponse pResponseStatus_ =
    SetReceiptRulePositionResponse'
    { _srrprsResponseStatus = pResponseStatus_
    }
srrprsResponseStatus :: Lens' SetReceiptRulePositionResponse Int
srrprsResponseStatus = lens _srrprsResponseStatus (\ s a -> s{_srrprsResponseStatus = a});
instance NFData SetReceiptRulePositionResponse