{-# 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.DeleteMessage
(
deleteMessage
, DeleteMessage
, dmQueueURL
, dmReceiptHandle
, deleteMessageResponse
, DeleteMessageResponse
) 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
data DeleteMessage = DeleteMessage'
{ _dmQueueURL :: !Text
, _dmReceiptHandle :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteMessage
:: Text
-> Text
-> DeleteMessage
deleteMessage pQueueURL_ pReceiptHandle_ =
DeleteMessage' {_dmQueueURL = pQueueURL_, _dmReceiptHandle = pReceiptHandle_}
dmQueueURL :: Lens' DeleteMessage Text
dmQueueURL = lens _dmQueueURL (\ s a -> s{_dmQueueURL = a})
dmReceiptHandle :: Lens' DeleteMessage Text
dmReceiptHandle = lens _dmReceiptHandle (\ s a -> s{_dmReceiptHandle = a})
instance AWSRequest DeleteMessage where
type Rs DeleteMessage = DeleteMessageResponse
request = postQuery sqs
response = receiveNull DeleteMessageResponse'
instance Hashable DeleteMessage where
instance NFData DeleteMessage where
instance ToHeaders DeleteMessage where
toHeaders = const mempty
instance ToPath DeleteMessage where
toPath = const "/"
instance ToQuery DeleteMessage where
toQuery DeleteMessage'{..}
= mconcat
["Action" =: ("DeleteMessage" :: ByteString),
"Version" =: ("2012-11-05" :: ByteString),
"QueueUrl" =: _dmQueueURL,
"ReceiptHandle" =: _dmReceiptHandle]
data DeleteMessageResponse =
DeleteMessageResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteMessageResponse
:: DeleteMessageResponse
deleteMessageResponse = DeleteMessageResponse'
instance NFData DeleteMessageResponse where