{-# 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.UpdateSlot
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the settings for a slot.
module Amazonka.LexV2Models.UpdateSlot
  ( -- * Creating a Request
    UpdateSlot (..),
    newUpdateSlot,

    -- * Request Lenses
    updateSlot_description,
    updateSlot_multipleValuesSetting,
    updateSlot_obfuscationSetting,
    updateSlot_slotTypeId,
    updateSlot_subSlotSetting,
    updateSlot_slotId,
    updateSlot_slotName,
    updateSlot_valueElicitationSetting,
    updateSlot_botId,
    updateSlot_botVersion,
    updateSlot_localeId,
    updateSlot_intentId,

    -- * Destructuring the Response
    UpdateSlotResponse (..),
    newUpdateSlotResponse,

    -- * Response Lenses
    updateSlotResponse_botId,
    updateSlotResponse_botVersion,
    updateSlotResponse_creationDateTime,
    updateSlotResponse_description,
    updateSlotResponse_intentId,
    updateSlotResponse_lastUpdatedDateTime,
    updateSlotResponse_localeId,
    updateSlotResponse_multipleValuesSetting,
    updateSlotResponse_obfuscationSetting,
    updateSlotResponse_slotId,
    updateSlotResponse_slotName,
    updateSlotResponse_slotTypeId,
    updateSlotResponse_subSlotSetting,
    updateSlotResponse_valueElicitationSetting,
    updateSlotResponse_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:/ 'newUpdateSlot' smart constructor.
data UpdateSlot = UpdateSlot'
  { -- | The new description for the slot.
    UpdateSlot -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Determines whether the slot accepts multiple values in one response.
    -- Multiple 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@.
    UpdateSlot -> Maybe MultipleValuesSetting
multipleValuesSetting :: Prelude.Maybe MultipleValuesSetting,
    -- | New settings that determine how slot values are formatted in Amazon
    -- CloudWatch logs.
    UpdateSlot -> Maybe ObfuscationSetting
obfuscationSetting :: Prelude.Maybe ObfuscationSetting,
    -- | The unique identifier of the new slot type to associate with this slot.
    UpdateSlot -> Maybe Text
slotTypeId :: Prelude.Maybe Prelude.Text,
    -- | Specifications for the constituent sub slots and the expression for the
    -- composite slot.
    UpdateSlot -> Maybe SubSlotSetting
subSlotSetting :: Prelude.Maybe SubSlotSetting,
    -- | The unique identifier for the slot to update.
    UpdateSlot -> Text
slotId :: Prelude.Text,
    -- | The new name for the slot.
    UpdateSlot -> Text
slotName :: Prelude.Text,
    -- | A new set of prompts that Amazon Lex sends to the user to elicit a
    -- response the provides a value for the slot.
    UpdateSlot -> SlotValueElicitationSetting
valueElicitationSetting :: SlotValueElicitationSetting,
    -- | The unique identifier of the bot that contains the slot.
    UpdateSlot -> Text
botId :: Prelude.Text,
    -- | The version of the bot that contains the slot. Must always be @DRAFT@.
    UpdateSlot -> Text
botVersion :: Prelude.Text,
    -- | The identifier of the language and locale that contains the slot. The
    -- string must match one of the supported locales. For more information,
    -- see
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
    UpdateSlot -> Text
localeId :: Prelude.Text,
    -- | The identifier of the intent that contains the slot.
    UpdateSlot -> Text
intentId :: Prelude.Text
  }
  deriving (UpdateSlot -> UpdateSlot -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSlot -> UpdateSlot -> Bool
$c/= :: UpdateSlot -> UpdateSlot -> Bool
== :: UpdateSlot -> UpdateSlot -> Bool
$c== :: UpdateSlot -> UpdateSlot -> Bool
Prelude.Eq, ReadPrec [UpdateSlot]
ReadPrec UpdateSlot
Int -> ReadS UpdateSlot
ReadS [UpdateSlot]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSlot]
$creadListPrec :: ReadPrec [UpdateSlot]
readPrec :: ReadPrec UpdateSlot
$creadPrec :: ReadPrec UpdateSlot
readList :: ReadS [UpdateSlot]
$creadList :: ReadS [UpdateSlot]
readsPrec :: Int -> ReadS UpdateSlot
$creadsPrec :: Int -> ReadS UpdateSlot
Prelude.Read, Int -> UpdateSlot -> ShowS
[UpdateSlot] -> ShowS
UpdateSlot -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSlot] -> ShowS
$cshowList :: [UpdateSlot] -> ShowS
show :: UpdateSlot -> String
$cshow :: UpdateSlot -> String
showsPrec :: Int -> UpdateSlot -> ShowS
$cshowsPrec :: Int -> UpdateSlot -> ShowS
Prelude.Show, forall x. Rep UpdateSlot x -> UpdateSlot
forall x. UpdateSlot -> Rep UpdateSlot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSlot x -> UpdateSlot
$cfrom :: forall x. UpdateSlot -> Rep UpdateSlot x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSlot' 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', 'updateSlot_description' - The new description for the slot.
--
-- 'multipleValuesSetting', 'updateSlot_multipleValuesSetting' - Determines whether the slot accepts multiple values in one response.
-- Multiple 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', 'updateSlot_obfuscationSetting' - New settings that determine how slot values are formatted in Amazon
-- CloudWatch logs.
--
-- 'slotTypeId', 'updateSlot_slotTypeId' - The unique identifier of the new slot type to associate with this slot.
--
-- 'subSlotSetting', 'updateSlot_subSlotSetting' - Specifications for the constituent sub slots and the expression for the
-- composite slot.
--
-- 'slotId', 'updateSlot_slotId' - The unique identifier for the slot to update.
--
-- 'slotName', 'updateSlot_slotName' - The new name for the slot.
--
-- 'valueElicitationSetting', 'updateSlot_valueElicitationSetting' - A new set of prompts that Amazon Lex sends to the user to elicit a
-- response the provides a value for the slot.
--
-- 'botId', 'updateSlot_botId' - The unique identifier of the bot that contains the slot.
--
-- 'botVersion', 'updateSlot_botVersion' - The version of the bot that contains the slot. Must always be @DRAFT@.
--
-- 'localeId', 'updateSlot_localeId' - The identifier of the language and locale that contains the slot. The
-- string must match one of the supported locales. For more information,
-- see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
--
-- 'intentId', 'updateSlot_intentId' - The identifier of the intent that contains the slot.
newUpdateSlot ::
  -- | 'slotId'
  Prelude.Text ->
  -- | 'slotName'
  Prelude.Text ->
  -- | 'valueElicitationSetting'
  SlotValueElicitationSetting ->
  -- | 'botId'
  Prelude.Text ->
  -- | 'botVersion'
  Prelude.Text ->
  -- | 'localeId'
  Prelude.Text ->
  -- | 'intentId'
  Prelude.Text ->
  UpdateSlot
newUpdateSlot :: Text
-> Text
-> SlotValueElicitationSetting
-> Text
-> Text
-> Text
-> Text
-> UpdateSlot
newUpdateSlot
  Text
pSlotId_
  Text
pSlotName_
  SlotValueElicitationSetting
pValueElicitationSetting_
  Text
pBotId_
  Text
pBotVersion_
  Text
pLocaleId_
  Text
pIntentId_ =
    UpdateSlot'
      { $sel:description:UpdateSlot' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:multipleValuesSetting:UpdateSlot' :: Maybe MultipleValuesSetting
multipleValuesSetting = forall a. Maybe a
Prelude.Nothing,
        $sel:obfuscationSetting:UpdateSlot' :: Maybe ObfuscationSetting
obfuscationSetting = forall a. Maybe a
Prelude.Nothing,
        $sel:slotTypeId:UpdateSlot' :: Maybe Text
slotTypeId = forall a. Maybe a
Prelude.Nothing,
        $sel:subSlotSetting:UpdateSlot' :: Maybe SubSlotSetting
subSlotSetting = forall a. Maybe a
Prelude.Nothing,
        $sel:slotId:UpdateSlot' :: Text
slotId = Text
pSlotId_,
        $sel:slotName:UpdateSlot' :: Text
slotName = Text
pSlotName_,
        $sel:valueElicitationSetting:UpdateSlot' :: SlotValueElicitationSetting
valueElicitationSetting = SlotValueElicitationSetting
pValueElicitationSetting_,
        $sel:botId:UpdateSlot' :: Text
botId = Text
pBotId_,
        $sel:botVersion:UpdateSlot' :: Text
botVersion = Text
pBotVersion_,
        $sel:localeId:UpdateSlot' :: Text
localeId = Text
pLocaleId_,
        $sel:intentId:UpdateSlot' :: Text
intentId = Text
pIntentId_
      }

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

-- | Determines whether the slot accepts multiple values in one response.
-- Multiple 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@.
updateSlot_multipleValuesSetting :: Lens.Lens' UpdateSlot (Prelude.Maybe MultipleValuesSetting)
updateSlot_multipleValuesSetting :: Lens' UpdateSlot (Maybe MultipleValuesSetting)
updateSlot_multipleValuesSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlot' {Maybe MultipleValuesSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
$sel:multipleValuesSetting:UpdateSlot' :: UpdateSlot -> Maybe MultipleValuesSetting
multipleValuesSetting} -> Maybe MultipleValuesSetting
multipleValuesSetting) (\s :: UpdateSlot
s@UpdateSlot' {} Maybe MultipleValuesSetting
a -> UpdateSlot
s {$sel:multipleValuesSetting:UpdateSlot' :: Maybe MultipleValuesSetting
multipleValuesSetting = Maybe MultipleValuesSetting
a} :: UpdateSlot)

-- | New settings that determine how slot values are formatted in Amazon
-- CloudWatch logs.
updateSlot_obfuscationSetting :: Lens.Lens' UpdateSlot (Prelude.Maybe ObfuscationSetting)
updateSlot_obfuscationSetting :: Lens' UpdateSlot (Maybe ObfuscationSetting)
updateSlot_obfuscationSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlot' {Maybe ObfuscationSetting
obfuscationSetting :: Maybe ObfuscationSetting
$sel:obfuscationSetting:UpdateSlot' :: UpdateSlot -> Maybe ObfuscationSetting
obfuscationSetting} -> Maybe ObfuscationSetting
obfuscationSetting) (\s :: UpdateSlot
s@UpdateSlot' {} Maybe ObfuscationSetting
a -> UpdateSlot
s {$sel:obfuscationSetting:UpdateSlot' :: Maybe ObfuscationSetting
obfuscationSetting = Maybe ObfuscationSetting
a} :: UpdateSlot)

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

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

-- | The unique identifier for the slot to update.
updateSlot_slotId :: Lens.Lens' UpdateSlot Prelude.Text
updateSlot_slotId :: Lens' UpdateSlot Text
updateSlot_slotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlot' {Text
slotId :: Text
$sel:slotId:UpdateSlot' :: UpdateSlot -> Text
slotId} -> Text
slotId) (\s :: UpdateSlot
s@UpdateSlot' {} Text
a -> UpdateSlot
s {$sel:slotId:UpdateSlot' :: Text
slotId = Text
a} :: UpdateSlot)

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

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

-- | The unique identifier of the bot that contains the slot.
updateSlot_botId :: Lens.Lens' UpdateSlot Prelude.Text
updateSlot_botId :: Lens' UpdateSlot Text
updateSlot_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlot' {Text
botId :: Text
$sel:botId:UpdateSlot' :: UpdateSlot -> Text
botId} -> Text
botId) (\s :: UpdateSlot
s@UpdateSlot' {} Text
a -> UpdateSlot
s {$sel:botId:UpdateSlot' :: Text
botId = Text
a} :: UpdateSlot)

-- | The version of the bot that contains the slot. Must always be @DRAFT@.
updateSlot_botVersion :: Lens.Lens' UpdateSlot Prelude.Text
updateSlot_botVersion :: Lens' UpdateSlot Text
updateSlot_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlot' {Text
botVersion :: Text
$sel:botVersion:UpdateSlot' :: UpdateSlot -> Text
botVersion} -> Text
botVersion) (\s :: UpdateSlot
s@UpdateSlot' {} Text
a -> UpdateSlot
s {$sel:botVersion:UpdateSlot' :: Text
botVersion = Text
a} :: UpdateSlot)

-- | The identifier of the language and locale that contains the slot. The
-- string must match one of the supported locales. For more information,
-- see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html Supported languages>.
updateSlot_localeId :: Lens.Lens' UpdateSlot Prelude.Text
updateSlot_localeId :: Lens' UpdateSlot Text
updateSlot_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlot' {Text
localeId :: Text
$sel:localeId:UpdateSlot' :: UpdateSlot -> Text
localeId} -> Text
localeId) (\s :: UpdateSlot
s@UpdateSlot' {} Text
a -> UpdateSlot
s {$sel:localeId:UpdateSlot' :: Text
localeId = Text
a} :: UpdateSlot)

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

instance Core.AWSRequest UpdateSlot where
  type AWSResponse UpdateSlot = UpdateSlotResponse
  request :: (Service -> Service) -> UpdateSlot -> Request UpdateSlot
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 UpdateSlot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateSlot)))
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 POSIX
-> Maybe Text
-> Maybe MultipleValuesSetting
-> Maybe ObfuscationSetting
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SubSlotSetting
-> Maybe SlotValueElicitationSetting
-> Int
-> UpdateSlotResponse
UpdateSlotResponse'
            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
"lastUpdatedDateTime")
            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 UpdateSlot where
  hashWithSalt :: Int -> UpdateSlot -> Int
hashWithSalt Int
_salt UpdateSlot' {Maybe Text
Maybe MultipleValuesSetting
Maybe ObfuscationSetting
Maybe SubSlotSetting
Text
SlotValueElicitationSetting
intentId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
valueElicitationSetting :: SlotValueElicitationSetting
slotName :: Text
slotId :: Text
subSlotSetting :: Maybe SubSlotSetting
slotTypeId :: Maybe Text
obfuscationSetting :: Maybe ObfuscationSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
description :: Maybe Text
$sel:intentId:UpdateSlot' :: UpdateSlot -> Text
$sel:localeId:UpdateSlot' :: UpdateSlot -> Text
$sel:botVersion:UpdateSlot' :: UpdateSlot -> Text
$sel:botId:UpdateSlot' :: UpdateSlot -> Text
$sel:valueElicitationSetting:UpdateSlot' :: UpdateSlot -> SlotValueElicitationSetting
$sel:slotName:UpdateSlot' :: UpdateSlot -> Text
$sel:slotId:UpdateSlot' :: UpdateSlot -> Text
$sel:subSlotSetting:UpdateSlot' :: UpdateSlot -> Maybe SubSlotSetting
$sel:slotTypeId:UpdateSlot' :: UpdateSlot -> Maybe Text
$sel:obfuscationSetting:UpdateSlot' :: UpdateSlot -> Maybe ObfuscationSetting
$sel:multipleValuesSetting:UpdateSlot' :: UpdateSlot -> Maybe MultipleValuesSetting
$sel:description:UpdateSlot' :: UpdateSlot -> 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
slotId
      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 UpdateSlot where
  rnf :: UpdateSlot -> ()
rnf UpdateSlot' {Maybe Text
Maybe MultipleValuesSetting
Maybe ObfuscationSetting
Maybe SubSlotSetting
Text
SlotValueElicitationSetting
intentId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
valueElicitationSetting :: SlotValueElicitationSetting
slotName :: Text
slotId :: Text
subSlotSetting :: Maybe SubSlotSetting
slotTypeId :: Maybe Text
obfuscationSetting :: Maybe ObfuscationSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
description :: Maybe Text
$sel:intentId:UpdateSlot' :: UpdateSlot -> Text
$sel:localeId:UpdateSlot' :: UpdateSlot -> Text
$sel:botVersion:UpdateSlot' :: UpdateSlot -> Text
$sel:botId:UpdateSlot' :: UpdateSlot -> Text
$sel:valueElicitationSetting:UpdateSlot' :: UpdateSlot -> SlotValueElicitationSetting
$sel:slotName:UpdateSlot' :: UpdateSlot -> Text
$sel:slotId:UpdateSlot' :: UpdateSlot -> Text
$sel:subSlotSetting:UpdateSlot' :: UpdateSlot -> Maybe SubSlotSetting
$sel:slotTypeId:UpdateSlot' :: UpdateSlot -> Maybe Text
$sel:obfuscationSetting:UpdateSlot' :: UpdateSlot -> Maybe ObfuscationSetting
$sel:multipleValuesSetting:UpdateSlot' :: UpdateSlot -> Maybe MultipleValuesSetting
$sel:description:UpdateSlot' :: UpdateSlot -> 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
slotId
      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 UpdateSlot where
  toHeaders :: UpdateSlot -> 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 UpdateSlot where
  toJSON :: UpdateSlot -> Value
toJSON UpdateSlot' {Maybe Text
Maybe MultipleValuesSetting
Maybe ObfuscationSetting
Maybe SubSlotSetting
Text
SlotValueElicitationSetting
intentId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
valueElicitationSetting :: SlotValueElicitationSetting
slotName :: Text
slotId :: Text
subSlotSetting :: Maybe SubSlotSetting
slotTypeId :: Maybe Text
obfuscationSetting :: Maybe ObfuscationSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
description :: Maybe Text
$sel:intentId:UpdateSlot' :: UpdateSlot -> Text
$sel:localeId:UpdateSlot' :: UpdateSlot -> Text
$sel:botVersion:UpdateSlot' :: UpdateSlot -> Text
$sel:botId:UpdateSlot' :: UpdateSlot -> Text
$sel:valueElicitationSetting:UpdateSlot' :: UpdateSlot -> SlotValueElicitationSetting
$sel:slotName:UpdateSlot' :: UpdateSlot -> Text
$sel:slotId:UpdateSlot' :: UpdateSlot -> Text
$sel:subSlotSetting:UpdateSlot' :: UpdateSlot -> Maybe SubSlotSetting
$sel:slotTypeId:UpdateSlot' :: UpdateSlot -> Maybe Text
$sel:obfuscationSetting:UpdateSlot' :: UpdateSlot -> Maybe ObfuscationSetting
$sel:multipleValuesSetting:UpdateSlot' :: UpdateSlot -> Maybe MultipleValuesSetting
$sel:description:UpdateSlot' :: UpdateSlot -> 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 UpdateSlot where
  toPath :: UpdateSlot -> ByteString
toPath UpdateSlot' {Maybe Text
Maybe MultipleValuesSetting
Maybe ObfuscationSetting
Maybe SubSlotSetting
Text
SlotValueElicitationSetting
intentId :: Text
localeId :: Text
botVersion :: Text
botId :: Text
valueElicitationSetting :: SlotValueElicitationSetting
slotName :: Text
slotId :: Text
subSlotSetting :: Maybe SubSlotSetting
slotTypeId :: Maybe Text
obfuscationSetting :: Maybe ObfuscationSetting
multipleValuesSetting :: Maybe MultipleValuesSetting
description :: Maybe Text
$sel:intentId:UpdateSlot' :: UpdateSlot -> Text
$sel:localeId:UpdateSlot' :: UpdateSlot -> Text
$sel:botVersion:UpdateSlot' :: UpdateSlot -> Text
$sel:botId:UpdateSlot' :: UpdateSlot -> Text
$sel:valueElicitationSetting:UpdateSlot' :: UpdateSlot -> SlotValueElicitationSetting
$sel:slotName:UpdateSlot' :: UpdateSlot -> Text
$sel:slotId:UpdateSlot' :: UpdateSlot -> Text
$sel:subSlotSetting:UpdateSlot' :: UpdateSlot -> Maybe SubSlotSetting
$sel:slotTypeId:UpdateSlot' :: UpdateSlot -> Maybe Text
$sel:obfuscationSetting:UpdateSlot' :: UpdateSlot -> Maybe ObfuscationSetting
$sel:multipleValuesSetting:UpdateSlot' :: UpdateSlot -> Maybe MultipleValuesSetting
$sel:description:UpdateSlot' :: UpdateSlot -> 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/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
slotId,
        ByteString
"/"
      ]

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

-- | /See:/ 'newUpdateSlotResponse' smart constructor.
data UpdateSlotResponse = UpdateSlotResponse'
  { -- | The identifier of the bot that contains the slot.
    UpdateSlotResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the slot version that contains the slot. Will always
    -- be @DRAFT@.
    UpdateSlotResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
    -- | The timestamp of the date and time that the slot was created.
    UpdateSlotResponse -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
    -- | The updated description of the bot.
    UpdateSlotResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The intent that contains the slot.
    UpdateSlotResponse -> Maybe Text
intentId :: Prelude.Maybe Prelude.Text,
    -- | The timestamp of the date and time that the slot was last updated.
    UpdateSlotResponse -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
    -- | The locale that contains the slot.
    UpdateSlotResponse -> Maybe Text
localeId :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the slot accepts multiple values in one response.
    UpdateSlotResponse -> Maybe MultipleValuesSetting
multipleValuesSetting :: Prelude.Maybe MultipleValuesSetting,
    -- | The updated setting that determines whether the slot value is obfuscated
    -- in the Amazon CloudWatch logs.
    UpdateSlotResponse -> Maybe ObfuscationSetting
obfuscationSetting :: Prelude.Maybe ObfuscationSetting,
    -- | The unique identifier of the slot that was updated.
    UpdateSlotResponse -> Maybe Text
slotId :: Prelude.Maybe Prelude.Text,
    -- | The updated name of the slot.
    UpdateSlotResponse -> Maybe Text
slotName :: Prelude.Maybe Prelude.Text,
    -- | The updated identifier of the slot type that provides values for the
    -- slot.
    UpdateSlotResponse -> Maybe Text
slotTypeId :: Prelude.Maybe Prelude.Text,
    -- | Specifications for the constituent sub slots and the expression for the
    -- composite slot.
    UpdateSlotResponse -> Maybe SubSlotSetting
subSlotSetting :: Prelude.Maybe SubSlotSetting,
    -- | The updated prompts that Amazon Lex sends to the user to elicit a
    -- response that provides a value for the slot.
    UpdateSlotResponse -> Maybe SlotValueElicitationSetting
valueElicitationSetting :: Prelude.Maybe SlotValueElicitationSetting,
    -- | The response's http status code.
    UpdateSlotResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateSlotResponse -> UpdateSlotResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSlotResponse -> UpdateSlotResponse -> Bool
$c/= :: UpdateSlotResponse -> UpdateSlotResponse -> Bool
== :: UpdateSlotResponse -> UpdateSlotResponse -> Bool
$c== :: UpdateSlotResponse -> UpdateSlotResponse -> Bool
Prelude.Eq, ReadPrec [UpdateSlotResponse]
ReadPrec UpdateSlotResponse
Int -> ReadS UpdateSlotResponse
ReadS [UpdateSlotResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSlotResponse]
$creadListPrec :: ReadPrec [UpdateSlotResponse]
readPrec :: ReadPrec UpdateSlotResponse
$creadPrec :: ReadPrec UpdateSlotResponse
readList :: ReadS [UpdateSlotResponse]
$creadList :: ReadS [UpdateSlotResponse]
readsPrec :: Int -> ReadS UpdateSlotResponse
$creadsPrec :: Int -> ReadS UpdateSlotResponse
Prelude.Read, Int -> UpdateSlotResponse -> ShowS
[UpdateSlotResponse] -> ShowS
UpdateSlotResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSlotResponse] -> ShowS
$cshowList :: [UpdateSlotResponse] -> ShowS
show :: UpdateSlotResponse -> String
$cshow :: UpdateSlotResponse -> String
showsPrec :: Int -> UpdateSlotResponse -> ShowS
$cshowsPrec :: Int -> UpdateSlotResponse -> ShowS
Prelude.Show, forall x. Rep UpdateSlotResponse x -> UpdateSlotResponse
forall x. UpdateSlotResponse -> Rep UpdateSlotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSlotResponse x -> UpdateSlotResponse
$cfrom :: forall x. UpdateSlotResponse -> Rep UpdateSlotResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSlotResponse' 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', 'updateSlotResponse_botId' - The identifier of the bot that contains the slot.
--
-- 'botVersion', 'updateSlotResponse_botVersion' - The identifier of the slot version that contains the slot. Will always
-- be @DRAFT@.
--
-- 'creationDateTime', 'updateSlotResponse_creationDateTime' - The timestamp of the date and time that the slot was created.
--
-- 'description', 'updateSlotResponse_description' - The updated description of the bot.
--
-- 'intentId', 'updateSlotResponse_intentId' - The intent that contains the slot.
--
-- 'lastUpdatedDateTime', 'updateSlotResponse_lastUpdatedDateTime' - The timestamp of the date and time that the slot was last updated.
--
-- 'localeId', 'updateSlotResponse_localeId' - The locale that contains the slot.
--
-- 'multipleValuesSetting', 'updateSlotResponse_multipleValuesSetting' - Indicates whether the slot accepts multiple values in one response.
--
-- 'obfuscationSetting', 'updateSlotResponse_obfuscationSetting' - The updated setting that determines whether the slot value is obfuscated
-- in the Amazon CloudWatch logs.
--
-- 'slotId', 'updateSlotResponse_slotId' - The unique identifier of the slot that was updated.
--
-- 'slotName', 'updateSlotResponse_slotName' - The updated name of the slot.
--
-- 'slotTypeId', 'updateSlotResponse_slotTypeId' - The updated identifier of the slot type that provides values for the
-- slot.
--
-- 'subSlotSetting', 'updateSlotResponse_subSlotSetting' - Specifications for the constituent sub slots and the expression for the
-- composite slot.
--
-- 'valueElicitationSetting', 'updateSlotResponse_valueElicitationSetting' - The updated prompts that Amazon Lex sends to the user to elicit a
-- response that provides a value for the slot.
--
-- 'httpStatus', 'updateSlotResponse_httpStatus' - The response's http status code.
newUpdateSlotResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateSlotResponse
newUpdateSlotResponse :: Int -> UpdateSlotResponse
newUpdateSlotResponse Int
pHttpStatus_ =
  UpdateSlotResponse'
    { $sel:botId:UpdateSlotResponse' :: Maybe Text
botId = forall a. Maybe a
Prelude.Nothing,
      $sel:botVersion:UpdateSlotResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:UpdateSlotResponse' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateSlotResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:intentId:UpdateSlotResponse' :: Maybe Text
intentId = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDateTime:UpdateSlotResponse' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:localeId:UpdateSlotResponse' :: Maybe Text
localeId = forall a. Maybe a
Prelude.Nothing,
      $sel:multipleValuesSetting:UpdateSlotResponse' :: Maybe MultipleValuesSetting
multipleValuesSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:obfuscationSetting:UpdateSlotResponse' :: Maybe ObfuscationSetting
obfuscationSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:slotId:UpdateSlotResponse' :: Maybe Text
slotId = forall a. Maybe a
Prelude.Nothing,
      $sel:slotName:UpdateSlotResponse' :: Maybe Text
slotName = forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeId:UpdateSlotResponse' :: Maybe Text
slotTypeId = forall a. Maybe a
Prelude.Nothing,
      $sel:subSlotSetting:UpdateSlotResponse' :: Maybe SubSlotSetting
subSlotSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:valueElicitationSetting:UpdateSlotResponse' :: Maybe SlotValueElicitationSetting
valueElicitationSetting = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateSlotResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier of the bot that contains the slot.
updateSlotResponse_botId :: Lens.Lens' UpdateSlotResponse (Prelude.Maybe Prelude.Text)
updateSlotResponse_botId :: Lens' UpdateSlotResponse (Maybe Text)
updateSlotResponse_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlotResponse' {Maybe Text
botId :: Maybe Text
$sel:botId:UpdateSlotResponse' :: UpdateSlotResponse -> Maybe Text
botId} -> Maybe Text
botId) (\s :: UpdateSlotResponse
s@UpdateSlotResponse' {} Maybe Text
a -> UpdateSlotResponse
s {$sel:botId:UpdateSlotResponse' :: Maybe Text
botId = Maybe Text
a} :: UpdateSlotResponse)

-- | The identifier of the slot version that contains the slot. Will always
-- be @DRAFT@.
updateSlotResponse_botVersion :: Lens.Lens' UpdateSlotResponse (Prelude.Maybe Prelude.Text)
updateSlotResponse_botVersion :: Lens' UpdateSlotResponse (Maybe Text)
updateSlotResponse_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlotResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:UpdateSlotResponse' :: UpdateSlotResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: UpdateSlotResponse
s@UpdateSlotResponse' {} Maybe Text
a -> UpdateSlotResponse
s {$sel:botVersion:UpdateSlotResponse' :: Maybe Text
botVersion = Maybe Text
a} :: UpdateSlotResponse)

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

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

-- | The timestamp of the date and time that the slot was last updated.
updateSlotResponse_lastUpdatedDateTime :: Lens.Lens' UpdateSlotResponse (Prelude.Maybe Prelude.UTCTime)
updateSlotResponse_lastUpdatedDateTime :: Lens' UpdateSlotResponse (Maybe UTCTime)
updateSlotResponse_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlotResponse' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:UpdateSlotResponse' :: UpdateSlotResponse -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: UpdateSlotResponse
s@UpdateSlotResponse' {} Maybe POSIX
a -> UpdateSlotResponse
s {$sel:lastUpdatedDateTime:UpdateSlotResponse' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: UpdateSlotResponse) 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 locale that contains the slot.
updateSlotResponse_localeId :: Lens.Lens' UpdateSlotResponse (Prelude.Maybe Prelude.Text)
updateSlotResponse_localeId :: Lens' UpdateSlotResponse (Maybe Text)
updateSlotResponse_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlotResponse' {Maybe Text
localeId :: Maybe Text
$sel:localeId:UpdateSlotResponse' :: UpdateSlotResponse -> Maybe Text
localeId} -> Maybe Text
localeId) (\s :: UpdateSlotResponse
s@UpdateSlotResponse' {} Maybe Text
a -> UpdateSlotResponse
s {$sel:localeId:UpdateSlotResponse' :: Maybe Text
localeId = Maybe Text
a} :: UpdateSlotResponse)

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

-- | The updated setting that determines whether the slot value is obfuscated
-- in the Amazon CloudWatch logs.
updateSlotResponse_obfuscationSetting :: Lens.Lens' UpdateSlotResponse (Prelude.Maybe ObfuscationSetting)
updateSlotResponse_obfuscationSetting :: Lens' UpdateSlotResponse (Maybe ObfuscationSetting)
updateSlotResponse_obfuscationSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlotResponse' {Maybe ObfuscationSetting
obfuscationSetting :: Maybe ObfuscationSetting
$sel:obfuscationSetting:UpdateSlotResponse' :: UpdateSlotResponse -> Maybe ObfuscationSetting
obfuscationSetting} -> Maybe ObfuscationSetting
obfuscationSetting) (\s :: UpdateSlotResponse
s@UpdateSlotResponse' {} Maybe ObfuscationSetting
a -> UpdateSlotResponse
s {$sel:obfuscationSetting:UpdateSlotResponse' :: Maybe ObfuscationSetting
obfuscationSetting = Maybe ObfuscationSetting
a} :: UpdateSlotResponse)

-- | The unique identifier of the slot that was updated.
updateSlotResponse_slotId :: Lens.Lens' UpdateSlotResponse (Prelude.Maybe Prelude.Text)
updateSlotResponse_slotId :: Lens' UpdateSlotResponse (Maybe Text)
updateSlotResponse_slotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlotResponse' {Maybe Text
slotId :: Maybe Text
$sel:slotId:UpdateSlotResponse' :: UpdateSlotResponse -> Maybe Text
slotId} -> Maybe Text
slotId) (\s :: UpdateSlotResponse
s@UpdateSlotResponse' {} Maybe Text
a -> UpdateSlotResponse
s {$sel:slotId:UpdateSlotResponse' :: Maybe Text
slotId = Maybe Text
a} :: UpdateSlotResponse)

-- | The updated name of the slot.
updateSlotResponse_slotName :: Lens.Lens' UpdateSlotResponse (Prelude.Maybe Prelude.Text)
updateSlotResponse_slotName :: Lens' UpdateSlotResponse (Maybe Text)
updateSlotResponse_slotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlotResponse' {Maybe Text
slotName :: Maybe Text
$sel:slotName:UpdateSlotResponse' :: UpdateSlotResponse -> Maybe Text
slotName} -> Maybe Text
slotName) (\s :: UpdateSlotResponse
s@UpdateSlotResponse' {} Maybe Text
a -> UpdateSlotResponse
s {$sel:slotName:UpdateSlotResponse' :: Maybe Text
slotName = Maybe Text
a} :: UpdateSlotResponse)

-- | The updated identifier of the slot type that provides values for the
-- slot.
updateSlotResponse_slotTypeId :: Lens.Lens' UpdateSlotResponse (Prelude.Maybe Prelude.Text)
updateSlotResponse_slotTypeId :: Lens' UpdateSlotResponse (Maybe Text)
updateSlotResponse_slotTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSlotResponse' {Maybe Text
slotTypeId :: Maybe Text
$sel:slotTypeId:UpdateSlotResponse' :: UpdateSlotResponse -> Maybe Text
slotTypeId} -> Maybe Text
slotTypeId) (\s :: UpdateSlotResponse
s@UpdateSlotResponse' {} Maybe Text
a -> UpdateSlotResponse
s {$sel:slotTypeId:UpdateSlotResponse' :: Maybe Text
slotTypeId = Maybe Text
a} :: UpdateSlotResponse)

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

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

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

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