{-# 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.ListBuiltInSlotTypes
-- 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 built-in slot types that meet the specified criteria.
module Amazonka.LexV2Models.ListBuiltInSlotTypes
  ( -- * Creating a Request
    ListBuiltInSlotTypes (..),
    newListBuiltInSlotTypes,

    -- * Request Lenses
    listBuiltInSlotTypes_maxResults,
    listBuiltInSlotTypes_nextToken,
    listBuiltInSlotTypes_sortBy,
    listBuiltInSlotTypes_localeId,

    -- * Destructuring the Response
    ListBuiltInSlotTypesResponse (..),
    newListBuiltInSlotTypesResponse,

    -- * Response Lenses
    listBuiltInSlotTypesResponse_builtInSlotTypeSummaries,
    listBuiltInSlotTypesResponse_localeId,
    listBuiltInSlotTypesResponse_nextToken,
    listBuiltInSlotTypesResponse_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:/ 'newListBuiltInSlotTypes' smart constructor.
data ListBuiltInSlotTypes = ListBuiltInSlotTypes'
  { -- | The maximum number of built-in slot types 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.
    ListBuiltInSlotTypes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the response from the @ListBuiltInSlotTypes@ 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.
    ListBuiltInSlotTypes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Determines the sort order for the response from the
    -- @ListBuiltInSlotTypes@ operation. You can choose to sort by the slot
    -- type signature in either ascending or descending order.
    ListBuiltInSlotTypes -> Maybe BuiltInSlotTypeSortBy
sortBy :: Prelude.Maybe BuiltInSlotTypeSortBy,
    -- | The identifier of the language and locale of the slot types 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>.
    ListBuiltInSlotTypes -> Text
localeId :: Prelude.Text
  }
  deriving (ListBuiltInSlotTypes -> ListBuiltInSlotTypes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBuiltInSlotTypes -> ListBuiltInSlotTypes -> Bool
$c/= :: ListBuiltInSlotTypes -> ListBuiltInSlotTypes -> Bool
== :: ListBuiltInSlotTypes -> ListBuiltInSlotTypes -> Bool
$c== :: ListBuiltInSlotTypes -> ListBuiltInSlotTypes -> Bool
Prelude.Eq, ReadPrec [ListBuiltInSlotTypes]
ReadPrec ListBuiltInSlotTypes
Int -> ReadS ListBuiltInSlotTypes
ReadS [ListBuiltInSlotTypes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBuiltInSlotTypes]
$creadListPrec :: ReadPrec [ListBuiltInSlotTypes]
readPrec :: ReadPrec ListBuiltInSlotTypes
$creadPrec :: ReadPrec ListBuiltInSlotTypes
readList :: ReadS [ListBuiltInSlotTypes]
$creadList :: ReadS [ListBuiltInSlotTypes]
readsPrec :: Int -> ReadS ListBuiltInSlotTypes
$creadsPrec :: Int -> ReadS ListBuiltInSlotTypes
Prelude.Read, Int -> ListBuiltInSlotTypes -> ShowS
[ListBuiltInSlotTypes] -> ShowS
ListBuiltInSlotTypes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBuiltInSlotTypes] -> ShowS
$cshowList :: [ListBuiltInSlotTypes] -> ShowS
show :: ListBuiltInSlotTypes -> String
$cshow :: ListBuiltInSlotTypes -> String
showsPrec :: Int -> ListBuiltInSlotTypes -> ShowS
$cshowsPrec :: Int -> ListBuiltInSlotTypes -> ShowS
Prelude.Show, forall x. Rep ListBuiltInSlotTypes x -> ListBuiltInSlotTypes
forall x. ListBuiltInSlotTypes -> Rep ListBuiltInSlotTypes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBuiltInSlotTypes x -> ListBuiltInSlotTypes
$cfrom :: forall x. ListBuiltInSlotTypes -> Rep ListBuiltInSlotTypes x
Prelude.Generic)

-- |
-- Create a value of 'ListBuiltInSlotTypes' 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', 'listBuiltInSlotTypes_maxResults' - The maximum number of built-in slot types 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', 'listBuiltInSlotTypes_nextToken' - If the response from the @ListBuiltInSlotTypes@ 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.
--
-- 'sortBy', 'listBuiltInSlotTypes_sortBy' - Determines the sort order for the response from the
-- @ListBuiltInSlotTypes@ operation. You can choose to sort by the slot
-- type signature in either ascending or descending order.
--
-- 'localeId', 'listBuiltInSlotTypes_localeId' - The identifier of the language and locale of the slot types 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>.
newListBuiltInSlotTypes ::
  -- | 'localeId'
  Prelude.Text ->
  ListBuiltInSlotTypes
newListBuiltInSlotTypes :: Text -> ListBuiltInSlotTypes
newListBuiltInSlotTypes Text
pLocaleId_ =
  ListBuiltInSlotTypes'
    { $sel:maxResults:ListBuiltInSlotTypes' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBuiltInSlotTypes' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListBuiltInSlotTypes' :: Maybe BuiltInSlotTypeSortBy
sortBy = forall a. Maybe a
Prelude.Nothing,
      $sel:localeId:ListBuiltInSlotTypes' :: Text
localeId = Text
pLocaleId_
    }

-- | The maximum number of built-in slot types 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.
listBuiltInSlotTypes_maxResults :: Lens.Lens' ListBuiltInSlotTypes (Prelude.Maybe Prelude.Natural)
listBuiltInSlotTypes_maxResults :: Lens' ListBuiltInSlotTypes (Maybe Natural)
listBuiltInSlotTypes_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBuiltInSlotTypes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListBuiltInSlotTypes
s@ListBuiltInSlotTypes' {} Maybe Natural
a -> ListBuiltInSlotTypes
s {$sel:maxResults:ListBuiltInSlotTypes' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListBuiltInSlotTypes)

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

-- | Determines the sort order for the response from the
-- @ListBuiltInSlotTypes@ operation. You can choose to sort by the slot
-- type signature in either ascending or descending order.
listBuiltInSlotTypes_sortBy :: Lens.Lens' ListBuiltInSlotTypes (Prelude.Maybe BuiltInSlotTypeSortBy)
listBuiltInSlotTypes_sortBy :: Lens' ListBuiltInSlotTypes (Maybe BuiltInSlotTypeSortBy)
listBuiltInSlotTypes_sortBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBuiltInSlotTypes' {Maybe BuiltInSlotTypeSortBy
sortBy :: Maybe BuiltInSlotTypeSortBy
$sel:sortBy:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe BuiltInSlotTypeSortBy
sortBy} -> Maybe BuiltInSlotTypeSortBy
sortBy) (\s :: ListBuiltInSlotTypes
s@ListBuiltInSlotTypes' {} Maybe BuiltInSlotTypeSortBy
a -> ListBuiltInSlotTypes
s {$sel:sortBy:ListBuiltInSlotTypes' :: Maybe BuiltInSlotTypeSortBy
sortBy = Maybe BuiltInSlotTypeSortBy
a} :: ListBuiltInSlotTypes)

-- | The identifier of the language and locale of the slot types 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>.
listBuiltInSlotTypes_localeId :: Lens.Lens' ListBuiltInSlotTypes Prelude.Text
listBuiltInSlotTypes_localeId :: Lens' ListBuiltInSlotTypes Text
listBuiltInSlotTypes_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBuiltInSlotTypes' {Text
localeId :: Text
$sel:localeId:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Text
localeId} -> Text
localeId) (\s :: ListBuiltInSlotTypes
s@ListBuiltInSlotTypes' {} Text
a -> ListBuiltInSlotTypes
s {$sel:localeId:ListBuiltInSlotTypes' :: Text
localeId = Text
a} :: ListBuiltInSlotTypes)

instance Core.AWSRequest ListBuiltInSlotTypes where
  type
    AWSResponse ListBuiltInSlotTypes =
      ListBuiltInSlotTypesResponse
  request :: (Service -> Service)
-> ListBuiltInSlotTypes -> Request ListBuiltInSlotTypes
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 ListBuiltInSlotTypes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBuiltInSlotTypes)))
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 [BuiltInSlotTypeSummary]
-> Maybe Text -> Maybe Text -> Int -> ListBuiltInSlotTypesResponse
ListBuiltInSlotTypesResponse'
            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
"builtInSlotTypeSummaries"
                            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
"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 ListBuiltInSlotTypes where
  hashWithSalt :: Int -> ListBuiltInSlotTypes -> Int
hashWithSalt Int
_salt ListBuiltInSlotTypes' {Maybe Natural
Maybe Text
Maybe BuiltInSlotTypeSortBy
Text
localeId :: Text
sortBy :: Maybe BuiltInSlotTypeSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:localeId:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Text
$sel:sortBy:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe BuiltInSlotTypeSortBy
$sel:nextToken:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe Text
$sel:maxResults:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> 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` Maybe BuiltInSlotTypeSortBy
sortBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
localeId

instance Prelude.NFData ListBuiltInSlotTypes where
  rnf :: ListBuiltInSlotTypes -> ()
rnf ListBuiltInSlotTypes' {Maybe Natural
Maybe Text
Maybe BuiltInSlotTypeSortBy
Text
localeId :: Text
sortBy :: Maybe BuiltInSlotTypeSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:localeId:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Text
$sel:sortBy:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe BuiltInSlotTypeSortBy
$sel:nextToken:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe Text
$sel:maxResults:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> 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 Maybe BuiltInSlotTypeSortBy
sortBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
localeId

instance Data.ToHeaders ListBuiltInSlotTypes where
  toHeaders :: ListBuiltInSlotTypes -> 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 ListBuiltInSlotTypes where
  toJSON :: ListBuiltInSlotTypes -> Value
toJSON ListBuiltInSlotTypes' {Maybe Natural
Maybe Text
Maybe BuiltInSlotTypeSortBy
Text
localeId :: Text
sortBy :: Maybe BuiltInSlotTypeSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:localeId:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Text
$sel:sortBy:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe BuiltInSlotTypeSortBy
$sel:nextToken:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe Text
$sel:maxResults:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> 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,
            (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 BuiltInSlotTypeSortBy
sortBy
          ]
      )

instance Data.ToPath ListBuiltInSlotTypes where
  toPath :: ListBuiltInSlotTypes -> ByteString
toPath ListBuiltInSlotTypes' {Maybe Natural
Maybe Text
Maybe BuiltInSlotTypeSortBy
Text
localeId :: Text
sortBy :: Maybe BuiltInSlotTypeSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:localeId:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Text
$sel:sortBy:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe BuiltInSlotTypeSortBy
$sel:nextToken:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe Text
$sel:maxResults:ListBuiltInSlotTypes' :: ListBuiltInSlotTypes -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/builtins/locales/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
localeId,
        ByteString
"/slottypes/"
      ]

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

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

-- |
-- Create a value of 'ListBuiltInSlotTypesResponse' 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:
--
-- 'builtInSlotTypeSummaries', 'listBuiltInSlotTypesResponse_builtInSlotTypeSummaries' - Summary information for the built-in slot types 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 slot
-- types available, the @nextToken@ field contains a token to get the next
-- page of results.
--
-- 'localeId', 'listBuiltInSlotTypesResponse_localeId' - The language and locale of the slot types in the list.
--
-- 'nextToken', 'listBuiltInSlotTypesResponse_nextToken' - A token that indicates whether there are more results to return in a
-- response to the @ListBuiltInSlotTypes@ operation. If the @nextToken@
-- field is present, you send the contents as the @nextToken@ parameter of
-- a @LIstBuiltInSlotTypes@ operation request to get the next page of
-- results.
--
-- 'httpStatus', 'listBuiltInSlotTypesResponse_httpStatus' - The response's http status code.
newListBuiltInSlotTypesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBuiltInSlotTypesResponse
newListBuiltInSlotTypesResponse :: Int -> ListBuiltInSlotTypesResponse
newListBuiltInSlotTypesResponse Int
pHttpStatus_ =
  ListBuiltInSlotTypesResponse'
    { $sel:builtInSlotTypeSummaries:ListBuiltInSlotTypesResponse' :: Maybe [BuiltInSlotTypeSummary]
builtInSlotTypeSummaries =
        forall a. Maybe a
Prelude.Nothing,
      $sel:localeId:ListBuiltInSlotTypesResponse' :: Maybe Text
localeId = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBuiltInSlotTypesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBuiltInSlotTypesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Summary information for the built-in slot types 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 slot
-- types available, the @nextToken@ field contains a token to get the next
-- page of results.
listBuiltInSlotTypesResponse_builtInSlotTypeSummaries :: Lens.Lens' ListBuiltInSlotTypesResponse (Prelude.Maybe [BuiltInSlotTypeSummary])
listBuiltInSlotTypesResponse_builtInSlotTypeSummaries :: Lens' ListBuiltInSlotTypesResponse (Maybe [BuiltInSlotTypeSummary])
listBuiltInSlotTypesResponse_builtInSlotTypeSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBuiltInSlotTypesResponse' {Maybe [BuiltInSlotTypeSummary]
builtInSlotTypeSummaries :: Maybe [BuiltInSlotTypeSummary]
$sel:builtInSlotTypeSummaries:ListBuiltInSlotTypesResponse' :: ListBuiltInSlotTypesResponse -> Maybe [BuiltInSlotTypeSummary]
builtInSlotTypeSummaries} -> Maybe [BuiltInSlotTypeSummary]
builtInSlotTypeSummaries) (\s :: ListBuiltInSlotTypesResponse
s@ListBuiltInSlotTypesResponse' {} Maybe [BuiltInSlotTypeSummary]
a -> ListBuiltInSlotTypesResponse
s {$sel:builtInSlotTypeSummaries:ListBuiltInSlotTypesResponse' :: Maybe [BuiltInSlotTypeSummary]
builtInSlotTypeSummaries = Maybe [BuiltInSlotTypeSummary]
a} :: ListBuiltInSlotTypesResponse) 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 language and locale of the slot types in the list.
listBuiltInSlotTypesResponse_localeId :: Lens.Lens' ListBuiltInSlotTypesResponse (Prelude.Maybe Prelude.Text)
listBuiltInSlotTypesResponse_localeId :: Lens' ListBuiltInSlotTypesResponse (Maybe Text)
listBuiltInSlotTypesResponse_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBuiltInSlotTypesResponse' {Maybe Text
localeId :: Maybe Text
$sel:localeId:ListBuiltInSlotTypesResponse' :: ListBuiltInSlotTypesResponse -> Maybe Text
localeId} -> Maybe Text
localeId) (\s :: ListBuiltInSlotTypesResponse
s@ListBuiltInSlotTypesResponse' {} Maybe Text
a -> ListBuiltInSlotTypesResponse
s {$sel:localeId:ListBuiltInSlotTypesResponse' :: Maybe Text
localeId = Maybe Text
a} :: ListBuiltInSlotTypesResponse)

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

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

instance Prelude.NFData ListBuiltInSlotTypesResponse where
  rnf :: ListBuiltInSlotTypesResponse -> ()
rnf ListBuiltInSlotTypesResponse' {Int
Maybe [BuiltInSlotTypeSummary]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
localeId :: Maybe Text
builtInSlotTypeSummaries :: Maybe [BuiltInSlotTypeSummary]
$sel:httpStatus:ListBuiltInSlotTypesResponse' :: ListBuiltInSlotTypesResponse -> Int
$sel:nextToken:ListBuiltInSlotTypesResponse' :: ListBuiltInSlotTypesResponse -> Maybe Text
$sel:localeId:ListBuiltInSlotTypesResponse' :: ListBuiltInSlotTypesResponse -> Maybe Text
$sel:builtInSlotTypeSummaries:ListBuiltInSlotTypesResponse' :: ListBuiltInSlotTypesResponse -> Maybe [BuiltInSlotTypeSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [BuiltInSlotTypeSummary]
builtInSlotTypeSummaries
      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