{-# 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.ListQuickConnects
-- 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 quick connects for the specified Amazon
-- Connect instance.
--
-- This operation returns paginated results.
module Amazonka.Connect.ListQuickConnects
  ( -- * Creating a Request
    ListQuickConnects (..),
    newListQuickConnects,

    -- * Request Lenses
    listQuickConnects_quickConnectTypes,
    listQuickConnects_nextToken,
    listQuickConnects_maxResults,
    listQuickConnects_instanceId,

    -- * Destructuring the Response
    ListQuickConnectsResponse (..),
    newListQuickConnectsResponse,

    -- * Response Lenses
    listQuickConnectsResponse_quickConnectSummaryList,
    listQuickConnectsResponse_nextToken,
    listQuickConnectsResponse_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:/ 'newListQuickConnects' smart constructor.
data ListQuickConnects = ListQuickConnects'
  { -- | The type of quick connect. In the Amazon Connect console, when you
    -- create a quick connect, you are prompted to assign one of the following
    -- types: Agent (USER), External (PHONE_NUMBER), or Queue (QUEUE).
    ListQuickConnects -> Maybe [QuickConnectType]
quickConnectTypes :: Prelude.Maybe [QuickConnectType],
    -- | 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.
    ListQuickConnects -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return per page.
    ListQuickConnects -> 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.
    ListQuickConnects -> Text
instanceId :: Prelude.Text
  }
  deriving (ListQuickConnects -> ListQuickConnects -> Bool
(ListQuickConnects -> ListQuickConnects -> Bool)
-> (ListQuickConnects -> ListQuickConnects -> Bool)
-> Eq ListQuickConnects
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListQuickConnects -> ListQuickConnects -> Bool
$c/= :: ListQuickConnects -> ListQuickConnects -> Bool
== :: ListQuickConnects -> ListQuickConnects -> Bool
$c== :: ListQuickConnects -> ListQuickConnects -> Bool
Prelude.Eq, ReadPrec [ListQuickConnects]
ReadPrec ListQuickConnects
Int -> ReadS ListQuickConnects
ReadS [ListQuickConnects]
(Int -> ReadS ListQuickConnects)
-> ReadS [ListQuickConnects]
-> ReadPrec ListQuickConnects
-> ReadPrec [ListQuickConnects]
-> Read ListQuickConnects
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListQuickConnects]
$creadListPrec :: ReadPrec [ListQuickConnects]
readPrec :: ReadPrec ListQuickConnects
$creadPrec :: ReadPrec ListQuickConnects
readList :: ReadS [ListQuickConnects]
$creadList :: ReadS [ListQuickConnects]
readsPrec :: Int -> ReadS ListQuickConnects
$creadsPrec :: Int -> ReadS ListQuickConnects
Prelude.Read, Int -> ListQuickConnects -> ShowS
[ListQuickConnects] -> ShowS
ListQuickConnects -> String
(Int -> ListQuickConnects -> ShowS)
-> (ListQuickConnects -> String)
-> ([ListQuickConnects] -> ShowS)
-> Show ListQuickConnects
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListQuickConnects] -> ShowS
$cshowList :: [ListQuickConnects] -> ShowS
show :: ListQuickConnects -> String
$cshow :: ListQuickConnects -> String
showsPrec :: Int -> ListQuickConnects -> ShowS
$cshowsPrec :: Int -> ListQuickConnects -> ShowS
Prelude.Show, (forall x. ListQuickConnects -> Rep ListQuickConnects x)
-> (forall x. Rep ListQuickConnects x -> ListQuickConnects)
-> Generic ListQuickConnects
forall x. Rep ListQuickConnects x -> ListQuickConnects
forall x. ListQuickConnects -> Rep ListQuickConnects x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListQuickConnects x -> ListQuickConnects
$cfrom :: forall x. ListQuickConnects -> Rep ListQuickConnects x
Prelude.Generic)

-- |
-- Create a value of 'ListQuickConnects' 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:
--
-- 'quickConnectTypes', 'listQuickConnects_quickConnectTypes' - The type of quick connect. In the Amazon Connect console, when you
-- create a quick connect, you are prompted to assign one of the following
-- types: Agent (USER), External (PHONE_NUMBER), or Queue (QUEUE).
--
-- 'nextToken', 'listQuickConnects_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', 'listQuickConnects_maxResults' - The maximum number of results to return per page.
--
-- 'instanceId', 'listQuickConnects_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
newListQuickConnects ::
  -- | 'instanceId'
  Prelude.Text ->
  ListQuickConnects
newListQuickConnects :: Text -> ListQuickConnects
newListQuickConnects Text
pInstanceId_ =
  ListQuickConnects' :: Maybe [QuickConnectType]
-> Maybe Text -> Maybe Natural -> Text -> ListQuickConnects
ListQuickConnects'
    { $sel:quickConnectTypes:ListQuickConnects' :: Maybe [QuickConnectType]
quickConnectTypes =
        Maybe [QuickConnectType]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListQuickConnects' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListQuickConnects' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:ListQuickConnects' :: Text
instanceId = Text
pInstanceId_
    }

-- | The type of quick connect. In the Amazon Connect console, when you
-- create a quick connect, you are prompted to assign one of the following
-- types: Agent (USER), External (PHONE_NUMBER), or Queue (QUEUE).
listQuickConnects_quickConnectTypes :: Lens.Lens' ListQuickConnects (Prelude.Maybe [QuickConnectType])
listQuickConnects_quickConnectTypes :: (Maybe [QuickConnectType] -> f (Maybe [QuickConnectType]))
-> ListQuickConnects -> f ListQuickConnects
listQuickConnects_quickConnectTypes = (ListQuickConnects -> Maybe [QuickConnectType])
-> (ListQuickConnects
    -> Maybe [QuickConnectType] -> ListQuickConnects)
-> Lens
     ListQuickConnects
     ListQuickConnects
     (Maybe [QuickConnectType])
     (Maybe [QuickConnectType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQuickConnects' {Maybe [QuickConnectType]
quickConnectTypes :: Maybe [QuickConnectType]
$sel:quickConnectTypes:ListQuickConnects' :: ListQuickConnects -> Maybe [QuickConnectType]
quickConnectTypes} -> Maybe [QuickConnectType]
quickConnectTypes) (\s :: ListQuickConnects
s@ListQuickConnects' {} Maybe [QuickConnectType]
a -> ListQuickConnects
s {$sel:quickConnectTypes:ListQuickConnects' :: Maybe [QuickConnectType]
quickConnectTypes = Maybe [QuickConnectType]
a} :: ListQuickConnects) ((Maybe [QuickConnectType] -> f (Maybe [QuickConnectType]))
 -> ListQuickConnects -> f ListQuickConnects)
-> ((Maybe [QuickConnectType] -> f (Maybe [QuickConnectType]))
    -> Maybe [QuickConnectType] -> f (Maybe [QuickConnectType]))
-> (Maybe [QuickConnectType] -> f (Maybe [QuickConnectType]))
-> ListQuickConnects
-> f ListQuickConnects
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [QuickConnectType]
  [QuickConnectType]
  [QuickConnectType]
  [QuickConnectType]
-> Iso
     (Maybe [QuickConnectType])
     (Maybe [QuickConnectType])
     (Maybe [QuickConnectType])
     (Maybe [QuickConnectType])
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
  [QuickConnectType]
  [QuickConnectType]
  [QuickConnectType]
  [QuickConnectType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

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

instance Core.AWSPager ListQuickConnects where
  page :: ListQuickConnects
-> AWSResponse ListQuickConnects -> Maybe ListQuickConnects
page ListQuickConnects
rq AWSResponse ListQuickConnects
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListQuickConnects
ListQuickConnectsResponse
rs
            ListQuickConnectsResponse
-> Getting (First Text) ListQuickConnectsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListQuickConnectsResponse
-> Const (First Text) ListQuickConnectsResponse
Lens' ListQuickConnectsResponse (Maybe Text)
listQuickConnectsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListQuickConnectsResponse
 -> Const (First Text) ListQuickConnectsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListQuickConnectsResponse 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 ListQuickConnects
forall a. Maybe a
Prelude.Nothing
    | Maybe [QuickConnectSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListQuickConnects
ListQuickConnectsResponse
rs
            ListQuickConnectsResponse
-> Getting
     (First [QuickConnectSummary])
     ListQuickConnectsResponse
     [QuickConnectSummary]
-> Maybe [QuickConnectSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [QuickConnectSummary]
 -> Const
      (First [QuickConnectSummary]) (Maybe [QuickConnectSummary]))
-> ListQuickConnectsResponse
-> Const (First [QuickConnectSummary]) ListQuickConnectsResponse
Lens' ListQuickConnectsResponse (Maybe [QuickConnectSummary])
listQuickConnectsResponse_quickConnectSummaryList
              ((Maybe [QuickConnectSummary]
  -> Const
       (First [QuickConnectSummary]) (Maybe [QuickConnectSummary]))
 -> ListQuickConnectsResponse
 -> Const (First [QuickConnectSummary]) ListQuickConnectsResponse)
-> (([QuickConnectSummary]
     -> Const (First [QuickConnectSummary]) [QuickConnectSummary])
    -> Maybe [QuickConnectSummary]
    -> Const
         (First [QuickConnectSummary]) (Maybe [QuickConnectSummary]))
-> Getting
     (First [QuickConnectSummary])
     ListQuickConnectsResponse
     [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 ListQuickConnects
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListQuickConnects -> Maybe ListQuickConnects
forall a. a -> Maybe a
Prelude.Just (ListQuickConnects -> Maybe ListQuickConnects)
-> ListQuickConnects -> Maybe ListQuickConnects
forall a b. (a -> b) -> a -> b
Prelude.$
        ListQuickConnects
rq
          ListQuickConnects
-> (ListQuickConnects -> ListQuickConnects) -> ListQuickConnects
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListQuickConnects -> Identity ListQuickConnects
Lens ListQuickConnects ListQuickConnects (Maybe Text) (Maybe Text)
listQuickConnects_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListQuickConnects -> Identity ListQuickConnects)
-> Maybe Text -> ListQuickConnects -> ListQuickConnects
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListQuickConnects
ListQuickConnectsResponse
rs
          ListQuickConnectsResponse
-> Getting (First Text) ListQuickConnectsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListQuickConnectsResponse
-> Const (First Text) ListQuickConnectsResponse
Lens' ListQuickConnectsResponse (Maybe Text)
listQuickConnectsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListQuickConnectsResponse
 -> Const (First Text) ListQuickConnectsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListQuickConnectsResponse 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 ListQuickConnects where
  type
    AWSResponse ListQuickConnects =
      ListQuickConnectsResponse
  request :: ListQuickConnects -> Request ListQuickConnects
request = Service -> ListQuickConnects -> Request ListQuickConnects
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListQuickConnects
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListQuickConnects)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListQuickConnects))
-> Logger
-> Service
-> Proxy ListQuickConnects
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListQuickConnects)))
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 -> ListQuickConnectsResponse
ListQuickConnectsResponse'
            (Maybe [QuickConnectSummary]
 -> Maybe Text -> Int -> ListQuickConnectsResponse)
-> Either String (Maybe [QuickConnectSummary])
-> Either String (Maybe Text -> Int -> ListQuickConnectsResponse)
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 -> ListQuickConnectsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListQuickConnectsResponse)
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 -> ListQuickConnectsResponse)
-> Either String Int -> Either String ListQuickConnectsResponse
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 ListQuickConnects

instance Prelude.NFData ListQuickConnects

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

instance Core.ToQuery ListQuickConnects where
  toQuery :: ListQuickConnects -> QueryString
toQuery ListQuickConnects' {Maybe Natural
Maybe [QuickConnectType]
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
quickConnectTypes :: Maybe [QuickConnectType]
$sel:instanceId:ListQuickConnects' :: ListQuickConnects -> Text
$sel:maxResults:ListQuickConnects' :: ListQuickConnects -> Maybe Natural
$sel:nextToken:ListQuickConnects' :: ListQuickConnects -> Maybe Text
$sel:quickConnectTypes:ListQuickConnects' :: ListQuickConnects -> Maybe [QuickConnectType]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"QuickConnectTypes"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [QuickConnectType] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([QuickConnectType] -> QueryString)
-> Maybe [QuickConnectType] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [QuickConnectType]
quickConnectTypes
            ),
        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:/ 'newListQuickConnectsResponse' smart constructor.
data ListQuickConnectsResponse = ListQuickConnectsResponse'
  { -- | Information about the quick connects.
    ListQuickConnectsResponse -> Maybe [QuickConnectSummary]
quickConnectSummaryList :: Prelude.Maybe [QuickConnectSummary],
    -- | If there are additional results, this is the token for the next set of
    -- results.
    ListQuickConnectsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListQuickConnectsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListQuickConnectsResponse -> ListQuickConnectsResponse -> Bool
(ListQuickConnectsResponse -> ListQuickConnectsResponse -> Bool)
-> (ListQuickConnectsResponse -> ListQuickConnectsResponse -> Bool)
-> Eq ListQuickConnectsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListQuickConnectsResponse -> ListQuickConnectsResponse -> Bool
$c/= :: ListQuickConnectsResponse -> ListQuickConnectsResponse -> Bool
== :: ListQuickConnectsResponse -> ListQuickConnectsResponse -> Bool
$c== :: ListQuickConnectsResponse -> ListQuickConnectsResponse -> Bool
Prelude.Eq, ReadPrec [ListQuickConnectsResponse]
ReadPrec ListQuickConnectsResponse
Int -> ReadS ListQuickConnectsResponse
ReadS [ListQuickConnectsResponse]
(Int -> ReadS ListQuickConnectsResponse)
-> ReadS [ListQuickConnectsResponse]
-> ReadPrec ListQuickConnectsResponse
-> ReadPrec [ListQuickConnectsResponse]
-> Read ListQuickConnectsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListQuickConnectsResponse]
$creadListPrec :: ReadPrec [ListQuickConnectsResponse]
readPrec :: ReadPrec ListQuickConnectsResponse
$creadPrec :: ReadPrec ListQuickConnectsResponse
readList :: ReadS [ListQuickConnectsResponse]
$creadList :: ReadS [ListQuickConnectsResponse]
readsPrec :: Int -> ReadS ListQuickConnectsResponse
$creadsPrec :: Int -> ReadS ListQuickConnectsResponse
Prelude.Read, Int -> ListQuickConnectsResponse -> ShowS
[ListQuickConnectsResponse] -> ShowS
ListQuickConnectsResponse -> String
(Int -> ListQuickConnectsResponse -> ShowS)
-> (ListQuickConnectsResponse -> String)
-> ([ListQuickConnectsResponse] -> ShowS)
-> Show ListQuickConnectsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListQuickConnectsResponse] -> ShowS
$cshowList :: [ListQuickConnectsResponse] -> ShowS
show :: ListQuickConnectsResponse -> String
$cshow :: ListQuickConnectsResponse -> String
showsPrec :: Int -> ListQuickConnectsResponse -> ShowS
$cshowsPrec :: Int -> ListQuickConnectsResponse -> ShowS
Prelude.Show, (forall x.
 ListQuickConnectsResponse -> Rep ListQuickConnectsResponse x)
-> (forall x.
    Rep ListQuickConnectsResponse x -> ListQuickConnectsResponse)
-> Generic ListQuickConnectsResponse
forall x.
Rep ListQuickConnectsResponse x -> ListQuickConnectsResponse
forall x.
ListQuickConnectsResponse -> Rep ListQuickConnectsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListQuickConnectsResponse x -> ListQuickConnectsResponse
$cfrom :: forall x.
ListQuickConnectsResponse -> Rep ListQuickConnectsResponse x
Prelude.Generic)

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

-- | Information about the quick connects.
listQuickConnectsResponse_quickConnectSummaryList :: Lens.Lens' ListQuickConnectsResponse (Prelude.Maybe [QuickConnectSummary])
listQuickConnectsResponse_quickConnectSummaryList :: (Maybe [QuickConnectSummary] -> f (Maybe [QuickConnectSummary]))
-> ListQuickConnectsResponse -> f ListQuickConnectsResponse
listQuickConnectsResponse_quickConnectSummaryList = (ListQuickConnectsResponse -> Maybe [QuickConnectSummary])
-> (ListQuickConnectsResponse
    -> Maybe [QuickConnectSummary] -> ListQuickConnectsResponse)
-> Lens' ListQuickConnectsResponse (Maybe [QuickConnectSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQuickConnectsResponse' {Maybe [QuickConnectSummary]
quickConnectSummaryList :: Maybe [QuickConnectSummary]
$sel:quickConnectSummaryList:ListQuickConnectsResponse' :: ListQuickConnectsResponse -> Maybe [QuickConnectSummary]
quickConnectSummaryList} -> Maybe [QuickConnectSummary]
quickConnectSummaryList) (\s :: ListQuickConnectsResponse
s@ListQuickConnectsResponse' {} Maybe [QuickConnectSummary]
a -> ListQuickConnectsResponse
s {$sel:quickConnectSummaryList:ListQuickConnectsResponse' :: Maybe [QuickConnectSummary]
quickConnectSummaryList = Maybe [QuickConnectSummary]
a} :: ListQuickConnectsResponse) ((Maybe [QuickConnectSummary] -> f (Maybe [QuickConnectSummary]))
 -> ListQuickConnectsResponse -> f ListQuickConnectsResponse)
-> ((Maybe [QuickConnectSummary]
     -> f (Maybe [QuickConnectSummary]))
    -> Maybe [QuickConnectSummary] -> f (Maybe [QuickConnectSummary]))
-> (Maybe [QuickConnectSummary] -> f (Maybe [QuickConnectSummary]))
-> ListQuickConnectsResponse
-> f ListQuickConnectsResponse
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.
listQuickConnectsResponse_nextToken :: Lens.Lens' ListQuickConnectsResponse (Prelude.Maybe Prelude.Text)
listQuickConnectsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListQuickConnectsResponse -> f ListQuickConnectsResponse
listQuickConnectsResponse_nextToken = (ListQuickConnectsResponse -> Maybe Text)
-> (ListQuickConnectsResponse
    -> Maybe Text -> ListQuickConnectsResponse)
-> Lens' ListQuickConnectsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListQuickConnectsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListQuickConnectsResponse' :: ListQuickConnectsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListQuickConnectsResponse
s@ListQuickConnectsResponse' {} Maybe Text
a -> ListQuickConnectsResponse
s {$sel:nextToken:ListQuickConnectsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListQuickConnectsResponse)

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

instance Prelude.NFData ListQuickConnectsResponse