{-# 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.CreateConfigurationSet
    (
    
      createConfigurationSet
    , CreateConfigurationSet
    
    , ccsConfigurationSet
    
    , createConfigurationSetResponse
    , CreateConfigurationSetResponse
    
    , ccsrsResponseStatus
    ) 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 CreateConfigurationSet = CreateConfigurationSet'
    { _ccsConfigurationSet :: ConfigurationSet
    } deriving (Eq,Read,Show,Data,Typeable,Generic)
createConfigurationSet
    :: ConfigurationSet 
    -> CreateConfigurationSet
createConfigurationSet pConfigurationSet_ =
    CreateConfigurationSet'
    { _ccsConfigurationSet = pConfigurationSet_
    }
ccsConfigurationSet :: Lens' CreateConfigurationSet ConfigurationSet
ccsConfigurationSet = lens _ccsConfigurationSet (\ s a -> s{_ccsConfigurationSet = a});
instance AWSRequest CreateConfigurationSet where
        type Rs CreateConfigurationSet =
             CreateConfigurationSetResponse
        request = postQuery ses
        response
          = receiveXMLWrapper "CreateConfigurationSetResult"
              (\ s h x ->
                 CreateConfigurationSetResponse' <$>
                   (pure (fromEnum s)))
instance Hashable CreateConfigurationSet
instance NFData CreateConfigurationSet
instance ToHeaders CreateConfigurationSet where
        toHeaders = const mempty
instance ToPath CreateConfigurationSet where
        toPath = const "/"
instance ToQuery CreateConfigurationSet where
        toQuery CreateConfigurationSet'{..}
          = mconcat
              ["Action" =:
                 ("CreateConfigurationSet" :: ByteString),
               "Version" =: ("2010-12-01" :: ByteString),
               "ConfigurationSet" =: _ccsConfigurationSet]
newtype CreateConfigurationSetResponse = CreateConfigurationSetResponse'
    { _ccsrsResponseStatus :: Int
    } deriving (Eq,Read,Show,Data,Typeable,Generic)
createConfigurationSetResponse
    :: Int 
    -> CreateConfigurationSetResponse
createConfigurationSetResponse pResponseStatus_ =
    CreateConfigurationSetResponse'
    { _ccsrsResponseStatus = pResponseStatus_
    }
ccsrsResponseStatus :: Lens' CreateConfigurationSetResponse Int
ccsrsResponseStatus = lens _ccsrsResponseStatus (\ s a -> s{_ccsrsResponseStatus = a});
instance NFData CreateConfigurationSetResponse