{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SQS.ListDeadLetterSourceQueues
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of your queues that have the @RedrivePolicy@ queue
-- attribute configured with a dead-letter queue.
--
-- The @ListDeadLetterSourceQueues@ methods supports pagination. Set
-- parameter @MaxResults@ in the request to specify the maximum number of
-- results to be returned in the response. If you do not set @MaxResults@,
-- the response includes a maximum of 1,000 results. If you set
-- @MaxResults@ and there are additional results to display, the response
-- includes a value for @NextToken@. Use @NextToken@ as a parameter in your
-- next request to @ListDeadLetterSourceQueues@ to receive the next page of
-- results.
--
-- For more information about using dead-letter queues, see
-- <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html Using Amazon SQS Dead-Letter Queues>
-- in the /Amazon SQS Developer Guide/.
--
-- This operation returns paginated results.
module Amazonka.SQS.ListDeadLetterSourceQueues
  ( -- * Creating a Request
    ListDeadLetterSourceQueues (..),
    newListDeadLetterSourceQueues,

    -- * Request Lenses
    listDeadLetterSourceQueues_nextToken,
    listDeadLetterSourceQueues_maxResults,
    listDeadLetterSourceQueues_queueUrl,

    -- * Destructuring the Response
    ListDeadLetterSourceQueuesResponse (..),
    newListDeadLetterSourceQueuesResponse,

    -- * Response Lenses
    listDeadLetterSourceQueuesResponse_nextToken,
    listDeadLetterSourceQueuesResponse_httpStatus,
    listDeadLetterSourceQueuesResponse_queueUrls,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SQS.Types

-- |
--
-- /See:/ 'newListDeadLetterSourceQueues' smart constructor.
data ListDeadLetterSourceQueues = ListDeadLetterSourceQueues'
  { -- | Pagination token to request the next set of results.
    ListDeadLetterSourceQueues -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of results to include in the response. Value range is 1
    -- to 1000. You must set @MaxResults@ to receive a value for @NextToken@ in
    -- the response.
    ListDeadLetterSourceQueues -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The URL of a dead-letter queue.
    --
    -- Queue URLs and names are case-sensitive.
    ListDeadLetterSourceQueues -> Text
queueUrl :: Prelude.Text
  }
  deriving (ListDeadLetterSourceQueues -> ListDeadLetterSourceQueues -> Bool
(ListDeadLetterSourceQueues -> ListDeadLetterSourceQueues -> Bool)
-> (ListDeadLetterSourceQueues
    -> ListDeadLetterSourceQueues -> Bool)
-> Eq ListDeadLetterSourceQueues
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDeadLetterSourceQueues -> ListDeadLetterSourceQueues -> Bool
$c/= :: ListDeadLetterSourceQueues -> ListDeadLetterSourceQueues -> Bool
== :: ListDeadLetterSourceQueues -> ListDeadLetterSourceQueues -> Bool
$c== :: ListDeadLetterSourceQueues -> ListDeadLetterSourceQueues -> Bool
Prelude.Eq, ReadPrec [ListDeadLetterSourceQueues]
ReadPrec ListDeadLetterSourceQueues
Int -> ReadS ListDeadLetterSourceQueues
ReadS [ListDeadLetterSourceQueues]
(Int -> ReadS ListDeadLetterSourceQueues)
-> ReadS [ListDeadLetterSourceQueues]
-> ReadPrec ListDeadLetterSourceQueues
-> ReadPrec [ListDeadLetterSourceQueues]
-> Read ListDeadLetterSourceQueues
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDeadLetterSourceQueues]
$creadListPrec :: ReadPrec [ListDeadLetterSourceQueues]
readPrec :: ReadPrec ListDeadLetterSourceQueues
$creadPrec :: ReadPrec ListDeadLetterSourceQueues
readList :: ReadS [ListDeadLetterSourceQueues]
$creadList :: ReadS [ListDeadLetterSourceQueues]
readsPrec :: Int -> ReadS ListDeadLetterSourceQueues
$creadsPrec :: Int -> ReadS ListDeadLetterSourceQueues
Prelude.Read, Int -> ListDeadLetterSourceQueues -> ShowS
[ListDeadLetterSourceQueues] -> ShowS
ListDeadLetterSourceQueues -> String
(Int -> ListDeadLetterSourceQueues -> ShowS)
-> (ListDeadLetterSourceQueues -> String)
-> ([ListDeadLetterSourceQueues] -> ShowS)
-> Show ListDeadLetterSourceQueues
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDeadLetterSourceQueues] -> ShowS
$cshowList :: [ListDeadLetterSourceQueues] -> ShowS
show :: ListDeadLetterSourceQueues -> String
$cshow :: ListDeadLetterSourceQueues -> String
showsPrec :: Int -> ListDeadLetterSourceQueues -> ShowS
$cshowsPrec :: Int -> ListDeadLetterSourceQueues -> ShowS
Prelude.Show, (forall x.
 ListDeadLetterSourceQueues -> Rep ListDeadLetterSourceQueues x)
-> (forall x.
    Rep ListDeadLetterSourceQueues x -> ListDeadLetterSourceQueues)
-> Generic ListDeadLetterSourceQueues
forall x.
Rep ListDeadLetterSourceQueues x -> ListDeadLetterSourceQueues
forall x.
ListDeadLetterSourceQueues -> Rep ListDeadLetterSourceQueues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDeadLetterSourceQueues x -> ListDeadLetterSourceQueues
$cfrom :: forall x.
ListDeadLetterSourceQueues -> Rep ListDeadLetterSourceQueues x
Prelude.Generic)

-- |
-- Create a value of 'ListDeadLetterSourceQueues' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listDeadLetterSourceQueues_nextToken' - Pagination token to request the next set of results.
--
-- 'maxResults', 'listDeadLetterSourceQueues_maxResults' - Maximum number of results to include in the response. Value range is 1
-- to 1000. You must set @MaxResults@ to receive a value for @NextToken@ in
-- the response.
--
-- 'queueUrl', 'listDeadLetterSourceQueues_queueUrl' - The URL of a dead-letter queue.
--
-- Queue URLs and names are case-sensitive.
newListDeadLetterSourceQueues ::
  -- | 'queueUrl'
  Prelude.Text ->
  ListDeadLetterSourceQueues
newListDeadLetterSourceQueues :: Text -> ListDeadLetterSourceQueues
newListDeadLetterSourceQueues Text
pQueueUrl_ =
  ListDeadLetterSourceQueues' :: Maybe Text -> Maybe Int -> Text -> ListDeadLetterSourceQueues
ListDeadLetterSourceQueues'
    { $sel:nextToken:ListDeadLetterSourceQueues' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListDeadLetterSourceQueues' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:queueUrl:ListDeadLetterSourceQueues' :: Text
queueUrl = Text
pQueueUrl_
    }

-- | Pagination token to request the next set of results.
listDeadLetterSourceQueues_nextToken :: Lens.Lens' ListDeadLetterSourceQueues (Prelude.Maybe Prelude.Text)
listDeadLetterSourceQueues_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDeadLetterSourceQueues -> f ListDeadLetterSourceQueues
listDeadLetterSourceQueues_nextToken = (ListDeadLetterSourceQueues -> Maybe Text)
-> (ListDeadLetterSourceQueues
    -> Maybe Text -> ListDeadLetterSourceQueues)
-> Lens
     ListDeadLetterSourceQueues
     ListDeadLetterSourceQueues
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeadLetterSourceQueues' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDeadLetterSourceQueues' :: ListDeadLetterSourceQueues -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDeadLetterSourceQueues
s@ListDeadLetterSourceQueues' {} Maybe Text
a -> ListDeadLetterSourceQueues
s {$sel:nextToken:ListDeadLetterSourceQueues' :: Maybe Text
nextToken = Maybe Text
a} :: ListDeadLetterSourceQueues)

-- | Maximum number of results to include in the response. Value range is 1
-- to 1000. You must set @MaxResults@ to receive a value for @NextToken@ in
-- the response.
listDeadLetterSourceQueues_maxResults :: Lens.Lens' ListDeadLetterSourceQueues (Prelude.Maybe Prelude.Int)
listDeadLetterSourceQueues_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListDeadLetterSourceQueues -> f ListDeadLetterSourceQueues
listDeadLetterSourceQueues_maxResults = (ListDeadLetterSourceQueues -> Maybe Int)
-> (ListDeadLetterSourceQueues
    -> Maybe Int -> ListDeadLetterSourceQueues)
-> Lens
     ListDeadLetterSourceQueues
     ListDeadLetterSourceQueues
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeadLetterSourceQueues' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListDeadLetterSourceQueues' :: ListDeadLetterSourceQueues -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListDeadLetterSourceQueues
s@ListDeadLetterSourceQueues' {} Maybe Int
a -> ListDeadLetterSourceQueues
s {$sel:maxResults:ListDeadLetterSourceQueues' :: Maybe Int
maxResults = Maybe Int
a} :: ListDeadLetterSourceQueues)

-- | The URL of a dead-letter queue.
--
-- Queue URLs and names are case-sensitive.
listDeadLetterSourceQueues_queueUrl :: Lens.Lens' ListDeadLetterSourceQueues Prelude.Text
listDeadLetterSourceQueues_queueUrl :: (Text -> f Text)
-> ListDeadLetterSourceQueues -> f ListDeadLetterSourceQueues
listDeadLetterSourceQueues_queueUrl = (ListDeadLetterSourceQueues -> Text)
-> (ListDeadLetterSourceQueues
    -> Text -> ListDeadLetterSourceQueues)
-> Lens
     ListDeadLetterSourceQueues ListDeadLetterSourceQueues Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeadLetterSourceQueues' {Text
queueUrl :: Text
$sel:queueUrl:ListDeadLetterSourceQueues' :: ListDeadLetterSourceQueues -> Text
queueUrl} -> Text
queueUrl) (\s :: ListDeadLetterSourceQueues
s@ListDeadLetterSourceQueues' {} Text
a -> ListDeadLetterSourceQueues
s {$sel:queueUrl:ListDeadLetterSourceQueues' :: Text
queueUrl = Text
a} :: ListDeadLetterSourceQueues)

instance Core.AWSPager ListDeadLetterSourceQueues where
  page :: ListDeadLetterSourceQueues
-> AWSResponse ListDeadLetterSourceQueues
-> Maybe ListDeadLetterSourceQueues
page ListDeadLetterSourceQueues
rq AWSResponse ListDeadLetterSourceQueues
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDeadLetterSourceQueues
ListDeadLetterSourceQueuesResponse
rs
            ListDeadLetterSourceQueuesResponse
-> Getting (First Text) ListDeadLetterSourceQueuesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDeadLetterSourceQueuesResponse
-> Const (First Text) ListDeadLetterSourceQueuesResponse
Lens' ListDeadLetterSourceQueuesResponse (Maybe Text)
listDeadLetterSourceQueuesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDeadLetterSourceQueuesResponse
 -> Const (First Text) ListDeadLetterSourceQueuesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDeadLetterSourceQueuesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDeadLetterSourceQueues
forall a. Maybe a
Prelude.Nothing
    | [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDeadLetterSourceQueues
ListDeadLetterSourceQueuesResponse
rs
            ListDeadLetterSourceQueuesResponse
-> Getting [Text] ListDeadLetterSourceQueuesResponse [Text]
-> [Text]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [Text] ListDeadLetterSourceQueuesResponse [Text]
Lens' ListDeadLetterSourceQueuesResponse [Text]
listDeadLetterSourceQueuesResponse_queueUrls
        ) =
      Maybe ListDeadLetterSourceQueues
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListDeadLetterSourceQueues -> Maybe ListDeadLetterSourceQueues
forall a. a -> Maybe a
Prelude.Just (ListDeadLetterSourceQueues -> Maybe ListDeadLetterSourceQueues)
-> ListDeadLetterSourceQueues -> Maybe ListDeadLetterSourceQueues
forall a b. (a -> b) -> a -> b
Prelude.$
        ListDeadLetterSourceQueues
rq
          ListDeadLetterSourceQueues
-> (ListDeadLetterSourceQueues -> ListDeadLetterSourceQueues)
-> ListDeadLetterSourceQueues
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDeadLetterSourceQueues
-> Identity ListDeadLetterSourceQueues
Lens
  ListDeadLetterSourceQueues
  ListDeadLetterSourceQueues
  (Maybe Text)
  (Maybe Text)
listDeadLetterSourceQueues_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListDeadLetterSourceQueues
 -> Identity ListDeadLetterSourceQueues)
-> Maybe Text
-> ListDeadLetterSourceQueues
-> ListDeadLetterSourceQueues
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDeadLetterSourceQueues
ListDeadLetterSourceQueuesResponse
rs
          ListDeadLetterSourceQueuesResponse
-> Getting (First Text) ListDeadLetterSourceQueuesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDeadLetterSourceQueuesResponse
-> Const (First Text) ListDeadLetterSourceQueuesResponse
Lens' ListDeadLetterSourceQueuesResponse (Maybe Text)
listDeadLetterSourceQueuesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDeadLetterSourceQueuesResponse
 -> Const (First Text) ListDeadLetterSourceQueuesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDeadLetterSourceQueuesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListDeadLetterSourceQueues where
  type
    AWSResponse ListDeadLetterSourceQueues =
      ListDeadLetterSourceQueuesResponse
  request :: ListDeadLetterSourceQueues -> Request ListDeadLetterSourceQueues
request = Service
-> ListDeadLetterSourceQueues -> Request ListDeadLetterSourceQueues
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDeadLetterSourceQueues
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDeadLetterSourceQueues)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListDeadLetterSourceQueues))
-> Logger
-> Service
-> Proxy ListDeadLetterSourceQueues
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDeadLetterSourceQueues)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListDeadLetterSourceQueuesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> [Text] -> ListDeadLetterSourceQueuesResponse
ListDeadLetterSourceQueuesResponse'
            (Maybe Text -> Int -> [Text] -> ListDeadLetterSourceQueuesResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> [Text] -> ListDeadLetterSourceQueuesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextToken")
            Either String (Int -> [Text] -> ListDeadLetterSourceQueuesResponse)
-> Either String Int
-> Either String ([Text] -> ListDeadLetterSourceQueuesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either String ([Text] -> ListDeadLetterSourceQueuesResponse)
-> Either String [Text]
-> Either String ListDeadLetterSourceQueuesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"QueueUrl" [Node]
x)
      )

instance Prelude.Hashable ListDeadLetterSourceQueues

instance Prelude.NFData ListDeadLetterSourceQueues

instance Core.ToHeaders ListDeadLetterSourceQueues where
  toHeaders :: ListDeadLetterSourceQueues -> ResponseHeaders
toHeaders = ResponseHeaders -> ListDeadLetterSourceQueues -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath ListDeadLetterSourceQueues where
  toPath :: ListDeadLetterSourceQueues -> ByteString
toPath = ByteString -> ListDeadLetterSourceQueues -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ListDeadLetterSourceQueues where
  toQuery :: ListDeadLetterSourceQueues -> QueryString
toQuery ListDeadLetterSourceQueues' {Maybe Int
Maybe Text
Text
queueUrl :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:queueUrl:ListDeadLetterSourceQueues' :: ListDeadLetterSourceQueues -> Text
$sel:maxResults:ListDeadLetterSourceQueues' :: ListDeadLetterSourceQueues -> Maybe Int
$sel:nextToken:ListDeadLetterSourceQueues' :: ListDeadLetterSourceQueues -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ListDeadLetterSourceQueues" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-11-05" :: Prelude.ByteString),
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"MaxResults" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxResults,
        ByteString
"QueueUrl" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
queueUrl
      ]

-- | A list of your dead letter source queues.
--
-- /See:/ 'newListDeadLetterSourceQueuesResponse' smart constructor.
data ListDeadLetterSourceQueuesResponse = ListDeadLetterSourceQueuesResponse'
  { -- | Pagination token to include in the next request. Token value is @null@
    -- if there are no additional results to request, or if you did not set
    -- @MaxResults@ in the request.
    ListDeadLetterSourceQueuesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDeadLetterSourceQueuesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of source queue URLs that have the @RedrivePolicy@ queue
    -- attribute configured with a dead-letter queue.
    ListDeadLetterSourceQueuesResponse -> [Text]
queueUrls :: [Prelude.Text]
  }
  deriving (ListDeadLetterSourceQueuesResponse
-> ListDeadLetterSourceQueuesResponse -> Bool
(ListDeadLetterSourceQueuesResponse
 -> ListDeadLetterSourceQueuesResponse -> Bool)
-> (ListDeadLetterSourceQueuesResponse
    -> ListDeadLetterSourceQueuesResponse -> Bool)
-> Eq ListDeadLetterSourceQueuesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDeadLetterSourceQueuesResponse
-> ListDeadLetterSourceQueuesResponse -> Bool
$c/= :: ListDeadLetterSourceQueuesResponse
-> ListDeadLetterSourceQueuesResponse -> Bool
== :: ListDeadLetterSourceQueuesResponse
-> ListDeadLetterSourceQueuesResponse -> Bool
$c== :: ListDeadLetterSourceQueuesResponse
-> ListDeadLetterSourceQueuesResponse -> Bool
Prelude.Eq, ReadPrec [ListDeadLetterSourceQueuesResponse]
ReadPrec ListDeadLetterSourceQueuesResponse
Int -> ReadS ListDeadLetterSourceQueuesResponse
ReadS [ListDeadLetterSourceQueuesResponse]
(Int -> ReadS ListDeadLetterSourceQueuesResponse)
-> ReadS [ListDeadLetterSourceQueuesResponse]
-> ReadPrec ListDeadLetterSourceQueuesResponse
-> ReadPrec [ListDeadLetterSourceQueuesResponse]
-> Read ListDeadLetterSourceQueuesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDeadLetterSourceQueuesResponse]
$creadListPrec :: ReadPrec [ListDeadLetterSourceQueuesResponse]
readPrec :: ReadPrec ListDeadLetterSourceQueuesResponse
$creadPrec :: ReadPrec ListDeadLetterSourceQueuesResponse
readList :: ReadS [ListDeadLetterSourceQueuesResponse]
$creadList :: ReadS [ListDeadLetterSourceQueuesResponse]
readsPrec :: Int -> ReadS ListDeadLetterSourceQueuesResponse
$creadsPrec :: Int -> ReadS ListDeadLetterSourceQueuesResponse
Prelude.Read, Int -> ListDeadLetterSourceQueuesResponse -> ShowS
[ListDeadLetterSourceQueuesResponse] -> ShowS
ListDeadLetterSourceQueuesResponse -> String
(Int -> ListDeadLetterSourceQueuesResponse -> ShowS)
-> (ListDeadLetterSourceQueuesResponse -> String)
-> ([ListDeadLetterSourceQueuesResponse] -> ShowS)
-> Show ListDeadLetterSourceQueuesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDeadLetterSourceQueuesResponse] -> ShowS
$cshowList :: [ListDeadLetterSourceQueuesResponse] -> ShowS
show :: ListDeadLetterSourceQueuesResponse -> String
$cshow :: ListDeadLetterSourceQueuesResponse -> String
showsPrec :: Int -> ListDeadLetterSourceQueuesResponse -> ShowS
$cshowsPrec :: Int -> ListDeadLetterSourceQueuesResponse -> ShowS
Prelude.Show, (forall x.
 ListDeadLetterSourceQueuesResponse
 -> Rep ListDeadLetterSourceQueuesResponse x)
-> (forall x.
    Rep ListDeadLetterSourceQueuesResponse x
    -> ListDeadLetterSourceQueuesResponse)
-> Generic ListDeadLetterSourceQueuesResponse
forall x.
Rep ListDeadLetterSourceQueuesResponse x
-> ListDeadLetterSourceQueuesResponse
forall x.
ListDeadLetterSourceQueuesResponse
-> Rep ListDeadLetterSourceQueuesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDeadLetterSourceQueuesResponse x
-> ListDeadLetterSourceQueuesResponse
$cfrom :: forall x.
ListDeadLetterSourceQueuesResponse
-> Rep ListDeadLetterSourceQueuesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDeadLetterSourceQueuesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listDeadLetterSourceQueuesResponse_nextToken' - Pagination token to include in the next request. Token value is @null@
-- if there are no additional results to request, or if you did not set
-- @MaxResults@ in the request.
--
-- 'httpStatus', 'listDeadLetterSourceQueuesResponse_httpStatus' - The response's http status code.
--
-- 'queueUrls', 'listDeadLetterSourceQueuesResponse_queueUrls' - A list of source queue URLs that have the @RedrivePolicy@ queue
-- attribute configured with a dead-letter queue.
newListDeadLetterSourceQueuesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDeadLetterSourceQueuesResponse
newListDeadLetterSourceQueuesResponse :: Int -> ListDeadLetterSourceQueuesResponse
newListDeadLetterSourceQueuesResponse Int
pHttpStatus_ =
  ListDeadLetterSourceQueuesResponse' :: Maybe Text -> Int -> [Text] -> ListDeadLetterSourceQueuesResponse
ListDeadLetterSourceQueuesResponse'
    { $sel:nextToken:ListDeadLetterSourceQueuesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDeadLetterSourceQueuesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:queueUrls:ListDeadLetterSourceQueuesResponse' :: [Text]
queueUrls = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | Pagination token to include in the next request. Token value is @null@
-- if there are no additional results to request, or if you did not set
-- @MaxResults@ in the request.
listDeadLetterSourceQueuesResponse_nextToken :: Lens.Lens' ListDeadLetterSourceQueuesResponse (Prelude.Maybe Prelude.Text)
listDeadLetterSourceQueuesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDeadLetterSourceQueuesResponse
-> f ListDeadLetterSourceQueuesResponse
listDeadLetterSourceQueuesResponse_nextToken = (ListDeadLetterSourceQueuesResponse -> Maybe Text)
-> (ListDeadLetterSourceQueuesResponse
    -> Maybe Text -> ListDeadLetterSourceQueuesResponse)
-> Lens' ListDeadLetterSourceQueuesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeadLetterSourceQueuesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDeadLetterSourceQueuesResponse' :: ListDeadLetterSourceQueuesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDeadLetterSourceQueuesResponse
s@ListDeadLetterSourceQueuesResponse' {} Maybe Text
a -> ListDeadLetterSourceQueuesResponse
s {$sel:nextToken:ListDeadLetterSourceQueuesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDeadLetterSourceQueuesResponse)

-- | The response's http status code.
listDeadLetterSourceQueuesResponse_httpStatus :: Lens.Lens' ListDeadLetterSourceQueuesResponse Prelude.Int
listDeadLetterSourceQueuesResponse_httpStatus :: (Int -> f Int)
-> ListDeadLetterSourceQueuesResponse
-> f ListDeadLetterSourceQueuesResponse
listDeadLetterSourceQueuesResponse_httpStatus = (ListDeadLetterSourceQueuesResponse -> Int)
-> (ListDeadLetterSourceQueuesResponse
    -> Int -> ListDeadLetterSourceQueuesResponse)
-> Lens
     ListDeadLetterSourceQueuesResponse
     ListDeadLetterSourceQueuesResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeadLetterSourceQueuesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListDeadLetterSourceQueuesResponse' :: ListDeadLetterSourceQueuesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListDeadLetterSourceQueuesResponse
s@ListDeadLetterSourceQueuesResponse' {} Int
a -> ListDeadLetterSourceQueuesResponse
s {$sel:httpStatus:ListDeadLetterSourceQueuesResponse' :: Int
httpStatus = Int
a} :: ListDeadLetterSourceQueuesResponse)

-- | A list of source queue URLs that have the @RedrivePolicy@ queue
-- attribute configured with a dead-letter queue.
listDeadLetterSourceQueuesResponse_queueUrls :: Lens.Lens' ListDeadLetterSourceQueuesResponse [Prelude.Text]
listDeadLetterSourceQueuesResponse_queueUrls :: ([Text] -> f [Text])
-> ListDeadLetterSourceQueuesResponse
-> f ListDeadLetterSourceQueuesResponse
listDeadLetterSourceQueuesResponse_queueUrls = (ListDeadLetterSourceQueuesResponse -> [Text])
-> (ListDeadLetterSourceQueuesResponse
    -> [Text] -> ListDeadLetterSourceQueuesResponse)
-> Lens' ListDeadLetterSourceQueuesResponse [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeadLetterSourceQueuesResponse' {[Text]
queueUrls :: [Text]
$sel:queueUrls:ListDeadLetterSourceQueuesResponse' :: ListDeadLetterSourceQueuesResponse -> [Text]
queueUrls} -> [Text]
queueUrls) (\s :: ListDeadLetterSourceQueuesResponse
s@ListDeadLetterSourceQueuesResponse' {} [Text]
a -> ListDeadLetterSourceQueuesResponse
s {$sel:queueUrls:ListDeadLetterSourceQueuesResponse' :: [Text]
queueUrls = [Text]
a} :: ListDeadLetterSourceQueuesResponse) (([Text] -> f [Text])
 -> ListDeadLetterSourceQueuesResponse
 -> f ListDeadLetterSourceQueuesResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ListDeadLetterSourceQueuesResponse
-> f ListDeadLetterSourceQueuesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListDeadLetterSourceQueuesResponse