{-# 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.WAF.DeleteXSSMatchSet
(
deleteXSSMatchSet
, DeleteXSSMatchSet
, dxmsXSSMatchSetId
, dxmsChangeToken
, deleteXSSMatchSetResponse
, DeleteXSSMatchSetResponse
, dxmsrsChangeToken
, dxmsrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.WAF.Types
import Network.AWS.WAF.Types.Product
data DeleteXSSMatchSet = DeleteXSSMatchSet'
{ _dxmsXSSMatchSetId :: !Text
, _dxmsChangeToken :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteXSSMatchSet
:: Text
-> Text
-> DeleteXSSMatchSet
deleteXSSMatchSet pXSSMatchSetId_ pChangeToken_ =
DeleteXSSMatchSet'
{_dxmsXSSMatchSetId = pXSSMatchSetId_, _dxmsChangeToken = pChangeToken_}
dxmsXSSMatchSetId :: Lens' DeleteXSSMatchSet Text
dxmsXSSMatchSetId = lens _dxmsXSSMatchSetId (\ s a -> s{_dxmsXSSMatchSetId = a})
dxmsChangeToken :: Lens' DeleteXSSMatchSet Text
dxmsChangeToken = lens _dxmsChangeToken (\ s a -> s{_dxmsChangeToken = a})
instance AWSRequest DeleteXSSMatchSet where
type Rs DeleteXSSMatchSet = DeleteXSSMatchSetResponse
request = postJSON waf
response
= receiveJSON
(\ s h x ->
DeleteXSSMatchSetResponse' <$>
(x .?> "ChangeToken") <*> (pure (fromEnum s)))
instance Hashable DeleteXSSMatchSet where
instance NFData DeleteXSSMatchSet where
instance ToHeaders DeleteXSSMatchSet where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSWAF_20150824.DeleteXssMatchSet" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteXSSMatchSet where
toJSON DeleteXSSMatchSet'{..}
= object
(catMaybes
[Just ("XssMatchSetId" .= _dxmsXSSMatchSetId),
Just ("ChangeToken" .= _dxmsChangeToken)])
instance ToPath DeleteXSSMatchSet where
toPath = const "/"
instance ToQuery DeleteXSSMatchSet where
toQuery = const mempty
data DeleteXSSMatchSetResponse = DeleteXSSMatchSetResponse'
{ _dxmsrsChangeToken :: !(Maybe Text)
, _dxmsrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteXSSMatchSetResponse
:: Int
-> DeleteXSSMatchSetResponse
deleteXSSMatchSetResponse pResponseStatus_ =
DeleteXSSMatchSetResponse'
{_dxmsrsChangeToken = Nothing, _dxmsrsResponseStatus = pResponseStatus_}
dxmsrsChangeToken :: Lens' DeleteXSSMatchSetResponse (Maybe Text)
dxmsrsChangeToken = lens _dxmsrsChangeToken (\ s a -> s{_dxmsrsChangeToken = a})
dxmsrsResponseStatus :: Lens' DeleteXSSMatchSetResponse Int
dxmsrsResponseStatus = lens _dxmsrsResponseStatus (\ s a -> s{_dxmsrsResponseStatus = a})
instance NFData DeleteXSSMatchSetResponse where