{-# 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.CreateSlotType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a custom slot type
--
-- To create a custom slot type, specify a name for the slot type and a set
-- of enumeration values, the values that a slot of this type can assume.
module Amazonka.LexV2Models.CreateSlotType
  ( -- * Creating a Request
    CreateSlotType (..),
    newCreateSlotType,

    -- * Request Lenses
    createSlotType_compositeSlotTypeSetting,
    createSlotType_description,
    createSlotType_externalSourceSetting,
    createSlotType_parentSlotTypeSignature,
    createSlotType_slotTypeValues,
    createSlotType_valueSelectionSetting,
    createSlotType_slotTypeName,
    createSlotType_botId,
    createSlotType_botVersion,
    createSlotType_localeId,

    -- * Destructuring the Response
    CreateSlotTypeResponse (..),
    newCreateSlotTypeResponse,

    -- * Response Lenses
    createSlotTypeResponse_botId,
    createSlotTypeResponse_botVersion,
    createSlotTypeResponse_compositeSlotTypeSetting,
    createSlotTypeResponse_creationDateTime,
    createSlotTypeResponse_description,
    createSlotTypeResponse_externalSourceSetting,
    createSlotTypeResponse_localeId,
    createSlotTypeResponse_parentSlotTypeSignature,
    createSlotTypeResponse_slotTypeId,
    createSlotTypeResponse_slotTypeName,
    createSlotTypeResponse_slotTypeValues,
    createSlotTypeResponse_valueSelectionSetting,
    createSlotTypeResponse_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:/ 'newCreateSlotType' smart constructor.
data CreateSlotType = CreateSlotType'
  { -- | Specifications for a composite slot type.
    CreateSlotType -> Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting :: Prelude.Maybe CompositeSlotTypeSetting,
    -- | A description of the slot type. Use the description to help identify the
    -- slot type in lists.
    CreateSlotType -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Sets the type of external information used to create the slot type.
    CreateSlotType -> Maybe ExternalSourceSetting
externalSourceSetting :: Prelude.Maybe ExternalSourceSetting,
    -- | The built-in slot type used as a parent of this slot type. When you
    -- define a parent slot type, the new slot type has the configuration of
    -- the parent slot type.
    --
    -- Only @AMAZON.AlphaNumeric@ is supported.
    CreateSlotType -> Maybe Text
parentSlotTypeSignature :: Prelude.Maybe Prelude.Text,
    -- | A list of @SlotTypeValue@ objects that defines the values that the slot
    -- type can take. Each value can have a list of synonyms, additional values
    -- that help train the machine learning model about the values that it
    -- resolves for a slot.
    CreateSlotType -> Maybe (NonEmpty SlotTypeValue)
slotTypeValues :: Prelude.Maybe (Prelude.NonEmpty SlotTypeValue),
    -- | Determines the strategy that Amazon Lex uses to select a value from the
    -- list of possible values. The field can be set to one of the following
    -- values:
    --
    -- -   @OriginalValue@ - Returns the value entered by the user, if the user
    --     value is similar to the slot value.
    --
    -- -   @TopResolution@ - If there is a resolution list for the slot, return
    --     the first value in the resolution list. If there is no resolution
    --     list, return null.
    --
    -- If you don\'t specify the @valueSelectionSetting@ parameter, the default
    -- is @OriginalValue@.
    CreateSlotType -> Maybe SlotValueSelectionSetting
valueSelectionSetting :: Prelude.Maybe SlotValueSelectionSetting,
    -- | The name for the slot. A slot type name must be unique within the
    -- account.
    CreateSlotType -> Text
slotTypeName :: Prelude.Text,
    -- | The identifier of the bot associated with this slot type.
    CreateSlotType -> Text
botId :: Prelude.Text,
    -- | The identifier of the bot version associated with this slot type.
    CreateSlotType -> Text
botVersion :: Prelude.Text,
    -- | The identifier of the language and locale that the slot type will be
    -- used in. The string must match one of the supported locales. All of the
    -- bots, intents, and slots used by the slot type must have the same
    -- locale. For more information, see
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
    CreateSlotType -> Text
localeId :: Prelude.Text
  }
  deriving (CreateSlotType -> CreateSlotType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSlotType -> CreateSlotType -> Bool
$c/= :: CreateSlotType -> CreateSlotType -> Bool
== :: CreateSlotType -> CreateSlotType -> Bool
$c== :: CreateSlotType -> CreateSlotType -> Bool
Prelude.Eq, ReadPrec [CreateSlotType]
ReadPrec CreateSlotType
Int -> ReadS CreateSlotType
ReadS [CreateSlotType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSlotType]
$creadListPrec :: ReadPrec [CreateSlotType]
readPrec :: ReadPrec CreateSlotType
$creadPrec :: ReadPrec CreateSlotType
readList :: ReadS [CreateSlotType]
$creadList :: ReadS [CreateSlotType]
readsPrec :: Int -> ReadS CreateSlotType
$creadsPrec :: Int -> ReadS CreateSlotType
Prelude.Read, Int -> CreateSlotType -> ShowS
[CreateSlotType] -> ShowS
CreateSlotType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSlotType] -> ShowS
$cshowList :: [CreateSlotType] -> ShowS
show :: CreateSlotType -> String
$cshow :: CreateSlotType -> String
showsPrec :: Int -> CreateSlotType -> ShowS
$cshowsPrec :: Int -> CreateSlotType -> ShowS
Prelude.Show, forall x. Rep CreateSlotType x -> CreateSlotType
forall x. CreateSlotType -> Rep CreateSlotType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSlotType x -> CreateSlotType
$cfrom :: forall x. CreateSlotType -> Rep CreateSlotType x
Prelude.Generic)

-- |
-- Create a value of 'CreateSlotType' 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:
--
-- 'compositeSlotTypeSetting', 'createSlotType_compositeSlotTypeSetting' - Specifications for a composite slot type.
--
-- 'description', 'createSlotType_description' - A description of the slot type. Use the description to help identify the
-- slot type in lists.
--
-- 'externalSourceSetting', 'createSlotType_externalSourceSetting' - Sets the type of external information used to create the slot type.
--
-- 'parentSlotTypeSignature', 'createSlotType_parentSlotTypeSignature' - The built-in slot type used as a parent of this slot type. When you
-- define a parent slot type, the new slot type has the configuration of
-- the parent slot type.
--
-- Only @AMAZON.AlphaNumeric@ is supported.
--
-- 'slotTypeValues', 'createSlotType_slotTypeValues' - A list of @SlotTypeValue@ objects that defines the values that the slot
-- type can take. Each value can have a list of synonyms, additional values
-- that help train the machine learning model about the values that it
-- resolves for a slot.
--
-- 'valueSelectionSetting', 'createSlotType_valueSelectionSetting' - Determines the strategy that Amazon Lex uses to select a value from the
-- list of possible values. The field can be set to one of the following
-- values:
--
-- -   @OriginalValue@ - Returns the value entered by the user, if the user
--     value is similar to the slot value.
--
-- -   @TopResolution@ - If there is a resolution list for the slot, return
--     the first value in the resolution list. If there is no resolution
--     list, return null.
--
-- If you don\'t specify the @valueSelectionSetting@ parameter, the default
-- is @OriginalValue@.
--
-- 'slotTypeName', 'createSlotType_slotTypeName' - The name for the slot. A slot type name must be unique within the
-- account.
--
-- 'botId', 'createSlotType_botId' - The identifier of the bot associated with this slot type.
--
-- 'botVersion', 'createSlotType_botVersion' - The identifier of the bot version associated with this slot type.
--
-- 'localeId', 'createSlotType_localeId' - The identifier of the language and locale that the slot type will be
-- used in. The string must match one of the supported locales. All of the
-- bots, intents, and slots used by the slot type must have the same
-- locale. For more information, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
newCreateSlotType ::
  -- | 'slotTypeName'
  Prelude.Text ->
  -- | 'botId'
  Prelude.Text ->
  -- | 'botVersion'
  Prelude.Text ->
  -- | 'localeId'
  Prelude.Text ->
  CreateSlotType
newCreateSlotType :: Text -> Text -> Text -> Text -> CreateSlotType
newCreateSlotType
  Text
pSlotTypeName_
  Text
pBotId_
  Text
pBotVersion_
  Text
pLocaleId_ =
    CreateSlotType'
      { $sel:compositeSlotTypeSetting:CreateSlotType' :: Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting =
          forall a. Maybe a
Prelude.Nothing,
        $sel:description:CreateSlotType' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:externalSourceSetting:CreateSlotType' :: Maybe ExternalSourceSetting
externalSourceSetting = forall a. Maybe a
Prelude.Nothing,
        $sel:parentSlotTypeSignature:CreateSlotType' :: Maybe Text
parentSlotTypeSignature = forall a. Maybe a
Prelude.Nothing,
        $sel:slotTypeValues:CreateSlotType' :: Maybe (NonEmpty SlotTypeValue)
slotTypeValues = forall a. Maybe a
Prelude.Nothing,
        $sel:valueSelectionSetting:CreateSlotType' :: Maybe SlotValueSelectionSetting
valueSelectionSetting = forall a. Maybe a
Prelude.Nothing,
        $sel:slotTypeName:CreateSlotType' :: Text
slotTypeName = Text
pSlotTypeName_,
        $sel:botId:CreateSlotType' :: Text
botId = Text
pBotId_,
        $sel:botVersion:CreateSlotType' :: Text
botVersion = Text
pBotVersion_,
        $sel:localeId:CreateSlotType' :: Text
localeId = Text
pLocaleId_
      }

-- | Specifications for a composite slot type.
createSlotType_compositeSlotTypeSetting :: Lens.Lens' CreateSlotType (Prelude.Maybe CompositeSlotTypeSetting)
createSlotType_compositeSlotTypeSetting :: Lens' CreateSlotType (Maybe CompositeSlotTypeSetting)
createSlotType_compositeSlotTypeSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting :: Maybe CompositeSlotTypeSetting
$sel:compositeSlotTypeSetting:CreateSlotType' :: CreateSlotType -> Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting} -> Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting) (\s :: CreateSlotType
s@CreateSlotType' {} Maybe CompositeSlotTypeSetting
a -> CreateSlotType
s {$sel:compositeSlotTypeSetting:CreateSlotType' :: Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting = Maybe CompositeSlotTypeSetting
a} :: CreateSlotType)

-- | A description of the slot type. Use the description to help identify the
-- slot type in lists.
createSlotType_description :: Lens.Lens' CreateSlotType (Prelude.Maybe Prelude.Text)
createSlotType_description :: Lens' CreateSlotType (Maybe Text)
createSlotType_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Maybe Text
description :: Maybe Text
$sel:description:CreateSlotType' :: CreateSlotType -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateSlotType
s@CreateSlotType' {} Maybe Text
a -> CreateSlotType
s {$sel:description:CreateSlotType' :: Maybe Text
description = Maybe Text
a} :: CreateSlotType)

-- | Sets the type of external information used to create the slot type.
createSlotType_externalSourceSetting :: Lens.Lens' CreateSlotType (Prelude.Maybe ExternalSourceSetting)
createSlotType_externalSourceSetting :: Lens' CreateSlotType (Maybe ExternalSourceSetting)
createSlotType_externalSourceSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Maybe ExternalSourceSetting
externalSourceSetting :: Maybe ExternalSourceSetting
$sel:externalSourceSetting:CreateSlotType' :: CreateSlotType -> Maybe ExternalSourceSetting
externalSourceSetting} -> Maybe ExternalSourceSetting
externalSourceSetting) (\s :: CreateSlotType
s@CreateSlotType' {} Maybe ExternalSourceSetting
a -> CreateSlotType
s {$sel:externalSourceSetting:CreateSlotType' :: Maybe ExternalSourceSetting
externalSourceSetting = Maybe ExternalSourceSetting
a} :: CreateSlotType)

-- | The built-in slot type used as a parent of this slot type. When you
-- define a parent slot type, the new slot type has the configuration of
-- the parent slot type.
--
-- Only @AMAZON.AlphaNumeric@ is supported.
createSlotType_parentSlotTypeSignature :: Lens.Lens' CreateSlotType (Prelude.Maybe Prelude.Text)
createSlotType_parentSlotTypeSignature :: Lens' CreateSlotType (Maybe Text)
createSlotType_parentSlotTypeSignature = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Maybe Text
parentSlotTypeSignature :: Maybe Text
$sel:parentSlotTypeSignature:CreateSlotType' :: CreateSlotType -> Maybe Text
parentSlotTypeSignature} -> Maybe Text
parentSlotTypeSignature) (\s :: CreateSlotType
s@CreateSlotType' {} Maybe Text
a -> CreateSlotType
s {$sel:parentSlotTypeSignature:CreateSlotType' :: Maybe Text
parentSlotTypeSignature = Maybe Text
a} :: CreateSlotType)

-- | A list of @SlotTypeValue@ objects that defines the values that the slot
-- type can take. Each value can have a list of synonyms, additional values
-- that help train the machine learning model about the values that it
-- resolves for a slot.
createSlotType_slotTypeValues :: Lens.Lens' CreateSlotType (Prelude.Maybe (Prelude.NonEmpty SlotTypeValue))
createSlotType_slotTypeValues :: Lens' CreateSlotType (Maybe (NonEmpty SlotTypeValue))
createSlotType_slotTypeValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Maybe (NonEmpty SlotTypeValue)
slotTypeValues :: Maybe (NonEmpty SlotTypeValue)
$sel:slotTypeValues:CreateSlotType' :: CreateSlotType -> Maybe (NonEmpty SlotTypeValue)
slotTypeValues} -> Maybe (NonEmpty SlotTypeValue)
slotTypeValues) (\s :: CreateSlotType
s@CreateSlotType' {} Maybe (NonEmpty SlotTypeValue)
a -> CreateSlotType
s {$sel:slotTypeValues:CreateSlotType' :: Maybe (NonEmpty SlotTypeValue)
slotTypeValues = Maybe (NonEmpty SlotTypeValue)
a} :: CreateSlotType) 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

-- | Determines the strategy that Amazon Lex uses to select a value from the
-- list of possible values. The field can be set to one of the following
-- values:
--
-- -   @OriginalValue@ - Returns the value entered by the user, if the user
--     value is similar to the slot value.
--
-- -   @TopResolution@ - If there is a resolution list for the slot, return
--     the first value in the resolution list. If there is no resolution
--     list, return null.
--
-- If you don\'t specify the @valueSelectionSetting@ parameter, the default
-- is @OriginalValue@.
createSlotType_valueSelectionSetting :: Lens.Lens' CreateSlotType (Prelude.Maybe SlotValueSelectionSetting)
createSlotType_valueSelectionSetting :: Lens' CreateSlotType (Maybe SlotValueSelectionSetting)
createSlotType_valueSelectionSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Maybe SlotValueSelectionSetting
valueSelectionSetting :: Maybe SlotValueSelectionSetting
$sel:valueSelectionSetting:CreateSlotType' :: CreateSlotType -> Maybe SlotValueSelectionSetting
valueSelectionSetting} -> Maybe SlotValueSelectionSetting
valueSelectionSetting) (\s :: CreateSlotType
s@CreateSlotType' {} Maybe SlotValueSelectionSetting
a -> CreateSlotType
s {$sel:valueSelectionSetting:CreateSlotType' :: Maybe SlotValueSelectionSetting
valueSelectionSetting = Maybe SlotValueSelectionSetting
a} :: CreateSlotType)

-- | The name for the slot. A slot type name must be unique within the
-- account.
createSlotType_slotTypeName :: Lens.Lens' CreateSlotType Prelude.Text
createSlotType_slotTypeName :: Lens' CreateSlotType Text
createSlotType_slotTypeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Text
slotTypeName :: Text
$sel:slotTypeName:CreateSlotType' :: CreateSlotType -> Text
slotTypeName} -> Text
slotTypeName) (\s :: CreateSlotType
s@CreateSlotType' {} Text
a -> CreateSlotType
s {$sel:slotTypeName:CreateSlotType' :: Text
slotTypeName = Text
a} :: CreateSlotType)

-- | The identifier of the bot associated with this slot type.
createSlotType_botId :: Lens.Lens' CreateSlotType Prelude.Text
createSlotType_botId :: Lens' CreateSlotType Text
createSlotType_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Text
botId :: Text
$sel:botId:CreateSlotType' :: CreateSlotType -> Text
botId} -> Text
botId) (\s :: CreateSlotType
s@CreateSlotType' {} Text
a -> CreateSlotType
s {$sel:botId:CreateSlotType' :: Text
botId = Text
a} :: CreateSlotType)

-- | The identifier of the bot version associated with this slot type.
createSlotType_botVersion :: Lens.Lens' CreateSlotType Prelude.Text
createSlotType_botVersion :: Lens' CreateSlotType Text
createSlotType_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Text
botVersion :: Text
$sel:botVersion:CreateSlotType' :: CreateSlotType -> Text
botVersion} -> Text
botVersion) (\s :: CreateSlotType
s@CreateSlotType' {} Text
a -> CreateSlotType
s {$sel:botVersion:CreateSlotType' :: Text
botVersion = Text
a} :: CreateSlotType)

-- | The identifier of the language and locale that the slot type will be
-- used in. The string must match one of the supported locales. All of the
-- bots, intents, and slots used by the slot type must have the same
-- locale. For more information, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
createSlotType_localeId :: Lens.Lens' CreateSlotType Prelude.Text
createSlotType_localeId :: Lens' CreateSlotType Text
createSlotType_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotType' {Text
localeId :: Text
$sel:localeId:CreateSlotType' :: CreateSlotType -> Text
localeId} -> Text
localeId) (\s :: CreateSlotType
s@CreateSlotType' {} Text
a -> CreateSlotType
s {$sel:localeId:CreateSlotType' :: Text
localeId = Text
a} :: CreateSlotType)

instance Core.AWSRequest CreateSlotType where
  type
    AWSResponse CreateSlotType =
      CreateSlotTypeResponse
  request :: (Service -> Service) -> CreateSlotType -> Request CreateSlotType
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateSlotType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateSlotType)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe CompositeSlotTypeSetting
-> Maybe POSIX
-> Maybe Text
-> Maybe ExternalSourceSetting
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty SlotTypeValue)
-> Maybe SlotValueSelectionSetting
-> Int
-> CreateSlotTypeResponse
CreateSlotTypeResponse'
            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
"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
"compositeSlotTypeSetting")
            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
"creationDateTime")
            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
"description")
            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
"externalSourceSetting")
            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
"parentSlotTypeSignature")
            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
"slotTypeId")
            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
"slotTypeName")
            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
"slotTypeValues")
            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
"valueSelectionSetting")
            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 CreateSlotType where
  hashWithSalt :: Int -> CreateSlotType -> Int
hashWithSalt Int
_salt CreateSlotType' {Maybe (NonEmpty SlotTypeValue)
Maybe Text
Maybe ExternalSourceSetting
Maybe SlotValueSelectionSetting
Maybe CompositeSlotTypeSetting
Text
localeId :: Text
botVersion :: Text
botId :: Text
slotTypeName :: Text
valueSelectionSetting :: Maybe SlotValueSelectionSetting
slotTypeValues :: Maybe (NonEmpty SlotTypeValue)
parentSlotTypeSignature :: Maybe Text
externalSourceSetting :: Maybe ExternalSourceSetting
description :: Maybe Text
compositeSlotTypeSetting :: Maybe CompositeSlotTypeSetting
$sel:localeId:CreateSlotType' :: CreateSlotType -> Text
$sel:botVersion:CreateSlotType' :: CreateSlotType -> Text
$sel:botId:CreateSlotType' :: CreateSlotType -> Text
$sel:slotTypeName:CreateSlotType' :: CreateSlotType -> Text
$sel:valueSelectionSetting:CreateSlotType' :: CreateSlotType -> Maybe SlotValueSelectionSetting
$sel:slotTypeValues:CreateSlotType' :: CreateSlotType -> Maybe (NonEmpty SlotTypeValue)
$sel:parentSlotTypeSignature:CreateSlotType' :: CreateSlotType -> Maybe Text
$sel:externalSourceSetting:CreateSlotType' :: CreateSlotType -> Maybe ExternalSourceSetting
$sel:description:CreateSlotType' :: CreateSlotType -> Maybe Text
$sel:compositeSlotTypeSetting:CreateSlotType' :: CreateSlotType -> Maybe CompositeSlotTypeSetting
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExternalSourceSetting
externalSourceSetting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parentSlotTypeSignature
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty SlotTypeValue)
slotTypeValues
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SlotValueSelectionSetting
valueSelectionSetting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
slotTypeName
      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 CreateSlotType where
  rnf :: CreateSlotType -> ()
rnf CreateSlotType' {Maybe (NonEmpty SlotTypeValue)
Maybe Text
Maybe ExternalSourceSetting
Maybe SlotValueSelectionSetting
Maybe CompositeSlotTypeSetting
Text
localeId :: Text
botVersion :: Text
botId :: Text
slotTypeName :: Text
valueSelectionSetting :: Maybe SlotValueSelectionSetting
slotTypeValues :: Maybe (NonEmpty SlotTypeValue)
parentSlotTypeSignature :: Maybe Text
externalSourceSetting :: Maybe ExternalSourceSetting
description :: Maybe Text
compositeSlotTypeSetting :: Maybe CompositeSlotTypeSetting
$sel:localeId:CreateSlotType' :: CreateSlotType -> Text
$sel:botVersion:CreateSlotType' :: CreateSlotType -> Text
$sel:botId:CreateSlotType' :: CreateSlotType -> Text
$sel:slotTypeName:CreateSlotType' :: CreateSlotType -> Text
$sel:valueSelectionSetting:CreateSlotType' :: CreateSlotType -> Maybe SlotValueSelectionSetting
$sel:slotTypeValues:CreateSlotType' :: CreateSlotType -> Maybe (NonEmpty SlotTypeValue)
$sel:parentSlotTypeSignature:CreateSlotType' :: CreateSlotType -> Maybe Text
$sel:externalSourceSetting:CreateSlotType' :: CreateSlotType -> Maybe ExternalSourceSetting
$sel:description:CreateSlotType' :: CreateSlotType -> Maybe Text
$sel:compositeSlotTypeSetting:CreateSlotType' :: CreateSlotType -> Maybe CompositeSlotTypeSetting
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExternalSourceSetting
externalSourceSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parentSlotTypeSignature
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty SlotTypeValue)
slotTypeValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SlotValueSelectionSetting
valueSelectionSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
slotTypeName
      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 CreateSlotType where
  toHeaders :: CreateSlotType -> 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 CreateSlotType where
  toJSON :: CreateSlotType -> Value
toJSON CreateSlotType' {Maybe (NonEmpty SlotTypeValue)
Maybe Text
Maybe ExternalSourceSetting
Maybe SlotValueSelectionSetting
Maybe CompositeSlotTypeSetting
Text
localeId :: Text
botVersion :: Text
botId :: Text
slotTypeName :: Text
valueSelectionSetting :: Maybe SlotValueSelectionSetting
slotTypeValues :: Maybe (NonEmpty SlotTypeValue)
parentSlotTypeSignature :: Maybe Text
externalSourceSetting :: Maybe ExternalSourceSetting
description :: Maybe Text
compositeSlotTypeSetting :: Maybe CompositeSlotTypeSetting
$sel:localeId:CreateSlotType' :: CreateSlotType -> Text
$sel:botVersion:CreateSlotType' :: CreateSlotType -> Text
$sel:botId:CreateSlotType' :: CreateSlotType -> Text
$sel:slotTypeName:CreateSlotType' :: CreateSlotType -> Text
$sel:valueSelectionSetting:CreateSlotType' :: CreateSlotType -> Maybe SlotValueSelectionSetting
$sel:slotTypeValues:CreateSlotType' :: CreateSlotType -> Maybe (NonEmpty SlotTypeValue)
$sel:parentSlotTypeSignature:CreateSlotType' :: CreateSlotType -> Maybe Text
$sel:externalSourceSetting:CreateSlotType' :: CreateSlotType -> Maybe ExternalSourceSetting
$sel:description:CreateSlotType' :: CreateSlotType -> Maybe Text
$sel:compositeSlotTypeSetting:CreateSlotType' :: CreateSlotType -> Maybe CompositeSlotTypeSetting
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"compositeSlotTypeSetting" 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 CompositeSlotTypeSetting
compositeSlotTypeSetting,
            (Key
"description" 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
description,
            (Key
"externalSourceSetting" 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 ExternalSourceSetting
externalSourceSetting,
            (Key
"parentSlotTypeSignature" 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
parentSlotTypeSignature,
            (Key
"slotTypeValues" 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 SlotTypeValue)
slotTypeValues,
            (Key
"valueSelectionSetting" 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 SlotValueSelectionSetting
valueSelectionSetting,
            forall a. a -> Maybe a
Prelude.Just (Key
"slotTypeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
slotTypeName)
          ]
      )

instance Data.ToPath CreateSlotType where
  toPath :: CreateSlotType -> ByteString
toPath CreateSlotType' {Maybe (NonEmpty SlotTypeValue)
Maybe Text
Maybe ExternalSourceSetting
Maybe SlotValueSelectionSetting
Maybe CompositeSlotTypeSetting
Text
localeId :: Text
botVersion :: Text
botId :: Text
slotTypeName :: Text
valueSelectionSetting :: Maybe SlotValueSelectionSetting
slotTypeValues :: Maybe (NonEmpty SlotTypeValue)
parentSlotTypeSignature :: Maybe Text
externalSourceSetting :: Maybe ExternalSourceSetting
description :: Maybe Text
compositeSlotTypeSetting :: Maybe CompositeSlotTypeSetting
$sel:localeId:CreateSlotType' :: CreateSlotType -> Text
$sel:botVersion:CreateSlotType' :: CreateSlotType -> Text
$sel:botId:CreateSlotType' :: CreateSlotType -> Text
$sel:slotTypeName:CreateSlotType' :: CreateSlotType -> Text
$sel:valueSelectionSetting:CreateSlotType' :: CreateSlotType -> Maybe SlotValueSelectionSetting
$sel:slotTypeValues:CreateSlotType' :: CreateSlotType -> Maybe (NonEmpty SlotTypeValue)
$sel:parentSlotTypeSignature:CreateSlotType' :: CreateSlotType -> Maybe Text
$sel:externalSourceSetting:CreateSlotType' :: CreateSlotType -> Maybe ExternalSourceSetting
$sel:description:CreateSlotType' :: CreateSlotType -> Maybe Text
$sel:compositeSlotTypeSetting:CreateSlotType' :: CreateSlotType -> Maybe CompositeSlotTypeSetting
..} =
    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
"/slottypes/"
      ]

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

-- | /See:/ 'newCreateSlotTypeResponse' smart constructor.
data CreateSlotTypeResponse = CreateSlotTypeResponse'
  { -- | The identifier for the bot associated with the slot type.
    CreateSlotTypeResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | The version of the bot associated with the slot type.
    CreateSlotTypeResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | Specifications for a composite slot type.
    CreateSlotTypeResponse -> Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting :: Prelude.Maybe CompositeSlotTypeSetting,
    -- | A timestamp of the date and time that the slot type was created.
    CreateSlotTypeResponse -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
    -- | The description specified for the slot type.
    CreateSlotTypeResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The type of external information used to create the slot type.
    CreateSlotTypeResponse -> Maybe ExternalSourceSetting
externalSourceSetting :: Prelude.Maybe ExternalSourceSetting,
    -- | The specified language and local specified for the slot type.
    CreateSlotTypeResponse -> Maybe Text
localeId :: Prelude.Maybe Prelude.Text,
    -- | The signature of the base slot type specified for the slot type.
    CreateSlotTypeResponse -> Maybe Text
parentSlotTypeSignature :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier assigned to the slot type. Use this to identify
    -- the slot type in the @UpdateSlotType@ and @DeleteSlotType@ operations.
    CreateSlotTypeResponse -> Maybe Text
slotTypeId :: Prelude.Maybe Prelude.Text,
    -- | The name specified for the slot type.
    CreateSlotTypeResponse -> Maybe Text
slotTypeName :: Prelude.Maybe Prelude.Text,
    -- | The list of values that the slot type can assume.
    CreateSlotTypeResponse -> Maybe (NonEmpty SlotTypeValue)
slotTypeValues :: Prelude.Maybe (Prelude.NonEmpty SlotTypeValue),
    -- | The strategy that Amazon Lex uses to select a value from the list of
    -- possible values.
    CreateSlotTypeResponse -> Maybe SlotValueSelectionSetting
valueSelectionSetting :: Prelude.Maybe SlotValueSelectionSetting,
    -- | The response's http status code.
    CreateSlotTypeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateSlotTypeResponse -> CreateSlotTypeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSlotTypeResponse -> CreateSlotTypeResponse -> Bool
$c/= :: CreateSlotTypeResponse -> CreateSlotTypeResponse -> Bool
== :: CreateSlotTypeResponse -> CreateSlotTypeResponse -> Bool
$c== :: CreateSlotTypeResponse -> CreateSlotTypeResponse -> Bool
Prelude.Eq, ReadPrec [CreateSlotTypeResponse]
ReadPrec CreateSlotTypeResponse
Int -> ReadS CreateSlotTypeResponse
ReadS [CreateSlotTypeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSlotTypeResponse]
$creadListPrec :: ReadPrec [CreateSlotTypeResponse]
readPrec :: ReadPrec CreateSlotTypeResponse
$creadPrec :: ReadPrec CreateSlotTypeResponse
readList :: ReadS [CreateSlotTypeResponse]
$creadList :: ReadS [CreateSlotTypeResponse]
readsPrec :: Int -> ReadS CreateSlotTypeResponse
$creadsPrec :: Int -> ReadS CreateSlotTypeResponse
Prelude.Read, Int -> CreateSlotTypeResponse -> ShowS
[CreateSlotTypeResponse] -> ShowS
CreateSlotTypeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSlotTypeResponse] -> ShowS
$cshowList :: [CreateSlotTypeResponse] -> ShowS
show :: CreateSlotTypeResponse -> String
$cshow :: CreateSlotTypeResponse -> String
showsPrec :: Int -> CreateSlotTypeResponse -> ShowS
$cshowsPrec :: Int -> CreateSlotTypeResponse -> ShowS
Prelude.Show, forall x. Rep CreateSlotTypeResponse x -> CreateSlotTypeResponse
forall x. CreateSlotTypeResponse -> Rep CreateSlotTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSlotTypeResponse x -> CreateSlotTypeResponse
$cfrom :: forall x. CreateSlotTypeResponse -> Rep CreateSlotTypeResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateSlotTypeResponse' 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', 'createSlotTypeResponse_botId' - The identifier for the bot associated with the slot type.
--
-- 'botVersion', 'createSlotTypeResponse_botVersion' - The version of the bot associated with the slot type.
--
-- 'compositeSlotTypeSetting', 'createSlotTypeResponse_compositeSlotTypeSetting' - Specifications for a composite slot type.
--
-- 'creationDateTime', 'createSlotTypeResponse_creationDateTime' - A timestamp of the date and time that the slot type was created.
--
-- 'description', 'createSlotTypeResponse_description' - The description specified for the slot type.
--
-- 'externalSourceSetting', 'createSlotTypeResponse_externalSourceSetting' - The type of external information used to create the slot type.
--
-- 'localeId', 'createSlotTypeResponse_localeId' - The specified language and local specified for the slot type.
--
-- 'parentSlotTypeSignature', 'createSlotTypeResponse_parentSlotTypeSignature' - The signature of the base slot type specified for the slot type.
--
-- 'slotTypeId', 'createSlotTypeResponse_slotTypeId' - The unique identifier assigned to the slot type. Use this to identify
-- the slot type in the @UpdateSlotType@ and @DeleteSlotType@ operations.
--
-- 'slotTypeName', 'createSlotTypeResponse_slotTypeName' - The name specified for the slot type.
--
-- 'slotTypeValues', 'createSlotTypeResponse_slotTypeValues' - The list of values that the slot type can assume.
--
-- 'valueSelectionSetting', 'createSlotTypeResponse_valueSelectionSetting' - The strategy that Amazon Lex uses to select a value from the list of
-- possible values.
--
-- 'httpStatus', 'createSlotTypeResponse_httpStatus' - The response's http status code.
newCreateSlotTypeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateSlotTypeResponse
newCreateSlotTypeResponse :: Int -> CreateSlotTypeResponse
newCreateSlotTypeResponse Int
pHttpStatus_ =
  CreateSlotTypeResponse'
    { $sel:botId:CreateSlotTypeResponse' :: Maybe Text
botId = forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:CreateSlotTypeResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:compositeSlotTypeSetting:CreateSlotTypeResponse' :: Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:CreateSlotTypeResponse' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateSlotTypeResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:externalSourceSetting:CreateSlotTypeResponse' :: Maybe ExternalSourceSetting
externalSourceSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:localeId:CreateSlotTypeResponse' :: Maybe Text
localeId = forall a. Maybe a
Prelude.Nothing,
      $sel:parentSlotTypeSignature:CreateSlotTypeResponse' :: Maybe Text
parentSlotTypeSignature = forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeId:CreateSlotTypeResponse' :: Maybe Text
slotTypeId = forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeName:CreateSlotTypeResponse' :: Maybe Text
slotTypeName = forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeValues:CreateSlotTypeResponse' :: Maybe (NonEmpty SlotTypeValue)
slotTypeValues = forall a. Maybe a
Prelude.Nothing,
      $sel:valueSelectionSetting:CreateSlotTypeResponse' :: Maybe SlotValueSelectionSetting
valueSelectionSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateSlotTypeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier for the bot associated with the slot type.
createSlotTypeResponse_botId :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe Prelude.Text)
createSlotTypeResponse_botId :: Lens' CreateSlotTypeResponse (Maybe Text)
createSlotTypeResponse_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe Text
botId :: Maybe Text
$sel:botId:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
botId} -> Maybe Text
botId) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe Text
a -> CreateSlotTypeResponse
s {$sel:botId:CreateSlotTypeResponse' :: Maybe Text
botId = Maybe Text
a} :: CreateSlotTypeResponse)

-- | The version of the bot associated with the slot type.
createSlotTypeResponse_botVersion :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe Prelude.Text)
createSlotTypeResponse_botVersion :: Lens' CreateSlotTypeResponse (Maybe Text)
createSlotTypeResponse_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe Text
a -> CreateSlotTypeResponse
s {$sel:botVersion:CreateSlotTypeResponse' :: Maybe Text
botVersion = Maybe Text
a} :: CreateSlotTypeResponse)

-- | Specifications for a composite slot type.
createSlotTypeResponse_compositeSlotTypeSetting :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe CompositeSlotTypeSetting)
createSlotTypeResponse_compositeSlotTypeSetting :: Lens' CreateSlotTypeResponse (Maybe CompositeSlotTypeSetting)
createSlotTypeResponse_compositeSlotTypeSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting :: Maybe CompositeSlotTypeSetting
$sel:compositeSlotTypeSetting:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting} -> Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe CompositeSlotTypeSetting
a -> CreateSlotTypeResponse
s {$sel:compositeSlotTypeSetting:CreateSlotTypeResponse' :: Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting = Maybe CompositeSlotTypeSetting
a} :: CreateSlotTypeResponse)

-- | A timestamp of the date and time that the slot type was created.
createSlotTypeResponse_creationDateTime :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe Prelude.UTCTime)
createSlotTypeResponse_creationDateTime :: Lens' CreateSlotTypeResponse (Maybe UTCTime)
createSlotTypeResponse_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe POSIX
a -> CreateSlotTypeResponse
s {$sel:creationDateTime:CreateSlotTypeResponse' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: CreateSlotTypeResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The description specified for the slot type.
createSlotTypeResponse_description :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe Prelude.Text)
createSlotTypeResponse_description :: Lens' CreateSlotTypeResponse (Maybe Text)
createSlotTypeResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe Text
description :: Maybe Text
$sel:description:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe Text
a -> CreateSlotTypeResponse
s {$sel:description:CreateSlotTypeResponse' :: Maybe Text
description = Maybe Text
a} :: CreateSlotTypeResponse)

-- | The type of external information used to create the slot type.
createSlotTypeResponse_externalSourceSetting :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe ExternalSourceSetting)
createSlotTypeResponse_externalSourceSetting :: Lens' CreateSlotTypeResponse (Maybe ExternalSourceSetting)
createSlotTypeResponse_externalSourceSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe ExternalSourceSetting
externalSourceSetting :: Maybe ExternalSourceSetting
$sel:externalSourceSetting:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe ExternalSourceSetting
externalSourceSetting} -> Maybe ExternalSourceSetting
externalSourceSetting) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe ExternalSourceSetting
a -> CreateSlotTypeResponse
s {$sel:externalSourceSetting:CreateSlotTypeResponse' :: Maybe ExternalSourceSetting
externalSourceSetting = Maybe ExternalSourceSetting
a} :: CreateSlotTypeResponse)

-- | The specified language and local specified for the slot type.
createSlotTypeResponse_localeId :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe Prelude.Text)
createSlotTypeResponse_localeId :: Lens' CreateSlotTypeResponse (Maybe Text)
createSlotTypeResponse_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe Text
localeId :: Maybe Text
$sel:localeId:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
localeId} -> Maybe Text
localeId) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe Text
a -> CreateSlotTypeResponse
s {$sel:localeId:CreateSlotTypeResponse' :: Maybe Text
localeId = Maybe Text
a} :: CreateSlotTypeResponse)

-- | The signature of the base slot type specified for the slot type.
createSlotTypeResponse_parentSlotTypeSignature :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe Prelude.Text)
createSlotTypeResponse_parentSlotTypeSignature :: Lens' CreateSlotTypeResponse (Maybe Text)
createSlotTypeResponse_parentSlotTypeSignature = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe Text
parentSlotTypeSignature :: Maybe Text
$sel:parentSlotTypeSignature:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
parentSlotTypeSignature} -> Maybe Text
parentSlotTypeSignature) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe Text
a -> CreateSlotTypeResponse
s {$sel:parentSlotTypeSignature:CreateSlotTypeResponse' :: Maybe Text
parentSlotTypeSignature = Maybe Text
a} :: CreateSlotTypeResponse)

-- | The unique identifier assigned to the slot type. Use this to identify
-- the slot type in the @UpdateSlotType@ and @DeleteSlotType@ operations.
createSlotTypeResponse_slotTypeId :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe Prelude.Text)
createSlotTypeResponse_slotTypeId :: Lens' CreateSlotTypeResponse (Maybe Text)
createSlotTypeResponse_slotTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe Text
slotTypeId :: Maybe Text
$sel:slotTypeId:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
slotTypeId} -> Maybe Text
slotTypeId) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe Text
a -> CreateSlotTypeResponse
s {$sel:slotTypeId:CreateSlotTypeResponse' :: Maybe Text
slotTypeId = Maybe Text
a} :: CreateSlotTypeResponse)

-- | The name specified for the slot type.
createSlotTypeResponse_slotTypeName :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe Prelude.Text)
createSlotTypeResponse_slotTypeName :: Lens' CreateSlotTypeResponse (Maybe Text)
createSlotTypeResponse_slotTypeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe Text
slotTypeName :: Maybe Text
$sel:slotTypeName:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
slotTypeName} -> Maybe Text
slotTypeName) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe Text
a -> CreateSlotTypeResponse
s {$sel:slotTypeName:CreateSlotTypeResponse' :: Maybe Text
slotTypeName = Maybe Text
a} :: CreateSlotTypeResponse)

-- | The list of values that the slot type can assume.
createSlotTypeResponse_slotTypeValues :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe (Prelude.NonEmpty SlotTypeValue))
createSlotTypeResponse_slotTypeValues :: Lens' CreateSlotTypeResponse (Maybe (NonEmpty SlotTypeValue))
createSlotTypeResponse_slotTypeValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe (NonEmpty SlotTypeValue)
slotTypeValues :: Maybe (NonEmpty SlotTypeValue)
$sel:slotTypeValues:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe (NonEmpty SlotTypeValue)
slotTypeValues} -> Maybe (NonEmpty SlotTypeValue)
slotTypeValues) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe (NonEmpty SlotTypeValue)
a -> CreateSlotTypeResponse
s {$sel:slotTypeValues:CreateSlotTypeResponse' :: Maybe (NonEmpty SlotTypeValue)
slotTypeValues = Maybe (NonEmpty SlotTypeValue)
a} :: CreateSlotTypeResponse) 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 strategy that Amazon Lex uses to select a value from the list of
-- possible values.
createSlotTypeResponse_valueSelectionSetting :: Lens.Lens' CreateSlotTypeResponse (Prelude.Maybe SlotValueSelectionSetting)
createSlotTypeResponse_valueSelectionSetting :: Lens' CreateSlotTypeResponse (Maybe SlotValueSelectionSetting)
createSlotTypeResponse_valueSelectionSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeResponse' {Maybe SlotValueSelectionSetting
valueSelectionSetting :: Maybe SlotValueSelectionSetting
$sel:valueSelectionSetting:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe SlotValueSelectionSetting
valueSelectionSetting} -> Maybe SlotValueSelectionSetting
valueSelectionSetting) (\s :: CreateSlotTypeResponse
s@CreateSlotTypeResponse' {} Maybe SlotValueSelectionSetting
a -> CreateSlotTypeResponse
s {$sel:valueSelectionSetting:CreateSlotTypeResponse' :: Maybe SlotValueSelectionSetting
valueSelectionSetting = Maybe SlotValueSelectionSetting
a} :: CreateSlotTypeResponse)

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

instance Prelude.NFData CreateSlotTypeResponse where
  rnf :: CreateSlotTypeResponse -> ()
rnf CreateSlotTypeResponse' {Int
Maybe (NonEmpty SlotTypeValue)
Maybe Text
Maybe POSIX
Maybe ExternalSourceSetting
Maybe SlotValueSelectionSetting
Maybe CompositeSlotTypeSetting
httpStatus :: Int
valueSelectionSetting :: Maybe SlotValueSelectionSetting
slotTypeValues :: Maybe (NonEmpty SlotTypeValue)
slotTypeName :: Maybe Text
slotTypeId :: Maybe Text
parentSlotTypeSignature :: Maybe Text
localeId :: Maybe Text
externalSourceSetting :: Maybe ExternalSourceSetting
description :: Maybe Text
creationDateTime :: Maybe POSIX
compositeSlotTypeSetting :: Maybe CompositeSlotTypeSetting
botVersion :: Maybe Text
botId :: Maybe Text
$sel:httpStatus:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Int
$sel:valueSelectionSetting:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe SlotValueSelectionSetting
$sel:slotTypeValues:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe (NonEmpty SlotTypeValue)
$sel:slotTypeName:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
$sel:slotTypeId:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
$sel:parentSlotTypeSignature:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
$sel:localeId:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
$sel:externalSourceSetting:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe ExternalSourceSetting
$sel:description:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
$sel:creationDateTime:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe POSIX
$sel:compositeSlotTypeSetting:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe CompositeSlotTypeSetting
$sel:botVersion:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
$sel:botId:CreateSlotTypeResponse' :: CreateSlotTypeResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CompositeSlotTypeSetting
compositeSlotTypeSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExternalSourceSetting
externalSourceSetting
      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
parentSlotTypeSignature
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
slotTypeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
slotTypeName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty SlotTypeValue)
slotTypeValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SlotValueSelectionSetting
valueSelectionSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus