{-# 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.CreateSlot
-- 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 slot in an intent. A slot is a variable needed to fulfill an
-- intent. For example, an @OrderPizza@ intent might need slots for size,
-- crust, and number of pizzas. For each slot, you define one or more
-- utterances that Amazon Lex uses to elicit a response from the user.
module Amazonka.LexV2Models.CreateSlot
  ( -- * Creating a Request
    CreateSlot (..),
    newCreateSlot,

    -- * Request Lenses
    createSlot_description,
    createSlot_multipleValuesSetting,
    createSlot_obfuscationSetting,
    createSlot_slotTypeId,
    createSlot_subSlotSetting,
    createSlot_slotName,
    createSlot_valueElicitationSetting,
    createSlot_botId,
    createSlot_botVersion,
    createSlot_localeId,
    createSlot_intentId,

    -- * Destructuring the Response
    CreateSlotResponse (..),
    newCreateSlotResponse,

    -- * Response Lenses
    createSlotResponse_botId,
    createSlotResponse_botVersion,
    createSlotResponse_creationDateTime,
    createSlotResponse_description,
    createSlotResponse_intentId,
    createSlotResponse_localeId,
    createSlotResponse_multipleValuesSetting,
    createSlotResponse_obfuscationSetting,
    createSlotResponse_slotId,
    createSlotResponse_slotName,
    createSlotResponse_slotTypeId,
    createSlotResponse_subSlotSetting,
    createSlotResponse_valueElicitationSetting,
    createSlotResponse_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:/ 'newCreateSlot' smart constructor.
data CreateSlot = CreateSlot'
  { -- | A description of the slot. Use this to help identify the slot in lists.
    CreateSlot -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the slot returns multiple values in one response.
    -- Multi-value slots are only available in the en-US locale. If you set
    -- this value to @true@ in any other locale, Amazon Lex throws a
    -- @ValidationException@.
    --
    -- If the @multipleValuesSetting@ is not set, the default value is @false@.
    CreateSlot -> Maybe MultipleValuesSetting
multipleValuesSetting :: Prelude.Maybe MultipleValuesSetting,
    -- | Determines how slot values are used in Amazon CloudWatch logs. If the
    -- value of the @obfuscationSetting@ parameter is @DefaultObfuscation@,
    -- slot values are obfuscated in the log output. If the value is @None@,
    -- the actual value is present in the log output.
    --
    -- The default is to obfuscate values in the CloudWatch logs.
    CreateSlot -> Maybe ObfuscationSetting
obfuscationSetting :: Prelude.Maybe ObfuscationSetting,
    -- | The unique identifier for the slot type associated with this slot. The
    -- slot type determines the values that can be entered into the slot.
    CreateSlot -> Maybe Text
slotTypeId :: Prelude.Maybe Prelude.Text,
    -- | Specifications for the constituent sub slots and the expression for the
    -- composite slot.
    CreateSlot -> Maybe SubSlotSetting
subSlotSetting :: Prelude.Maybe SubSlotSetting,
    -- | The name of the slot. Slot names must be unique within the bot that
    -- contains the slot.
    CreateSlot -> Text
slotName :: Prelude.Text,
    -- | Specifies prompts that Amazon Lex sends to the user to elicit a response
    -- that provides the value for the slot.
    CreateSlot -> SlotValueElicitationSetting
valueElicitationSetting :: SlotValueElicitationSetting,
    -- | The identifier of the bot associated with the slot.
    CreateSlot -> Text
botId :: Prelude.Text,
    -- | The version of the bot associated with the slot.
    CreateSlot -> Text
botVersion :: Prelude.Text,
    -- | The identifier of the language and locale that the slot will be used in.
    -- The string must match one of the supported locales. All of the bots,
    -- intents, slot types used by the slot must have the same locale. For more
    -- information, see
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
    CreateSlot -> Text
localeId :: Prelude.Text,
    -- | The identifier of the intent that contains the slot.
    CreateSlot -> Text
intentId :: Prelude.Text
  }
  deriving (CreateSlot -> CreateSlot -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSlot -> CreateSlot -> Bool
$c/= :: CreateSlot -> CreateSlot -> Bool
== :: CreateSlot -> CreateSlot -> Bool
$c== :: CreateSlot -> CreateSlot -> Bool
Prelude.Eq, ReadPrec [CreateSlot]
ReadPrec CreateSlot
Int -> ReadS CreateSlot
ReadS [CreateSlot]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSlot]
$creadListPrec :: ReadPrec [CreateSlot]
readPrec :: ReadPrec CreateSlot
$creadPrec :: ReadPrec CreateSlot
readList :: ReadS [CreateSlot]
$creadList :: ReadS [CreateSlot]
readsPrec :: Int -> ReadS CreateSlot
$creadsPrec :: Int -> ReadS CreateSlot
Prelude.Read, Int -> CreateSlot -> ShowS
[CreateSlot] -> ShowS
CreateSlot -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSlot] -> ShowS
$cshowList :: [CreateSlot] -> ShowS
show :: CreateSlot -> String
$cshow :: CreateSlot -> String
showsPrec :: Int -> CreateSlot -> ShowS
$cshowsPrec :: Int -> CreateSlot -> ShowS
Prelude.Show, forall x. Rep CreateSlot x -> CreateSlot
forall x. CreateSlot -> Rep CreateSlot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSlot x -> CreateSlot
$cfrom :: forall x. CreateSlot -> Rep CreateSlot x
Prelude.Generic)

-- |
-- Create a value of 'CreateSlot' 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:
--
-- 'description', 'createSlot_description' - A description of the slot. Use this to help identify the slot in lists.
--
-- 'multipleValuesSetting', 'createSlot_multipleValuesSetting' - Indicates whether the slot returns multiple values in one response.
-- Multi-value slots are only available in the en-US locale. If you set
-- this value to @true@ in any other locale, Amazon Lex throws a
-- @ValidationException@.
--
-- If the @multipleValuesSetting@ is not set, the default value is @false@.
--
-- 'obfuscationSetting', 'createSlot_obfuscationSetting' - Determines how slot values are used in Amazon CloudWatch logs. If the
-- value of the @obfuscationSetting@ parameter is @DefaultObfuscation@,
-- slot values are obfuscated in the log output. If the value is @None@,
-- the actual value is present in the log output.
--
-- The default is to obfuscate values in the CloudWatch logs.
--
-- 'slotTypeId', 'createSlot_slotTypeId' - The unique identifier for the slot type associated with this slot. The
-- slot type determines the values that can be entered into the slot.
--
-- 'subSlotSetting', 'createSlot_subSlotSetting' - Specifications for the constituent sub slots and the expression for the
-- composite slot.
--
-- 'slotName', 'createSlot_slotName' - The name of the slot. Slot names must be unique within the bot that
-- contains the slot.
--
-- 'valueElicitationSetting', 'createSlot_valueElicitationSetting' - Specifies prompts that Amazon Lex sends to the user to elicit a response
-- that provides the value for the slot.
--
-- 'botId', 'createSlot_botId' - The identifier of the bot associated with the slot.
--
-- 'botVersion', 'createSlot_botVersion' - The version of the bot associated with the slot.
--
-- 'localeId', 'createSlot_localeId' - The identifier of the language and locale that the slot will be used in.
-- The string must match one of the supported locales. All of the bots,
-- intents, slot types used by the slot must have the same locale. For more
-- information, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
--
-- 'intentId', 'createSlot_intentId' - The identifier of the intent that contains the slot.
newCreateSlot ::
  -- | 'slotName'
  Prelude.Text ->
  -- | 'valueElicitationSetting'
  SlotValueElicitationSetting ->
  -- | 'botId'
  Prelude.Text ->
  -- | 'botVersion'
  Prelude.Text ->
  -- | 'localeId'
  Prelude.Text ->
  -- | 'intentId'
  Prelude.Text ->
  CreateSlot
newCreateSlot :: Text
-> SlotValueElicitationSetting
-> Text
-> Text
-> Text
-> Text
-> CreateSlot
newCreateSlot
  Text
pSlotName_
  SlotValueElicitationSetting
pValueElicitationSetting_
  Text
pBotId_
  Text
pBotVersion_
  Text
pLocaleId_
  Text
pIntentId_ =
    CreateSlot'
      { $sel:description:CreateSlot' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:multipleValuesSetting:CreateSlot' :: Maybe MultipleValuesSetting
multipleValuesSetting = forall a. Maybe a
Prelude.Nothing,
        $sel:obfuscationSetting:CreateSlot' :: Maybe ObfuscationSetting
obfuscationSetting = forall a. Maybe a
Prelude.Nothing,
        $sel:slotTypeId:CreateSlot' :: Maybe Text
slotTypeId = forall a. Maybe a
Prelude.Nothing,
        $sel:subSlotSetting:CreateSlot' :: Maybe SubSlotSetting
subSlotSetting = forall a. Maybe a
Prelude.Nothing,
        $sel:slotName:CreateSlot' :: Text
slotName = Text
pSlotName_,
        $sel:valueElicitationSetting:CreateSlot' :: SlotValueElicitationSetting
valueElicitationSetting = SlotValueElicitationSetting
pValueElicitationSetting_,
        $sel:botId:CreateSlot' :: Text
botId = Text
pBotId_,
        $sel:botVersion:CreateSlot' :: Text
botVersion = Text
pBotVersion_,
        $sel:localeId:CreateSlot' :: Text
localeId = Text
pLocaleId_,
        $sel:intentId:CreateSlot' :: Text
intentId = Text
pIntentId_
      }

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

-- | Indicates whether the slot returns multiple values in one response.
-- Multi-value slots are only available in the en-US locale. If you set
-- this value to @true@ in any other locale, Amazon Lex throws a
-- @ValidationException@.
--
-- If the @multipleValuesSetting@ is not set, the default value is @false@.
createSlot_multipleValuesSetting :: Lens.Lens' CreateSlot (Prelude.Maybe MultipleValuesSetting)
createSlot_multipleValuesSetting :: Lens' CreateSlot (Maybe MultipleValuesSetting)
createSlot_multipleValuesSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlot' {Maybe MultipleValuesSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
$sel:multipleValuesSetting:CreateSlot' :: CreateSlot -> Maybe MultipleValuesSetting
multipleValuesSetting} -> Maybe MultipleValuesSetting
multipleValuesSetting) (\s :: CreateSlot
s@CreateSlot' {} Maybe MultipleValuesSetting
a -> CreateSlot
s {$sel:multipleValuesSetting:CreateSlot' :: Maybe MultipleValuesSetting
multipleValuesSetting = Maybe MultipleValuesSetting
a} :: CreateSlot)

-- | Determines how slot values are used in Amazon CloudWatch logs. If the
-- value of the @obfuscationSetting@ parameter is @DefaultObfuscation@,
-- slot values are obfuscated in the log output. If the value is @None@,
-- the actual value is present in the log output.
--
-- The default is to obfuscate values in the CloudWatch logs.
createSlot_obfuscationSetting :: Lens.Lens' CreateSlot (Prelude.Maybe ObfuscationSetting)
createSlot_obfuscationSetting :: Lens' CreateSlot (Maybe ObfuscationSetting)
createSlot_obfuscationSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlot' {Maybe ObfuscationSetting
obfuscationSetting :: Maybe ObfuscationSetting
$sel:obfuscationSetting:CreateSlot' :: CreateSlot -> Maybe ObfuscationSetting
obfuscationSetting} -> Maybe ObfuscationSetting
obfuscationSetting) (\s :: CreateSlot
s@CreateSlot' {} Maybe ObfuscationSetting
a -> CreateSlot
s {$sel:obfuscationSetting:CreateSlot' :: Maybe ObfuscationSetting
obfuscationSetting = Maybe ObfuscationSetting
a} :: CreateSlot)

-- | The unique identifier for the slot type associated with this slot. The
-- slot type determines the values that can be entered into the slot.
createSlot_slotTypeId :: Lens.Lens' CreateSlot (Prelude.Maybe Prelude.Text)
createSlot_slotTypeId :: Lens' CreateSlot (Maybe Text)
createSlot_slotTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlot' {Maybe Text
slotTypeId :: Maybe Text
$sel:slotTypeId:CreateSlot' :: CreateSlot -> Maybe Text
slotTypeId} -> Maybe Text
slotTypeId) (\s :: CreateSlot
s@CreateSlot' {} Maybe Text
a -> CreateSlot
s {$sel:slotTypeId:CreateSlot' :: Maybe Text
slotTypeId = Maybe Text
a} :: CreateSlot)

-- | Specifications for the constituent sub slots and the expression for the
-- composite slot.
createSlot_subSlotSetting :: Lens.Lens' CreateSlot (Prelude.Maybe SubSlotSetting)
createSlot_subSlotSetting :: Lens' CreateSlot (Maybe SubSlotSetting)
createSlot_subSlotSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlot' {Maybe SubSlotSetting
subSlotSetting :: Maybe SubSlotSetting
$sel:subSlotSetting:CreateSlot' :: CreateSlot -> Maybe SubSlotSetting
subSlotSetting} -> Maybe SubSlotSetting
subSlotSetting) (\s :: CreateSlot
s@CreateSlot' {} Maybe SubSlotSetting
a -> CreateSlot
s {$sel:subSlotSetting:CreateSlot' :: Maybe SubSlotSetting
subSlotSetting = Maybe SubSlotSetting
a} :: CreateSlot)

-- | The name of the slot. Slot names must be unique within the bot that
-- contains the slot.
createSlot_slotName :: Lens.Lens' CreateSlot Prelude.Text
createSlot_slotName :: Lens' CreateSlot Text
createSlot_slotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlot' {Text
slotName :: Text
$sel:slotName:CreateSlot' :: CreateSlot -> Text
slotName} -> Text
slotName) (\s :: CreateSlot
s@CreateSlot' {} Text
a -> CreateSlot
s {$sel:slotName:CreateSlot' :: Text
slotName = Text
a} :: CreateSlot)

-- | Specifies prompts that Amazon Lex sends to the user to elicit a response
-- that provides the value for the slot.
createSlot_valueElicitationSetting :: Lens.Lens' CreateSlot SlotValueElicitationSetting
createSlot_valueElicitationSetting :: Lens' CreateSlot SlotValueElicitationSetting
createSlot_valueElicitationSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlot' {SlotValueElicitationSetting
valueElicitationSetting :: SlotValueElicitationSetting
$sel:valueElicitationSetting:CreateSlot' :: CreateSlot -> SlotValueElicitationSetting
valueElicitationSetting} -> SlotValueElicitationSetting
valueElicitationSetting) (\s :: CreateSlot
s@CreateSlot' {} SlotValueElicitationSetting
a -> CreateSlot
s {$sel:valueElicitationSetting:CreateSlot' :: SlotValueElicitationSetting
valueElicitationSetting = SlotValueElicitationSetting
a} :: CreateSlot)

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

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

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

-- | The identifier of the intent that contains the slot.
createSlot_intentId :: Lens.Lens' CreateSlot Prelude.Text
createSlot_intentId :: Lens' CreateSlot Text
createSlot_intentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlot' {Text
intentId :: Text
$sel:intentId:CreateSlot' :: CreateSlot -> Text
intentId} -> Text
intentId) (\s :: CreateSlot
s@CreateSlot' {} Text
a -> CreateSlot
s {$sel:intentId:CreateSlot' :: Text
intentId = Text
a} :: CreateSlot)

instance Core.AWSRequest CreateSlot where
  type AWSResponse CreateSlot = CreateSlotResponse
  request :: (Service -> Service) -> CreateSlot -> Request CreateSlot
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 CreateSlot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateSlot)))
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe MultipleValuesSetting
-> Maybe ObfuscationSetting
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubSlotSetting
-> Maybe SlotValueElicitationSetting
-> Int
-> CreateSlotResponse
CreateSlotResponse'
            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
"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
"intentId")
            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
"multipleValuesSetting")
            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
"obfuscationSetting")
            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
"slotId")
            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
"slotName")
            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
"subSlotSetting")
            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
"valueElicitationSetting")
            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 CreateSlot where
  hashWithSalt :: Int -> CreateSlot -> Int
hashWithSalt Int
_salt CreateSlot' {Maybe Text
Maybe MultipleValuesSetting
Maybe ObfuscationSetting
Maybe SubSlotSetting
Text
SlotValueElicitationSetting
intentId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
valueElicitationSetting :: SlotValueElicitationSetting
slotName :: Text
subSlotSetting :: Maybe SubSlotSetting
slotTypeId :: Maybe Text
obfuscationSetting :: Maybe ObfuscationSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
description :: Maybe Text
$sel:intentId:CreateSlot' :: CreateSlot -> Text
$sel:localeId:CreateSlot' :: CreateSlot -> Text
$sel:botVersion:CreateSlot' :: CreateSlot -> Text
$sel:botId:CreateSlot' :: CreateSlot -> Text
$sel:valueElicitationSetting:CreateSlot' :: CreateSlot -> SlotValueElicitationSetting
$sel:slotName:CreateSlot' :: CreateSlot -> Text
$sel:subSlotSetting:CreateSlot' :: CreateSlot -> Maybe SubSlotSetting
$sel:slotTypeId:CreateSlot' :: CreateSlot -> Maybe Text
$sel:obfuscationSetting:CreateSlot' :: CreateSlot -> Maybe ObfuscationSetting
$sel:multipleValuesSetting:CreateSlot' :: CreateSlot -> Maybe MultipleValuesSetting
$sel:description:CreateSlot' :: CreateSlot -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MultipleValuesSetting
multipleValuesSetting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ObfuscationSetting
obfuscationSetting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
slotTypeId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SubSlotSetting
subSlotSetting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
slotName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SlotValueElicitationSetting
valueElicitationSetting
      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
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
intentId

instance Prelude.NFData CreateSlot where
  rnf :: CreateSlot -> ()
rnf CreateSlot' {Maybe Text
Maybe MultipleValuesSetting
Maybe ObfuscationSetting
Maybe SubSlotSetting
Text
SlotValueElicitationSetting
intentId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
valueElicitationSetting :: SlotValueElicitationSetting
slotName :: Text
subSlotSetting :: Maybe SubSlotSetting
slotTypeId :: Maybe Text
obfuscationSetting :: Maybe ObfuscationSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
description :: Maybe Text
$sel:intentId:CreateSlot' :: CreateSlot -> Text
$sel:localeId:CreateSlot' :: CreateSlot -> Text
$sel:botVersion:CreateSlot' :: CreateSlot -> Text
$sel:botId:CreateSlot' :: CreateSlot -> Text
$sel:valueElicitationSetting:CreateSlot' :: CreateSlot -> SlotValueElicitationSetting
$sel:slotName:CreateSlot' :: CreateSlot -> Text
$sel:subSlotSetting:CreateSlot' :: CreateSlot -> Maybe SubSlotSetting
$sel:slotTypeId:CreateSlot' :: CreateSlot -> Maybe Text
$sel:obfuscationSetting:CreateSlot' :: CreateSlot -> Maybe ObfuscationSetting
$sel:multipleValuesSetting:CreateSlot' :: CreateSlot -> Maybe MultipleValuesSetting
$sel:description:CreateSlot' :: CreateSlot -> Maybe Text
..} =
    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 MultipleValuesSetting
multipleValuesSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ObfuscationSetting
obfuscationSetting
      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 SubSlotSetting
subSlotSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
slotName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf SlotValueElicitationSetting
valueElicitationSetting
      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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
intentId

instance Data.ToHeaders CreateSlot where
  toHeaders :: CreateSlot -> 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 CreateSlot where
  toJSON :: CreateSlot -> Value
toJSON CreateSlot' {Maybe Text
Maybe MultipleValuesSetting
Maybe ObfuscationSetting
Maybe SubSlotSetting
Text
SlotValueElicitationSetting
intentId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
valueElicitationSetting :: SlotValueElicitationSetting
slotName :: Text
subSlotSetting :: Maybe SubSlotSetting
slotTypeId :: Maybe Text
obfuscationSetting :: Maybe ObfuscationSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
description :: Maybe Text
$sel:intentId:CreateSlot' :: CreateSlot -> Text
$sel:localeId:CreateSlot' :: CreateSlot -> Text
$sel:botVersion:CreateSlot' :: CreateSlot -> Text
$sel:botId:CreateSlot' :: CreateSlot -> Text
$sel:valueElicitationSetting:CreateSlot' :: CreateSlot -> SlotValueElicitationSetting
$sel:slotName:CreateSlot' :: CreateSlot -> Text
$sel:subSlotSetting:CreateSlot' :: CreateSlot -> Maybe SubSlotSetting
$sel:slotTypeId:CreateSlot' :: CreateSlot -> Maybe Text
$sel:obfuscationSetting:CreateSlot' :: CreateSlot -> Maybe ObfuscationSetting
$sel:multipleValuesSetting:CreateSlot' :: CreateSlot -> Maybe MultipleValuesSetting
$sel:description:CreateSlot' :: CreateSlot -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"multipleValuesSetting" 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 MultipleValuesSetting
multipleValuesSetting,
            (Key
"obfuscationSetting" 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 ObfuscationSetting
obfuscationSetting,
            (Key
"slotTypeId" 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
slotTypeId,
            (Key
"subSlotSetting" 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 SubSlotSetting
subSlotSetting,
            forall a. a -> Maybe a
Prelude.Just (Key
"slotName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
slotName),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"valueElicitationSetting"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= SlotValueElicitationSetting
valueElicitationSetting
              )
          ]
      )

instance Data.ToPath CreateSlot where
  toPath :: CreateSlot -> ByteString
toPath CreateSlot' {Maybe Text
Maybe MultipleValuesSetting
Maybe ObfuscationSetting
Maybe SubSlotSetting
Text
SlotValueElicitationSetting
intentId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
valueElicitationSetting :: SlotValueElicitationSetting
slotName :: Text
subSlotSetting :: Maybe SubSlotSetting
slotTypeId :: Maybe Text
obfuscationSetting :: Maybe ObfuscationSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
description :: Maybe Text
$sel:intentId:CreateSlot' :: CreateSlot -> Text
$sel:localeId:CreateSlot' :: CreateSlot -> Text
$sel:botVersion:CreateSlot' :: CreateSlot -> Text
$sel:botId:CreateSlot' :: CreateSlot -> Text
$sel:valueElicitationSetting:CreateSlot' :: CreateSlot -> SlotValueElicitationSetting
$sel:slotName:CreateSlot' :: CreateSlot -> Text
$sel:subSlotSetting:CreateSlot' :: CreateSlot -> Maybe SubSlotSetting
$sel:slotTypeId:CreateSlot' :: CreateSlot -> Maybe Text
$sel:obfuscationSetting:CreateSlot' :: CreateSlot -> Maybe ObfuscationSetting
$sel:multipleValuesSetting:CreateSlot' :: CreateSlot -> Maybe MultipleValuesSetting
$sel:description:CreateSlot' :: CreateSlot -> Maybe Text
..} =
    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
"/intents/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
intentId,
        ByteString
"/slots/"
      ]

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

-- | /See:/ 'newCreateSlotResponse' smart constructor.
data CreateSlotResponse = CreateSlotResponse'
  { -- | The unique identifier of the bot associated with the slot.
    CreateSlotResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | The version of the bot associated with the slot.
    CreateSlotResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | The timestamp of the date and time that the slot was created.
    CreateSlotResponse -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
    -- | The description associated with the slot.
    CreateSlotResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the intent associated with the slot.
    CreateSlotResponse -> Maybe Text
intentId :: Prelude.Maybe Prelude.Text,
    -- | The language and local specified for the slot.
    CreateSlotResponse -> Maybe Text
localeId :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the slot returns multiple values in one response.
    CreateSlotResponse -> Maybe MultipleValuesSetting
multipleValuesSetting :: Prelude.Maybe MultipleValuesSetting,
    -- | Indicates whether the slot is configured to obfuscate values in Amazon
    -- CloudWatch logs.
    CreateSlotResponse -> Maybe ObfuscationSetting
obfuscationSetting :: Prelude.Maybe ObfuscationSetting,
    -- | The unique identifier associated with the slot. Use this to identify the
    -- slot when you update or delete it.
    CreateSlotResponse -> Maybe Text
slotId :: Prelude.Maybe Prelude.Text,
    -- | The name specified for the slot.
    CreateSlotResponse -> Maybe Text
slotName :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the slot type associated with this slot.
    CreateSlotResponse -> Maybe Text
slotTypeId :: Prelude.Maybe Prelude.Text,
    -- | Specifications for the constituent sub slots and the expression for the
    -- composite slot.
    CreateSlotResponse -> Maybe SubSlotSetting
subSlotSetting :: Prelude.Maybe SubSlotSetting,
    -- | The value elicitation settings specified for the slot.
    CreateSlotResponse -> Maybe SlotValueElicitationSetting
valueElicitationSetting :: Prelude.Maybe SlotValueElicitationSetting,
    -- | The response's http status code.
    CreateSlotResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateSlotResponse -> CreateSlotResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSlotResponse -> CreateSlotResponse -> Bool
$c/= :: CreateSlotResponse -> CreateSlotResponse -> Bool
== :: CreateSlotResponse -> CreateSlotResponse -> Bool
$c== :: CreateSlotResponse -> CreateSlotResponse -> Bool
Prelude.Eq, ReadPrec [CreateSlotResponse]
ReadPrec CreateSlotResponse
Int -> ReadS CreateSlotResponse
ReadS [CreateSlotResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSlotResponse]
$creadListPrec :: ReadPrec [CreateSlotResponse]
readPrec :: ReadPrec CreateSlotResponse
$creadPrec :: ReadPrec CreateSlotResponse
readList :: ReadS [CreateSlotResponse]
$creadList :: ReadS [CreateSlotResponse]
readsPrec :: Int -> ReadS CreateSlotResponse
$creadsPrec :: Int -> ReadS CreateSlotResponse
Prelude.Read, Int -> CreateSlotResponse -> ShowS
[CreateSlotResponse] -> ShowS
CreateSlotResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSlotResponse] -> ShowS
$cshowList :: [CreateSlotResponse] -> ShowS
show :: CreateSlotResponse -> String
$cshow :: CreateSlotResponse -> String
showsPrec :: Int -> CreateSlotResponse -> ShowS
$cshowsPrec :: Int -> CreateSlotResponse -> ShowS
Prelude.Show, forall x. Rep CreateSlotResponse x -> CreateSlotResponse
forall x. CreateSlotResponse -> Rep CreateSlotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSlotResponse x -> CreateSlotResponse
$cfrom :: forall x. CreateSlotResponse -> Rep CreateSlotResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateSlotResponse' 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', 'createSlotResponse_botId' - The unique identifier of the bot associated with the slot.
--
-- 'botVersion', 'createSlotResponse_botVersion' - The version of the bot associated with the slot.
--
-- 'creationDateTime', 'createSlotResponse_creationDateTime' - The timestamp of the date and time that the slot was created.
--
-- 'description', 'createSlotResponse_description' - The description associated with the slot.
--
-- 'intentId', 'createSlotResponse_intentId' - The unique identifier of the intent associated with the slot.
--
-- 'localeId', 'createSlotResponse_localeId' - The language and local specified for the slot.
--
-- 'multipleValuesSetting', 'createSlotResponse_multipleValuesSetting' - Indicates whether the slot returns multiple values in one response.
--
-- 'obfuscationSetting', 'createSlotResponse_obfuscationSetting' - Indicates whether the slot is configured to obfuscate values in Amazon
-- CloudWatch logs.
--
-- 'slotId', 'createSlotResponse_slotId' - The unique identifier associated with the slot. Use this to identify the
-- slot when you update or delete it.
--
-- 'slotName', 'createSlotResponse_slotName' - The name specified for the slot.
--
-- 'slotTypeId', 'createSlotResponse_slotTypeId' - The unique identifier of the slot type associated with this slot.
--
-- 'subSlotSetting', 'createSlotResponse_subSlotSetting' - Specifications for the constituent sub slots and the expression for the
-- composite slot.
--
-- 'valueElicitationSetting', 'createSlotResponse_valueElicitationSetting' - The value elicitation settings specified for the slot.
--
-- 'httpStatus', 'createSlotResponse_httpStatus' - The response's http status code.
newCreateSlotResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateSlotResponse
newCreateSlotResponse :: Int -> CreateSlotResponse
newCreateSlotResponse Int
pHttpStatus_ =
  CreateSlotResponse'
    { $sel:botId:CreateSlotResponse' :: Maybe Text
botId = forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:CreateSlotResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:CreateSlotResponse' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateSlotResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:intentId:CreateSlotResponse' :: Maybe Text
intentId = forall a. Maybe a
Prelude.Nothing,
      $sel:localeId:CreateSlotResponse' :: Maybe Text
localeId = forall a. Maybe a
Prelude.Nothing,
      $sel:multipleValuesSetting:CreateSlotResponse' :: Maybe MultipleValuesSetting
multipleValuesSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:obfuscationSetting:CreateSlotResponse' :: Maybe ObfuscationSetting
obfuscationSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:slotId:CreateSlotResponse' :: Maybe Text
slotId = forall a. Maybe a
Prelude.Nothing,
      $sel:slotName:CreateSlotResponse' :: Maybe Text
slotName = forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeId:CreateSlotResponse' :: Maybe Text
slotTypeId = forall a. Maybe a
Prelude.Nothing,
      $sel:subSlotSetting:CreateSlotResponse' :: Maybe SubSlotSetting
subSlotSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:valueElicitationSetting:CreateSlotResponse' :: Maybe SlotValueElicitationSetting
valueElicitationSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateSlotResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | The timestamp of the date and time that the slot was created.
createSlotResponse_creationDateTime :: Lens.Lens' CreateSlotResponse (Prelude.Maybe Prelude.UTCTime)
createSlotResponse_creationDateTime :: Lens' CreateSlotResponse (Maybe UTCTime)
createSlotResponse_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotResponse' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:CreateSlotResponse' :: CreateSlotResponse -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: CreateSlotResponse
s@CreateSlotResponse' {} Maybe POSIX
a -> CreateSlotResponse
s {$sel:creationDateTime:CreateSlotResponse' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: CreateSlotResponse) 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 associated with the slot.
createSlotResponse_description :: Lens.Lens' CreateSlotResponse (Prelude.Maybe Prelude.Text)
createSlotResponse_description :: Lens' CreateSlotResponse (Maybe Text)
createSlotResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotResponse' {Maybe Text
description :: Maybe Text
$sel:description:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateSlotResponse
s@CreateSlotResponse' {} Maybe Text
a -> CreateSlotResponse
s {$sel:description:CreateSlotResponse' :: Maybe Text
description = Maybe Text
a} :: CreateSlotResponse)

-- | The unique identifier of the intent associated with the slot.
createSlotResponse_intentId :: Lens.Lens' CreateSlotResponse (Prelude.Maybe Prelude.Text)
createSlotResponse_intentId :: Lens' CreateSlotResponse (Maybe Text)
createSlotResponse_intentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotResponse' {Maybe Text
intentId :: Maybe Text
$sel:intentId:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
intentId} -> Maybe Text
intentId) (\s :: CreateSlotResponse
s@CreateSlotResponse' {} Maybe Text
a -> CreateSlotResponse
s {$sel:intentId:CreateSlotResponse' :: Maybe Text
intentId = Maybe Text
a} :: CreateSlotResponse)

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

-- | Indicates whether the slot returns multiple values in one response.
createSlotResponse_multipleValuesSetting :: Lens.Lens' CreateSlotResponse (Prelude.Maybe MultipleValuesSetting)
createSlotResponse_multipleValuesSetting :: Lens' CreateSlotResponse (Maybe MultipleValuesSetting)
createSlotResponse_multipleValuesSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotResponse' {Maybe MultipleValuesSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
$sel:multipleValuesSetting:CreateSlotResponse' :: CreateSlotResponse -> Maybe MultipleValuesSetting
multipleValuesSetting} -> Maybe MultipleValuesSetting
multipleValuesSetting) (\s :: CreateSlotResponse
s@CreateSlotResponse' {} Maybe MultipleValuesSetting
a -> CreateSlotResponse
s {$sel:multipleValuesSetting:CreateSlotResponse' :: Maybe MultipleValuesSetting
multipleValuesSetting = Maybe MultipleValuesSetting
a} :: CreateSlotResponse)

-- | Indicates whether the slot is configured to obfuscate values in Amazon
-- CloudWatch logs.
createSlotResponse_obfuscationSetting :: Lens.Lens' CreateSlotResponse (Prelude.Maybe ObfuscationSetting)
createSlotResponse_obfuscationSetting :: Lens' CreateSlotResponse (Maybe ObfuscationSetting)
createSlotResponse_obfuscationSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotResponse' {Maybe ObfuscationSetting
obfuscationSetting :: Maybe ObfuscationSetting
$sel:obfuscationSetting:CreateSlotResponse' :: CreateSlotResponse -> Maybe ObfuscationSetting
obfuscationSetting} -> Maybe ObfuscationSetting
obfuscationSetting) (\s :: CreateSlotResponse
s@CreateSlotResponse' {} Maybe ObfuscationSetting
a -> CreateSlotResponse
s {$sel:obfuscationSetting:CreateSlotResponse' :: Maybe ObfuscationSetting
obfuscationSetting = Maybe ObfuscationSetting
a} :: CreateSlotResponse)

-- | The unique identifier associated with the slot. Use this to identify the
-- slot when you update or delete it.
createSlotResponse_slotId :: Lens.Lens' CreateSlotResponse (Prelude.Maybe Prelude.Text)
createSlotResponse_slotId :: Lens' CreateSlotResponse (Maybe Text)
createSlotResponse_slotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotResponse' {Maybe Text
slotId :: Maybe Text
$sel:slotId:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
slotId} -> Maybe Text
slotId) (\s :: CreateSlotResponse
s@CreateSlotResponse' {} Maybe Text
a -> CreateSlotResponse
s {$sel:slotId:CreateSlotResponse' :: Maybe Text
slotId = Maybe Text
a} :: CreateSlotResponse)

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

-- | The unique identifier of the slot type associated with this slot.
createSlotResponse_slotTypeId :: Lens.Lens' CreateSlotResponse (Prelude.Maybe Prelude.Text)
createSlotResponse_slotTypeId :: Lens' CreateSlotResponse (Maybe Text)
createSlotResponse_slotTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotResponse' {Maybe Text
slotTypeId :: Maybe Text
$sel:slotTypeId:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
slotTypeId} -> Maybe Text
slotTypeId) (\s :: CreateSlotResponse
s@CreateSlotResponse' {} Maybe Text
a -> CreateSlotResponse
s {$sel:slotTypeId:CreateSlotResponse' :: Maybe Text
slotTypeId = Maybe Text
a} :: CreateSlotResponse)

-- | Specifications for the constituent sub slots and the expression for the
-- composite slot.
createSlotResponse_subSlotSetting :: Lens.Lens' CreateSlotResponse (Prelude.Maybe SubSlotSetting)
createSlotResponse_subSlotSetting :: Lens' CreateSlotResponse (Maybe SubSlotSetting)
createSlotResponse_subSlotSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotResponse' {Maybe SubSlotSetting
subSlotSetting :: Maybe SubSlotSetting
$sel:subSlotSetting:CreateSlotResponse' :: CreateSlotResponse -> Maybe SubSlotSetting
subSlotSetting} -> Maybe SubSlotSetting
subSlotSetting) (\s :: CreateSlotResponse
s@CreateSlotResponse' {} Maybe SubSlotSetting
a -> CreateSlotResponse
s {$sel:subSlotSetting:CreateSlotResponse' :: Maybe SubSlotSetting
subSlotSetting = Maybe SubSlotSetting
a} :: CreateSlotResponse)

-- | The value elicitation settings specified for the slot.
createSlotResponse_valueElicitationSetting :: Lens.Lens' CreateSlotResponse (Prelude.Maybe SlotValueElicitationSetting)
createSlotResponse_valueElicitationSetting :: Lens' CreateSlotResponse (Maybe SlotValueElicitationSetting)
createSlotResponse_valueElicitationSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotResponse' {Maybe SlotValueElicitationSetting
valueElicitationSetting :: Maybe SlotValueElicitationSetting
$sel:valueElicitationSetting:CreateSlotResponse' :: CreateSlotResponse -> Maybe SlotValueElicitationSetting
valueElicitationSetting} -> Maybe SlotValueElicitationSetting
valueElicitationSetting) (\s :: CreateSlotResponse
s@CreateSlotResponse' {} Maybe SlotValueElicitationSetting
a -> CreateSlotResponse
s {$sel:valueElicitationSetting:CreateSlotResponse' :: Maybe SlotValueElicitationSetting
valueElicitationSetting = Maybe SlotValueElicitationSetting
a} :: CreateSlotResponse)

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

instance Prelude.NFData CreateSlotResponse where
  rnf :: CreateSlotResponse -> ()
rnf CreateSlotResponse' {Int
Maybe Text
Maybe POSIX
Maybe MultipleValuesSetting
Maybe ObfuscationSetting
Maybe SubSlotSetting
Maybe SlotValueElicitationSetting
httpStatus :: Int
valueElicitationSetting :: Maybe SlotValueElicitationSetting
subSlotSetting :: Maybe SubSlotSetting
slotTypeId :: Maybe Text
slotName :: Maybe Text
slotId :: Maybe Text
obfuscationSetting :: Maybe ObfuscationSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
localeId :: Maybe Text
intentId :: Maybe Text
description :: Maybe Text
creationDateTime :: Maybe POSIX
botVersion :: Maybe Text
botId :: Maybe Text
$sel:httpStatus:CreateSlotResponse' :: CreateSlotResponse -> Int
$sel:valueElicitationSetting:CreateSlotResponse' :: CreateSlotResponse -> Maybe SlotValueElicitationSetting
$sel:subSlotSetting:CreateSlotResponse' :: CreateSlotResponse -> Maybe SubSlotSetting
$sel:slotTypeId:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
$sel:slotName:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
$sel:slotId:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
$sel:obfuscationSetting:CreateSlotResponse' :: CreateSlotResponse -> Maybe ObfuscationSetting
$sel:multipleValuesSetting:CreateSlotResponse' :: CreateSlotResponse -> Maybe MultipleValuesSetting
$sel:localeId:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
$sel:intentId:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
$sel:description:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
$sel:creationDateTime:CreateSlotResponse' :: CreateSlotResponse -> Maybe POSIX
$sel:botVersion:CreateSlotResponse' :: CreateSlotResponse -> Maybe Text
$sel:botId:CreateSlotResponse' :: CreateSlotResponse -> 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 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 Text
intentId
      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 MultipleValuesSetting
multipleValuesSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ObfuscationSetting
obfuscationSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
slotId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
slotName
      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 SubSlotSetting
subSlotSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SlotValueElicitationSetting
valueElicitationSetting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus