{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.LexModels.PutSlotType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a custom slot type or replaces an existing custom slot type.
--
-- To create a custom slot type, specify a name for the slot type and a set
-- of enumeration values, which are the values that a slot of this type can
-- assume. For more information, see how-it-works.
--
-- If you specify the name of an existing slot type, the fields in the
-- request replace the existing values in the @$LATEST@ version of the slot
-- type. Amazon Lex removes the fields that you don\'t provide in the
-- request. If you don\'t specify required fields, Amazon Lex throws an
-- exception. When you update the @$LATEST@ version of a slot type, if a
-- bot uses the @$LATEST@ version of an intent that contains the slot type,
-- the bot\'s @status@ field is set to @NOT_BUILT@.
--
-- This operation requires permissions for the @lex:PutSlotType@ action.
module Amazonka.LexModels.PutSlotType
  ( -- * Creating a Request
    PutSlotType (..),
    newPutSlotType,

    -- * Request Lenses
    putSlotType_checksum,
    putSlotType_createVersion,
    putSlotType_description,
    putSlotType_enumerationValues,
    putSlotType_parentSlotTypeSignature,
    putSlotType_slotTypeConfigurations,
    putSlotType_valueSelectionStrategy,
    putSlotType_name,

    -- * Destructuring the Response
    PutSlotTypeResponse (..),
    newPutSlotTypeResponse,

    -- * Response Lenses
    putSlotTypeResponse_checksum,
    putSlotTypeResponse_createVersion,
    putSlotTypeResponse_createdDate,
    putSlotTypeResponse_description,
    putSlotTypeResponse_enumerationValues,
    putSlotTypeResponse_lastUpdatedDate,
    putSlotTypeResponse_name,
    putSlotTypeResponse_parentSlotTypeSignature,
    putSlotTypeResponse_slotTypeConfigurations,
    putSlotTypeResponse_valueSelectionStrategy,
    putSlotTypeResponse_version,
    putSlotTypeResponse_httpStatus,
  )
where

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

-- | /See:/ 'newPutSlotType' smart constructor.
data PutSlotType = PutSlotType'
  { -- | Identifies a specific revision of the @$LATEST@ version.
    --
    -- When you create a new slot type, leave the @checksum@ field blank. If
    -- you specify a checksum you get a @BadRequestException@ exception.
    --
    -- When you want to update a slot type, set the @checksum@ field to the
    -- checksum of the most recent revision of the @$LATEST@ version. If you
    -- don\'t specify the @ checksum@ field, or if the checksum does not match
    -- the @$LATEST@ version, you get a @PreconditionFailedException@
    -- exception.
    PutSlotType -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | When set to @true@ a new numbered version of the slot type is created.
    -- This is the same as calling the @CreateSlotTypeVersion@ operation. If
    -- you do not specify @createVersion@, the default is @false@.
    PutSlotType -> Maybe Bool
createVersion :: Prelude.Maybe Prelude.Bool,
    -- | A description of the slot type.
    PutSlotType -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A list of @EnumerationValue@ objects that defines the values that the
    -- slot type can take. Each value can have a list of @synonyms@, which are
    -- additional values that help train the machine learning model about the
    -- values that it resolves for a slot.
    --
    -- A regular expression slot type doesn\'t require enumeration values. All
    -- other slot types require a list of enumeration values.
    --
    -- When Amazon Lex resolves a slot value, it generates a resolution list
    -- that contains up to five possible values for the slot. If you are using
    -- a Lambda function, this resolution list is passed to the function. If
    -- you are not using a Lambda function you can choose to return the value
    -- that the user entered or the first value in the resolution list as the
    -- slot value. The @valueSelectionStrategy@ field indicates the option to
    -- use.
    PutSlotType -> Maybe [EnumerationValue]
enumerationValues :: Prelude.Maybe [EnumerationValue],
    -- | The built-in slot type used as the parent of the slot type. When you
    -- define a parent slot type, the new slot type has all of the same
    -- configuration as the parent.
    --
    -- Only @AMAZON.AlphaNumeric@ is supported.
    PutSlotType -> Maybe Text
parentSlotTypeSignature :: Prelude.Maybe Prelude.Text,
    -- | Configuration information that extends the parent built-in slot type.
    -- The configuration is added to the settings for the parent slot type.
    PutSlotType -> Maybe [SlotTypeConfiguration]
slotTypeConfigurations :: Prelude.Maybe [SlotTypeConfiguration],
    -- | Determines the slot resolution strategy that Amazon Lex uses to return
    -- slot type values. The field can be set to one of the following values:
    --
    -- -   @ORIGINAL_VALUE@ - Returns the value entered by the user, if the
    --     user value is similar to the slot value.
    --
    -- -   @TOP_RESOLUTION@ - If there is a resolution list for the slot,
    --     return the first value in the resolution list as the slot type
    --     value. If there is no resolution list, null is returned.
    --
    -- If you don\'t specify the @valueSelectionStrategy@, the default is
    -- @ORIGINAL_VALUE@.
    PutSlotType -> Maybe SlotValueSelectionStrategy
valueSelectionStrategy :: Prelude.Maybe SlotValueSelectionStrategy,
    -- | The name of the slot type. The name is /not/ case sensitive.
    --
    -- The name can\'t match a built-in slot type name, or a built-in slot type
    -- name with \"AMAZON.\" removed. For example, because there is a built-in
    -- slot type called @AMAZON.DATE@, you can\'t create a custom slot type
    -- called @DATE@.
    --
    -- For a list of built-in slot types, see
    -- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference Slot Type Reference>
    -- in the /Alexa Skills Kit/.
    PutSlotType -> Text
name :: Prelude.Text
  }
  deriving (PutSlotType -> PutSlotType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutSlotType -> PutSlotType -> Bool
$c/= :: PutSlotType -> PutSlotType -> Bool
== :: PutSlotType -> PutSlotType -> Bool
$c== :: PutSlotType -> PutSlotType -> Bool
Prelude.Eq, ReadPrec [PutSlotType]
ReadPrec PutSlotType
Int -> ReadS PutSlotType
ReadS [PutSlotType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutSlotType]
$creadListPrec :: ReadPrec [PutSlotType]
readPrec :: ReadPrec PutSlotType
$creadPrec :: ReadPrec PutSlotType
readList :: ReadS [PutSlotType]
$creadList :: ReadS [PutSlotType]
readsPrec :: Int -> ReadS PutSlotType
$creadsPrec :: Int -> ReadS PutSlotType
Prelude.Read, Int -> PutSlotType -> ShowS
[PutSlotType] -> ShowS
PutSlotType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutSlotType] -> ShowS
$cshowList :: [PutSlotType] -> ShowS
show :: PutSlotType -> String
$cshow :: PutSlotType -> String
showsPrec :: Int -> PutSlotType -> ShowS
$cshowsPrec :: Int -> PutSlotType -> ShowS
Prelude.Show, forall x. Rep PutSlotType x -> PutSlotType
forall x. PutSlotType -> Rep PutSlotType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutSlotType x -> PutSlotType
$cfrom :: forall x. PutSlotType -> Rep PutSlotType x
Prelude.Generic)

-- |
-- Create a value of 'PutSlotType' 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:
--
-- 'checksum', 'putSlotType_checksum' - Identifies a specific revision of the @$LATEST@ version.
--
-- When you create a new slot type, leave the @checksum@ field blank. If
-- you specify a checksum you get a @BadRequestException@ exception.
--
-- When you want to update a slot type, set the @checksum@ field to the
-- checksum of the most recent revision of the @$LATEST@ version. If you
-- don\'t specify the @ checksum@ field, or if the checksum does not match
-- the @$LATEST@ version, you get a @PreconditionFailedException@
-- exception.
--
-- 'createVersion', 'putSlotType_createVersion' - When set to @true@ a new numbered version of the slot type is created.
-- This is the same as calling the @CreateSlotTypeVersion@ operation. If
-- you do not specify @createVersion@, the default is @false@.
--
-- 'description', 'putSlotType_description' - A description of the slot type.
--
-- 'enumerationValues', 'putSlotType_enumerationValues' - A list of @EnumerationValue@ objects that defines the values that the
-- slot type can take. Each value can have a list of @synonyms@, which are
-- additional values that help train the machine learning model about the
-- values that it resolves for a slot.
--
-- A regular expression slot type doesn\'t require enumeration values. All
-- other slot types require a list of enumeration values.
--
-- When Amazon Lex resolves a slot value, it generates a resolution list
-- that contains up to five possible values for the slot. If you are using
-- a Lambda function, this resolution list is passed to the function. If
-- you are not using a Lambda function you can choose to return the value
-- that the user entered or the first value in the resolution list as the
-- slot value. The @valueSelectionStrategy@ field indicates the option to
-- use.
--
-- 'parentSlotTypeSignature', 'putSlotType_parentSlotTypeSignature' - The built-in slot type used as the parent of the slot type. When you
-- define a parent slot type, the new slot type has all of the same
-- configuration as the parent.
--
-- Only @AMAZON.AlphaNumeric@ is supported.
--
-- 'slotTypeConfigurations', 'putSlotType_slotTypeConfigurations' - Configuration information that extends the parent built-in slot type.
-- The configuration is added to the settings for the parent slot type.
--
-- 'valueSelectionStrategy', 'putSlotType_valueSelectionStrategy' - Determines the slot resolution strategy that Amazon Lex uses to return
-- slot type values. The field can be set to one of the following values:
--
-- -   @ORIGINAL_VALUE@ - Returns the value entered by the user, if the
--     user value is similar to the slot value.
--
-- -   @TOP_RESOLUTION@ - If there is a resolution list for the slot,
--     return the first value in the resolution list as the slot type
--     value. If there is no resolution list, null is returned.
--
-- If you don\'t specify the @valueSelectionStrategy@, the default is
-- @ORIGINAL_VALUE@.
--
-- 'name', 'putSlotType_name' - The name of the slot type. The name is /not/ case sensitive.
--
-- The name can\'t match a built-in slot type name, or a built-in slot type
-- name with \"AMAZON.\" removed. For example, because there is a built-in
-- slot type called @AMAZON.DATE@, you can\'t create a custom slot type
-- called @DATE@.
--
-- For a list of built-in slot types, see
-- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference Slot Type Reference>
-- in the /Alexa Skills Kit/.
newPutSlotType ::
  -- | 'name'
  Prelude.Text ->
  PutSlotType
newPutSlotType :: Text -> PutSlotType
newPutSlotType Text
pName_ =
  PutSlotType'
    { $sel:checksum:PutSlotType' :: Maybe Text
checksum = forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutSlotType' :: Maybe Bool
createVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutSlotType' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:enumerationValues:PutSlotType' :: Maybe [EnumerationValue]
enumerationValues = forall a. Maybe a
Prelude.Nothing,
      $sel:parentSlotTypeSignature:PutSlotType' :: Maybe Text
parentSlotTypeSignature = forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeConfigurations:PutSlotType' :: Maybe [SlotTypeConfiguration]
slotTypeConfigurations = forall a. Maybe a
Prelude.Nothing,
      $sel:valueSelectionStrategy:PutSlotType' :: Maybe SlotValueSelectionStrategy
valueSelectionStrategy = forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutSlotType' :: Text
name = Text
pName_
    }

-- | Identifies a specific revision of the @$LATEST@ version.
--
-- When you create a new slot type, leave the @checksum@ field blank. If
-- you specify a checksum you get a @BadRequestException@ exception.
--
-- When you want to update a slot type, set the @checksum@ field to the
-- checksum of the most recent revision of the @$LATEST@ version. If you
-- don\'t specify the @ checksum@ field, or if the checksum does not match
-- the @$LATEST@ version, you get a @PreconditionFailedException@
-- exception.
putSlotType_checksum :: Lens.Lens' PutSlotType (Prelude.Maybe Prelude.Text)
putSlotType_checksum :: Lens' PutSlotType (Maybe Text)
putSlotType_checksum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotType' {Maybe Text
checksum :: Maybe Text
$sel:checksum:PutSlotType' :: PutSlotType -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: PutSlotType
s@PutSlotType' {} Maybe Text
a -> PutSlotType
s {$sel:checksum:PutSlotType' :: Maybe Text
checksum = Maybe Text
a} :: PutSlotType)

-- | When set to @true@ a new numbered version of the slot type is created.
-- This is the same as calling the @CreateSlotTypeVersion@ operation. If
-- you do not specify @createVersion@, the default is @false@.
putSlotType_createVersion :: Lens.Lens' PutSlotType (Prelude.Maybe Prelude.Bool)
putSlotType_createVersion :: Lens' PutSlotType (Maybe Bool)
putSlotType_createVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotType' {Maybe Bool
createVersion :: Maybe Bool
$sel:createVersion:PutSlotType' :: PutSlotType -> Maybe Bool
createVersion} -> Maybe Bool
createVersion) (\s :: PutSlotType
s@PutSlotType' {} Maybe Bool
a -> PutSlotType
s {$sel:createVersion:PutSlotType' :: Maybe Bool
createVersion = Maybe Bool
a} :: PutSlotType)

-- | A description of the slot type.
putSlotType_description :: Lens.Lens' PutSlotType (Prelude.Maybe Prelude.Text)
putSlotType_description :: Lens' PutSlotType (Maybe Text)
putSlotType_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotType' {Maybe Text
description :: Maybe Text
$sel:description:PutSlotType' :: PutSlotType -> Maybe Text
description} -> Maybe Text
description) (\s :: PutSlotType
s@PutSlotType' {} Maybe Text
a -> PutSlotType
s {$sel:description:PutSlotType' :: Maybe Text
description = Maybe Text
a} :: PutSlotType)

-- | A list of @EnumerationValue@ objects that defines the values that the
-- slot type can take. Each value can have a list of @synonyms@, which are
-- additional values that help train the machine learning model about the
-- values that it resolves for a slot.
--
-- A regular expression slot type doesn\'t require enumeration values. All
-- other slot types require a list of enumeration values.
--
-- When Amazon Lex resolves a slot value, it generates a resolution list
-- that contains up to five possible values for the slot. If you are using
-- a Lambda function, this resolution list is passed to the function. If
-- you are not using a Lambda function you can choose to return the value
-- that the user entered or the first value in the resolution list as the
-- slot value. The @valueSelectionStrategy@ field indicates the option to
-- use.
putSlotType_enumerationValues :: Lens.Lens' PutSlotType (Prelude.Maybe [EnumerationValue])
putSlotType_enumerationValues :: Lens' PutSlotType (Maybe [EnumerationValue])
putSlotType_enumerationValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotType' {Maybe [EnumerationValue]
enumerationValues :: Maybe [EnumerationValue]
$sel:enumerationValues:PutSlotType' :: PutSlotType -> Maybe [EnumerationValue]
enumerationValues} -> Maybe [EnumerationValue]
enumerationValues) (\s :: PutSlotType
s@PutSlotType' {} Maybe [EnumerationValue]
a -> PutSlotType
s {$sel:enumerationValues:PutSlotType' :: Maybe [EnumerationValue]
enumerationValues = Maybe [EnumerationValue]
a} :: PutSlotType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | Configuration information that extends the parent built-in slot type.
-- The configuration is added to the settings for the parent slot type.
putSlotType_slotTypeConfigurations :: Lens.Lens' PutSlotType (Prelude.Maybe [SlotTypeConfiguration])
putSlotType_slotTypeConfigurations :: Lens' PutSlotType (Maybe [SlotTypeConfiguration])
putSlotType_slotTypeConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotType' {Maybe [SlotTypeConfiguration]
slotTypeConfigurations :: Maybe [SlotTypeConfiguration]
$sel:slotTypeConfigurations:PutSlotType' :: PutSlotType -> Maybe [SlotTypeConfiguration]
slotTypeConfigurations} -> Maybe [SlotTypeConfiguration]
slotTypeConfigurations) (\s :: PutSlotType
s@PutSlotType' {} Maybe [SlotTypeConfiguration]
a -> PutSlotType
s {$sel:slotTypeConfigurations:PutSlotType' :: Maybe [SlotTypeConfiguration]
slotTypeConfigurations = Maybe [SlotTypeConfiguration]
a} :: PutSlotType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Determines the slot resolution strategy that Amazon Lex uses to return
-- slot type values. The field can be set to one of the following values:
--
-- -   @ORIGINAL_VALUE@ - Returns the value entered by the user, if the
--     user value is similar to the slot value.
--
-- -   @TOP_RESOLUTION@ - If there is a resolution list for the slot,
--     return the first value in the resolution list as the slot type
--     value. If there is no resolution list, null is returned.
--
-- If you don\'t specify the @valueSelectionStrategy@, the default is
-- @ORIGINAL_VALUE@.
putSlotType_valueSelectionStrategy :: Lens.Lens' PutSlotType (Prelude.Maybe SlotValueSelectionStrategy)
putSlotType_valueSelectionStrategy :: Lens' PutSlotType (Maybe SlotValueSelectionStrategy)
putSlotType_valueSelectionStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotType' {Maybe SlotValueSelectionStrategy
valueSelectionStrategy :: Maybe SlotValueSelectionStrategy
$sel:valueSelectionStrategy:PutSlotType' :: PutSlotType -> Maybe SlotValueSelectionStrategy
valueSelectionStrategy} -> Maybe SlotValueSelectionStrategy
valueSelectionStrategy) (\s :: PutSlotType
s@PutSlotType' {} Maybe SlotValueSelectionStrategy
a -> PutSlotType
s {$sel:valueSelectionStrategy:PutSlotType' :: Maybe SlotValueSelectionStrategy
valueSelectionStrategy = Maybe SlotValueSelectionStrategy
a} :: PutSlotType)

-- | The name of the slot type. The name is /not/ case sensitive.
--
-- The name can\'t match a built-in slot type name, or a built-in slot type
-- name with \"AMAZON.\" removed. For example, because there is a built-in
-- slot type called @AMAZON.DATE@, you can\'t create a custom slot type
-- called @DATE@.
--
-- For a list of built-in slot types, see
-- <https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference Slot Type Reference>
-- in the /Alexa Skills Kit/.
putSlotType_name :: Lens.Lens' PutSlotType Prelude.Text
putSlotType_name :: Lens' PutSlotType Text
putSlotType_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotType' {Text
name :: Text
$sel:name:PutSlotType' :: PutSlotType -> Text
name} -> Text
name) (\s :: PutSlotType
s@PutSlotType' {} Text
a -> PutSlotType
s {$sel:name:PutSlotType' :: Text
name = Text
a} :: PutSlotType)

instance Core.AWSRequest PutSlotType where
  type AWSResponse PutSlotType = PutSlotTypeResponse
  request :: (Service -> Service) -> PutSlotType -> Request PutSlotType
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 PutSlotType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutSlotType)))
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 Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe [EnumerationValue]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [SlotTypeConfiguration]
-> Maybe SlotValueSelectionStrategy
-> Maybe Text
-> Int
-> PutSlotTypeResponse
PutSlotTypeResponse'
            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
"checksum")
            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
"createVersion")
            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
"createdDate")
            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
"enumerationValues"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"lastUpdatedDate")
            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
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"parentSlotTypeSignature")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"slotTypeConfigurations"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"valueSelectionStrategy")
            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
"version")
            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 PutSlotType where
  hashWithSalt :: Int -> PutSlotType -> Int
hashWithSalt Int
_salt PutSlotType' {Maybe Bool
Maybe [EnumerationValue]
Maybe [SlotTypeConfiguration]
Maybe Text
Maybe SlotValueSelectionStrategy
Text
name :: Text
valueSelectionStrategy :: Maybe SlotValueSelectionStrategy
slotTypeConfigurations :: Maybe [SlotTypeConfiguration]
parentSlotTypeSignature :: Maybe Text
enumerationValues :: Maybe [EnumerationValue]
description :: Maybe Text
createVersion :: Maybe Bool
checksum :: Maybe Text
$sel:name:PutSlotType' :: PutSlotType -> Text
$sel:valueSelectionStrategy:PutSlotType' :: PutSlotType -> Maybe SlotValueSelectionStrategy
$sel:slotTypeConfigurations:PutSlotType' :: PutSlotType -> Maybe [SlotTypeConfiguration]
$sel:parentSlotTypeSignature:PutSlotType' :: PutSlotType -> Maybe Text
$sel:enumerationValues:PutSlotType' :: PutSlotType -> Maybe [EnumerationValue]
$sel:description:PutSlotType' :: PutSlotType -> Maybe Text
$sel:createVersion:PutSlotType' :: PutSlotType -> Maybe Bool
$sel:checksum:PutSlotType' :: PutSlotType -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
checksum
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
createVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [EnumerationValue]
enumerationValues
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parentSlotTypeSignature
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SlotTypeConfiguration]
slotTypeConfigurations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SlotValueSelectionStrategy
valueSelectionStrategy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData PutSlotType where
  rnf :: PutSlotType -> ()
rnf PutSlotType' {Maybe Bool
Maybe [EnumerationValue]
Maybe [SlotTypeConfiguration]
Maybe Text
Maybe SlotValueSelectionStrategy
Text
name :: Text
valueSelectionStrategy :: Maybe SlotValueSelectionStrategy
slotTypeConfigurations :: Maybe [SlotTypeConfiguration]
parentSlotTypeSignature :: Maybe Text
enumerationValues :: Maybe [EnumerationValue]
description :: Maybe Text
createVersion :: Maybe Bool
checksum :: Maybe Text
$sel:name:PutSlotType' :: PutSlotType -> Text
$sel:valueSelectionStrategy:PutSlotType' :: PutSlotType -> Maybe SlotValueSelectionStrategy
$sel:slotTypeConfigurations:PutSlotType' :: PutSlotType -> Maybe [SlotTypeConfiguration]
$sel:parentSlotTypeSignature:PutSlotType' :: PutSlotType -> Maybe Text
$sel:enumerationValues:PutSlotType' :: PutSlotType -> Maybe [EnumerationValue]
$sel:description:PutSlotType' :: PutSlotType -> Maybe Text
$sel:createVersion:PutSlotType' :: PutSlotType -> Maybe Bool
$sel:checksum:PutSlotType' :: PutSlotType -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksum
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
createVersion
      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 [EnumerationValue]
enumerationValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parentSlotTypeSignature
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SlotTypeConfiguration]
slotTypeConfigurations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SlotValueSelectionStrategy
valueSelectionStrategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders PutSlotType where
  toHeaders :: PutSlotType -> 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 PutSlotType where
  toJSON :: PutSlotType -> Value
toJSON PutSlotType' {Maybe Bool
Maybe [EnumerationValue]
Maybe [SlotTypeConfiguration]
Maybe Text
Maybe SlotValueSelectionStrategy
Text
name :: Text
valueSelectionStrategy :: Maybe SlotValueSelectionStrategy
slotTypeConfigurations :: Maybe [SlotTypeConfiguration]
parentSlotTypeSignature :: Maybe Text
enumerationValues :: Maybe [EnumerationValue]
description :: Maybe Text
createVersion :: Maybe Bool
checksum :: Maybe Text
$sel:name:PutSlotType' :: PutSlotType -> Text
$sel:valueSelectionStrategy:PutSlotType' :: PutSlotType -> Maybe SlotValueSelectionStrategy
$sel:slotTypeConfigurations:PutSlotType' :: PutSlotType -> Maybe [SlotTypeConfiguration]
$sel:parentSlotTypeSignature:PutSlotType' :: PutSlotType -> Maybe Text
$sel:enumerationValues:PutSlotType' :: PutSlotType -> Maybe [EnumerationValue]
$sel:description:PutSlotType' :: PutSlotType -> Maybe Text
$sel:createVersion:PutSlotType' :: PutSlotType -> Maybe Bool
$sel:checksum:PutSlotType' :: PutSlotType -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"checksum" 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
checksum,
            (Key
"createVersion" 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 Bool
createVersion,
            (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
"enumerationValues" 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 [EnumerationValue]
enumerationValues,
            (Key
"parentSlotTypeSignature" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
parentSlotTypeSignature,
            (Key
"slotTypeConfigurations" 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 [SlotTypeConfiguration]
slotTypeConfigurations,
            (Key
"valueSelectionStrategy" 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 SlotValueSelectionStrategy
valueSelectionStrategy
          ]
      )

instance Data.ToPath PutSlotType where
  toPath :: PutSlotType -> ByteString
toPath PutSlotType' {Maybe Bool
Maybe [EnumerationValue]
Maybe [SlotTypeConfiguration]
Maybe Text
Maybe SlotValueSelectionStrategy
Text
name :: Text
valueSelectionStrategy :: Maybe SlotValueSelectionStrategy
slotTypeConfigurations :: Maybe [SlotTypeConfiguration]
parentSlotTypeSignature :: Maybe Text
enumerationValues :: Maybe [EnumerationValue]
description :: Maybe Text
createVersion :: Maybe Bool
checksum :: Maybe Text
$sel:name:PutSlotType' :: PutSlotType -> Text
$sel:valueSelectionStrategy:PutSlotType' :: PutSlotType -> Maybe SlotValueSelectionStrategy
$sel:slotTypeConfigurations:PutSlotType' :: PutSlotType -> Maybe [SlotTypeConfiguration]
$sel:parentSlotTypeSignature:PutSlotType' :: PutSlotType -> Maybe Text
$sel:enumerationValues:PutSlotType' :: PutSlotType -> Maybe [EnumerationValue]
$sel:description:PutSlotType' :: PutSlotType -> Maybe Text
$sel:createVersion:PutSlotType' :: PutSlotType -> Maybe Bool
$sel:checksum:PutSlotType' :: PutSlotType -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/slottypes/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name, ByteString
"/versions/$LATEST"]

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

-- | /See:/ 'newPutSlotTypeResponse' smart constructor.
data PutSlotTypeResponse = PutSlotTypeResponse'
  { -- | Checksum of the @$LATEST@ version of the slot type.
    PutSlotTypeResponse -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | @True@ if a new version of the slot type was created. If the
    -- @createVersion@ field was not specified in the request, the
    -- @createVersion@ field is set to false in the response.
    PutSlotTypeResponse -> Maybe Bool
createVersion :: Prelude.Maybe Prelude.Bool,
    -- | The date that the slot type was created.
    PutSlotTypeResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Data.POSIX,
    -- | A description of the slot type.
    PutSlotTypeResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A list of @EnumerationValue@ objects that defines the values that the
    -- slot type can take.
    PutSlotTypeResponse -> Maybe [EnumerationValue]
enumerationValues :: Prelude.Maybe [EnumerationValue],
    -- | The date that the slot type was updated. When you create a slot type,
    -- the creation date and last update date are the same.
    PutSlotTypeResponse -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Data.POSIX,
    -- | The name of the slot type.
    PutSlotTypeResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The built-in slot type used as the parent of the slot type.
    PutSlotTypeResponse -> Maybe Text
parentSlotTypeSignature :: Prelude.Maybe Prelude.Text,
    -- | Configuration information that extends the parent built-in slot type.
    PutSlotTypeResponse -> Maybe [SlotTypeConfiguration]
slotTypeConfigurations :: Prelude.Maybe [SlotTypeConfiguration],
    -- | The slot resolution strategy that Amazon Lex uses to determine the value
    -- of the slot. For more information, see PutSlotType.
    PutSlotTypeResponse -> Maybe SlotValueSelectionStrategy
valueSelectionStrategy :: Prelude.Maybe SlotValueSelectionStrategy,
    -- | The version of the slot type. For a new slot type, the version is always
    -- @$LATEST@.
    PutSlotTypeResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    PutSlotTypeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutSlotTypeResponse -> PutSlotTypeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutSlotTypeResponse -> PutSlotTypeResponse -> Bool
$c/= :: PutSlotTypeResponse -> PutSlotTypeResponse -> Bool
== :: PutSlotTypeResponse -> PutSlotTypeResponse -> Bool
$c== :: PutSlotTypeResponse -> PutSlotTypeResponse -> Bool
Prelude.Eq, ReadPrec [PutSlotTypeResponse]
ReadPrec PutSlotTypeResponse
Int -> ReadS PutSlotTypeResponse
ReadS [PutSlotTypeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutSlotTypeResponse]
$creadListPrec :: ReadPrec [PutSlotTypeResponse]
readPrec :: ReadPrec PutSlotTypeResponse
$creadPrec :: ReadPrec PutSlotTypeResponse
readList :: ReadS [PutSlotTypeResponse]
$creadList :: ReadS [PutSlotTypeResponse]
readsPrec :: Int -> ReadS PutSlotTypeResponse
$creadsPrec :: Int -> ReadS PutSlotTypeResponse
Prelude.Read, Int -> PutSlotTypeResponse -> ShowS
[PutSlotTypeResponse] -> ShowS
PutSlotTypeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutSlotTypeResponse] -> ShowS
$cshowList :: [PutSlotTypeResponse] -> ShowS
show :: PutSlotTypeResponse -> String
$cshow :: PutSlotTypeResponse -> String
showsPrec :: Int -> PutSlotTypeResponse -> ShowS
$cshowsPrec :: Int -> PutSlotTypeResponse -> ShowS
Prelude.Show, forall x. Rep PutSlotTypeResponse x -> PutSlotTypeResponse
forall x. PutSlotTypeResponse -> Rep PutSlotTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutSlotTypeResponse x -> PutSlotTypeResponse
$cfrom :: forall x. PutSlotTypeResponse -> Rep PutSlotTypeResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutSlotTypeResponse' 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:
--
-- 'checksum', 'putSlotTypeResponse_checksum' - Checksum of the @$LATEST@ version of the slot type.
--
-- 'createVersion', 'putSlotTypeResponse_createVersion' - @True@ if a new version of the slot type was created. If the
-- @createVersion@ field was not specified in the request, the
-- @createVersion@ field is set to false in the response.
--
-- 'createdDate', 'putSlotTypeResponse_createdDate' - The date that the slot type was created.
--
-- 'description', 'putSlotTypeResponse_description' - A description of the slot type.
--
-- 'enumerationValues', 'putSlotTypeResponse_enumerationValues' - A list of @EnumerationValue@ objects that defines the values that the
-- slot type can take.
--
-- 'lastUpdatedDate', 'putSlotTypeResponse_lastUpdatedDate' - The date that the slot type was updated. When you create a slot type,
-- the creation date and last update date are the same.
--
-- 'name', 'putSlotTypeResponse_name' - The name of the slot type.
--
-- 'parentSlotTypeSignature', 'putSlotTypeResponse_parentSlotTypeSignature' - The built-in slot type used as the parent of the slot type.
--
-- 'slotTypeConfigurations', 'putSlotTypeResponse_slotTypeConfigurations' - Configuration information that extends the parent built-in slot type.
--
-- 'valueSelectionStrategy', 'putSlotTypeResponse_valueSelectionStrategy' - The slot resolution strategy that Amazon Lex uses to determine the value
-- of the slot. For more information, see PutSlotType.
--
-- 'version', 'putSlotTypeResponse_version' - The version of the slot type. For a new slot type, the version is always
-- @$LATEST@.
--
-- 'httpStatus', 'putSlotTypeResponse_httpStatus' - The response's http status code.
newPutSlotTypeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutSlotTypeResponse
newPutSlotTypeResponse :: Int -> PutSlotTypeResponse
newPutSlotTypeResponse Int
pHttpStatus_ =
  PutSlotTypeResponse'
    { $sel:checksum:PutSlotTypeResponse' :: Maybe Text
checksum = forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutSlotTypeResponse' :: Maybe Bool
createVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:PutSlotTypeResponse' :: Maybe POSIX
createdDate = forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutSlotTypeResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:enumerationValues:PutSlotTypeResponse' :: Maybe [EnumerationValue]
enumerationValues = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:PutSlotTypeResponse' :: Maybe POSIX
lastUpdatedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutSlotTypeResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:parentSlotTypeSignature:PutSlotTypeResponse' :: Maybe Text
parentSlotTypeSignature = forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeConfigurations:PutSlotTypeResponse' :: Maybe [SlotTypeConfiguration]
slotTypeConfigurations = forall a. Maybe a
Prelude.Nothing,
      $sel:valueSelectionStrategy:PutSlotTypeResponse' :: Maybe SlotValueSelectionStrategy
valueSelectionStrategy = forall a. Maybe a
Prelude.Nothing,
      $sel:version:PutSlotTypeResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutSlotTypeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Checksum of the @$LATEST@ version of the slot type.
putSlotTypeResponse_checksum :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Text)
putSlotTypeResponse_checksum :: Lens' PutSlotTypeResponse (Maybe Text)
putSlotTypeResponse_checksum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe Text
checksum :: Maybe Text
$sel:checksum:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe Text
a -> PutSlotTypeResponse
s {$sel:checksum:PutSlotTypeResponse' :: Maybe Text
checksum = Maybe Text
a} :: PutSlotTypeResponse)

-- | @True@ if a new version of the slot type was created. If the
-- @createVersion@ field was not specified in the request, the
-- @createVersion@ field is set to false in the response.
putSlotTypeResponse_createVersion :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Bool)
putSlotTypeResponse_createVersion :: Lens' PutSlotTypeResponse (Maybe Bool)
putSlotTypeResponse_createVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe Bool
createVersion :: Maybe Bool
$sel:createVersion:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Bool
createVersion} -> Maybe Bool
createVersion) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe Bool
a -> PutSlotTypeResponse
s {$sel:createVersion:PutSlotTypeResponse' :: Maybe Bool
createVersion = Maybe Bool
a} :: PutSlotTypeResponse)

-- | The date that the slot type was created.
putSlotTypeResponse_createdDate :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.UTCTime)
putSlotTypeResponse_createdDate :: Lens' PutSlotTypeResponse (Maybe UTCTime)
putSlotTypeResponse_createdDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe POSIX
a -> PutSlotTypeResponse
s {$sel:createdDate:PutSlotTypeResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: PutSlotTypeResponse) 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

-- | A description of the slot type.
putSlotTypeResponse_description :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Text)
putSlotTypeResponse_description :: Lens' PutSlotTypeResponse (Maybe Text)
putSlotTypeResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe Text
description :: Maybe Text
$sel:description:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe Text
a -> PutSlotTypeResponse
s {$sel:description:PutSlotTypeResponse' :: Maybe Text
description = Maybe Text
a} :: PutSlotTypeResponse)

-- | A list of @EnumerationValue@ objects that defines the values that the
-- slot type can take.
putSlotTypeResponse_enumerationValues :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe [EnumerationValue])
putSlotTypeResponse_enumerationValues :: Lens' PutSlotTypeResponse (Maybe [EnumerationValue])
putSlotTypeResponse_enumerationValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe [EnumerationValue]
enumerationValues :: Maybe [EnumerationValue]
$sel:enumerationValues:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe [EnumerationValue]
enumerationValues} -> Maybe [EnumerationValue]
enumerationValues) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe [EnumerationValue]
a -> PutSlotTypeResponse
s {$sel:enumerationValues:PutSlotTypeResponse' :: Maybe [EnumerationValue]
enumerationValues = Maybe [EnumerationValue]
a} :: PutSlotTypeResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The date that the slot type was updated. When you create a slot type,
-- the creation date and last update date are the same.
putSlotTypeResponse_lastUpdatedDate :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.UTCTime)
putSlotTypeResponse_lastUpdatedDate :: Lens' PutSlotTypeResponse (Maybe UTCTime)
putSlotTypeResponse_lastUpdatedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe POSIX
a -> PutSlotTypeResponse
s {$sel:lastUpdatedDate:PutSlotTypeResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: PutSlotTypeResponse) 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 name of the slot type.
putSlotTypeResponse_name :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Text)
putSlotTypeResponse_name :: Lens' PutSlotTypeResponse (Maybe Text)
putSlotTypeResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe Text
name :: Maybe Text
$sel:name:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe Text
a -> PutSlotTypeResponse
s {$sel:name:PutSlotTypeResponse' :: Maybe Text
name = Maybe Text
a} :: PutSlotTypeResponse)

-- | The built-in slot type used as the parent of the slot type.
putSlotTypeResponse_parentSlotTypeSignature :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Text)
putSlotTypeResponse_parentSlotTypeSignature :: Lens' PutSlotTypeResponse (Maybe Text)
putSlotTypeResponse_parentSlotTypeSignature = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe Text
parentSlotTypeSignature :: Maybe Text
$sel:parentSlotTypeSignature:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
parentSlotTypeSignature} -> Maybe Text
parentSlotTypeSignature) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe Text
a -> PutSlotTypeResponse
s {$sel:parentSlotTypeSignature:PutSlotTypeResponse' :: Maybe Text
parentSlotTypeSignature = Maybe Text
a} :: PutSlotTypeResponse)

-- | Configuration information that extends the parent built-in slot type.
putSlotTypeResponse_slotTypeConfigurations :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe [SlotTypeConfiguration])
putSlotTypeResponse_slotTypeConfigurations :: Lens' PutSlotTypeResponse (Maybe [SlotTypeConfiguration])
putSlotTypeResponse_slotTypeConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe [SlotTypeConfiguration]
slotTypeConfigurations :: Maybe [SlotTypeConfiguration]
$sel:slotTypeConfigurations:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe [SlotTypeConfiguration]
slotTypeConfigurations} -> Maybe [SlotTypeConfiguration]
slotTypeConfigurations) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe [SlotTypeConfiguration]
a -> PutSlotTypeResponse
s {$sel:slotTypeConfigurations:PutSlotTypeResponse' :: Maybe [SlotTypeConfiguration]
slotTypeConfigurations = Maybe [SlotTypeConfiguration]
a} :: PutSlotTypeResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The slot resolution strategy that Amazon Lex uses to determine the value
-- of the slot. For more information, see PutSlotType.
putSlotTypeResponse_valueSelectionStrategy :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe SlotValueSelectionStrategy)
putSlotTypeResponse_valueSelectionStrategy :: Lens' PutSlotTypeResponse (Maybe SlotValueSelectionStrategy)
putSlotTypeResponse_valueSelectionStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe SlotValueSelectionStrategy
valueSelectionStrategy :: Maybe SlotValueSelectionStrategy
$sel:valueSelectionStrategy:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe SlotValueSelectionStrategy
valueSelectionStrategy} -> Maybe SlotValueSelectionStrategy
valueSelectionStrategy) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe SlotValueSelectionStrategy
a -> PutSlotTypeResponse
s {$sel:valueSelectionStrategy:PutSlotTypeResponse' :: Maybe SlotValueSelectionStrategy
valueSelectionStrategy = Maybe SlotValueSelectionStrategy
a} :: PutSlotTypeResponse)

-- | The version of the slot type. For a new slot type, the version is always
-- @$LATEST@.
putSlotTypeResponse_version :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Text)
putSlotTypeResponse_version :: Lens' PutSlotTypeResponse (Maybe Text)
putSlotTypeResponse_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSlotTypeResponse' {Maybe Text
version :: Maybe Text
$sel:version:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: PutSlotTypeResponse
s@PutSlotTypeResponse' {} Maybe Text
a -> PutSlotTypeResponse
s {$sel:version:PutSlotTypeResponse' :: Maybe Text
version = Maybe Text
a} :: PutSlotTypeResponse)

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

instance Prelude.NFData PutSlotTypeResponse where
  rnf :: PutSlotTypeResponse -> ()
rnf PutSlotTypeResponse' {Int
Maybe Bool
Maybe [EnumerationValue]
Maybe [SlotTypeConfiguration]
Maybe Text
Maybe POSIX
Maybe SlotValueSelectionStrategy
httpStatus :: Int
version :: Maybe Text
valueSelectionStrategy :: Maybe SlotValueSelectionStrategy
slotTypeConfigurations :: Maybe [SlotTypeConfiguration]
parentSlotTypeSignature :: Maybe Text
name :: Maybe Text
lastUpdatedDate :: Maybe POSIX
enumerationValues :: Maybe [EnumerationValue]
description :: Maybe Text
createdDate :: Maybe POSIX
createVersion :: Maybe Bool
checksum :: Maybe Text
$sel:httpStatus:PutSlotTypeResponse' :: PutSlotTypeResponse -> Int
$sel:version:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
$sel:valueSelectionStrategy:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe SlotValueSelectionStrategy
$sel:slotTypeConfigurations:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe [SlotTypeConfiguration]
$sel:parentSlotTypeSignature:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
$sel:name:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
$sel:lastUpdatedDate:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe POSIX
$sel:enumerationValues:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe [EnumerationValue]
$sel:description:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
$sel:createdDate:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe POSIX
$sel:createVersion:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Bool
$sel:checksum:PutSlotTypeResponse' :: PutSlotTypeResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksum
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
createVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdDate
      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 [EnumerationValue]
enumerationValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parentSlotTypeSignature
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SlotTypeConfiguration]
slotTypeConfigurations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SlotValueSelectionStrategy
valueSelectionStrategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus