module Network.AWS.Config.StartConfigurationRecorder
    (
    
      startConfigurationRecorder
    , StartConfigurationRecorder
    
    , sConfigurationRecorderName
    
    , startConfigurationRecorderResponse
    , StartConfigurationRecorderResponse
    ) where
import           Network.AWS.Config.Types
import           Network.AWS.Config.Types.Product
import           Network.AWS.Prelude
import           Network.AWS.Request
import           Network.AWS.Response
newtype StartConfigurationRecorder = StartConfigurationRecorder'
    { _sConfigurationRecorderName :: Text
    } deriving (Eq,Read,Show,Data,Typeable,Generic)
startConfigurationRecorder
    :: Text 
    -> StartConfigurationRecorder
startConfigurationRecorder pConfigurationRecorderName_ =
    StartConfigurationRecorder'
    { _sConfigurationRecorderName = pConfigurationRecorderName_
    }
sConfigurationRecorderName :: Lens' StartConfigurationRecorder Text
sConfigurationRecorderName = lens _sConfigurationRecorderName (\ s a -> s{_sConfigurationRecorderName = a});
instance AWSRequest StartConfigurationRecorder where
        type Rs StartConfigurationRecorder =
             StartConfigurationRecorderResponse
        request = postJSON config
        response
          = receiveNull StartConfigurationRecorderResponse'
instance ToHeaders StartConfigurationRecorder where
        toHeaders
          = const
              (mconcat
                 ["X-Amz-Target" =#
                    ("StarlingDoveService.StartConfigurationRecorder" ::
                       ByteString),
                  "Content-Type" =#
                    ("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StartConfigurationRecorder where
        toJSON StartConfigurationRecorder'{..}
          = object
              (catMaybes
                 [Just
                    ("ConfigurationRecorderName" .=
                       _sConfigurationRecorderName)])
instance ToPath StartConfigurationRecorder where
        toPath = const "/"
instance ToQuery StartConfigurationRecorder where
        toQuery = const mempty
data StartConfigurationRecorderResponse =
    StartConfigurationRecorderResponse'
    deriving (Eq,Read,Show,Data,Typeable,Generic)
startConfigurationRecorderResponse
    :: StartConfigurationRecorderResponse
startConfigurationRecorderResponse = StartConfigurationRecorderResponse'