{-# 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.DeleteSqlInjectionMatchSet
(
deleteSqlInjectionMatchSet
, DeleteSqlInjectionMatchSet
, dsimsSqlInjectionMatchSetId
, dsimsChangeToken
, deleteSqlInjectionMatchSetResponse
, DeleteSqlInjectionMatchSetResponse
, dsimsrsChangeToken
, dsimsrsResponseStatus
) 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 DeleteSqlInjectionMatchSet = DeleteSqlInjectionMatchSet'
{ _dsimsSqlInjectionMatchSetId :: !Text
, _dsimsChangeToken :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSqlInjectionMatchSet
:: Text
-> Text
-> DeleteSqlInjectionMatchSet
deleteSqlInjectionMatchSet pSqlInjectionMatchSetId_ pChangeToken_ =
DeleteSqlInjectionMatchSet'
{ _dsimsSqlInjectionMatchSetId = pSqlInjectionMatchSetId_
, _dsimsChangeToken = pChangeToken_
}
dsimsSqlInjectionMatchSetId :: Lens' DeleteSqlInjectionMatchSet Text
dsimsSqlInjectionMatchSetId = lens _dsimsSqlInjectionMatchSetId (\ s a -> s{_dsimsSqlInjectionMatchSetId = a})
dsimsChangeToken :: Lens' DeleteSqlInjectionMatchSet Text
dsimsChangeToken = lens _dsimsChangeToken (\ s a -> s{_dsimsChangeToken = a})
instance AWSRequest DeleteSqlInjectionMatchSet where
type Rs DeleteSqlInjectionMatchSet =
DeleteSqlInjectionMatchSetResponse
request = postJSON waf
response
= receiveJSON
(\ s h x ->
DeleteSqlInjectionMatchSetResponse' <$>
(x .?> "ChangeToken") <*> (pure (fromEnum s)))
instance Hashable DeleteSqlInjectionMatchSet where
instance NFData DeleteSqlInjectionMatchSet where
instance ToHeaders DeleteSqlInjectionMatchSet where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSWAF_20150824.DeleteSqlInjectionMatchSet" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteSqlInjectionMatchSet where
toJSON DeleteSqlInjectionMatchSet'{..}
= object
(catMaybes
[Just
("SqlInjectionMatchSetId" .=
_dsimsSqlInjectionMatchSetId),
Just ("ChangeToken" .= _dsimsChangeToken)])
instance ToPath DeleteSqlInjectionMatchSet where
toPath = const "/"
instance ToQuery DeleteSqlInjectionMatchSet where
toQuery = const mempty
data DeleteSqlInjectionMatchSetResponse = DeleteSqlInjectionMatchSetResponse'
{ _dsimsrsChangeToken :: !(Maybe Text)
, _dsimsrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSqlInjectionMatchSetResponse
:: Int
-> DeleteSqlInjectionMatchSetResponse
deleteSqlInjectionMatchSetResponse pResponseStatus_ =
DeleteSqlInjectionMatchSetResponse'
{_dsimsrsChangeToken = Nothing, _dsimsrsResponseStatus = pResponseStatus_}
dsimsrsChangeToken :: Lens' DeleteSqlInjectionMatchSetResponse (Maybe Text)
dsimsrsChangeToken = lens _dsimsrsChangeToken (\ s a -> s{_dsimsrsChangeToken = a})
dsimsrsResponseStatus :: Lens' DeleteSqlInjectionMatchSetResponse Int
dsimsrsResponseStatus = lens _dsimsrsResponseStatus (\ s a -> s{_dsimsrsResponseStatus = a})
instance NFData DeleteSqlInjectionMatchSetResponse
where