{-# 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.ListBotRecommendations
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Get a list of bot recommendations that meet the specified criteria.
module Amazonka.LexV2Models.ListBotRecommendations
  ( -- * Creating a Request
    ListBotRecommendations (..),
    newListBotRecommendations,

    -- * Request Lenses
    listBotRecommendations_maxResults,
    listBotRecommendations_nextToken,
    listBotRecommendations_botId,
    listBotRecommendations_botVersion,
    listBotRecommendations_localeId,

    -- * Destructuring the Response
    ListBotRecommendationsResponse (..),
    newListBotRecommendationsResponse,

    -- * Response Lenses
    listBotRecommendationsResponse_botId,
    listBotRecommendationsResponse_botRecommendationSummaries,
    listBotRecommendationsResponse_botVersion,
    listBotRecommendationsResponse_localeId,
    listBotRecommendationsResponse_nextToken,
    listBotRecommendationsResponse_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:/ 'newListBotRecommendations' smart constructor.
data ListBotRecommendations = ListBotRecommendations'
  { -- | 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.
    ListBotRecommendations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the response from the ListBotRecommendation 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.
    ListBotRecommendations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the bot that contains the bot recommendation
    -- list.
    ListBotRecommendations -> Text
botId :: Prelude.Text,
    -- | The version of the bot that contains the bot recommendation list.
    ListBotRecommendations -> Text
botVersion :: Prelude.Text,
    -- | The identifier of the language and locale of the bot recommendation
    -- list.
    ListBotRecommendations -> Text
localeId :: Prelude.Text
  }
  deriving (ListBotRecommendations -> ListBotRecommendations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBotRecommendations -> ListBotRecommendations -> Bool
$c/= :: ListBotRecommendations -> ListBotRecommendations -> Bool
== :: ListBotRecommendations -> ListBotRecommendations -> Bool
$c== :: ListBotRecommendations -> ListBotRecommendations -> Bool
Prelude.Eq, ReadPrec [ListBotRecommendations]
ReadPrec ListBotRecommendations
Int -> ReadS ListBotRecommendations
ReadS [ListBotRecommendations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBotRecommendations]
$creadListPrec :: ReadPrec [ListBotRecommendations]
readPrec :: ReadPrec ListBotRecommendations
$creadPrec :: ReadPrec ListBotRecommendations
readList :: ReadS [ListBotRecommendations]
$creadList :: ReadS [ListBotRecommendations]
readsPrec :: Int -> ReadS ListBotRecommendations
$creadsPrec :: Int -> ReadS ListBotRecommendations
Prelude.Read, Int -> ListBotRecommendations -> ShowS
[ListBotRecommendations] -> ShowS
ListBotRecommendations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBotRecommendations] -> ShowS
$cshowList :: [ListBotRecommendations] -> ShowS
show :: ListBotRecommendations -> String
$cshow :: ListBotRecommendations -> String
showsPrec :: Int -> ListBotRecommendations -> ShowS
$cshowsPrec :: Int -> ListBotRecommendations -> ShowS
Prelude.Show, forall x. Rep ListBotRecommendations x -> ListBotRecommendations
forall x. ListBotRecommendations -> Rep ListBotRecommendations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBotRecommendations x -> ListBotRecommendations
$cfrom :: forall x. ListBotRecommendations -> Rep ListBotRecommendations x
Prelude.Generic)

-- |
-- Create a value of 'ListBotRecommendations' 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', 'listBotRecommendations_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', 'listBotRecommendations_nextToken' - If the response from the ListBotRecommendation 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', 'listBotRecommendations_botId' - The unique identifier of the bot that contains the bot recommendation
-- list.
--
-- 'botVersion', 'listBotRecommendations_botVersion' - The version of the bot that contains the bot recommendation list.
--
-- 'localeId', 'listBotRecommendations_localeId' - The identifier of the language and locale of the bot recommendation
-- list.
newListBotRecommendations ::
  -- | 'botId'
  Prelude.Text ->
  -- | 'botVersion'
  Prelude.Text ->
  -- | 'localeId'
  Prelude.Text ->
  ListBotRecommendations
newListBotRecommendations :: Text -> Text -> Text -> ListBotRecommendations
newListBotRecommendations
  Text
pBotId_
  Text
pBotVersion_
  Text
pLocaleId_ =
    ListBotRecommendations'
      { $sel:maxResults:ListBotRecommendations' :: Maybe Natural
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListBotRecommendations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:botId:ListBotRecommendations' :: Text
botId = Text
pBotId_,
        $sel:botVersion:ListBotRecommendations' :: Text
botVersion = Text
pBotVersion_,
        $sel:localeId:ListBotRecommendations' :: Text
localeId = Text
pLocaleId_
      }

-- | 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.
listBotRecommendations_maxResults :: Lens.Lens' ListBotRecommendations (Prelude.Maybe Prelude.Natural)
listBotRecommendations_maxResults :: Lens' ListBotRecommendations (Maybe Natural)
listBotRecommendations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotRecommendations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListBotRecommendations' :: ListBotRecommendations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListBotRecommendations
s@ListBotRecommendations' {} Maybe Natural
a -> ListBotRecommendations
s {$sel:maxResults:ListBotRecommendations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListBotRecommendations)

-- | If the response from the ListBotRecommendation 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.
listBotRecommendations_nextToken :: Lens.Lens' ListBotRecommendations (Prelude.Maybe Prelude.Text)
listBotRecommendations_nextToken :: Lens' ListBotRecommendations (Maybe Text)
listBotRecommendations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotRecommendations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBotRecommendations' :: ListBotRecommendations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBotRecommendations
s@ListBotRecommendations' {} Maybe Text
a -> ListBotRecommendations
s {$sel:nextToken:ListBotRecommendations' :: Maybe Text
nextToken = Maybe Text
a} :: ListBotRecommendations)

-- | The unique identifier of the bot that contains the bot recommendation
-- list.
listBotRecommendations_botId :: Lens.Lens' ListBotRecommendations Prelude.Text
listBotRecommendations_botId :: Lens' ListBotRecommendations Text
listBotRecommendations_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotRecommendations' {Text
botId :: Text
$sel:botId:ListBotRecommendations' :: ListBotRecommendations -> Text
botId} -> Text
botId) (\s :: ListBotRecommendations
s@ListBotRecommendations' {} Text
a -> ListBotRecommendations
s {$sel:botId:ListBotRecommendations' :: Text
botId = Text
a} :: ListBotRecommendations)

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

-- | The identifier of the language and locale of the bot recommendation
-- list.
listBotRecommendations_localeId :: Lens.Lens' ListBotRecommendations Prelude.Text
listBotRecommendations_localeId :: Lens' ListBotRecommendations Text
listBotRecommendations_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotRecommendations' {Text
localeId :: Text
$sel:localeId:ListBotRecommendations' :: ListBotRecommendations -> Text
localeId} -> Text
localeId) (\s :: ListBotRecommendations
s@ListBotRecommendations' {} Text
a -> ListBotRecommendations
s {$sel:localeId:ListBotRecommendations' :: Text
localeId = Text
a} :: ListBotRecommendations)

instance Core.AWSRequest ListBotRecommendations where
  type
    AWSResponse ListBotRecommendations =
      ListBotRecommendationsResponse
  request :: (Service -> Service)
-> ListBotRecommendations -> Request ListBotRecommendations
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 ListBotRecommendations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBotRecommendations)))
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 [BotRecommendationSummary]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ListBotRecommendationsResponse
ListBotRecommendationsResponse'
            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
"botRecommendationSummaries"
                            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.<*> (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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListBotRecommendations where
  hashWithSalt :: Int -> ListBotRecommendations -> Int
hashWithSalt Int
_salt ListBotRecommendations' {Maybe Natural
Maybe Text
Text
localeId :: Text
botVersion :: Text
botId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:localeId:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:botVersion:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:botId:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:nextToken:ListBotRecommendations' :: ListBotRecommendations -> Maybe Text
$sel:maxResults:ListBotRecommendations' :: ListBotRecommendations -> 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

instance Prelude.NFData ListBotRecommendations where
  rnf :: ListBotRecommendations -> ()
rnf ListBotRecommendations' {Maybe Natural
Maybe Text
Text
localeId :: Text
botVersion :: Text
botId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:localeId:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:botVersion:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:botId:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:nextToken:ListBotRecommendations' :: ListBotRecommendations -> Maybe Text
$sel:maxResults:ListBotRecommendations' :: ListBotRecommendations -> 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

instance Data.ToHeaders ListBotRecommendations where
  toHeaders :: ListBotRecommendations -> 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 ListBotRecommendations where
  toJSON :: ListBotRecommendations -> Value
toJSON ListBotRecommendations' {Maybe Natural
Maybe Text
Text
localeId :: Text
botVersion :: Text
botId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:localeId:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:botVersion:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:botId:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:nextToken:ListBotRecommendations' :: ListBotRecommendations -> Maybe Text
$sel:maxResults:ListBotRecommendations' :: ListBotRecommendations -> 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 ListBotRecommendations where
  toPath :: ListBotRecommendations -> ByteString
toPath ListBotRecommendations' {Maybe Natural
Maybe Text
Text
localeId :: Text
botVersion :: Text
botId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:localeId:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:botVersion:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:botId:ListBotRecommendations' :: ListBotRecommendations -> Text
$sel:nextToken:ListBotRecommendations' :: ListBotRecommendations -> Maybe Text
$sel:maxResults:ListBotRecommendations' :: ListBotRecommendations -> 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/"
      ]

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

-- | /See:/ 'newListBotRecommendationsResponse' smart constructor.
data ListBotRecommendationsResponse = ListBotRecommendationsResponse'
  { -- | The unique identifier of the bot that contains the bot recommendation
    -- list.
    ListBotRecommendationsResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | Summary information for the bot recommendations that meet the filter
    -- specified in this request. The length of the list is specified in the
    -- maxResults parameter of the request. If there are more bot
    -- recommendations available, the nextToken field contains a token to get
    -- the next page of results.
    ListBotRecommendationsResponse -> Maybe [BotRecommendationSummary]
botRecommendationSummaries :: Prelude.Maybe [BotRecommendationSummary],
    -- | The version of the bot that contains the bot recommendation list.
    ListBotRecommendationsResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the language and locale of the bot recommendation
    -- list.
    ListBotRecommendationsResponse -> Maybe Text
localeId :: Prelude.Maybe Prelude.Text,
    -- | A token that indicates whether there are more results to return in a
    -- response to the ListBotRecommendations operation. If the nextToken field
    -- is present, you send the contents as the nextToken parameter of a
    -- ListBotRecommendations operation request to get the next page of
    -- results.
    ListBotRecommendationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListBotRecommendationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBotRecommendationsResponse
-> ListBotRecommendationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBotRecommendationsResponse
-> ListBotRecommendationsResponse -> Bool
$c/= :: ListBotRecommendationsResponse
-> ListBotRecommendationsResponse -> Bool
== :: ListBotRecommendationsResponse
-> ListBotRecommendationsResponse -> Bool
$c== :: ListBotRecommendationsResponse
-> ListBotRecommendationsResponse -> Bool
Prelude.Eq, ReadPrec [ListBotRecommendationsResponse]
ReadPrec ListBotRecommendationsResponse
Int -> ReadS ListBotRecommendationsResponse
ReadS [ListBotRecommendationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBotRecommendationsResponse]
$creadListPrec :: ReadPrec [ListBotRecommendationsResponse]
readPrec :: ReadPrec ListBotRecommendationsResponse
$creadPrec :: ReadPrec ListBotRecommendationsResponse
readList :: ReadS [ListBotRecommendationsResponse]
$creadList :: ReadS [ListBotRecommendationsResponse]
readsPrec :: Int -> ReadS ListBotRecommendationsResponse
$creadsPrec :: Int -> ReadS ListBotRecommendationsResponse
Prelude.Read, Int -> ListBotRecommendationsResponse -> ShowS
[ListBotRecommendationsResponse] -> ShowS
ListBotRecommendationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBotRecommendationsResponse] -> ShowS
$cshowList :: [ListBotRecommendationsResponse] -> ShowS
show :: ListBotRecommendationsResponse -> String
$cshow :: ListBotRecommendationsResponse -> String
showsPrec :: Int -> ListBotRecommendationsResponse -> ShowS
$cshowsPrec :: Int -> ListBotRecommendationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListBotRecommendationsResponse x
-> ListBotRecommendationsResponse
forall x.
ListBotRecommendationsResponse
-> Rep ListBotRecommendationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBotRecommendationsResponse x
-> ListBotRecommendationsResponse
$cfrom :: forall x.
ListBotRecommendationsResponse
-> Rep ListBotRecommendationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBotRecommendationsResponse' 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', 'listBotRecommendationsResponse_botId' - The unique identifier of the bot that contains the bot recommendation
-- list.
--
-- 'botRecommendationSummaries', 'listBotRecommendationsResponse_botRecommendationSummaries' - Summary information for the bot recommendations that meet the filter
-- specified in this request. The length of the list is specified in the
-- maxResults parameter of the request. If there are more bot
-- recommendations available, the nextToken field contains a token to get
-- the next page of results.
--
-- 'botVersion', 'listBotRecommendationsResponse_botVersion' - The version of the bot that contains the bot recommendation list.
--
-- 'localeId', 'listBotRecommendationsResponse_localeId' - The identifier of the language and locale of the bot recommendation
-- list.
--
-- 'nextToken', 'listBotRecommendationsResponse_nextToken' - A token that indicates whether there are more results to return in a
-- response to the ListBotRecommendations operation. If the nextToken field
-- is present, you send the contents as the nextToken parameter of a
-- ListBotRecommendations operation request to get the next page of
-- results.
--
-- 'httpStatus', 'listBotRecommendationsResponse_httpStatus' - The response's http status code.
newListBotRecommendationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBotRecommendationsResponse
newListBotRecommendationsResponse :: Int -> ListBotRecommendationsResponse
newListBotRecommendationsResponse Int
pHttpStatus_ =
  ListBotRecommendationsResponse'
    { $sel:botId:ListBotRecommendationsResponse' :: Maybe Text
botId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:botRecommendationSummaries:ListBotRecommendationsResponse' :: Maybe [BotRecommendationSummary]
botRecommendationSummaries =
        forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:ListBotRecommendationsResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:localeId:ListBotRecommendationsResponse' :: Maybe Text
localeId = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBotRecommendationsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBotRecommendationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The unique identifier of the bot that contains the bot recommendation
-- list.
listBotRecommendationsResponse_botId :: Lens.Lens' ListBotRecommendationsResponse (Prelude.Maybe Prelude.Text)
listBotRecommendationsResponse_botId :: Lens' ListBotRecommendationsResponse (Maybe Text)
listBotRecommendationsResponse_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotRecommendationsResponse' {Maybe Text
botId :: Maybe Text
$sel:botId:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> Maybe Text
botId} -> Maybe Text
botId) (\s :: ListBotRecommendationsResponse
s@ListBotRecommendationsResponse' {} Maybe Text
a -> ListBotRecommendationsResponse
s {$sel:botId:ListBotRecommendationsResponse' :: Maybe Text
botId = Maybe Text
a} :: ListBotRecommendationsResponse)

-- | Summary information for the bot recommendations that meet the filter
-- specified in this request. The length of the list is specified in the
-- maxResults parameter of the request. If there are more bot
-- recommendations available, the nextToken field contains a token to get
-- the next page of results.
listBotRecommendationsResponse_botRecommendationSummaries :: Lens.Lens' ListBotRecommendationsResponse (Prelude.Maybe [BotRecommendationSummary])
listBotRecommendationsResponse_botRecommendationSummaries :: Lens'
  ListBotRecommendationsResponse (Maybe [BotRecommendationSummary])
listBotRecommendationsResponse_botRecommendationSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotRecommendationsResponse' {Maybe [BotRecommendationSummary]
botRecommendationSummaries :: Maybe [BotRecommendationSummary]
$sel:botRecommendationSummaries:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> Maybe [BotRecommendationSummary]
botRecommendationSummaries} -> Maybe [BotRecommendationSummary]
botRecommendationSummaries) (\s :: ListBotRecommendationsResponse
s@ListBotRecommendationsResponse' {} Maybe [BotRecommendationSummary]
a -> ListBotRecommendationsResponse
s {$sel:botRecommendationSummaries:ListBotRecommendationsResponse' :: Maybe [BotRecommendationSummary]
botRecommendationSummaries = Maybe [BotRecommendationSummary]
a} :: ListBotRecommendationsResponse) 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 version of the bot that contains the bot recommendation list.
listBotRecommendationsResponse_botVersion :: Lens.Lens' ListBotRecommendationsResponse (Prelude.Maybe Prelude.Text)
listBotRecommendationsResponse_botVersion :: Lens' ListBotRecommendationsResponse (Maybe Text)
listBotRecommendationsResponse_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotRecommendationsResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: ListBotRecommendationsResponse
s@ListBotRecommendationsResponse' {} Maybe Text
a -> ListBotRecommendationsResponse
s {$sel:botVersion:ListBotRecommendationsResponse' :: Maybe Text
botVersion = Maybe Text
a} :: ListBotRecommendationsResponse)

-- | The identifier of the language and locale of the bot recommendation
-- list.
listBotRecommendationsResponse_localeId :: Lens.Lens' ListBotRecommendationsResponse (Prelude.Maybe Prelude.Text)
listBotRecommendationsResponse_localeId :: Lens' ListBotRecommendationsResponse (Maybe Text)
listBotRecommendationsResponse_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotRecommendationsResponse' {Maybe Text
localeId :: Maybe Text
$sel:localeId:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> Maybe Text
localeId} -> Maybe Text
localeId) (\s :: ListBotRecommendationsResponse
s@ListBotRecommendationsResponse' {} Maybe Text
a -> ListBotRecommendationsResponse
s {$sel:localeId:ListBotRecommendationsResponse' :: Maybe Text
localeId = Maybe Text
a} :: ListBotRecommendationsResponse)

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

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

instance
  Prelude.NFData
    ListBotRecommendationsResponse
  where
  rnf :: ListBotRecommendationsResponse -> ()
rnf ListBotRecommendationsResponse' {Int
Maybe [BotRecommendationSummary]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
localeId :: Maybe Text
botVersion :: Maybe Text
botRecommendationSummaries :: Maybe [BotRecommendationSummary]
botId :: Maybe Text
$sel:httpStatus:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> Int
$sel:nextToken:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> Maybe Text
$sel:localeId:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> Maybe Text
$sel:botVersion:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> Maybe Text
$sel:botRecommendationSummaries:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> Maybe [BotRecommendationSummary]
$sel:botId:ListBotRecommendationsResponse' :: ListBotRecommendationsResponse -> 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 [BotRecommendationSummary]
botRecommendationSummaries
      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 Int
httpStatus