{-# 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.ListBotLocales
-- 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 locales for the specified bot.
module Amazonka.LexV2Models.ListBotLocales
  ( -- * Creating a Request
    ListBotLocales (..),
    newListBotLocales,

    -- * Request Lenses
    listBotLocales_filters,
    listBotLocales_maxResults,
    listBotLocales_nextToken,
    listBotLocales_sortBy,
    listBotLocales_botId,
    listBotLocales_botVersion,

    -- * Destructuring the Response
    ListBotLocalesResponse (..),
    newListBotLocalesResponse,

    -- * Response Lenses
    listBotLocalesResponse_botId,
    listBotLocalesResponse_botLocaleSummaries,
    listBotLocalesResponse_botVersion,
    listBotLocalesResponse_nextToken,
    listBotLocalesResponse_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:/ 'newListBotLocales' smart constructor.
data ListBotLocales = ListBotLocales'
  { -- | Provides the specification for a filter used to limit the response to
    -- only those locales that match the filter specification. You can only
    -- specify one filter and one value to filter on.
    ListBotLocales -> Maybe (NonEmpty BotLocaleFilter)
filters :: Prelude.Maybe (Prelude.NonEmpty BotLocaleFilter),
    -- | The maximum number of aliases 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.
    ListBotLocales -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the response from the @ListBotLocales@ operation contains more
    -- results than specified in the @maxResults@ parameter, a token is
    -- returned in the response. Use that token as the @nextToken@ parameter to
    -- return the next page of results.
    ListBotLocales -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Specifies sorting parameters for the list of locales. You can sort by
    -- locale name in ascending or descending order.
    ListBotLocales -> Maybe BotLocaleSortBy
sortBy :: Prelude.Maybe BotLocaleSortBy,
    -- | The identifier of the bot to list locales for.
    ListBotLocales -> Text
botId :: Prelude.Text,
    -- | The version of the bot to list locales for.
    ListBotLocales -> Text
botVersion :: Prelude.Text
  }
  deriving (ListBotLocales -> ListBotLocales -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBotLocales -> ListBotLocales -> Bool
$c/= :: ListBotLocales -> ListBotLocales -> Bool
== :: ListBotLocales -> ListBotLocales -> Bool
$c== :: ListBotLocales -> ListBotLocales -> Bool
Prelude.Eq, ReadPrec [ListBotLocales]
ReadPrec ListBotLocales
Int -> ReadS ListBotLocales
ReadS [ListBotLocales]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBotLocales]
$creadListPrec :: ReadPrec [ListBotLocales]
readPrec :: ReadPrec ListBotLocales
$creadPrec :: ReadPrec ListBotLocales
readList :: ReadS [ListBotLocales]
$creadList :: ReadS [ListBotLocales]
readsPrec :: Int -> ReadS ListBotLocales
$creadsPrec :: Int -> ReadS ListBotLocales
Prelude.Read, Int -> ListBotLocales -> ShowS
[ListBotLocales] -> ShowS
ListBotLocales -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBotLocales] -> ShowS
$cshowList :: [ListBotLocales] -> ShowS
show :: ListBotLocales -> String
$cshow :: ListBotLocales -> String
showsPrec :: Int -> ListBotLocales -> ShowS
$cshowsPrec :: Int -> ListBotLocales -> ShowS
Prelude.Show, forall x. Rep ListBotLocales x -> ListBotLocales
forall x. ListBotLocales -> Rep ListBotLocales x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBotLocales x -> ListBotLocales
$cfrom :: forall x. ListBotLocales -> Rep ListBotLocales x
Prelude.Generic)

-- |
-- Create a value of 'ListBotLocales' 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:
--
-- 'filters', 'listBotLocales_filters' - Provides the specification for a filter used to limit the response to
-- only those locales that match the filter specification. You can only
-- specify one filter and one value to filter on.
--
-- 'maxResults', 'listBotLocales_maxResults' - The maximum number of aliases 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', 'listBotLocales_nextToken' - If the response from the @ListBotLocales@ operation contains more
-- results than specified in the @maxResults@ parameter, a token is
-- returned in the response. Use that token as the @nextToken@ parameter to
-- return the next page of results.
--
-- 'sortBy', 'listBotLocales_sortBy' - Specifies sorting parameters for the list of locales. You can sort by
-- locale name in ascending or descending order.
--
-- 'botId', 'listBotLocales_botId' - The identifier of the bot to list locales for.
--
-- 'botVersion', 'listBotLocales_botVersion' - The version of the bot to list locales for.
newListBotLocales ::
  -- | 'botId'
  Prelude.Text ->
  -- | 'botVersion'
  Prelude.Text ->
  ListBotLocales
newListBotLocales :: Text -> Text -> ListBotLocales
newListBotLocales Text
pBotId_ Text
pBotVersion_ =
  ListBotLocales'
    { $sel:filters:ListBotLocales' :: Maybe (NonEmpty BotLocaleFilter)
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListBotLocales' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBotLocales' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListBotLocales' :: Maybe BotLocaleSortBy
sortBy = forall a. Maybe a
Prelude.Nothing,
      $sel:botId:ListBotLocales' :: Text
botId = Text
pBotId_,
      $sel:botVersion:ListBotLocales' :: Text
botVersion = Text
pBotVersion_
    }

-- | Provides the specification for a filter used to limit the response to
-- only those locales that match the filter specification. You can only
-- specify one filter and one value to filter on.
listBotLocales_filters :: Lens.Lens' ListBotLocales (Prelude.Maybe (Prelude.NonEmpty BotLocaleFilter))
listBotLocales_filters :: Lens' ListBotLocales (Maybe (NonEmpty BotLocaleFilter))
listBotLocales_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotLocales' {Maybe (NonEmpty BotLocaleFilter)
filters :: Maybe (NonEmpty BotLocaleFilter)
$sel:filters:ListBotLocales' :: ListBotLocales -> Maybe (NonEmpty BotLocaleFilter)
filters} -> Maybe (NonEmpty BotLocaleFilter)
filters) (\s :: ListBotLocales
s@ListBotLocales' {} Maybe (NonEmpty BotLocaleFilter)
a -> ListBotLocales
s {$sel:filters:ListBotLocales' :: Maybe (NonEmpty BotLocaleFilter)
filters = Maybe (NonEmpty BotLocaleFilter)
a} :: ListBotLocales) 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 maximum number of aliases 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.
listBotLocales_maxResults :: Lens.Lens' ListBotLocales (Prelude.Maybe Prelude.Natural)
listBotLocales_maxResults :: Lens' ListBotLocales (Maybe Natural)
listBotLocales_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotLocales' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListBotLocales' :: ListBotLocales -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListBotLocales
s@ListBotLocales' {} Maybe Natural
a -> ListBotLocales
s {$sel:maxResults:ListBotLocales' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListBotLocales)

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

-- | Specifies sorting parameters for the list of locales. You can sort by
-- locale name in ascending or descending order.
listBotLocales_sortBy :: Lens.Lens' ListBotLocales (Prelude.Maybe BotLocaleSortBy)
listBotLocales_sortBy :: Lens' ListBotLocales (Maybe BotLocaleSortBy)
listBotLocales_sortBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotLocales' {Maybe BotLocaleSortBy
sortBy :: Maybe BotLocaleSortBy
$sel:sortBy:ListBotLocales' :: ListBotLocales -> Maybe BotLocaleSortBy
sortBy} -> Maybe BotLocaleSortBy
sortBy) (\s :: ListBotLocales
s@ListBotLocales' {} Maybe BotLocaleSortBy
a -> ListBotLocales
s {$sel:sortBy:ListBotLocales' :: Maybe BotLocaleSortBy
sortBy = Maybe BotLocaleSortBy
a} :: ListBotLocales)

-- | The identifier of the bot to list locales for.
listBotLocales_botId :: Lens.Lens' ListBotLocales Prelude.Text
listBotLocales_botId :: Lens' ListBotLocales Text
listBotLocales_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotLocales' {Text
botId :: Text
$sel:botId:ListBotLocales' :: ListBotLocales -> Text
botId} -> Text
botId) (\s :: ListBotLocales
s@ListBotLocales' {} Text
a -> ListBotLocales
s {$sel:botId:ListBotLocales' :: Text
botId = Text
a} :: ListBotLocales)

-- | The version of the bot to list locales for.
listBotLocales_botVersion :: Lens.Lens' ListBotLocales Prelude.Text
listBotLocales_botVersion :: Lens' ListBotLocales Text
listBotLocales_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotLocales' {Text
botVersion :: Text
$sel:botVersion:ListBotLocales' :: ListBotLocales -> Text
botVersion} -> Text
botVersion) (\s :: ListBotLocales
s@ListBotLocales' {} Text
a -> ListBotLocales
s {$sel:botVersion:ListBotLocales' :: Text
botVersion = Text
a} :: ListBotLocales)

instance Core.AWSRequest ListBotLocales where
  type
    AWSResponse ListBotLocales =
      ListBotLocalesResponse
  request :: (Service -> Service) -> ListBotLocales -> Request ListBotLocales
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 ListBotLocales
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListBotLocales)))
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 [BotLocaleSummary]
-> Maybe Text
-> Maybe Text
-> Int
-> ListBotLocalesResponse
ListBotLocalesResponse'
            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
"botLocaleSummaries"
                            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
"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 ListBotLocales where
  hashWithSalt :: Int -> ListBotLocales -> Int
hashWithSalt Int
_salt ListBotLocales' {Maybe Natural
Maybe (NonEmpty BotLocaleFilter)
Maybe Text
Maybe BotLocaleSortBy
Text
botVersion :: Text
botId :: Text
sortBy :: Maybe BotLocaleSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe (NonEmpty BotLocaleFilter)
$sel:botVersion:ListBotLocales' :: ListBotLocales -> Text
$sel:botId:ListBotLocales' :: ListBotLocales -> Text
$sel:sortBy:ListBotLocales' :: ListBotLocales -> Maybe BotLocaleSortBy
$sel:nextToken:ListBotLocales' :: ListBotLocales -> Maybe Text
$sel:maxResults:ListBotLocales' :: ListBotLocales -> Maybe Natural
$sel:filters:ListBotLocales' :: ListBotLocales -> Maybe (NonEmpty BotLocaleFilter)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty BotLocaleFilter)
filters
      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` Maybe BotLocaleSortBy
sortBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botVersion

instance Prelude.NFData ListBotLocales where
  rnf :: ListBotLocales -> ()
rnf ListBotLocales' {Maybe Natural
Maybe (NonEmpty BotLocaleFilter)
Maybe Text
Maybe BotLocaleSortBy
Text
botVersion :: Text
botId :: Text
sortBy :: Maybe BotLocaleSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe (NonEmpty BotLocaleFilter)
$sel:botVersion:ListBotLocales' :: ListBotLocales -> Text
$sel:botId:ListBotLocales' :: ListBotLocales -> Text
$sel:sortBy:ListBotLocales' :: ListBotLocales -> Maybe BotLocaleSortBy
$sel:nextToken:ListBotLocales' :: ListBotLocales -> Maybe Text
$sel:maxResults:ListBotLocales' :: ListBotLocales -> Maybe Natural
$sel:filters:ListBotLocales' :: ListBotLocales -> Maybe (NonEmpty BotLocaleFilter)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty BotLocaleFilter)
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Maybe BotLocaleSortBy
sortBy
      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

instance Data.ToHeaders ListBotLocales where
  toHeaders :: ListBotLocales -> 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 ListBotLocales where
  toJSON :: ListBotLocales -> Value
toJSON ListBotLocales' {Maybe Natural
Maybe (NonEmpty BotLocaleFilter)
Maybe Text
Maybe BotLocaleSortBy
Text
botVersion :: Text
botId :: Text
sortBy :: Maybe BotLocaleSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe (NonEmpty BotLocaleFilter)
$sel:botVersion:ListBotLocales' :: ListBotLocales -> Text
$sel:botId:ListBotLocales' :: ListBotLocales -> Text
$sel:sortBy:ListBotLocales' :: ListBotLocales -> Maybe BotLocaleSortBy
$sel:nextToken:ListBotLocales' :: ListBotLocales -> Maybe Text
$sel:maxResults:ListBotLocales' :: ListBotLocales -> Maybe Natural
$sel:filters:ListBotLocales' :: ListBotLocales -> Maybe (NonEmpty BotLocaleFilter)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"filters" 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 (NonEmpty BotLocaleFilter)
filters,
            (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,
            (Key
"sortBy" 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 BotLocaleSortBy
sortBy
          ]
      )

instance Data.ToPath ListBotLocales where
  toPath :: ListBotLocales -> ByteString
toPath ListBotLocales' {Maybe Natural
Maybe (NonEmpty BotLocaleFilter)
Maybe Text
Maybe BotLocaleSortBy
Text
botVersion :: Text
botId :: Text
sortBy :: Maybe BotLocaleSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe (NonEmpty BotLocaleFilter)
$sel:botVersion:ListBotLocales' :: ListBotLocales -> Text
$sel:botId:ListBotLocales' :: ListBotLocales -> Text
$sel:sortBy:ListBotLocales' :: ListBotLocales -> Maybe BotLocaleSortBy
$sel:nextToken:ListBotLocales' :: ListBotLocales -> Maybe Text
$sel:maxResults:ListBotLocales' :: ListBotLocales -> Maybe Natural
$sel:filters:ListBotLocales' :: ListBotLocales -> Maybe (NonEmpty BotLocaleFilter)
..} =
    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/"
      ]

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

-- | /See:/ 'newListBotLocalesResponse' smart constructor.
data ListBotLocalesResponse = ListBotLocalesResponse'
  { -- | The identifier of the bot to list locales for.
    ListBotLocalesResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | Summary information for the locales 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 locales
    -- available, the @nextToken@ field contains a token to get the next page
    -- of results.
    ListBotLocalesResponse -> Maybe [BotLocaleSummary]
botLocaleSummaries :: Prelude.Maybe [BotLocaleSummary],
    -- | The version of the bot.
    ListBotLocalesResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | A token that indicates whether there are more results to return in a
    -- response to the @ListBotLocales@ operation. If the @nextToken@ field is
    -- present, you send the contents as the @nextToken@ parameter of a
    -- @ListBotLocales@ operation request to get the next page of results.
    ListBotLocalesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListBotLocalesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBotLocalesResponse -> ListBotLocalesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBotLocalesResponse -> ListBotLocalesResponse -> Bool
$c/= :: ListBotLocalesResponse -> ListBotLocalesResponse -> Bool
== :: ListBotLocalesResponse -> ListBotLocalesResponse -> Bool
$c== :: ListBotLocalesResponse -> ListBotLocalesResponse -> Bool
Prelude.Eq, ReadPrec [ListBotLocalesResponse]
ReadPrec ListBotLocalesResponse
Int -> ReadS ListBotLocalesResponse
ReadS [ListBotLocalesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBotLocalesResponse]
$creadListPrec :: ReadPrec [ListBotLocalesResponse]
readPrec :: ReadPrec ListBotLocalesResponse
$creadPrec :: ReadPrec ListBotLocalesResponse
readList :: ReadS [ListBotLocalesResponse]
$creadList :: ReadS [ListBotLocalesResponse]
readsPrec :: Int -> ReadS ListBotLocalesResponse
$creadsPrec :: Int -> ReadS ListBotLocalesResponse
Prelude.Read, Int -> ListBotLocalesResponse -> ShowS
[ListBotLocalesResponse] -> ShowS
ListBotLocalesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBotLocalesResponse] -> ShowS
$cshowList :: [ListBotLocalesResponse] -> ShowS
show :: ListBotLocalesResponse -> String
$cshow :: ListBotLocalesResponse -> String
showsPrec :: Int -> ListBotLocalesResponse -> ShowS
$cshowsPrec :: Int -> ListBotLocalesResponse -> ShowS
Prelude.Show, forall x. Rep ListBotLocalesResponse x -> ListBotLocalesResponse
forall x. ListBotLocalesResponse -> Rep ListBotLocalesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBotLocalesResponse x -> ListBotLocalesResponse
$cfrom :: forall x. ListBotLocalesResponse -> Rep ListBotLocalesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBotLocalesResponse' 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', 'listBotLocalesResponse_botId' - The identifier of the bot to list locales for.
--
-- 'botLocaleSummaries', 'listBotLocalesResponse_botLocaleSummaries' - Summary information for the locales 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 locales
-- available, the @nextToken@ field contains a token to get the next page
-- of results.
--
-- 'botVersion', 'listBotLocalesResponse_botVersion' - The version of the bot.
--
-- 'nextToken', 'listBotLocalesResponse_nextToken' - A token that indicates whether there are more results to return in a
-- response to the @ListBotLocales@ operation. If the @nextToken@ field is
-- present, you send the contents as the @nextToken@ parameter of a
-- @ListBotLocales@ operation request to get the next page of results.
--
-- 'httpStatus', 'listBotLocalesResponse_httpStatus' - The response's http status code.
newListBotLocalesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBotLocalesResponse
newListBotLocalesResponse :: Int -> ListBotLocalesResponse
newListBotLocalesResponse Int
pHttpStatus_ =
  ListBotLocalesResponse'
    { $sel:botId:ListBotLocalesResponse' :: Maybe Text
botId = forall a. Maybe a
Prelude.Nothing,
      $sel:botLocaleSummaries:ListBotLocalesResponse' :: Maybe [BotLocaleSummary]
botLocaleSummaries = forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:ListBotLocalesResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBotLocalesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBotLocalesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier of the bot to list locales for.
listBotLocalesResponse_botId :: Lens.Lens' ListBotLocalesResponse (Prelude.Maybe Prelude.Text)
listBotLocalesResponse_botId :: Lens' ListBotLocalesResponse (Maybe Text)
listBotLocalesResponse_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotLocalesResponse' {Maybe Text
botId :: Maybe Text
$sel:botId:ListBotLocalesResponse' :: ListBotLocalesResponse -> Maybe Text
botId} -> Maybe Text
botId) (\s :: ListBotLocalesResponse
s@ListBotLocalesResponse' {} Maybe Text
a -> ListBotLocalesResponse
s {$sel:botId:ListBotLocalesResponse' :: Maybe Text
botId = Maybe Text
a} :: ListBotLocalesResponse)

-- | Summary information for the locales 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 locales
-- available, the @nextToken@ field contains a token to get the next page
-- of results.
listBotLocalesResponse_botLocaleSummaries :: Lens.Lens' ListBotLocalesResponse (Prelude.Maybe [BotLocaleSummary])
listBotLocalesResponse_botLocaleSummaries :: Lens' ListBotLocalesResponse (Maybe [BotLocaleSummary])
listBotLocalesResponse_botLocaleSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotLocalesResponse' {Maybe [BotLocaleSummary]
botLocaleSummaries :: Maybe [BotLocaleSummary]
$sel:botLocaleSummaries:ListBotLocalesResponse' :: ListBotLocalesResponse -> Maybe [BotLocaleSummary]
botLocaleSummaries} -> Maybe [BotLocaleSummary]
botLocaleSummaries) (\s :: ListBotLocalesResponse
s@ListBotLocalesResponse' {} Maybe [BotLocaleSummary]
a -> ListBotLocalesResponse
s {$sel:botLocaleSummaries:ListBotLocalesResponse' :: Maybe [BotLocaleSummary]
botLocaleSummaries = Maybe [BotLocaleSummary]
a} :: ListBotLocalesResponse) 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.
listBotLocalesResponse_botVersion :: Lens.Lens' ListBotLocalesResponse (Prelude.Maybe Prelude.Text)
listBotLocalesResponse_botVersion :: Lens' ListBotLocalesResponse (Maybe Text)
listBotLocalesResponse_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBotLocalesResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:ListBotLocalesResponse' :: ListBotLocalesResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: ListBotLocalesResponse
s@ListBotLocalesResponse' {} Maybe Text
a -> ListBotLocalesResponse
s {$sel:botVersion:ListBotLocalesResponse' :: Maybe Text
botVersion = Maybe Text
a} :: ListBotLocalesResponse)

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

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

instance Prelude.NFData ListBotLocalesResponse where
  rnf :: ListBotLocalesResponse -> ()
rnf ListBotLocalesResponse' {Int
Maybe [BotLocaleSummary]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
botVersion :: Maybe Text
botLocaleSummaries :: Maybe [BotLocaleSummary]
botId :: Maybe Text
$sel:httpStatus:ListBotLocalesResponse' :: ListBotLocalesResponse -> Int
$sel:nextToken:ListBotLocalesResponse' :: ListBotLocalesResponse -> Maybe Text
$sel:botVersion:ListBotLocalesResponse' :: ListBotLocalesResponse -> Maybe Text
$sel:botLocaleSummaries:ListBotLocalesResponse' :: ListBotLocalesResponse -> Maybe [BotLocaleSummary]
$sel:botId:ListBotLocalesResponse' :: ListBotLocalesResponse -> 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 [BotLocaleSummary]
botLocaleSummaries
      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
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus