{-# 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.LexModels.GetBuiltinSlotTypes
-- 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.
--
-- For a list of built-in slot types, see
-- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference Slot Type Reference>
-- in the /Alexa Skills Kit/.
--
-- This operation requires permission for the @lex:GetBuiltInSlotTypes@
-- action.
--
-- This operation returns paginated results.
module Amazonka.LexModels.GetBuiltinSlotTypes
  ( -- * Creating a Request
    GetBuiltinSlotTypes (..),
    newGetBuiltinSlotTypes,

    -- * Request Lenses
    getBuiltinSlotTypes_locale,
    getBuiltinSlotTypes_maxResults,
    getBuiltinSlotTypes_nextToken,
    getBuiltinSlotTypes_signatureContains,

    -- * Destructuring the Response
    GetBuiltinSlotTypesResponse (..),
    newGetBuiltinSlotTypesResponse,

    -- * Response Lenses
    getBuiltinSlotTypesResponse_nextToken,
    getBuiltinSlotTypesResponse_slotTypes,
    getBuiltinSlotTypesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetBuiltinSlotTypes' smart constructor.
data GetBuiltinSlotTypes = GetBuiltinSlotTypes'
  { -- | A list of locales that the slot type supports.
    GetBuiltinSlotTypes -> Maybe Locale
locale :: Prelude.Maybe Locale,
    -- | The maximum number of slot types to return in the response. The default
    -- is 10.
    GetBuiltinSlotTypes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A pagination token that fetches the next page of slot types. If the
    -- response to this API call is truncated, Amazon Lex returns a pagination
    -- token in the response. To fetch the next page of slot types, specify the
    -- pagination token in the next request.
    GetBuiltinSlotTypes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Substring to match in built-in slot type signatures. A slot type will be
    -- returned if any part of its signature matches the substring. For
    -- example, \"xyz\" matches both \"xyzabc\" and \"abcxyz.\"
    GetBuiltinSlotTypes -> Maybe Text
signatureContains :: Prelude.Maybe Prelude.Text
  }
  deriving (GetBuiltinSlotTypes -> GetBuiltinSlotTypes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBuiltinSlotTypes -> GetBuiltinSlotTypes -> Bool
$c/= :: GetBuiltinSlotTypes -> GetBuiltinSlotTypes -> Bool
== :: GetBuiltinSlotTypes -> GetBuiltinSlotTypes -> Bool
$c== :: GetBuiltinSlotTypes -> GetBuiltinSlotTypes -> Bool
Prelude.Eq, ReadPrec [GetBuiltinSlotTypes]
ReadPrec GetBuiltinSlotTypes
Int -> ReadS GetBuiltinSlotTypes
ReadS [GetBuiltinSlotTypes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBuiltinSlotTypes]
$creadListPrec :: ReadPrec [GetBuiltinSlotTypes]
readPrec :: ReadPrec GetBuiltinSlotTypes
$creadPrec :: ReadPrec GetBuiltinSlotTypes
readList :: ReadS [GetBuiltinSlotTypes]
$creadList :: ReadS [GetBuiltinSlotTypes]
readsPrec :: Int -> ReadS GetBuiltinSlotTypes
$creadsPrec :: Int -> ReadS GetBuiltinSlotTypes
Prelude.Read, Int -> GetBuiltinSlotTypes -> ShowS
[GetBuiltinSlotTypes] -> ShowS
GetBuiltinSlotTypes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBuiltinSlotTypes] -> ShowS
$cshowList :: [GetBuiltinSlotTypes] -> ShowS
show :: GetBuiltinSlotTypes -> String
$cshow :: GetBuiltinSlotTypes -> String
showsPrec :: Int -> GetBuiltinSlotTypes -> ShowS
$cshowsPrec :: Int -> GetBuiltinSlotTypes -> ShowS
Prelude.Show, forall x. Rep GetBuiltinSlotTypes x -> GetBuiltinSlotTypes
forall x. GetBuiltinSlotTypes -> Rep GetBuiltinSlotTypes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBuiltinSlotTypes x -> GetBuiltinSlotTypes
$cfrom :: forall x. GetBuiltinSlotTypes -> Rep GetBuiltinSlotTypes x
Prelude.Generic)

-- |
-- Create a value of 'GetBuiltinSlotTypes' 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:
--
-- 'locale', 'getBuiltinSlotTypes_locale' - A list of locales that the slot type supports.
--
-- 'maxResults', 'getBuiltinSlotTypes_maxResults' - The maximum number of slot types to return in the response. The default
-- is 10.
--
-- 'nextToken', 'getBuiltinSlotTypes_nextToken' - A pagination token that fetches the next page of slot types. If the
-- response to this API call is truncated, Amazon Lex returns a pagination
-- token in the response. To fetch the next page of slot types, specify the
-- pagination token in the next request.
--
-- 'signatureContains', 'getBuiltinSlotTypes_signatureContains' - Substring to match in built-in slot type signatures. A slot type will be
-- returned if any part of its signature matches the substring. For
-- example, \"xyz\" matches both \"xyzabc\" and \"abcxyz.\"
newGetBuiltinSlotTypes ::
  GetBuiltinSlotTypes
newGetBuiltinSlotTypes :: GetBuiltinSlotTypes
newGetBuiltinSlotTypes =
  GetBuiltinSlotTypes'
    { $sel:locale:GetBuiltinSlotTypes' :: Maybe Locale
locale = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetBuiltinSlotTypes' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetBuiltinSlotTypes' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:signatureContains:GetBuiltinSlotTypes' :: Maybe Text
signatureContains = forall a. Maybe a
Prelude.Nothing
    }

-- | A list of locales that the slot type supports.
getBuiltinSlotTypes_locale :: Lens.Lens' GetBuiltinSlotTypes (Prelude.Maybe Locale)
getBuiltinSlotTypes_locale :: Lens' GetBuiltinSlotTypes (Maybe Locale)
getBuiltinSlotTypes_locale = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinSlotTypes' {Maybe Locale
locale :: Maybe Locale
$sel:locale:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Locale
locale} -> Maybe Locale
locale) (\s :: GetBuiltinSlotTypes
s@GetBuiltinSlotTypes' {} Maybe Locale
a -> GetBuiltinSlotTypes
s {$sel:locale:GetBuiltinSlotTypes' :: Maybe Locale
locale = Maybe Locale
a} :: GetBuiltinSlotTypes)

-- | The maximum number of slot types to return in the response. The default
-- is 10.
getBuiltinSlotTypes_maxResults :: Lens.Lens' GetBuiltinSlotTypes (Prelude.Maybe Prelude.Natural)
getBuiltinSlotTypes_maxResults :: Lens' GetBuiltinSlotTypes (Maybe Natural)
getBuiltinSlotTypes_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinSlotTypes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetBuiltinSlotTypes
s@GetBuiltinSlotTypes' {} Maybe Natural
a -> GetBuiltinSlotTypes
s {$sel:maxResults:GetBuiltinSlotTypes' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetBuiltinSlotTypes)

-- | A pagination token that fetches the next page of slot types. If the
-- response to this API call is truncated, Amazon Lex returns a pagination
-- token in the response. To fetch the next page of slot types, specify the
-- pagination token in the next request.
getBuiltinSlotTypes_nextToken :: Lens.Lens' GetBuiltinSlotTypes (Prelude.Maybe Prelude.Text)
getBuiltinSlotTypes_nextToken :: Lens' GetBuiltinSlotTypes (Maybe Text)
getBuiltinSlotTypes_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinSlotTypes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetBuiltinSlotTypes
s@GetBuiltinSlotTypes' {} Maybe Text
a -> GetBuiltinSlotTypes
s {$sel:nextToken:GetBuiltinSlotTypes' :: Maybe Text
nextToken = Maybe Text
a} :: GetBuiltinSlotTypes)

-- | Substring to match in built-in slot type signatures. A slot type will be
-- returned if any part of its signature matches the substring. For
-- example, \"xyz\" matches both \"xyzabc\" and \"abcxyz.\"
getBuiltinSlotTypes_signatureContains :: Lens.Lens' GetBuiltinSlotTypes (Prelude.Maybe Prelude.Text)
getBuiltinSlotTypes_signatureContains :: Lens' GetBuiltinSlotTypes (Maybe Text)
getBuiltinSlotTypes_signatureContains = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinSlotTypes' {Maybe Text
signatureContains :: Maybe Text
$sel:signatureContains:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Text
signatureContains} -> Maybe Text
signatureContains) (\s :: GetBuiltinSlotTypes
s@GetBuiltinSlotTypes' {} Maybe Text
a -> GetBuiltinSlotTypes
s {$sel:signatureContains:GetBuiltinSlotTypes' :: Maybe Text
signatureContains = Maybe Text
a} :: GetBuiltinSlotTypes)

instance Core.AWSPager GetBuiltinSlotTypes where
  page :: GetBuiltinSlotTypes
-> AWSResponse GetBuiltinSlotTypes -> Maybe GetBuiltinSlotTypes
page GetBuiltinSlotTypes
rq AWSResponse GetBuiltinSlotTypes
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetBuiltinSlotTypes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetBuiltinSlotTypesResponse (Maybe Text)
getBuiltinSlotTypesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetBuiltinSlotTypes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetBuiltinSlotTypesResponse (Maybe [BuiltinSlotTypeMetadata])
getBuiltinSlotTypesResponse_slotTypes
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ GetBuiltinSlotTypes
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetBuiltinSlotTypes (Maybe Text)
getBuiltinSlotTypes_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetBuiltinSlotTypes
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetBuiltinSlotTypesResponse (Maybe Text)
getBuiltinSlotTypesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest GetBuiltinSlotTypes where
  type
    AWSResponse GetBuiltinSlotTypes =
      GetBuiltinSlotTypesResponse
  request :: (Service -> Service)
-> GetBuiltinSlotTypes -> Request GetBuiltinSlotTypes
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetBuiltinSlotTypes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBuiltinSlotTypes)))
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 [BuiltinSlotTypeMetadata]
-> Int
-> GetBuiltinSlotTypesResponse
GetBuiltinSlotTypesResponse'
            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
"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
"slotTypes" 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 GetBuiltinSlotTypes where
  hashWithSalt :: Int -> GetBuiltinSlotTypes -> Int
hashWithSalt Int
_salt GetBuiltinSlotTypes' {Maybe Natural
Maybe Text
Maybe Locale
signatureContains :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
locale :: Maybe Locale
$sel:signatureContains:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Text
$sel:nextToken:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Text
$sel:maxResults:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Natural
$sel:locale:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Locale
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Locale
locale
      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 Text
signatureContains

instance Prelude.NFData GetBuiltinSlotTypes where
  rnf :: GetBuiltinSlotTypes -> ()
rnf GetBuiltinSlotTypes' {Maybe Natural
Maybe Text
Maybe Locale
signatureContains :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
locale :: Maybe Locale
$sel:signatureContains:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Text
$sel:nextToken:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Text
$sel:maxResults:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Natural
$sel:locale:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Locale
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Locale
locale
      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 Text
signatureContains

instance Data.ToHeaders GetBuiltinSlotTypes where
  toHeaders :: GetBuiltinSlotTypes -> 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.ToPath GetBuiltinSlotTypes where
  toPath :: GetBuiltinSlotTypes -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/builtins/slottypes/"

instance Data.ToQuery GetBuiltinSlotTypes where
  toQuery :: GetBuiltinSlotTypes -> QueryString
toQuery GetBuiltinSlotTypes' {Maybe Natural
Maybe Text
Maybe Locale
signatureContains :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
locale :: Maybe Locale
$sel:signatureContains:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Text
$sel:nextToken:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Text
$sel:maxResults:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Natural
$sel:locale:GetBuiltinSlotTypes' :: GetBuiltinSlotTypes -> Maybe Locale
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"locale" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Locale
locale,
        ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"signatureContains" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
signatureContains
      ]

-- | /See:/ 'newGetBuiltinSlotTypesResponse' smart constructor.
data GetBuiltinSlotTypesResponse = GetBuiltinSlotTypesResponse'
  { -- | If the response is truncated, the response includes a pagination token
    -- that you can use in your next request to fetch the next page of slot
    -- types.
    GetBuiltinSlotTypesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An array of @BuiltInSlotTypeMetadata@ objects, one entry for each slot
    -- type returned.
    GetBuiltinSlotTypesResponse -> Maybe [BuiltinSlotTypeMetadata]
slotTypes :: Prelude.Maybe [BuiltinSlotTypeMetadata],
    -- | The response's http status code.
    GetBuiltinSlotTypesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBuiltinSlotTypesResponse -> GetBuiltinSlotTypesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBuiltinSlotTypesResponse -> GetBuiltinSlotTypesResponse -> Bool
$c/= :: GetBuiltinSlotTypesResponse -> GetBuiltinSlotTypesResponse -> Bool
== :: GetBuiltinSlotTypesResponse -> GetBuiltinSlotTypesResponse -> Bool
$c== :: GetBuiltinSlotTypesResponse -> GetBuiltinSlotTypesResponse -> Bool
Prelude.Eq, ReadPrec [GetBuiltinSlotTypesResponse]
ReadPrec GetBuiltinSlotTypesResponse
Int -> ReadS GetBuiltinSlotTypesResponse
ReadS [GetBuiltinSlotTypesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBuiltinSlotTypesResponse]
$creadListPrec :: ReadPrec [GetBuiltinSlotTypesResponse]
readPrec :: ReadPrec GetBuiltinSlotTypesResponse
$creadPrec :: ReadPrec GetBuiltinSlotTypesResponse
readList :: ReadS [GetBuiltinSlotTypesResponse]
$creadList :: ReadS [GetBuiltinSlotTypesResponse]
readsPrec :: Int -> ReadS GetBuiltinSlotTypesResponse
$creadsPrec :: Int -> ReadS GetBuiltinSlotTypesResponse
Prelude.Read, Int -> GetBuiltinSlotTypesResponse -> ShowS
[GetBuiltinSlotTypesResponse] -> ShowS
GetBuiltinSlotTypesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBuiltinSlotTypesResponse] -> ShowS
$cshowList :: [GetBuiltinSlotTypesResponse] -> ShowS
show :: GetBuiltinSlotTypesResponse -> String
$cshow :: GetBuiltinSlotTypesResponse -> String
showsPrec :: Int -> GetBuiltinSlotTypesResponse -> ShowS
$cshowsPrec :: Int -> GetBuiltinSlotTypesResponse -> ShowS
Prelude.Show, forall x.
Rep GetBuiltinSlotTypesResponse x -> GetBuiltinSlotTypesResponse
forall x.
GetBuiltinSlotTypesResponse -> Rep GetBuiltinSlotTypesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBuiltinSlotTypesResponse x -> GetBuiltinSlotTypesResponse
$cfrom :: forall x.
GetBuiltinSlotTypesResponse -> Rep GetBuiltinSlotTypesResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBuiltinSlotTypesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'getBuiltinSlotTypesResponse_nextToken' - If the response is truncated, the response includes a pagination token
-- that you can use in your next request to fetch the next page of slot
-- types.
--
-- 'slotTypes', 'getBuiltinSlotTypesResponse_slotTypes' - An array of @BuiltInSlotTypeMetadata@ objects, one entry for each slot
-- type returned.
--
-- 'httpStatus', 'getBuiltinSlotTypesResponse_httpStatus' - The response's http status code.
newGetBuiltinSlotTypesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBuiltinSlotTypesResponse
newGetBuiltinSlotTypesResponse :: Int -> GetBuiltinSlotTypesResponse
newGetBuiltinSlotTypesResponse Int
pHttpStatus_ =
  GetBuiltinSlotTypesResponse'
    { $sel:nextToken:GetBuiltinSlotTypesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypes:GetBuiltinSlotTypesResponse' :: Maybe [BuiltinSlotTypeMetadata]
slotTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBuiltinSlotTypesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the response is truncated, the response includes a pagination token
-- that you can use in your next request to fetch the next page of slot
-- types.
getBuiltinSlotTypesResponse_nextToken :: Lens.Lens' GetBuiltinSlotTypesResponse (Prelude.Maybe Prelude.Text)
getBuiltinSlotTypesResponse_nextToken :: Lens' GetBuiltinSlotTypesResponse (Maybe Text)
getBuiltinSlotTypesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinSlotTypesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetBuiltinSlotTypesResponse' :: GetBuiltinSlotTypesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetBuiltinSlotTypesResponse
s@GetBuiltinSlotTypesResponse' {} Maybe Text
a -> GetBuiltinSlotTypesResponse
s {$sel:nextToken:GetBuiltinSlotTypesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetBuiltinSlotTypesResponse)

-- | An array of @BuiltInSlotTypeMetadata@ objects, one entry for each slot
-- type returned.
getBuiltinSlotTypesResponse_slotTypes :: Lens.Lens' GetBuiltinSlotTypesResponse (Prelude.Maybe [BuiltinSlotTypeMetadata])
getBuiltinSlotTypesResponse_slotTypes :: Lens' GetBuiltinSlotTypesResponse (Maybe [BuiltinSlotTypeMetadata])
getBuiltinSlotTypesResponse_slotTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinSlotTypesResponse' {Maybe [BuiltinSlotTypeMetadata]
slotTypes :: Maybe [BuiltinSlotTypeMetadata]
$sel:slotTypes:GetBuiltinSlotTypesResponse' :: GetBuiltinSlotTypesResponse -> Maybe [BuiltinSlotTypeMetadata]
slotTypes} -> Maybe [BuiltinSlotTypeMetadata]
slotTypes) (\s :: GetBuiltinSlotTypesResponse
s@GetBuiltinSlotTypesResponse' {} Maybe [BuiltinSlotTypeMetadata]
a -> GetBuiltinSlotTypesResponse
s {$sel:slotTypes:GetBuiltinSlotTypesResponse' :: Maybe [BuiltinSlotTypeMetadata]
slotTypes = Maybe [BuiltinSlotTypeMetadata]
a} :: GetBuiltinSlotTypesResponse) 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.
getBuiltinSlotTypesResponse_httpStatus :: Lens.Lens' GetBuiltinSlotTypesResponse Prelude.Int
getBuiltinSlotTypesResponse_httpStatus :: Lens' GetBuiltinSlotTypesResponse Int
getBuiltinSlotTypesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBuiltinSlotTypesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetBuiltinSlotTypesResponse' :: GetBuiltinSlotTypesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetBuiltinSlotTypesResponse
s@GetBuiltinSlotTypesResponse' {} Int
a -> GetBuiltinSlotTypesResponse
s {$sel:httpStatus:GetBuiltinSlotTypesResponse' :: Int
httpStatus = Int
a} :: GetBuiltinSlotTypesResponse)

instance Prelude.NFData GetBuiltinSlotTypesResponse where
  rnf :: GetBuiltinSlotTypesResponse -> ()
rnf GetBuiltinSlotTypesResponse' {Int
Maybe [BuiltinSlotTypeMetadata]
Maybe Text
httpStatus :: Int
slotTypes :: Maybe [BuiltinSlotTypeMetadata]
nextToken :: Maybe Text
$sel:httpStatus:GetBuiltinSlotTypesResponse' :: GetBuiltinSlotTypesResponse -> Int
$sel:slotTypes:GetBuiltinSlotTypesResponse' :: GetBuiltinSlotTypesResponse -> Maybe [BuiltinSlotTypeMetadata]
$sel:nextToken:GetBuiltinSlotTypesResponse' :: GetBuiltinSlotTypesResponse -> Maybe Text
..} =
    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 [BuiltinSlotTypeMetadata]
slotTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus