{-# 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.UpdateConfigurationSetEventDestination
    (
    
      updateConfigurationSetEventDestination
    , UpdateConfigurationSetEventDestination
    
    , ucsedConfigurationSetName
    , ucsedEventDestination
    
    , updateConfigurationSetEventDestinationResponse
    , UpdateConfigurationSetEventDestinationResponse
    
    , ucsedrsResponseStatus
    ) 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 UpdateConfigurationSetEventDestination = UpdateConfigurationSetEventDestination'
    { _ucsedConfigurationSetName :: !Text
    , _ucsedEventDestination     :: !EventDestination
    } deriving (Eq,Read,Show,Data,Typeable,Generic)
updateConfigurationSetEventDestination
    :: Text 
    -> EventDestination 
    -> UpdateConfigurationSetEventDestination
updateConfigurationSetEventDestination pConfigurationSetName_ pEventDestination_ =
    UpdateConfigurationSetEventDestination'
    { _ucsedConfigurationSetName = pConfigurationSetName_
    , _ucsedEventDestination = pEventDestination_
    }
ucsedConfigurationSetName :: Lens' UpdateConfigurationSetEventDestination Text
ucsedConfigurationSetName = lens _ucsedConfigurationSetName (\ s a -> s{_ucsedConfigurationSetName = a});
ucsedEventDestination :: Lens' UpdateConfigurationSetEventDestination EventDestination
ucsedEventDestination = lens _ucsedEventDestination (\ s a -> s{_ucsedEventDestination = a});
instance AWSRequest
         UpdateConfigurationSetEventDestination where
        type Rs UpdateConfigurationSetEventDestination =
             UpdateConfigurationSetEventDestinationResponse
        request = postQuery ses
        response
          = receiveXMLWrapper
              "UpdateConfigurationSetEventDestinationResult"
              (\ s h x ->
                 UpdateConfigurationSetEventDestinationResponse' <$>
                   (pure (fromEnum s)))
instance Hashable
         UpdateConfigurationSetEventDestination
instance NFData
         UpdateConfigurationSetEventDestination
instance ToHeaders
         UpdateConfigurationSetEventDestination where
        toHeaders = const mempty
instance ToPath
         UpdateConfigurationSetEventDestination where
        toPath = const "/"
instance ToQuery
         UpdateConfigurationSetEventDestination where
        toQuery UpdateConfigurationSetEventDestination'{..}
          = mconcat
              ["Action" =:
                 ("UpdateConfigurationSetEventDestination" ::
                    ByteString),
               "Version" =: ("2010-12-01" :: ByteString),
               "ConfigurationSetName" =: _ucsedConfigurationSetName,
               "EventDestination" =: _ucsedEventDestination]
newtype UpdateConfigurationSetEventDestinationResponse = UpdateConfigurationSetEventDestinationResponse'
    { _ucsedrsResponseStatus :: Int
    } deriving (Eq,Read,Show,Data,Typeable,Generic)
updateConfigurationSetEventDestinationResponse
    :: Int 
    -> UpdateConfigurationSetEventDestinationResponse
updateConfigurationSetEventDestinationResponse pResponseStatus_ =
    UpdateConfigurationSetEventDestinationResponse'
    { _ucsedrsResponseStatus = pResponseStatus_
    }
ucsedrsResponseStatus :: Lens' UpdateConfigurationSetEventDestinationResponse Int
ucsedrsResponseStatus = lens _ucsedrsResponseStatus (\ s a -> s{_ucsedrsResponseStatus = a});
instance NFData
         UpdateConfigurationSetEventDestinationResponse