{-# 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.DeleteIPSet
(
deleteIPSet
, DeleteIPSet
, disDetectorId
, disIPSetId
, deleteIPSetResponse
, DeleteIPSetResponse
, dipsrsResponseStatus
) 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
data DeleteIPSet = DeleteIPSet'
{ _disDetectorId :: !Text
, _disIPSetId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteIPSet
:: Text
-> Text
-> DeleteIPSet
deleteIPSet pDetectorId_ pIPSetId_ =
DeleteIPSet' {_disDetectorId = pDetectorId_, _disIPSetId = pIPSetId_}
disDetectorId :: Lens' DeleteIPSet Text
disDetectorId = lens _disDetectorId (\ s a -> s{_disDetectorId = a})
disIPSetId :: Lens' DeleteIPSet Text
disIPSetId = lens _disIPSetId (\ s a -> s{_disIPSetId = a})
instance AWSRequest DeleteIPSet where
type Rs DeleteIPSet = DeleteIPSetResponse
request = delete guardDuty
response
= receiveEmpty
(\ s h x ->
DeleteIPSetResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteIPSet where
instance NFData DeleteIPSet where
instance ToHeaders DeleteIPSet where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteIPSet where
toPath DeleteIPSet'{..}
= mconcat
["/detector/", toBS _disDetectorId, "/ipset/",
toBS _disIPSetId]
instance ToQuery DeleteIPSet where
toQuery = const mempty
newtype DeleteIPSetResponse = DeleteIPSetResponse'
{ _dipsrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteIPSetResponse
:: Int
-> DeleteIPSetResponse
deleteIPSetResponse pResponseStatus_ =
DeleteIPSetResponse' {_dipsrsResponseStatus = pResponseStatus_}
dipsrsResponseStatus :: Lens' DeleteIPSetResponse Int
dipsrsResponseStatus = lens _dipsrsResponseStatus (\ s a -> s{_dipsrsResponseStatus = a})
instance NFData DeleteIPSetResponse where