{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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_parentSlotTypeSignature,
    putSlotType_slotTypeConfigurations,
    putSlotType_checksum,
    putSlotType_valueSelectionStrategy,
    putSlotType_createVersion,
    putSlotType_description,
    putSlotType_enumerationValues,
    putSlotType_name,

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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'
  { -- | 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],
    -- | 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,
    -- | 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,
    -- | 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 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
(PutSlotType -> PutSlotType -> Bool)
-> (PutSlotType -> PutSlotType -> Bool) -> Eq PutSlotType
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]
(Int -> ReadS PutSlotType)
-> ReadS [PutSlotType]
-> ReadPrec PutSlotType
-> ReadPrec [PutSlotType]
-> Read 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
(Int -> PutSlotType -> ShowS)
-> (PutSlotType -> String)
-> ([PutSlotType] -> ShowS)
-> Show PutSlotType
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. PutSlotType -> Rep PutSlotType x)
-> (forall x. Rep PutSlotType x -> PutSlotType)
-> Generic PutSlotType
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:
--
-- '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.
--
-- '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.
--
-- '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@.
--
-- '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.
--
-- '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' :: Maybe Text
-> Maybe [SlotTypeConfiguration]
-> Maybe Text
-> Maybe SlotValueSelectionStrategy
-> Maybe Bool
-> Maybe Text
-> Maybe [EnumerationValue]
-> Text
-> PutSlotType
PutSlotType'
    { $sel:parentSlotTypeSignature:PutSlotType' :: Maybe Text
parentSlotTypeSignature =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeConfigurations:PutSlotType' :: Maybe [SlotTypeConfiguration]
slotTypeConfigurations = Maybe [SlotTypeConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:PutSlotType' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:valueSelectionStrategy:PutSlotType' :: Maybe SlotValueSelectionStrategy
valueSelectionStrategy = Maybe SlotValueSelectionStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutSlotType' :: Maybe Bool
createVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutSlotType' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enumerationValues:PutSlotType' :: Maybe [EnumerationValue]
enumerationValues = Maybe [EnumerationValue]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutSlotType' :: Text
name = Text
pName_
    }

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> PutSlotType -> f PutSlotType
putSlotType_parentSlotTypeSignature = (PutSlotType -> Maybe Text)
-> (PutSlotType -> Maybe Text -> PutSlotType)
-> Lens PutSlotType PutSlotType (Maybe Text) (Maybe Text)
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 :: (Maybe [SlotTypeConfiguration]
 -> f (Maybe [SlotTypeConfiguration]))
-> PutSlotType -> f PutSlotType
putSlotType_slotTypeConfigurations = (PutSlotType -> Maybe [SlotTypeConfiguration])
-> (PutSlotType -> Maybe [SlotTypeConfiguration] -> PutSlotType)
-> Lens
     PutSlotType
     PutSlotType
     (Maybe [SlotTypeConfiguration])
     (Maybe [SlotTypeConfiguration])
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) ((Maybe [SlotTypeConfiguration]
  -> f (Maybe [SlotTypeConfiguration]))
 -> PutSlotType -> f PutSlotType)
-> ((Maybe [SlotTypeConfiguration]
     -> f (Maybe [SlotTypeConfiguration]))
    -> Maybe [SlotTypeConfiguration]
    -> f (Maybe [SlotTypeConfiguration]))
-> (Maybe [SlotTypeConfiguration]
    -> f (Maybe [SlotTypeConfiguration]))
-> PutSlotType
-> f PutSlotType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
-> Iso
     (Maybe [SlotTypeConfiguration])
     (Maybe [SlotTypeConfiguration])
     (Maybe [SlotTypeConfiguration])
     (Maybe [SlotTypeConfiguration])
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 AnIso
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> PutSlotType -> f PutSlotType
putSlotType_checksum = (PutSlotType -> Maybe Text)
-> (PutSlotType -> Maybe Text -> PutSlotType)
-> Lens PutSlotType PutSlotType (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe SlotValueSelectionStrategy
 -> f (Maybe SlotValueSelectionStrategy))
-> PutSlotType -> f PutSlotType
putSlotType_valueSelectionStrategy = (PutSlotType -> Maybe SlotValueSelectionStrategy)
-> (PutSlotType -> Maybe SlotValueSelectionStrategy -> PutSlotType)
-> Lens
     PutSlotType
     PutSlotType
     (Maybe SlotValueSelectionStrategy)
     (Maybe SlotValueSelectionStrategy)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> PutSlotType -> f PutSlotType
putSlotType_createVersion = (PutSlotType -> Maybe Bool)
-> (PutSlotType -> Maybe Bool -> PutSlotType)
-> Lens PutSlotType PutSlotType (Maybe Bool) (Maybe Bool)
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 :: (Maybe Text -> f (Maybe Text)) -> PutSlotType -> f PutSlotType
putSlotType_description = (PutSlotType -> Maybe Text)
-> (PutSlotType -> Maybe Text -> PutSlotType)
-> Lens PutSlotType PutSlotType (Maybe Text) (Maybe Text)
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 :: (Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
-> PutSlotType -> f PutSlotType
putSlotType_enumerationValues = (PutSlotType -> Maybe [EnumerationValue])
-> (PutSlotType -> Maybe [EnumerationValue] -> PutSlotType)
-> Lens
     PutSlotType
     PutSlotType
     (Maybe [EnumerationValue])
     (Maybe [EnumerationValue])
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) ((Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
 -> PutSlotType -> f PutSlotType)
-> ((Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
    -> Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
-> (Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
-> PutSlotType
-> f PutSlotType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EnumerationValue]
  [EnumerationValue]
  [EnumerationValue]
  [EnumerationValue]
-> Iso
     (Maybe [EnumerationValue])
     (Maybe [EnumerationValue])
     (Maybe [EnumerationValue])
     (Maybe [EnumerationValue])
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 AnIso
  [EnumerationValue]
  [EnumerationValue]
  [EnumerationValue]
  [EnumerationValue]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Text -> f Text) -> PutSlotType -> f PutSlotType
putSlotType_name = (PutSlotType -> Text)
-> (PutSlotType -> Text -> PutSlotType)
-> Lens PutSlotType PutSlotType Text Text
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 :: PutSlotType -> Request PutSlotType
request = Service -> PutSlotType -> Request PutSlotType
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutSlotType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutSlotType)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse PutSlotType))
-> Logger
-> Service
-> Proxy PutSlotType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutSlotType)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [SlotTypeConfiguration]
-> Maybe Text
-> Maybe SlotValueSelectionStrategy
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> Maybe [EnumerationValue]
-> Int
-> PutSlotTypeResponse
PutSlotTypeResponse'
            (Maybe Text
 -> Maybe [SlotTypeConfiguration]
 -> Maybe Text
 -> Maybe SlotValueSelectionStrategy
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Bool
 -> Maybe Text
 -> Maybe [EnumerationValue]
 -> Int
 -> PutSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [SlotTypeConfiguration]
      -> Maybe Text
      -> Maybe SlotValueSelectionStrategy
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"parentSlotTypeSignature")
            Either
  String
  (Maybe [SlotTypeConfiguration]
   -> Maybe Text
   -> Maybe SlotValueSelectionStrategy
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [EnumerationValue]
   -> Int
   -> PutSlotTypeResponse)
-> Either String (Maybe [SlotTypeConfiguration])
-> Either
     String
     (Maybe Text
      -> Maybe SlotValueSelectionStrategy
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [SlotTypeConfiguration]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"slotTypeConfigurations"
                            Either String (Maybe (Maybe [SlotTypeConfiguration]))
-> Maybe [SlotTypeConfiguration]
-> Either String (Maybe [SlotTypeConfiguration])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SlotTypeConfiguration]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe SlotValueSelectionStrategy
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [EnumerationValue]
   -> Int
   -> PutSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe SlotValueSelectionStrategy
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"checksum")
            Either
  String
  (Maybe SlotValueSelectionStrategy
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [EnumerationValue]
   -> Int
   -> PutSlotTypeResponse)
-> Either String (Maybe SlotValueSelectionStrategy)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe SlotValueSelectionStrategy)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"valueSelectionStrategy")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [EnumerationValue]
   -> Int
   -> PutSlotTypeResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdDate")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [EnumerationValue]
   -> Int
   -> PutSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [EnumerationValue]
   -> Int
   -> PutSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"version")
            Either
  String
  (Maybe POSIX
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [EnumerationValue]
   -> Int
   -> PutSlotTypeResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastUpdatedDate")
            Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe [EnumerationValue]
   -> Int
   -> PutSlotTypeResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe [EnumerationValue] -> Int -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createVersion")
            Either
  String
  (Maybe Text
   -> Maybe [EnumerationValue] -> Int -> PutSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [EnumerationValue] -> Int -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            Either
  String (Maybe [EnumerationValue] -> Int -> PutSlotTypeResponse)
-> Either String (Maybe [EnumerationValue])
-> Either String (Int -> PutSlotTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [EnumerationValue]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"enumerationValues"
                            Either String (Maybe (Maybe [EnumerationValue]))
-> Maybe [EnumerationValue]
-> Either String (Maybe [EnumerationValue])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EnumerationValue]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> PutSlotTypeResponse)
-> Either String Int -> Either String PutSlotTypeResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable PutSlotType

instance Prelude.NFData PutSlotType

instance Core.ToHeaders PutSlotType where
  toHeaders :: PutSlotType -> ResponseHeaders
toHeaders =
    ResponseHeaders -> PutSlotType -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

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

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

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

-- | /See:/ 'newPutSlotTypeResponse' smart constructor.
data PutSlotTypeResponse = PutSlotTypeResponse'
  { -- | 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],
    -- | Checksum of the @$LATEST@ version of the slot type.
    PutSlotTypeResponse -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | 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 date that the slot type was created.
    PutSlotTypeResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | The name of the slot type.
    PutSlotTypeResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | 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 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 Core.POSIX,
    -- | @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,
    -- | 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 response's http status code.
    PutSlotTypeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutSlotTypeResponse -> PutSlotTypeResponse -> Bool
(PutSlotTypeResponse -> PutSlotTypeResponse -> Bool)
-> (PutSlotTypeResponse -> PutSlotTypeResponse -> Bool)
-> Eq PutSlotTypeResponse
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]
(Int -> ReadS PutSlotTypeResponse)
-> ReadS [PutSlotTypeResponse]
-> ReadPrec PutSlotTypeResponse
-> ReadPrec [PutSlotTypeResponse]
-> Read 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
(Int -> PutSlotTypeResponse -> ShowS)
-> (PutSlotTypeResponse -> String)
-> ([PutSlotTypeResponse] -> ShowS)
-> Show PutSlotTypeResponse
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. PutSlotTypeResponse -> Rep PutSlotTypeResponse x)
-> (forall x. Rep PutSlotTypeResponse x -> PutSlotTypeResponse)
-> Generic PutSlotTypeResponse
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:
--
-- '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.
--
-- 'checksum', 'putSlotTypeResponse_checksum' - Checksum of the @$LATEST@ version of the 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.
--
-- 'createdDate', 'putSlotTypeResponse_createdDate' - The date that the slot type was created.
--
-- 'name', 'putSlotTypeResponse_name' - The name of the slot type.
--
-- 'version', 'putSlotTypeResponse_version' - The version of the slot type. For a new slot type, the version is always
-- @$LATEST@.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'httpStatus', 'putSlotTypeResponse_httpStatus' - The response's http status code.
newPutSlotTypeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutSlotTypeResponse
newPutSlotTypeResponse :: Int -> PutSlotTypeResponse
newPutSlotTypeResponse Int
pHttpStatus_ =
  PutSlotTypeResponse' :: Maybe Text
-> Maybe [SlotTypeConfiguration]
-> Maybe Text
-> Maybe SlotValueSelectionStrategy
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> Maybe [EnumerationValue]
-> Int
-> PutSlotTypeResponse
PutSlotTypeResponse'
    { $sel:parentSlotTypeSignature:PutSlotTypeResponse' :: Maybe Text
parentSlotTypeSignature =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeConfigurations:PutSlotTypeResponse' :: Maybe [SlotTypeConfiguration]
slotTypeConfigurations = Maybe [SlotTypeConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:PutSlotTypeResponse' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:valueSelectionStrategy:PutSlotTypeResponse' :: Maybe SlotValueSelectionStrategy
valueSelectionStrategy = Maybe SlotValueSelectionStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:PutSlotTypeResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:PutSlotTypeResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:PutSlotTypeResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:PutSlotTypeResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createVersion:PutSlotTypeResponse' :: Maybe Bool
createVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:description:PutSlotTypeResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enumerationValues:PutSlotTypeResponse' :: Maybe [EnumerationValue]
enumerationValues = Maybe [EnumerationValue]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutSlotTypeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The built-in slot type used as the parent of the slot type.
putSlotTypeResponse_parentSlotTypeSignature :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Text)
putSlotTypeResponse_parentSlotTypeSignature :: (Maybe Text -> f (Maybe Text))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_parentSlotTypeSignature = (PutSlotTypeResponse -> Maybe Text)
-> (PutSlotTypeResponse -> Maybe Text -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse PutSlotTypeResponse (Maybe Text) (Maybe Text)
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 :: (Maybe [SlotTypeConfiguration]
 -> f (Maybe [SlotTypeConfiguration]))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_slotTypeConfigurations = (PutSlotTypeResponse -> Maybe [SlotTypeConfiguration])
-> (PutSlotTypeResponse
    -> Maybe [SlotTypeConfiguration] -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse
     PutSlotTypeResponse
     (Maybe [SlotTypeConfiguration])
     (Maybe [SlotTypeConfiguration])
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) ((Maybe [SlotTypeConfiguration]
  -> f (Maybe [SlotTypeConfiguration]))
 -> PutSlotTypeResponse -> f PutSlotTypeResponse)
-> ((Maybe [SlotTypeConfiguration]
     -> f (Maybe [SlotTypeConfiguration]))
    -> Maybe [SlotTypeConfiguration]
    -> f (Maybe [SlotTypeConfiguration]))
-> (Maybe [SlotTypeConfiguration]
    -> f (Maybe [SlotTypeConfiguration]))
-> PutSlotTypeResponse
-> f PutSlotTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
-> Iso
     (Maybe [SlotTypeConfiguration])
     (Maybe [SlotTypeConfiguration])
     (Maybe [SlotTypeConfiguration])
     (Maybe [SlotTypeConfiguration])
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 AnIso
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
  [SlotTypeConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Checksum of the @$LATEST@ version of the slot type.
putSlotTypeResponse_checksum :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Text)
putSlotTypeResponse_checksum :: (Maybe Text -> f (Maybe Text))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_checksum = (PutSlotTypeResponse -> Maybe Text)
-> (PutSlotTypeResponse -> Maybe Text -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse PutSlotTypeResponse (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe SlotValueSelectionStrategy
 -> f (Maybe SlotValueSelectionStrategy))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_valueSelectionStrategy = (PutSlotTypeResponse -> Maybe SlotValueSelectionStrategy)
-> (PutSlotTypeResponse
    -> Maybe SlotValueSelectionStrategy -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse
     PutSlotTypeResponse
     (Maybe SlotValueSelectionStrategy)
     (Maybe SlotValueSelectionStrategy)
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 date that the slot type was created.
putSlotTypeResponse_createdDate :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.UTCTime)
putSlotTypeResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_createdDate = (PutSlotTypeResponse -> Maybe POSIX)
-> (PutSlotTypeResponse -> Maybe POSIX -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse PutSlotTypeResponse (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutSlotTypeResponse -> f PutSlotTypeResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutSlotTypeResponse
-> f PutSlotTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the slot type.
putSlotTypeResponse_name :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Text)
putSlotTypeResponse_name :: (Maybe Text -> f (Maybe Text))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_name = (PutSlotTypeResponse -> Maybe Text)
-> (PutSlotTypeResponse -> Maybe Text -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse PutSlotTypeResponse (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_version = (PutSlotTypeResponse -> Maybe Text)
-> (PutSlotTypeResponse -> Maybe Text -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse PutSlotTypeResponse (Maybe Text) (Maybe Text)
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 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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_lastUpdatedDate = (PutSlotTypeResponse -> Maybe POSIX)
-> (PutSlotTypeResponse -> Maybe POSIX -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse PutSlotTypeResponse (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutSlotTypeResponse -> f PutSlotTypeResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutSlotTypeResponse
-> f PutSlotTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | @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 :: (Maybe Bool -> f (Maybe Bool))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_createVersion = (PutSlotTypeResponse -> Maybe Bool)
-> (PutSlotTypeResponse -> Maybe Bool -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse PutSlotTypeResponse (Maybe Bool) (Maybe Bool)
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)

-- | A description of the slot type.
putSlotTypeResponse_description :: Lens.Lens' PutSlotTypeResponse (Prelude.Maybe Prelude.Text)
putSlotTypeResponse_description :: (Maybe Text -> f (Maybe Text))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_description = (PutSlotTypeResponse -> Maybe Text)
-> (PutSlotTypeResponse -> Maybe Text -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse PutSlotTypeResponse (Maybe Text) (Maybe Text)
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 :: (Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
-> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_enumerationValues = (PutSlotTypeResponse -> Maybe [EnumerationValue])
-> (PutSlotTypeResponse
    -> Maybe [EnumerationValue] -> PutSlotTypeResponse)
-> Lens
     PutSlotTypeResponse
     PutSlotTypeResponse
     (Maybe [EnumerationValue])
     (Maybe [EnumerationValue])
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) ((Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
 -> PutSlotTypeResponse -> f PutSlotTypeResponse)
-> ((Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
    -> Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
-> (Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
-> PutSlotTypeResponse
-> f PutSlotTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EnumerationValue]
  [EnumerationValue]
  [EnumerationValue]
  [EnumerationValue]
-> Iso
     (Maybe [EnumerationValue])
     (Maybe [EnumerationValue])
     (Maybe [EnumerationValue])
     (Maybe [EnumerationValue])
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 AnIso
  [EnumerationValue]
  [EnumerationValue]
  [EnumerationValue]
  [EnumerationValue]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
putSlotTypeResponse_httpStatus :: Lens.Lens' PutSlotTypeResponse Prelude.Int
putSlotTypeResponse_httpStatus :: (Int -> f Int) -> PutSlotTypeResponse -> f PutSlotTypeResponse
putSlotTypeResponse_httpStatus = (PutSlotTypeResponse -> Int)
-> (PutSlotTypeResponse -> Int -> PutSlotTypeResponse)
-> Lens PutSlotTypeResponse PutSlotTypeResponse Int Int
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