{-# 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.Connect.ListQueues
-- 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)
--
-- Provides information about the queues for the specified Amazon Connect
-- instance.
--
-- If you do not specify a @QueueTypes@ parameter, both standard and agent
-- queues are returned. This might cause an unexpected truncation of
-- results if you have more than 1000 agents and you limit the number of
-- results of the API call in code.
--
-- For more information about queues, see
-- <https://docs.aws.amazon.com/connect/latest/adminguide/concepts-queues-standard-and-agent.html Queues: Standard and Agent>
-- in the /Amazon Connect Administrator Guide/.
--
-- This operation returns paginated results.
module Amazonka.Connect.ListQueues
  ( -- * Creating a Request
    ListQueues (..),
    newListQueues,

    -- * Request Lenses
    listQueues_nextToken,
    listQueues_queueTypes,
    listQueues_maxResults,
    listQueues_instanceId,

    -- * Destructuring the Response
    ListQueuesResponse (..),
    newListQueuesResponse,

    -- * Response Lenses
    listQueuesResponse_nextToken,
    listQueuesResponse_queueSummaryList,
    listQueuesResponse_httpStatus,
  )
where

import Amazonka.Connect.Types
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

-- | /See:/ 'newListQueues' smart constructor.
data ListQueues = ListQueues'
  { -- | The token for the next set of results. Use the value returned in the
    -- previous response in the next request to retrieve the next set of
    -- results.
    ListQueues -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The type of queue.
    ListQueues -> Maybe [QueueType]
queueTypes :: Prelude.Maybe [QueueType],
    -- | The maximum number of results to return per page.
    ListQueues -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    ListQueues -> Text
instanceId :: Prelude.Text
  }
  deriving (ListQueues -> ListQueues -> Bool
(ListQueues -> ListQueues -> Bool)
-> (ListQueues -> ListQueues -> Bool) -> Eq ListQueues
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListQueues -> ListQueues -> Bool
$c/= :: ListQueues -> ListQueues -> Bool
== :: ListQueues -> ListQueues -> Bool
$c== :: ListQueues -> ListQueues -> Bool
Prelude.Eq, ReadPrec [ListQueues]
ReadPrec ListQueues
Int -> ReadS ListQueues
ReadS [ListQueues]
(Int -> ReadS ListQueues)
-> ReadS [ListQueues]
-> ReadPrec ListQueues
-> ReadPrec [ListQueues]
-> Read ListQueues
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListQueues]
$creadListPrec :: ReadPrec [ListQueues]
readPrec :: ReadPrec ListQueues
$creadPrec :: ReadPrec ListQueues
readList :: ReadS [ListQueues]
$creadList :: ReadS [ListQueues]
readsPrec :: Int -> ReadS ListQueues
$creadsPrec :: Int -> ReadS ListQueues
Prelude.Read, Int -> ListQueues -> ShowS
[ListQueues] -> ShowS
ListQueues -> String
(Int -> ListQueues -> ShowS)
-> (ListQueues -> String)
-> ([ListQueues] -> ShowS)
-> Show ListQueues
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListQueues] -> ShowS
$cshowList :: [ListQueues] -> ShowS
show :: ListQueues -> String
$cshow :: ListQueues -> String
showsPrec :: Int -> ListQueues -> ShowS
$cshowsPrec :: Int -> ListQueues -> ShowS
Prelude.Show, (forall x. ListQueues -> Rep ListQueues x)
-> (forall x. Rep ListQueues x -> ListQueues) -> Generic ListQueues
forall x. Rep ListQueues x -> ListQueues
forall x. ListQueues -> Rep ListQueues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListQueues x -> ListQueues
$cfrom :: forall x. ListQueues -> Rep ListQueues x
Prelude.Generic)

-- |
-- Create a value of 'ListQueues' 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', 'listQueues_nextToken' - The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
--
-- 'queueTypes', 'listQueues_queueTypes' - The type of queue.
--
-- 'maxResults', 'listQueues_maxResults' - The maximum number of results to return per page.
--
-- 'instanceId', 'listQueues_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
newListQueues ::
  -- | 'instanceId'
  Prelude.Text ->
  ListQueues
newListQueues :: Text -> ListQueues
newListQueues Text
pInstanceId_ =
  ListQueues' :: Maybe Text
-> Maybe [QueueType] -> Maybe Natural -> Text -> ListQueues
ListQueues'
    { $sel:nextToken:ListQueues' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:queueTypes:ListQueues' :: Maybe [QueueType]
queueTypes = Maybe [QueueType]
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListQueues' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:ListQueues' :: Text
instanceId = Text
pInstanceId_
    }

-- | The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
listQueues_nextToken :: Lens.Lens' ListQueues (Prelude.Maybe Prelude.Text)
listQueues_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListQueues -> f ListQueues
listQueues_nextToken = (ListQueues -> Maybe Text)
-> (ListQueues -> Maybe Text -> ListQueues)
-> Lens ListQueues ListQueues (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQueues' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListQueues' :: ListQueues -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListQueues
s@ListQueues' {} Maybe Text
a -> ListQueues
s {$sel:nextToken:ListQueues' :: Maybe Text
nextToken = Maybe Text
a} :: ListQueues)

-- | The type of queue.
listQueues_queueTypes :: Lens.Lens' ListQueues (Prelude.Maybe [QueueType])
listQueues_queueTypes :: (Maybe [QueueType] -> f (Maybe [QueueType]))
-> ListQueues -> f ListQueues
listQueues_queueTypes = (ListQueues -> Maybe [QueueType])
-> (ListQueues -> Maybe [QueueType] -> ListQueues)
-> Lens
     ListQueues ListQueues (Maybe [QueueType]) (Maybe [QueueType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQueues' {Maybe [QueueType]
queueTypes :: Maybe [QueueType]
$sel:queueTypes:ListQueues' :: ListQueues -> Maybe [QueueType]
queueTypes} -> Maybe [QueueType]
queueTypes) (\s :: ListQueues
s@ListQueues' {} Maybe [QueueType]
a -> ListQueues
s {$sel:queueTypes:ListQueues' :: Maybe [QueueType]
queueTypes = Maybe [QueueType]
a} :: ListQueues) ((Maybe [QueueType] -> f (Maybe [QueueType]))
 -> ListQueues -> f ListQueues)
-> ((Maybe [QueueType] -> f (Maybe [QueueType]))
    -> Maybe [QueueType] -> f (Maybe [QueueType]))
-> (Maybe [QueueType] -> f (Maybe [QueueType]))
-> ListQueues
-> f ListQueues
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [QueueType] [QueueType] [QueueType] [QueueType]
-> Iso
     (Maybe [QueueType])
     (Maybe [QueueType])
     (Maybe [QueueType])
     (Maybe [QueueType])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [QueueType] [QueueType] [QueueType] [QueueType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of results to return per page.
listQueues_maxResults :: Lens.Lens' ListQueues (Prelude.Maybe Prelude.Natural)
listQueues_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> ListQueues -> f ListQueues
listQueues_maxResults = (ListQueues -> Maybe Natural)
-> (ListQueues -> Maybe Natural -> ListQueues)
-> Lens ListQueues ListQueues (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQueues' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListQueues' :: ListQueues -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListQueues
s@ListQueues' {} Maybe Natural
a -> ListQueues
s {$sel:maxResults:ListQueues' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListQueues)

-- | The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
listQueues_instanceId :: Lens.Lens' ListQueues Prelude.Text
listQueues_instanceId :: (Text -> f Text) -> ListQueues -> f ListQueues
listQueues_instanceId = (ListQueues -> Text)
-> (ListQueues -> Text -> ListQueues)
-> Lens ListQueues ListQueues Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQueues' {Text
instanceId :: Text
$sel:instanceId:ListQueues' :: ListQueues -> Text
instanceId} -> Text
instanceId) (\s :: ListQueues
s@ListQueues' {} Text
a -> ListQueues
s {$sel:instanceId:ListQueues' :: Text
instanceId = Text
a} :: ListQueues)

instance Core.AWSPager ListQueues where
  page :: ListQueues -> AWSResponse ListQueues -> Maybe ListQueues
page ListQueues
rq AWSResponse ListQueues
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListQueues
ListQueuesResponse
rs
            ListQueuesResponse
-> Getting (First Text) ListQueuesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListQueuesResponse -> Const (First Text) ListQueuesResponse
Lens' ListQueuesResponse (Maybe Text)
listQueuesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListQueuesResponse -> Const (First Text) ListQueuesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListQueuesResponse 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 ListQueues
forall a. Maybe a
Prelude.Nothing
    | Maybe [QueueSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListQueues
ListQueuesResponse
rs
            ListQueuesResponse
-> Getting (First [QueueSummary]) ListQueuesResponse [QueueSummary]
-> Maybe [QueueSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [QueueSummary]
 -> Const (First [QueueSummary]) (Maybe [QueueSummary]))
-> ListQueuesResponse
-> Const (First [QueueSummary]) ListQueuesResponse
Lens' ListQueuesResponse (Maybe [QueueSummary])
listQueuesResponse_queueSummaryList
              ((Maybe [QueueSummary]
  -> Const (First [QueueSummary]) (Maybe [QueueSummary]))
 -> ListQueuesResponse
 -> Const (First [QueueSummary]) ListQueuesResponse)
-> (([QueueSummary] -> Const (First [QueueSummary]) [QueueSummary])
    -> Maybe [QueueSummary]
    -> Const (First [QueueSummary]) (Maybe [QueueSummary]))
-> Getting (First [QueueSummary]) ListQueuesResponse [QueueSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([QueueSummary] -> Const (First [QueueSummary]) [QueueSummary])
-> Maybe [QueueSummary]
-> Const (First [QueueSummary]) (Maybe [QueueSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListQueues
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListQueues -> Maybe ListQueues
forall a. a -> Maybe a
Prelude.Just (ListQueues -> Maybe ListQueues) -> ListQueues -> Maybe ListQueues
forall a b. (a -> b) -> a -> b
Prelude.$
        ListQueues
rq
          ListQueues -> (ListQueues -> ListQueues) -> ListQueues
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListQueues -> Identity ListQueues
Lens ListQueues ListQueues (Maybe Text) (Maybe Text)
listQueues_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListQueues -> Identity ListQueues)
-> Maybe Text -> ListQueues -> ListQueues
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListQueues
ListQueuesResponse
rs
          ListQueuesResponse
-> Getting (First Text) ListQueuesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListQueuesResponse -> Const (First Text) ListQueuesResponse
Lens' ListQueuesResponse (Maybe Text)
listQueuesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListQueuesResponse -> Const (First Text) ListQueuesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListQueuesResponse 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 ListQueues where
  type AWSResponse ListQueues = ListQueuesResponse
  request :: ListQueues -> Request ListQueues
request = Service -> ListQueues -> Request ListQueues
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListQueues
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListQueues)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListQueues))
-> Logger
-> Service
-> Proxy ListQueues
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListQueues)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe [QueueSummary] -> Int -> ListQueuesResponse
ListQueuesResponse'
            (Maybe Text -> Maybe [QueueSummary] -> Int -> ListQueuesResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [QueueSummary] -> Int -> ListQueuesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Maybe [QueueSummary] -> Int -> ListQueuesResponse)
-> Either String (Maybe [QueueSummary])
-> Either String (Int -> ListQueuesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [QueueSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"QueueSummaryList"
                            Either String (Maybe (Maybe [QueueSummary]))
-> Maybe [QueueSummary] -> Either String (Maybe [QueueSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [QueueSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListQueuesResponse)
-> Either String Int -> Either String ListQueuesResponse
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))
      )

instance Prelude.Hashable ListQueues

instance Prelude.NFData ListQueues

instance Core.ToHeaders ListQueues where
  toHeaders :: ListQueues -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListQueues -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath ListQueues where
  toPath :: ListQueues -> ByteString
toPath ListQueues' {Maybe Natural
Maybe [QueueType]
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
queueTypes :: Maybe [QueueType]
nextToken :: Maybe Text
$sel:instanceId:ListQueues' :: ListQueues -> Text
$sel:maxResults:ListQueues' :: ListQueues -> Maybe Natural
$sel:queueTypes:ListQueues' :: ListQueues -> Maybe [QueueType]
$sel:nextToken:ListQueues' :: ListQueues -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/queues-summary/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId]

instance Core.ToQuery ListQueues where
  toQuery :: ListQueues -> QueryString
toQuery ListQueues' {Maybe Natural
Maybe [QueueType]
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
queueTypes :: Maybe [QueueType]
nextToken :: Maybe Text
$sel:instanceId:ListQueues' :: ListQueues -> Text
$sel:maxResults:ListQueues' :: ListQueues -> Maybe Natural
$sel:queueTypes:ListQueues' :: ListQueues -> Maybe [QueueType]
$sel:nextToken:ListQueues' :: ListQueues -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"queueTypes"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [QueueType] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([QueueType] -> QueryString)
-> Maybe [QueueType] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [QueueType]
queueTypes),
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListQueuesResponse' smart constructor.
data ListQueuesResponse = ListQueuesResponse'
  { -- | If there are additional results, this is the token for the next set of
    -- results.
    ListQueuesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the queues.
    ListQueuesResponse -> Maybe [QueueSummary]
queueSummaryList :: Prelude.Maybe [QueueSummary],
    -- | The response's http status code.
    ListQueuesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListQueuesResponse -> ListQueuesResponse -> Bool
(ListQueuesResponse -> ListQueuesResponse -> Bool)
-> (ListQueuesResponse -> ListQueuesResponse -> Bool)
-> Eq ListQueuesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListQueuesResponse -> ListQueuesResponse -> Bool
$c/= :: ListQueuesResponse -> ListQueuesResponse -> Bool
== :: ListQueuesResponse -> ListQueuesResponse -> Bool
$c== :: ListQueuesResponse -> ListQueuesResponse -> Bool
Prelude.Eq, ReadPrec [ListQueuesResponse]
ReadPrec ListQueuesResponse
Int -> ReadS ListQueuesResponse
ReadS [ListQueuesResponse]
(Int -> ReadS ListQueuesResponse)
-> ReadS [ListQueuesResponse]
-> ReadPrec ListQueuesResponse
-> ReadPrec [ListQueuesResponse]
-> Read ListQueuesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListQueuesResponse]
$creadListPrec :: ReadPrec [ListQueuesResponse]
readPrec :: ReadPrec ListQueuesResponse
$creadPrec :: ReadPrec ListQueuesResponse
readList :: ReadS [ListQueuesResponse]
$creadList :: ReadS [ListQueuesResponse]
readsPrec :: Int -> ReadS ListQueuesResponse
$creadsPrec :: Int -> ReadS ListQueuesResponse
Prelude.Read, Int -> ListQueuesResponse -> ShowS
[ListQueuesResponse] -> ShowS
ListQueuesResponse -> String
(Int -> ListQueuesResponse -> ShowS)
-> (ListQueuesResponse -> String)
-> ([ListQueuesResponse] -> ShowS)
-> Show ListQueuesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListQueuesResponse] -> ShowS
$cshowList :: [ListQueuesResponse] -> ShowS
show :: ListQueuesResponse -> String
$cshow :: ListQueuesResponse -> String
showsPrec :: Int -> ListQueuesResponse -> ShowS
$cshowsPrec :: Int -> ListQueuesResponse -> ShowS
Prelude.Show, (forall x. ListQueuesResponse -> Rep ListQueuesResponse x)
-> (forall x. Rep ListQueuesResponse x -> ListQueuesResponse)
-> Generic ListQueuesResponse
forall x. Rep ListQueuesResponse x -> ListQueuesResponse
forall x. ListQueuesResponse -> Rep ListQueuesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListQueuesResponse x -> ListQueuesResponse
$cfrom :: forall x. ListQueuesResponse -> Rep ListQueuesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListQueuesResponse' 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', 'listQueuesResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'queueSummaryList', 'listQueuesResponse_queueSummaryList' - Information about the queues.
--
-- 'httpStatus', 'listQueuesResponse_httpStatus' - The response's http status code.
newListQueuesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListQueuesResponse
newListQueuesResponse :: Int -> ListQueuesResponse
newListQueuesResponse Int
pHttpStatus_ =
  ListQueuesResponse' :: Maybe Text -> Maybe [QueueSummary] -> Int -> ListQueuesResponse
ListQueuesResponse'
    { $sel:nextToken:ListQueuesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:queueSummaryList:ListQueuesResponse' :: Maybe [QueueSummary]
queueSummaryList = Maybe [QueueSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListQueuesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If there are additional results, this is the token for the next set of
-- results.
listQueuesResponse_nextToken :: Lens.Lens' ListQueuesResponse (Prelude.Maybe Prelude.Text)
listQueuesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListQueuesResponse -> f ListQueuesResponse
listQueuesResponse_nextToken = (ListQueuesResponse -> Maybe Text)
-> (ListQueuesResponse -> Maybe Text -> ListQueuesResponse)
-> Lens' ListQueuesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQueuesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListQueuesResponse' :: ListQueuesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListQueuesResponse
s@ListQueuesResponse' {} Maybe Text
a -> ListQueuesResponse
s {$sel:nextToken:ListQueuesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListQueuesResponse)

-- | Information about the queues.
listQueuesResponse_queueSummaryList :: Lens.Lens' ListQueuesResponse (Prelude.Maybe [QueueSummary])
listQueuesResponse_queueSummaryList :: (Maybe [QueueSummary] -> f (Maybe [QueueSummary]))
-> ListQueuesResponse -> f ListQueuesResponse
listQueuesResponse_queueSummaryList = (ListQueuesResponse -> Maybe [QueueSummary])
-> (ListQueuesResponse
    -> Maybe [QueueSummary] -> ListQueuesResponse)
-> Lens' ListQueuesResponse (Maybe [QueueSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQueuesResponse' {Maybe [QueueSummary]
queueSummaryList :: Maybe [QueueSummary]
$sel:queueSummaryList:ListQueuesResponse' :: ListQueuesResponse -> Maybe [QueueSummary]
queueSummaryList} -> Maybe [QueueSummary]
queueSummaryList) (\s :: ListQueuesResponse
s@ListQueuesResponse' {} Maybe [QueueSummary]
a -> ListQueuesResponse
s {$sel:queueSummaryList:ListQueuesResponse' :: Maybe [QueueSummary]
queueSummaryList = Maybe [QueueSummary]
a} :: ListQueuesResponse) ((Maybe [QueueSummary] -> f (Maybe [QueueSummary]))
 -> ListQueuesResponse -> f ListQueuesResponse)
-> ((Maybe [QueueSummary] -> f (Maybe [QueueSummary]))
    -> Maybe [QueueSummary] -> f (Maybe [QueueSummary]))
-> (Maybe [QueueSummary] -> f (Maybe [QueueSummary]))
-> ListQueuesResponse
-> f ListQueuesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [QueueSummary] [QueueSummary] [QueueSummary] [QueueSummary]
-> Iso
     (Maybe [QueueSummary])
     (Maybe [QueueSummary])
     (Maybe [QueueSummary])
     (Maybe [QueueSummary])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [QueueSummary] [QueueSummary] [QueueSummary] [QueueSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListQueuesResponse