{-# 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.GetSqlInjectionMatchSet
(
getSqlInjectionMatchSet
, GetSqlInjectionMatchSet
, gsimsSqlInjectionMatchSetId
, getSqlInjectionMatchSetResponse
, GetSqlInjectionMatchSetResponse
, gsimsrsSqlInjectionMatchSet
, gsimsrsResponseStatus
) 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
newtype GetSqlInjectionMatchSet = GetSqlInjectionMatchSet'
{ _gsimsSqlInjectionMatchSetId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getSqlInjectionMatchSet
:: Text
-> GetSqlInjectionMatchSet
getSqlInjectionMatchSet pSqlInjectionMatchSetId_ =
GetSqlInjectionMatchSet'
{_gsimsSqlInjectionMatchSetId = pSqlInjectionMatchSetId_}
gsimsSqlInjectionMatchSetId :: Lens' GetSqlInjectionMatchSet Text
gsimsSqlInjectionMatchSetId = lens _gsimsSqlInjectionMatchSetId (\ s a -> s{_gsimsSqlInjectionMatchSetId = a})
instance AWSRequest GetSqlInjectionMatchSet where
type Rs GetSqlInjectionMatchSet =
GetSqlInjectionMatchSetResponse
request = postJSON waf
response
= receiveJSON
(\ s h x ->
GetSqlInjectionMatchSetResponse' <$>
(x .?> "SqlInjectionMatchSet") <*>
(pure (fromEnum s)))
instance Hashable GetSqlInjectionMatchSet where
instance NFData GetSqlInjectionMatchSet where
instance ToHeaders GetSqlInjectionMatchSet where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSWAF_20150824.GetSqlInjectionMatchSet" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetSqlInjectionMatchSet where
toJSON GetSqlInjectionMatchSet'{..}
= object
(catMaybes
[Just
("SqlInjectionMatchSetId" .=
_gsimsSqlInjectionMatchSetId)])
instance ToPath GetSqlInjectionMatchSet where
toPath = const "/"
instance ToQuery GetSqlInjectionMatchSet where
toQuery = const mempty
data GetSqlInjectionMatchSetResponse = GetSqlInjectionMatchSetResponse'
{ _gsimsrsSqlInjectionMatchSet :: !(Maybe SqlInjectionMatchSet)
, _gsimsrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getSqlInjectionMatchSetResponse
:: Int
-> GetSqlInjectionMatchSetResponse
getSqlInjectionMatchSetResponse pResponseStatus_ =
GetSqlInjectionMatchSetResponse'
{ _gsimsrsSqlInjectionMatchSet = Nothing
, _gsimsrsResponseStatus = pResponseStatus_
}
gsimsrsSqlInjectionMatchSet :: Lens' GetSqlInjectionMatchSetResponse (Maybe SqlInjectionMatchSet)
gsimsrsSqlInjectionMatchSet = lens _gsimsrsSqlInjectionMatchSet (\ s a -> s{_gsimsrsSqlInjectionMatchSet = a})
gsimsrsResponseStatus :: Lens' GetSqlInjectionMatchSetResponse Int
gsimsrsResponseStatus = lens _gsimsrsResponseStatus (\ s a -> s{_gsimsrsResponseStatus = a})
instance NFData GetSqlInjectionMatchSetResponse where