{-# 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.SQS.PurgeQueue
(
purgeQueue
, PurgeQueue
, pqQueueURL
, purgeQueueResponse
, PurgeQueueResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SQS.Types
import Network.AWS.SQS.Types.Product
newtype PurgeQueue = PurgeQueue'
{ _pqQueueURL :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
purgeQueue
:: Text
-> PurgeQueue
purgeQueue pQueueURL_ = PurgeQueue' {_pqQueueURL = pQueueURL_}
pqQueueURL :: Lens' PurgeQueue Text
pqQueueURL = lens _pqQueueURL (\ s a -> s{_pqQueueURL = a})
instance AWSRequest PurgeQueue where
type Rs PurgeQueue = PurgeQueueResponse
request = postQuery sqs
response = receiveNull PurgeQueueResponse'
instance Hashable PurgeQueue where
instance NFData PurgeQueue where
instance ToHeaders PurgeQueue where
toHeaders = const mempty
instance ToPath PurgeQueue where
toPath = const "/"
instance ToQuery PurgeQueue where
toQuery PurgeQueue'{..}
= mconcat
["Action" =: ("PurgeQueue" :: ByteString),
"Version" =: ("2012-11-05" :: ByteString),
"QueueUrl" =: _pqQueueURL]
data PurgeQueueResponse =
PurgeQueueResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
purgeQueueResponse
:: PurgeQueueResponse
purgeQueueResponse = PurgeQueueResponse'
instance NFData PurgeQueueResponse where