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

    -- * Request Lenses
    listPrompts_nextToken,
    listPrompts_maxResults,
    listPrompts_instanceId,

    -- * Destructuring the Response
    ListPromptsResponse (..),
    newListPromptsResponse,

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

-- |
-- Create a value of 'ListPrompts' 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', 'listPrompts_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', 'listPrompts_maxResults' - The maximum number of results to return per page.
--
-- 'instanceId', 'listPrompts_instanceId' - The identifier of the Amazon Connect instance.
newListPrompts ::
  -- | 'instanceId'
  Prelude.Text ->
  ListPrompts
newListPrompts :: Text -> ListPrompts
newListPrompts Text
pInstanceId_ =
  ListPrompts' :: Maybe Text -> Maybe Natural -> Text -> ListPrompts
ListPrompts'
    { $sel:nextToken:ListPrompts' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListPrompts' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:ListPrompts' :: 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.
listPrompts_nextToken :: Lens.Lens' ListPrompts (Prelude.Maybe Prelude.Text)
listPrompts_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListPrompts -> f ListPrompts
listPrompts_nextToken = (ListPrompts -> Maybe Text)
-> (ListPrompts -> Maybe Text -> ListPrompts)
-> Lens ListPrompts ListPrompts (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPrompts' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPrompts' :: ListPrompts -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPrompts
s@ListPrompts' {} Maybe Text
a -> ListPrompts
s {$sel:nextToken:ListPrompts' :: Maybe Text
nextToken = Maybe Text
a} :: ListPrompts)

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

-- | The identifier of the Amazon Connect instance.
listPrompts_instanceId :: Lens.Lens' ListPrompts Prelude.Text
listPrompts_instanceId :: (Text -> f Text) -> ListPrompts -> f ListPrompts
listPrompts_instanceId = (ListPrompts -> Text)
-> (ListPrompts -> Text -> ListPrompts)
-> Lens ListPrompts ListPrompts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPrompts' {Text
instanceId :: Text
$sel:instanceId:ListPrompts' :: ListPrompts -> Text
instanceId} -> Text
instanceId) (\s :: ListPrompts
s@ListPrompts' {} Text
a -> ListPrompts
s {$sel:instanceId:ListPrompts' :: Text
instanceId = Text
a} :: ListPrompts)

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

instance Prelude.NFData ListPrompts

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

instance Core.ToQuery ListPrompts where
  toQuery :: ListPrompts -> QueryString
toQuery ListPrompts' {Maybe Natural
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:instanceId:ListPrompts' :: ListPrompts -> Text
$sel:maxResults:ListPrompts' :: ListPrompts -> Maybe Natural
$sel:nextToken:ListPrompts' :: ListPrompts -> 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:/ 'newListPromptsResponse' smart constructor.
data ListPromptsResponse = ListPromptsResponse'
  { -- | Information about the prompts.
    ListPromptsResponse -> Maybe [PromptSummary]
promptSummaryList :: Prelude.Maybe [PromptSummary],
    -- | If there are additional results, this is the token for the next set of
    -- results.
    ListPromptsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListPromptsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPromptsResponse -> ListPromptsResponse -> Bool
(ListPromptsResponse -> ListPromptsResponse -> Bool)
-> (ListPromptsResponse -> ListPromptsResponse -> Bool)
-> Eq ListPromptsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPromptsResponse -> ListPromptsResponse -> Bool
$c/= :: ListPromptsResponse -> ListPromptsResponse -> Bool
== :: ListPromptsResponse -> ListPromptsResponse -> Bool
$c== :: ListPromptsResponse -> ListPromptsResponse -> Bool
Prelude.Eq, ReadPrec [ListPromptsResponse]
ReadPrec ListPromptsResponse
Int -> ReadS ListPromptsResponse
ReadS [ListPromptsResponse]
(Int -> ReadS ListPromptsResponse)
-> ReadS [ListPromptsResponse]
-> ReadPrec ListPromptsResponse
-> ReadPrec [ListPromptsResponse]
-> Read ListPromptsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPromptsResponse]
$creadListPrec :: ReadPrec [ListPromptsResponse]
readPrec :: ReadPrec ListPromptsResponse
$creadPrec :: ReadPrec ListPromptsResponse
readList :: ReadS [ListPromptsResponse]
$creadList :: ReadS [ListPromptsResponse]
readsPrec :: Int -> ReadS ListPromptsResponse
$creadsPrec :: Int -> ReadS ListPromptsResponse
Prelude.Read, Int -> ListPromptsResponse -> ShowS
[ListPromptsResponse] -> ShowS
ListPromptsResponse -> String
(Int -> ListPromptsResponse -> ShowS)
-> (ListPromptsResponse -> String)
-> ([ListPromptsResponse] -> ShowS)
-> Show ListPromptsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPromptsResponse] -> ShowS
$cshowList :: [ListPromptsResponse] -> ShowS
show :: ListPromptsResponse -> String
$cshow :: ListPromptsResponse -> String
showsPrec :: Int -> ListPromptsResponse -> ShowS
$cshowsPrec :: Int -> ListPromptsResponse -> ShowS
Prelude.Show, (forall x. ListPromptsResponse -> Rep ListPromptsResponse x)
-> (forall x. Rep ListPromptsResponse x -> ListPromptsResponse)
-> Generic ListPromptsResponse
forall x. Rep ListPromptsResponse x -> ListPromptsResponse
forall x. ListPromptsResponse -> Rep ListPromptsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPromptsResponse x -> ListPromptsResponse
$cfrom :: forall x. ListPromptsResponse -> Rep ListPromptsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPromptsResponse' 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:
--
-- 'promptSummaryList', 'listPromptsResponse_promptSummaryList' - Information about the prompts.
--
-- 'nextToken', 'listPromptsResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'httpStatus', 'listPromptsResponse_httpStatus' - The response's http status code.
newListPromptsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPromptsResponse
newListPromptsResponse :: Int -> ListPromptsResponse
newListPromptsResponse Int
pHttpStatus_ =
  ListPromptsResponse' :: Maybe [PromptSummary] -> Maybe Text -> Int -> ListPromptsResponse
ListPromptsResponse'
    { $sel:promptSummaryList:ListPromptsResponse' :: Maybe [PromptSummary]
promptSummaryList =
        Maybe [PromptSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPromptsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPromptsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the prompts.
listPromptsResponse_promptSummaryList :: Lens.Lens' ListPromptsResponse (Prelude.Maybe [PromptSummary])
listPromptsResponse_promptSummaryList :: (Maybe [PromptSummary] -> f (Maybe [PromptSummary]))
-> ListPromptsResponse -> f ListPromptsResponse
listPromptsResponse_promptSummaryList = (ListPromptsResponse -> Maybe [PromptSummary])
-> (ListPromptsResponse
    -> Maybe [PromptSummary] -> ListPromptsResponse)
-> Lens' ListPromptsResponse (Maybe [PromptSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPromptsResponse' {Maybe [PromptSummary]
promptSummaryList :: Maybe [PromptSummary]
$sel:promptSummaryList:ListPromptsResponse' :: ListPromptsResponse -> Maybe [PromptSummary]
promptSummaryList} -> Maybe [PromptSummary]
promptSummaryList) (\s :: ListPromptsResponse
s@ListPromptsResponse' {} Maybe [PromptSummary]
a -> ListPromptsResponse
s {$sel:promptSummaryList:ListPromptsResponse' :: Maybe [PromptSummary]
promptSummaryList = Maybe [PromptSummary]
a} :: ListPromptsResponse) ((Maybe [PromptSummary] -> f (Maybe [PromptSummary]))
 -> ListPromptsResponse -> f ListPromptsResponse)
-> ((Maybe [PromptSummary] -> f (Maybe [PromptSummary]))
    -> Maybe [PromptSummary] -> f (Maybe [PromptSummary]))
-> (Maybe [PromptSummary] -> f (Maybe [PromptSummary]))
-> ListPromptsResponse
-> f ListPromptsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PromptSummary] [PromptSummary] [PromptSummary] [PromptSummary]
-> Iso
     (Maybe [PromptSummary])
     (Maybe [PromptSummary])
     (Maybe [PromptSummary])
     (Maybe [PromptSummary])
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
  [PromptSummary] [PromptSummary] [PromptSummary] [PromptSummary]
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.
listPromptsResponse_nextToken :: Lens.Lens' ListPromptsResponse (Prelude.Maybe Prelude.Text)
listPromptsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPromptsResponse -> f ListPromptsResponse
listPromptsResponse_nextToken = (ListPromptsResponse -> Maybe Text)
-> (ListPromptsResponse -> Maybe Text -> ListPromptsResponse)
-> Lens' ListPromptsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPromptsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPromptsResponse' :: ListPromptsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPromptsResponse
s@ListPromptsResponse' {} Maybe Text
a -> ListPromptsResponse
s {$sel:nextToken:ListPromptsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPromptsResponse)

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

instance Prelude.NFData ListPromptsResponse