{-# 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.LexV2Models.ListRecommendedIntents
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a list of recommended intents provided by the bot recommendation
-- that you can use in your bot. Intents in the response are ordered by
-- relevance.
module Amazonka.LexV2Models.ListRecommendedIntents
  ( -- * Creating a Request
    ListRecommendedIntents (..),
    newListRecommendedIntents,

    -- * Request Lenses
    listRecommendedIntents_maxResults,
    listRecommendedIntents_nextToken,
    listRecommendedIntents_botId,
    listRecommendedIntents_botVersion,
    listRecommendedIntents_localeId,
    listRecommendedIntents_botRecommendationId,

    -- * Destructuring the Response
    ListRecommendedIntentsResponse (..),
    newListRecommendedIntentsResponse,

    -- * Response Lenses
    listRecommendedIntentsResponse_botId,
    listRecommendedIntentsResponse_botRecommendationId,
    listRecommendedIntentsResponse_botVersion,
    listRecommendedIntentsResponse_localeId,
    listRecommendedIntentsResponse_nextToken,
    listRecommendedIntentsResponse_summaryList,
    listRecommendedIntentsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexV2Models.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListRecommendedIntents' smart constructor.
data ListRecommendedIntents = ListRecommendedIntents'
  { -- | The maximum number of bot recommendations to return in each page of
    -- results. If there are fewer results than the max page size, only the
    -- actual number of results are returned.
    ListRecommendedIntents -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the response from the ListRecommendedIntents operation contains more
    -- results than specified in the maxResults parameter, a token is returned
    -- in the response. Use that token in the nextToken parameter to return the
    -- next page of results.
    ListRecommendedIntents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the bot associated with the recommended
    -- intents.
    ListRecommendedIntents -> Text
botId :: Prelude.Text,
    -- | The version of the bot that contains the recommended intents.
    ListRecommendedIntents -> Text
botVersion :: Prelude.Text,
    -- | The identifier of the language and locale of the recommended intents.
    ListRecommendedIntents -> Text
localeId :: Prelude.Text,
    -- | The identifier of the bot recommendation that contains the recommended
    -- intents.
    ListRecommendedIntents -> Text
botRecommendationId :: Prelude.Text
  }
  deriving (ListRecommendedIntents -> ListRecommendedIntents -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecommendedIntents -> ListRecommendedIntents -> Bool
$c/= :: ListRecommendedIntents -> ListRecommendedIntents -> Bool
== :: ListRecommendedIntents -> ListRecommendedIntents -> Bool
$c== :: ListRecommendedIntents -> ListRecommendedIntents -> Bool
Prelude.Eq, ReadPrec [ListRecommendedIntents]
ReadPrec ListRecommendedIntents
Int -> ReadS ListRecommendedIntents
ReadS [ListRecommendedIntents]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecommendedIntents]
$creadListPrec :: ReadPrec [ListRecommendedIntents]
readPrec :: ReadPrec ListRecommendedIntents
$creadPrec :: ReadPrec ListRecommendedIntents
readList :: ReadS [ListRecommendedIntents]
$creadList :: ReadS [ListRecommendedIntents]
readsPrec :: Int -> ReadS ListRecommendedIntents
$creadsPrec :: Int -> ReadS ListRecommendedIntents
Prelude.Read, Int -> ListRecommendedIntents -> ShowS
[ListRecommendedIntents] -> ShowS
ListRecommendedIntents -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecommendedIntents] -> ShowS
$cshowList :: [ListRecommendedIntents] -> ShowS
show :: ListRecommendedIntents -> String
$cshow :: ListRecommendedIntents -> String
showsPrec :: Int -> ListRecommendedIntents -> ShowS
$cshowsPrec :: Int -> ListRecommendedIntents -> ShowS
Prelude.Show, forall x. Rep ListRecommendedIntents x -> ListRecommendedIntents
forall x. ListRecommendedIntents -> Rep ListRecommendedIntents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRecommendedIntents x -> ListRecommendedIntents
$cfrom :: forall x. ListRecommendedIntents -> Rep ListRecommendedIntents x
Prelude.Generic)

-- |
-- Create a value of 'ListRecommendedIntents' 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:
--
-- 'maxResults', 'listRecommendedIntents_maxResults' - The maximum number of bot recommendations to return in each page of
-- results. If there are fewer results than the max page size, only the
-- actual number of results are returned.
--
-- 'nextToken', 'listRecommendedIntents_nextToken' - If the response from the ListRecommendedIntents operation contains more
-- results than specified in the maxResults parameter, a token is returned
-- in the response. Use that token in the nextToken parameter to return the
-- next page of results.
--
-- 'botId', 'listRecommendedIntents_botId' - The unique identifier of the bot associated with the recommended
-- intents.
--
-- 'botVersion', 'listRecommendedIntents_botVersion' - The version of the bot that contains the recommended intents.
--
-- 'localeId', 'listRecommendedIntents_localeId' - The identifier of the language and locale of the recommended intents.
--
-- 'botRecommendationId', 'listRecommendedIntents_botRecommendationId' - The identifier of the bot recommendation that contains the recommended
-- intents.
newListRecommendedIntents ::
  -- | 'botId'
  Prelude.Text ->
  -- | 'botVersion'
  Prelude.Text ->
  -- | 'localeId'
  Prelude.Text ->
  -- | 'botRecommendationId'
  Prelude.Text ->
  ListRecommendedIntents
newListRecommendedIntents :: Text -> Text -> Text -> Text -> ListRecommendedIntents
newListRecommendedIntents
  Text
pBotId_
  Text
pBotVersion_
  Text
pLocaleId_
  Text
pBotRecommendationId_ =
    ListRecommendedIntents'
      { $sel:maxResults:ListRecommendedIntents' :: Maybe Natural
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListRecommendedIntents' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:botId:ListRecommendedIntents' :: Text
botId = Text
pBotId_,
        $sel:botVersion:ListRecommendedIntents' :: Text
botVersion = Text
pBotVersion_,
        $sel:localeId:ListRecommendedIntents' :: Text
localeId = Text
pLocaleId_,
        $sel:botRecommendationId:ListRecommendedIntents' :: Text
botRecommendationId = Text
pBotRecommendationId_
      }

-- | The maximum number of bot recommendations to return in each page of
-- results. If there are fewer results than the max page size, only the
-- actual number of results are returned.
listRecommendedIntents_maxResults :: Lens.Lens' ListRecommendedIntents (Prelude.Maybe Prelude.Natural)
listRecommendedIntents_maxResults :: Lens' ListRecommendedIntents (Maybe Natural)
listRecommendedIntents_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntents' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRecommendedIntents
s@ListRecommendedIntents' {} Maybe Natural
a -> ListRecommendedIntents
s {$sel:maxResults:ListRecommendedIntents' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRecommendedIntents)

-- | If the response from the ListRecommendedIntents operation contains more
-- results than specified in the maxResults parameter, a token is returned
-- in the response. Use that token in the nextToken parameter to return the
-- next page of results.
listRecommendedIntents_nextToken :: Lens.Lens' ListRecommendedIntents (Prelude.Maybe Prelude.Text)
listRecommendedIntents_nextToken :: Lens' ListRecommendedIntents (Maybe Text)
listRecommendedIntents_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecommendedIntents
s@ListRecommendedIntents' {} Maybe Text
a -> ListRecommendedIntents
s {$sel:nextToken:ListRecommendedIntents' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecommendedIntents)

-- | The unique identifier of the bot associated with the recommended
-- intents.
listRecommendedIntents_botId :: Lens.Lens' ListRecommendedIntents Prelude.Text
listRecommendedIntents_botId :: Lens' ListRecommendedIntents Text
listRecommendedIntents_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntents' {Text
botId :: Text
$sel:botId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
botId} -> Text
botId) (\s :: ListRecommendedIntents
s@ListRecommendedIntents' {} Text
a -> ListRecommendedIntents
s {$sel:botId:ListRecommendedIntents' :: Text
botId = Text
a} :: ListRecommendedIntents)

-- | The version of the bot that contains the recommended intents.
listRecommendedIntents_botVersion :: Lens.Lens' ListRecommendedIntents Prelude.Text
listRecommendedIntents_botVersion :: Lens' ListRecommendedIntents Text
listRecommendedIntents_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntents' {Text
botVersion :: Text
$sel:botVersion:ListRecommendedIntents' :: ListRecommendedIntents -> Text
botVersion} -> Text
botVersion) (\s :: ListRecommendedIntents
s@ListRecommendedIntents' {} Text
a -> ListRecommendedIntents
s {$sel:botVersion:ListRecommendedIntents' :: Text
botVersion = Text
a} :: ListRecommendedIntents)

-- | The identifier of the language and locale of the recommended intents.
listRecommendedIntents_localeId :: Lens.Lens' ListRecommendedIntents Prelude.Text
listRecommendedIntents_localeId :: Lens' ListRecommendedIntents Text
listRecommendedIntents_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntents' {Text
localeId :: Text
$sel:localeId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
localeId} -> Text
localeId) (\s :: ListRecommendedIntents
s@ListRecommendedIntents' {} Text
a -> ListRecommendedIntents
s {$sel:localeId:ListRecommendedIntents' :: Text
localeId = Text
a} :: ListRecommendedIntents)

-- | The identifier of the bot recommendation that contains the recommended
-- intents.
listRecommendedIntents_botRecommendationId :: Lens.Lens' ListRecommendedIntents Prelude.Text
listRecommendedIntents_botRecommendationId :: Lens' ListRecommendedIntents Text
listRecommendedIntents_botRecommendationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntents' {Text
botRecommendationId :: Text
$sel:botRecommendationId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
botRecommendationId} -> Text
botRecommendationId) (\s :: ListRecommendedIntents
s@ListRecommendedIntents' {} Text
a -> ListRecommendedIntents
s {$sel:botRecommendationId:ListRecommendedIntents' :: Text
botRecommendationId = Text
a} :: ListRecommendedIntents)

instance Core.AWSRequest ListRecommendedIntents where
  type
    AWSResponse ListRecommendedIntents =
      ListRecommendedIntentsResponse
  request :: (Service -> Service)
-> ListRecommendedIntents -> Request ListRecommendedIntents
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListRecommendedIntents
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRecommendedIntents)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [RecommendedIntentSummary]
-> Int
-> ListRecommendedIntentsResponse
ListRecommendedIntentsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botRecommendationId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"localeId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"summaryList" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListRecommendedIntents where
  hashWithSalt :: Int -> ListRecommendedIntents -> Int
hashWithSalt Int
_salt ListRecommendedIntents' {Maybe Natural
Maybe Text
Text
botRecommendationId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:botRecommendationId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:localeId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:botVersion:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:botId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:nextToken:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Text
$sel:maxResults:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
localeId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botRecommendationId

instance Prelude.NFData ListRecommendedIntents where
  rnf :: ListRecommendedIntents -> ()
rnf ListRecommendedIntents' {Maybe Natural
Maybe Text
Text
botRecommendationId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:botRecommendationId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:localeId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:botVersion:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:botId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:nextToken:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Text
$sel:maxResults:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
localeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botRecommendationId

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

instance Data.ToJSON ListRecommendedIntents where
  toJSON :: ListRecommendedIntents -> Value
toJSON ListRecommendedIntents' {Maybe Natural
Maybe Text
Text
botRecommendationId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:botRecommendationId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:localeId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:botVersion:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:botId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:nextToken:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Text
$sel:maxResults:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

instance Data.ToPath ListRecommendedIntents where
  toPath :: ListRecommendedIntents -> ByteString
toPath ListRecommendedIntents' {Maybe Natural
Maybe Text
Text
botRecommendationId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:botRecommendationId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:localeId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:botVersion:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:botId:ListRecommendedIntents' :: ListRecommendedIntents -> Text
$sel:nextToken:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Text
$sel:maxResults:ListRecommendedIntents' :: ListRecommendedIntents -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/bots/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
botId,
        ByteString
"/botversions/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
botVersion,
        ByteString
"/botlocales/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
localeId,
        ByteString
"/botrecommendations/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
botRecommendationId,
        ByteString
"/intents"
      ]

instance Data.ToQuery ListRecommendedIntents where
  toQuery :: ListRecommendedIntents -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListRecommendedIntentsResponse' smart constructor.
data ListRecommendedIntentsResponse = ListRecommendedIntentsResponse'
  { -- | The unique identifier of the bot associated with the recommended intent.
    ListRecommendedIntentsResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the bot recommendation that contains the recommended
    -- intent.
    ListRecommendedIntentsResponse -> Maybe Text
botRecommendationId :: Prelude.Maybe Prelude.Text,
    -- | The version of the bot that contains the intent.
    ListRecommendedIntentsResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the language and locale of the intents to list. The
    -- string must match one of the supported locales. For more information,
    -- see
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
    ListRecommendedIntentsResponse -> Maybe Text
localeId :: Prelude.Maybe Prelude.Text,
    -- | A token that indicates whether there are more results to return in a
    -- response to the ListRecommendedIntents operation. If the nextToken field
    -- is present, you send the contents as the nextToken parameter of a
    -- ListRecommendedIntents operation request to get the next page of
    -- results.
    ListRecommendedIntentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Summary information for the intents that meet the filter criteria
    -- specified in the request. The length of the list is specified in the
    -- maxResults parameter of the request. If there are more intents
    -- available, the nextToken field contains a token to get the next page of
    -- results.
    ListRecommendedIntentsResponse -> Maybe [RecommendedIntentSummary]
summaryList :: Prelude.Maybe [RecommendedIntentSummary],
    -- | The response's http status code.
    ListRecommendedIntentsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRecommendedIntentsResponse
-> ListRecommendedIntentsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecommendedIntentsResponse
-> ListRecommendedIntentsResponse -> Bool
$c/= :: ListRecommendedIntentsResponse
-> ListRecommendedIntentsResponse -> Bool
== :: ListRecommendedIntentsResponse
-> ListRecommendedIntentsResponse -> Bool
$c== :: ListRecommendedIntentsResponse
-> ListRecommendedIntentsResponse -> Bool
Prelude.Eq, ReadPrec [ListRecommendedIntentsResponse]
ReadPrec ListRecommendedIntentsResponse
Int -> ReadS ListRecommendedIntentsResponse
ReadS [ListRecommendedIntentsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecommendedIntentsResponse]
$creadListPrec :: ReadPrec [ListRecommendedIntentsResponse]
readPrec :: ReadPrec ListRecommendedIntentsResponse
$creadPrec :: ReadPrec ListRecommendedIntentsResponse
readList :: ReadS [ListRecommendedIntentsResponse]
$creadList :: ReadS [ListRecommendedIntentsResponse]
readsPrec :: Int -> ReadS ListRecommendedIntentsResponse
$creadsPrec :: Int -> ReadS ListRecommendedIntentsResponse
Prelude.Read, Int -> ListRecommendedIntentsResponse -> ShowS
[ListRecommendedIntentsResponse] -> ShowS
ListRecommendedIntentsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecommendedIntentsResponse] -> ShowS
$cshowList :: [ListRecommendedIntentsResponse] -> ShowS
show :: ListRecommendedIntentsResponse -> String
$cshow :: ListRecommendedIntentsResponse -> String
showsPrec :: Int -> ListRecommendedIntentsResponse -> ShowS
$cshowsPrec :: Int -> ListRecommendedIntentsResponse -> ShowS
Prelude.Show, forall x.
Rep ListRecommendedIntentsResponse x
-> ListRecommendedIntentsResponse
forall x.
ListRecommendedIntentsResponse
-> Rep ListRecommendedIntentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRecommendedIntentsResponse x
-> ListRecommendedIntentsResponse
$cfrom :: forall x.
ListRecommendedIntentsResponse
-> Rep ListRecommendedIntentsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRecommendedIntentsResponse' 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:
--
-- 'botId', 'listRecommendedIntentsResponse_botId' - The unique identifier of the bot associated with the recommended intent.
--
-- 'botRecommendationId', 'listRecommendedIntentsResponse_botRecommendationId' - The identifier of the bot recommendation that contains the recommended
-- intent.
--
-- 'botVersion', 'listRecommendedIntentsResponse_botVersion' - The version of the bot that contains the intent.
--
-- 'localeId', 'listRecommendedIntentsResponse_localeId' - The identifier of the language and locale of the intents to list. The
-- string must match one of the supported locales. For more information,
-- see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
--
-- 'nextToken', 'listRecommendedIntentsResponse_nextToken' - A token that indicates whether there are more results to return in a
-- response to the ListRecommendedIntents operation. If the nextToken field
-- is present, you send the contents as the nextToken parameter of a
-- ListRecommendedIntents operation request to get the next page of
-- results.
--
-- 'summaryList', 'listRecommendedIntentsResponse_summaryList' - Summary information for the intents that meet the filter criteria
-- specified in the request. The length of the list is specified in the
-- maxResults parameter of the request. If there are more intents
-- available, the nextToken field contains a token to get the next page of
-- results.
--
-- 'httpStatus', 'listRecommendedIntentsResponse_httpStatus' - The response's http status code.
newListRecommendedIntentsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRecommendedIntentsResponse
newListRecommendedIntentsResponse :: Int -> ListRecommendedIntentsResponse
newListRecommendedIntentsResponse Int
pHttpStatus_ =
  ListRecommendedIntentsResponse'
    { $sel:botId:ListRecommendedIntentsResponse' :: Maybe Text
botId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:botRecommendationId:ListRecommendedIntentsResponse' :: Maybe Text
botRecommendationId = forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:ListRecommendedIntentsResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:localeId:ListRecommendedIntentsResponse' :: Maybe Text
localeId = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListRecommendedIntentsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:summaryList:ListRecommendedIntentsResponse' :: Maybe [RecommendedIntentSummary]
summaryList = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRecommendedIntentsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The unique identifier of the bot associated with the recommended intent.
listRecommendedIntentsResponse_botId :: Lens.Lens' ListRecommendedIntentsResponse (Prelude.Maybe Prelude.Text)
listRecommendedIntentsResponse_botId :: Lens' ListRecommendedIntentsResponse (Maybe Text)
listRecommendedIntentsResponse_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntentsResponse' {Maybe Text
botId :: Maybe Text
$sel:botId:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
botId} -> Maybe Text
botId) (\s :: ListRecommendedIntentsResponse
s@ListRecommendedIntentsResponse' {} Maybe Text
a -> ListRecommendedIntentsResponse
s {$sel:botId:ListRecommendedIntentsResponse' :: Maybe Text
botId = Maybe Text
a} :: ListRecommendedIntentsResponse)

-- | The identifier of the bot recommendation that contains the recommended
-- intent.
listRecommendedIntentsResponse_botRecommendationId :: Lens.Lens' ListRecommendedIntentsResponse (Prelude.Maybe Prelude.Text)
listRecommendedIntentsResponse_botRecommendationId :: Lens' ListRecommendedIntentsResponse (Maybe Text)
listRecommendedIntentsResponse_botRecommendationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntentsResponse' {Maybe Text
botRecommendationId :: Maybe Text
$sel:botRecommendationId:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
botRecommendationId} -> Maybe Text
botRecommendationId) (\s :: ListRecommendedIntentsResponse
s@ListRecommendedIntentsResponse' {} Maybe Text
a -> ListRecommendedIntentsResponse
s {$sel:botRecommendationId:ListRecommendedIntentsResponse' :: Maybe Text
botRecommendationId = Maybe Text
a} :: ListRecommendedIntentsResponse)

-- | The version of the bot that contains the intent.
listRecommendedIntentsResponse_botVersion :: Lens.Lens' ListRecommendedIntentsResponse (Prelude.Maybe Prelude.Text)
listRecommendedIntentsResponse_botVersion :: Lens' ListRecommendedIntentsResponse (Maybe Text)
listRecommendedIntentsResponse_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntentsResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: ListRecommendedIntentsResponse
s@ListRecommendedIntentsResponse' {} Maybe Text
a -> ListRecommendedIntentsResponse
s {$sel:botVersion:ListRecommendedIntentsResponse' :: Maybe Text
botVersion = Maybe Text
a} :: ListRecommendedIntentsResponse)

-- | The identifier of the language and locale of the intents to list. The
-- string must match one of the supported locales. For more information,
-- see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
listRecommendedIntentsResponse_localeId :: Lens.Lens' ListRecommendedIntentsResponse (Prelude.Maybe Prelude.Text)
listRecommendedIntentsResponse_localeId :: Lens' ListRecommendedIntentsResponse (Maybe Text)
listRecommendedIntentsResponse_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntentsResponse' {Maybe Text
localeId :: Maybe Text
$sel:localeId:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
localeId} -> Maybe Text
localeId) (\s :: ListRecommendedIntentsResponse
s@ListRecommendedIntentsResponse' {} Maybe Text
a -> ListRecommendedIntentsResponse
s {$sel:localeId:ListRecommendedIntentsResponse' :: Maybe Text
localeId = Maybe Text
a} :: ListRecommendedIntentsResponse)

-- | A token that indicates whether there are more results to return in a
-- response to the ListRecommendedIntents operation. If the nextToken field
-- is present, you send the contents as the nextToken parameter of a
-- ListRecommendedIntents operation request to get the next page of
-- results.
listRecommendedIntentsResponse_nextToken :: Lens.Lens' ListRecommendedIntentsResponse (Prelude.Maybe Prelude.Text)
listRecommendedIntentsResponse_nextToken :: Lens' ListRecommendedIntentsResponse (Maybe Text)
listRecommendedIntentsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecommendedIntentsResponse
s@ListRecommendedIntentsResponse' {} Maybe Text
a -> ListRecommendedIntentsResponse
s {$sel:nextToken:ListRecommendedIntentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecommendedIntentsResponse)

-- | Summary information for the intents that meet the filter criteria
-- specified in the request. The length of the list is specified in the
-- maxResults parameter of the request. If there are more intents
-- available, the nextToken field contains a token to get the next page of
-- results.
listRecommendedIntentsResponse_summaryList :: Lens.Lens' ListRecommendedIntentsResponse (Prelude.Maybe [RecommendedIntentSummary])
listRecommendedIntentsResponse_summaryList :: Lens'
  ListRecommendedIntentsResponse (Maybe [RecommendedIntentSummary])
listRecommendedIntentsResponse_summaryList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendedIntentsResponse' {Maybe [RecommendedIntentSummary]
summaryList :: Maybe [RecommendedIntentSummary]
$sel:summaryList:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe [RecommendedIntentSummary]
summaryList} -> Maybe [RecommendedIntentSummary]
summaryList) (\s :: ListRecommendedIntentsResponse
s@ListRecommendedIntentsResponse' {} Maybe [RecommendedIntentSummary]
a -> ListRecommendedIntentsResponse
s {$sel:summaryList:ListRecommendedIntentsResponse' :: Maybe [RecommendedIntentSummary]
summaryList = Maybe [RecommendedIntentSummary]
a} :: ListRecommendedIntentsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListRecommendedIntentsResponse
  where
  rnf :: ListRecommendedIntentsResponse -> ()
rnf ListRecommendedIntentsResponse' {Int
Maybe [RecommendedIntentSummary]
Maybe Text
httpStatus :: Int
summaryList :: Maybe [RecommendedIntentSummary]
nextToken :: Maybe Text
localeId :: Maybe Text
botVersion :: Maybe Text
botRecommendationId :: Maybe Text
botId :: Maybe Text
$sel:httpStatus:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Int
$sel:summaryList:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe [RecommendedIntentSummary]
$sel:nextToken:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
$sel:localeId:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
$sel:botVersion:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
$sel:botRecommendationId:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
$sel:botId:ListRecommendedIntentsResponse' :: ListRecommendedIntentsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botRecommendationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
localeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RecommendedIntentSummary]
summaryList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus