{-# 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.GuardDuty.DeleteDetector
(
deleteDetector
, DeleteDetector
, ddDetectorId
, deleteDetectorResponse
, DeleteDetectorResponse
, ddrsResponseStatus
) where
import Network.AWS.GuardDuty.Types
import Network.AWS.GuardDuty.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteDetector = DeleteDetector'
{ _ddDetectorId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDetector
:: Text
-> DeleteDetector
deleteDetector pDetectorId_ = DeleteDetector' {_ddDetectorId = pDetectorId_}
ddDetectorId :: Lens' DeleteDetector Text
ddDetectorId = lens _ddDetectorId (\ s a -> s{_ddDetectorId = a})
instance AWSRequest DeleteDetector where
type Rs DeleteDetector = DeleteDetectorResponse
request = delete guardDuty
response
= receiveEmpty
(\ s h x ->
DeleteDetectorResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteDetector where
instance NFData DeleteDetector where
instance ToHeaders DeleteDetector where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteDetector where
toPath DeleteDetector'{..}
= mconcat ["/detector/", toBS _ddDetectorId]
instance ToQuery DeleteDetector where
toQuery = const mempty
newtype DeleteDetectorResponse = DeleteDetectorResponse'
{ _ddrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDetectorResponse
:: Int
-> DeleteDetectorResponse
deleteDetectorResponse pResponseStatus_ =
DeleteDetectorResponse' {_ddrsResponseStatus = pResponseStatus_}
ddrsResponseStatus :: Lens' DeleteDetectorResponse Int
ddrsResponseStatus = lens _ddrsResponseStatus (\ s a -> s{_ddrsResponseStatus = a})
instance NFData DeleteDetectorResponse where