{-# 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.ListDeadLetterSourceQueues
(
listDeadLetterSourceQueues
, ListDeadLetterSourceQueues
, ldlsqQueueURL
, listDeadLetterSourceQueuesResponse
, ListDeadLetterSourceQueuesResponse
, ldlsqrsResponseStatus
, ldlsqrsQueueURLs
) 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 ListDeadLetterSourceQueues = ListDeadLetterSourceQueues'
{ _ldlsqQueueURL :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
listDeadLetterSourceQueues
:: Text
-> ListDeadLetterSourceQueues
listDeadLetterSourceQueues pQueueURL_ =
ListDeadLetterSourceQueues' {_ldlsqQueueURL = pQueueURL_}
ldlsqQueueURL :: Lens' ListDeadLetterSourceQueues Text
ldlsqQueueURL = lens _ldlsqQueueURL (\ s a -> s{_ldlsqQueueURL = a})
instance AWSRequest ListDeadLetterSourceQueues where
type Rs ListDeadLetterSourceQueues =
ListDeadLetterSourceQueuesResponse
request = postQuery sqs
response
= receiveXMLWrapper
"ListDeadLetterSourceQueuesResult"
(\ s h x ->
ListDeadLetterSourceQueuesResponse' <$>
(pure (fromEnum s)) <*> (parseXMLList "QueueUrl" x))
instance Hashable ListDeadLetterSourceQueues where
instance NFData ListDeadLetterSourceQueues where
instance ToHeaders ListDeadLetterSourceQueues where
toHeaders = const mempty
instance ToPath ListDeadLetterSourceQueues where
toPath = const "/"
instance ToQuery ListDeadLetterSourceQueues where
toQuery ListDeadLetterSourceQueues'{..}
= mconcat
["Action" =:
("ListDeadLetterSourceQueues" :: ByteString),
"Version" =: ("2012-11-05" :: ByteString),
"QueueUrl" =: _ldlsqQueueURL]
data ListDeadLetterSourceQueuesResponse = ListDeadLetterSourceQueuesResponse'
{ _ldlsqrsResponseStatus :: !Int
, _ldlsqrsQueueURLs :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
listDeadLetterSourceQueuesResponse
:: Int
-> ListDeadLetterSourceQueuesResponse
listDeadLetterSourceQueuesResponse pResponseStatus_ =
ListDeadLetterSourceQueuesResponse'
{_ldlsqrsResponseStatus = pResponseStatus_, _ldlsqrsQueueURLs = mempty}
ldlsqrsResponseStatus :: Lens' ListDeadLetterSourceQueuesResponse Int
ldlsqrsResponseStatus = lens _ldlsqrsResponseStatus (\ s a -> s{_ldlsqrsResponseStatus = a})
ldlsqrsQueueURLs :: Lens' ListDeadLetterSourceQueuesResponse [Text]
ldlsqrsQueueURLs = lens _ldlsqrsQueueURLs (\ s a -> s{_ldlsqrsQueueURLs = a}) . _Coerce
instance NFData ListDeadLetterSourceQueuesResponse
where