{-# 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.ListQueueQuickConnects
-- 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)
--
-- This API is in preview release for Amazon Connect and is subject to
-- change.
--
-- Lists the quick connects associated with a queue.
--
-- This operation returns paginated results.
module Amazonka.Connect.ListQueueQuickConnects
  ( -- * Creating a Request
    ListQueueQuickConnects (..),
    newListQueueQuickConnects,

    -- * Request Lenses
    listQueueQuickConnects_nextToken,
    listQueueQuickConnects_maxResults,
    listQueueQuickConnects_instanceId,
    listQueueQuickConnects_queueId,

    -- * Destructuring the Response
    ListQueueQuickConnectsResponse (..),
    newListQueueQuickConnectsResponse,

    -- * Response Lenses
    listQueueQuickConnectsResponse_quickConnectSummaryList,
    listQueueQuickConnectsResponse_nextToken,
    listQueueQuickConnectsResponse_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:/ 'newListQueueQuickConnects' smart constructor.
data ListQueueQuickConnects = ListQueueQuickConnects'
  { -- | 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.
    ListQueueQuickConnects -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return per page.
    ListQueueQuickConnects -> 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.
    ListQueueQuickConnects -> Text
instanceId :: Prelude.Text,
    -- | The identifier for the queue.
    ListQueueQuickConnects -> Text
queueId :: Prelude.Text
  }
  deriving (ListQueueQuickConnects -> ListQueueQuickConnects -> Bool
(ListQueueQuickConnects -> ListQueueQuickConnects -> Bool)
-> (ListQueueQuickConnects -> ListQueueQuickConnects -> Bool)
-> Eq ListQueueQuickConnects
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListQueueQuickConnects -> ListQueueQuickConnects -> Bool
$c/= :: ListQueueQuickConnects -> ListQueueQuickConnects -> Bool
== :: ListQueueQuickConnects -> ListQueueQuickConnects -> Bool
$c== :: ListQueueQuickConnects -> ListQueueQuickConnects -> Bool
Prelude.Eq, ReadPrec [ListQueueQuickConnects]
ReadPrec ListQueueQuickConnects
Int -> ReadS ListQueueQuickConnects
ReadS [ListQueueQuickConnects]
(Int -> ReadS ListQueueQuickConnects)
-> ReadS [ListQueueQuickConnects]
-> ReadPrec ListQueueQuickConnects
-> ReadPrec [ListQueueQuickConnects]
-> Read ListQueueQuickConnects
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListQueueQuickConnects]
$creadListPrec :: ReadPrec [ListQueueQuickConnects]
readPrec :: ReadPrec ListQueueQuickConnects
$creadPrec :: ReadPrec ListQueueQuickConnects
readList :: ReadS [ListQueueQuickConnects]
$creadList :: ReadS [ListQueueQuickConnects]
readsPrec :: Int -> ReadS ListQueueQuickConnects
$creadsPrec :: Int -> ReadS ListQueueQuickConnects
Prelude.Read, Int -> ListQueueQuickConnects -> ShowS
[ListQueueQuickConnects] -> ShowS
ListQueueQuickConnects -> String
(Int -> ListQueueQuickConnects -> ShowS)
-> (ListQueueQuickConnects -> String)
-> ([ListQueueQuickConnects] -> ShowS)
-> Show ListQueueQuickConnects
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListQueueQuickConnects] -> ShowS
$cshowList :: [ListQueueQuickConnects] -> ShowS
show :: ListQueueQuickConnects -> String
$cshow :: ListQueueQuickConnects -> String
showsPrec :: Int -> ListQueueQuickConnects -> ShowS
$cshowsPrec :: Int -> ListQueueQuickConnects -> ShowS
Prelude.Show, (forall x. ListQueueQuickConnects -> Rep ListQueueQuickConnects x)
-> (forall x.
    Rep ListQueueQuickConnects x -> ListQueueQuickConnects)
-> Generic ListQueueQuickConnects
forall x. Rep ListQueueQuickConnects x -> ListQueueQuickConnects
forall x. ListQueueQuickConnects -> Rep ListQueueQuickConnects x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListQueueQuickConnects x -> ListQueueQuickConnects
$cfrom :: forall x. ListQueueQuickConnects -> Rep ListQueueQuickConnects x
Prelude.Generic)

-- |
-- Create a value of 'ListQueueQuickConnects' 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', 'listQueueQuickConnects_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.
--
-- 'maxResults', 'listQueueQuickConnects_maxResults' - The maximum number of results to return per page.
--
-- 'instanceId', 'listQueueQuickConnects_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
--
-- 'queueId', 'listQueueQuickConnects_queueId' - The identifier for the queue.
newListQueueQuickConnects ::
  -- | 'instanceId'
  Prelude.Text ->
  -- | 'queueId'
  Prelude.Text ->
  ListQueueQuickConnects
newListQueueQuickConnects :: Text -> Text -> ListQueueQuickConnects
newListQueueQuickConnects Text
pInstanceId_ Text
pQueueId_ =
  ListQueueQuickConnects' :: Maybe Text
-> Maybe Natural -> Text -> Text -> ListQueueQuickConnects
ListQueueQuickConnects'
    { $sel:nextToken:ListQueueQuickConnects' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListQueueQuickConnects' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:ListQueueQuickConnects' :: Text
instanceId = Text
pInstanceId_,
      $sel:queueId:ListQueueQuickConnects' :: Text
queueId = Text
pQueueId_
    }

-- | 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.
listQueueQuickConnects_nextToken :: Lens.Lens' ListQueueQuickConnects (Prelude.Maybe Prelude.Text)
listQueueQuickConnects_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListQueueQuickConnects -> f ListQueueQuickConnects
listQueueQuickConnects_nextToken = (ListQueueQuickConnects -> Maybe Text)
-> (ListQueueQuickConnects -> Maybe Text -> ListQueueQuickConnects)
-> Lens
     ListQueueQuickConnects
     ListQueueQuickConnects
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQueueQuickConnects' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListQueueQuickConnects' :: ListQueueQuickConnects -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListQueueQuickConnects
s@ListQueueQuickConnects' {} Maybe Text
a -> ListQueueQuickConnects
s {$sel:nextToken:ListQueueQuickConnects' :: Maybe Text
nextToken = Maybe Text
a} :: ListQueueQuickConnects)

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

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

-- | The identifier for the queue.
listQueueQuickConnects_queueId :: Lens.Lens' ListQueueQuickConnects Prelude.Text
listQueueQuickConnects_queueId :: (Text -> f Text)
-> ListQueueQuickConnects -> f ListQueueQuickConnects
listQueueQuickConnects_queueId = (ListQueueQuickConnects -> Text)
-> (ListQueueQuickConnects -> Text -> ListQueueQuickConnects)
-> Lens ListQueueQuickConnects ListQueueQuickConnects Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQueueQuickConnects' {Text
queueId :: Text
$sel:queueId:ListQueueQuickConnects' :: ListQueueQuickConnects -> Text
queueId} -> Text
queueId) (\s :: ListQueueQuickConnects
s@ListQueueQuickConnects' {} Text
a -> ListQueueQuickConnects
s {$sel:queueId:ListQueueQuickConnects' :: Text
queueId = Text
a} :: ListQueueQuickConnects)

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

instance Prelude.NFData ListQueueQuickConnects

instance Core.ToHeaders ListQueueQuickConnects where
  toHeaders :: ListQueueQuickConnects -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListQueueQuickConnects -> 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 ListQueueQuickConnects where
  toPath :: ListQueueQuickConnects -> ByteString
toPath ListQueueQuickConnects' {Maybe Natural
Maybe Text
Text
queueId :: Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:queueId:ListQueueQuickConnects' :: ListQueueQuickConnects -> Text
$sel:instanceId:ListQueueQuickConnects' :: ListQueueQuickConnects -> Text
$sel:maxResults:ListQueueQuickConnects' :: ListQueueQuickConnects -> Maybe Natural
$sel:nextToken:ListQueueQuickConnects' :: ListQueueQuickConnects -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/queues/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
        ByteString
"/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
queueId,
        ByteString
"/quick-connects"
      ]

instance Core.ToQuery ListQueueQuickConnects where
  toQuery :: ListQueueQuickConnects -> QueryString
toQuery ListQueueQuickConnects' {Maybe Natural
Maybe Text
Text
queueId :: Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:queueId:ListQueueQuickConnects' :: ListQueueQuickConnects -> Text
$sel:instanceId:ListQueueQuickConnects' :: ListQueueQuickConnects -> Text
$sel:maxResults:ListQueueQuickConnects' :: ListQueueQuickConnects -> Maybe Natural
$sel:nextToken:ListQueueQuickConnects' :: ListQueueQuickConnects -> 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
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

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

-- |
-- Create a value of 'ListQueueQuickConnectsResponse' 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:
--
-- 'quickConnectSummaryList', 'listQueueQuickConnectsResponse_quickConnectSummaryList' - Information about the quick connects.
--
-- 'nextToken', 'listQueueQuickConnectsResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'httpStatus', 'listQueueQuickConnectsResponse_httpStatus' - The response's http status code.
newListQueueQuickConnectsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListQueueQuickConnectsResponse
newListQueueQuickConnectsResponse :: Int -> ListQueueQuickConnectsResponse
newListQueueQuickConnectsResponse Int
pHttpStatus_ =
  ListQueueQuickConnectsResponse' :: Maybe [QuickConnectSummary]
-> Maybe Text -> Int -> ListQueueQuickConnectsResponse
ListQueueQuickConnectsResponse'
    { $sel:quickConnectSummaryList:ListQueueQuickConnectsResponse' :: Maybe [QuickConnectSummary]
quickConnectSummaryList =
        Maybe [QuickConnectSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListQueueQuickConnectsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListQueueQuickConnectsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the quick connects.
listQueueQuickConnectsResponse_quickConnectSummaryList :: Lens.Lens' ListQueueQuickConnectsResponse (Prelude.Maybe [QuickConnectSummary])
listQueueQuickConnectsResponse_quickConnectSummaryList :: (Maybe [QuickConnectSummary] -> f (Maybe [QuickConnectSummary]))
-> ListQueueQuickConnectsResponse
-> f ListQueueQuickConnectsResponse
listQueueQuickConnectsResponse_quickConnectSummaryList = (ListQueueQuickConnectsResponse -> Maybe [QuickConnectSummary])
-> (ListQueueQuickConnectsResponse
    -> Maybe [QuickConnectSummary] -> ListQueueQuickConnectsResponse)
-> Lens'
     ListQueueQuickConnectsResponse (Maybe [QuickConnectSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQueueQuickConnectsResponse' {Maybe [QuickConnectSummary]
quickConnectSummaryList :: Maybe [QuickConnectSummary]
$sel:quickConnectSummaryList:ListQueueQuickConnectsResponse' :: ListQueueQuickConnectsResponse -> Maybe [QuickConnectSummary]
quickConnectSummaryList} -> Maybe [QuickConnectSummary]
quickConnectSummaryList) (\s :: ListQueueQuickConnectsResponse
s@ListQueueQuickConnectsResponse' {} Maybe [QuickConnectSummary]
a -> ListQueueQuickConnectsResponse
s {$sel:quickConnectSummaryList:ListQueueQuickConnectsResponse' :: Maybe [QuickConnectSummary]
quickConnectSummaryList = Maybe [QuickConnectSummary]
a} :: ListQueueQuickConnectsResponse) ((Maybe [QuickConnectSummary] -> f (Maybe [QuickConnectSummary]))
 -> ListQueueQuickConnectsResponse
 -> f ListQueueQuickConnectsResponse)
-> ((Maybe [QuickConnectSummary]
     -> f (Maybe [QuickConnectSummary]))
    -> Maybe [QuickConnectSummary] -> f (Maybe [QuickConnectSummary]))
-> (Maybe [QuickConnectSummary] -> f (Maybe [QuickConnectSummary]))
-> ListQueueQuickConnectsResponse
-> f ListQueueQuickConnectsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [QuickConnectSummary]
  [QuickConnectSummary]
  [QuickConnectSummary]
  [QuickConnectSummary]
-> Iso
     (Maybe [QuickConnectSummary])
     (Maybe [QuickConnectSummary])
     (Maybe [QuickConnectSummary])
     (Maybe [QuickConnectSummary])
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
  [QuickConnectSummary]
  [QuickConnectSummary]
  [QuickConnectSummary]
  [QuickConnectSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

instance
  Prelude.NFData
    ListQueueQuickConnectsResponse