{-# 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.CreateSlotTypeVersion
-- 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 new version of a slot type based on the @$LATEST@ version of
-- the specified slot type. If the @$LATEST@ version of this resource has
-- not changed since the last version that you created, Amazon Lex doesn\'t
-- create a new version. It returns the last version that you created.
--
-- You can update only the @$LATEST@ version of a slot type. You can\'t
-- update the numbered versions that you create with the
-- @CreateSlotTypeVersion@ operation.
--
-- When you create a version of a slot type, Amazon Lex sets the version to
-- 1. Subsequent versions increment by 1. For more information, see
-- versioning-intro.
--
-- This operation requires permissions for the @lex:CreateSlotTypeVersion@
-- action.
module Amazonka.LexModels.CreateSlotTypeVersion
  ( -- * Creating a Request
    CreateSlotTypeVersion (..),
    newCreateSlotTypeVersion,

    -- * Request Lenses
    createSlotTypeVersion_checksum,
    createSlotTypeVersion_name,

    -- * Destructuring the Response
    CreateSlotTypeVersionResponse (..),
    newCreateSlotTypeVersionResponse,

    -- * Response Lenses
    createSlotTypeVersionResponse_checksum,
    createSlotTypeVersionResponse_createdDate,
    createSlotTypeVersionResponse_description,
    createSlotTypeVersionResponse_enumerationValues,
    createSlotTypeVersionResponse_lastUpdatedDate,
    createSlotTypeVersionResponse_name,
    createSlotTypeVersionResponse_parentSlotTypeSignature,
    createSlotTypeVersionResponse_slotTypeConfigurations,
    createSlotTypeVersionResponse_valueSelectionStrategy,
    createSlotTypeVersionResponse_version,
    createSlotTypeVersionResponse_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:/ 'newCreateSlotTypeVersion' smart constructor.
data CreateSlotTypeVersion = CreateSlotTypeVersion'
  { -- | Checksum for the @$LATEST@ version of the slot type that you want to
    -- publish. If you specify a checksum and the @$LATEST@ version of the slot
    -- type has a different checksum, Amazon Lex returns a
    -- @PreconditionFailedException@ exception and doesn\'t publish the new
    -- version. If you don\'t specify a checksum, Amazon Lex publishes the
    -- @$LATEST@ version.
    CreateSlotTypeVersion -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
    -- | The name of the slot type that you want to create a new version for. The
    -- name is case sensitive.
    CreateSlotTypeVersion -> Text
name :: Prelude.Text
  }
  deriving (CreateSlotTypeVersion -> CreateSlotTypeVersion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSlotTypeVersion -> CreateSlotTypeVersion -> Bool
$c/= :: CreateSlotTypeVersion -> CreateSlotTypeVersion -> Bool
== :: CreateSlotTypeVersion -> CreateSlotTypeVersion -> Bool
$c== :: CreateSlotTypeVersion -> CreateSlotTypeVersion -> Bool
Prelude.Eq, ReadPrec [CreateSlotTypeVersion]
ReadPrec CreateSlotTypeVersion
Int -> ReadS CreateSlotTypeVersion
ReadS [CreateSlotTypeVersion]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSlotTypeVersion]
$creadListPrec :: ReadPrec [CreateSlotTypeVersion]
readPrec :: ReadPrec CreateSlotTypeVersion
$creadPrec :: ReadPrec CreateSlotTypeVersion
readList :: ReadS [CreateSlotTypeVersion]
$creadList :: ReadS [CreateSlotTypeVersion]
readsPrec :: Int -> ReadS CreateSlotTypeVersion
$creadsPrec :: Int -> ReadS CreateSlotTypeVersion
Prelude.Read, Int -> CreateSlotTypeVersion -> ShowS
[CreateSlotTypeVersion] -> ShowS
CreateSlotTypeVersion -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSlotTypeVersion] -> ShowS
$cshowList :: [CreateSlotTypeVersion] -> ShowS
show :: CreateSlotTypeVersion -> String
$cshow :: CreateSlotTypeVersion -> String
showsPrec :: Int -> CreateSlotTypeVersion -> ShowS
$cshowsPrec :: Int -> CreateSlotTypeVersion -> ShowS
Prelude.Show, forall x. Rep CreateSlotTypeVersion x -> CreateSlotTypeVersion
forall x. CreateSlotTypeVersion -> Rep CreateSlotTypeVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSlotTypeVersion x -> CreateSlotTypeVersion
$cfrom :: forall x. CreateSlotTypeVersion -> Rep CreateSlotTypeVersion x
Prelude.Generic)

-- |
-- Create a value of 'CreateSlotTypeVersion' 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', 'createSlotTypeVersion_checksum' - Checksum for the @$LATEST@ version of the slot type that you want to
-- publish. If you specify a checksum and the @$LATEST@ version of the slot
-- type has a different checksum, Amazon Lex returns a
-- @PreconditionFailedException@ exception and doesn\'t publish the new
-- version. If you don\'t specify a checksum, Amazon Lex publishes the
-- @$LATEST@ version.
--
-- 'name', 'createSlotTypeVersion_name' - The name of the slot type that you want to create a new version for. The
-- name is case sensitive.
newCreateSlotTypeVersion ::
  -- | 'name'
  Prelude.Text ->
  CreateSlotTypeVersion
newCreateSlotTypeVersion :: Text -> CreateSlotTypeVersion
newCreateSlotTypeVersion Text
pName_ =
  CreateSlotTypeVersion'
    { $sel:checksum:CreateSlotTypeVersion' :: Maybe Text
checksum = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateSlotTypeVersion' :: Text
name = Text
pName_
    }

-- | Checksum for the @$LATEST@ version of the slot type that you want to
-- publish. If you specify a checksum and the @$LATEST@ version of the slot
-- type has a different checksum, Amazon Lex returns a
-- @PreconditionFailedException@ exception and doesn\'t publish the new
-- version. If you don\'t specify a checksum, Amazon Lex publishes the
-- @$LATEST@ version.
createSlotTypeVersion_checksum :: Lens.Lens' CreateSlotTypeVersion (Prelude.Maybe Prelude.Text)
createSlotTypeVersion_checksum :: Lens' CreateSlotTypeVersion (Maybe Text)
createSlotTypeVersion_checksum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeVersion' {Maybe Text
checksum :: Maybe Text
$sel:checksum:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: CreateSlotTypeVersion
s@CreateSlotTypeVersion' {} Maybe Text
a -> CreateSlotTypeVersion
s {$sel:checksum:CreateSlotTypeVersion' :: Maybe Text
checksum = Maybe Text
a} :: CreateSlotTypeVersion)

-- | The name of the slot type that you want to create a new version for. The
-- name is case sensitive.
createSlotTypeVersion_name :: Lens.Lens' CreateSlotTypeVersion Prelude.Text
createSlotTypeVersion_name :: Lens' CreateSlotTypeVersion Text
createSlotTypeVersion_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeVersion' {Text
name :: Text
$sel:name:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> Text
name} -> Text
name) (\s :: CreateSlotTypeVersion
s@CreateSlotTypeVersion' {} Text
a -> CreateSlotTypeVersion
s {$sel:name:CreateSlotTypeVersion' :: Text
name = Text
a} :: CreateSlotTypeVersion)

instance Core.AWSRequest CreateSlotTypeVersion where
  type
    AWSResponse CreateSlotTypeVersion =
      CreateSlotTypeVersionResponse
  request :: (Service -> Service)
-> CreateSlotTypeVersion -> Request CreateSlotTypeVersion
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateSlotTypeVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateSlotTypeVersion)))
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 POSIX
-> Maybe Text
-> Maybe [EnumerationValue]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [SlotTypeConfiguration]
-> Maybe SlotValueSelectionStrategy
-> Maybe Text
-> Int
-> CreateSlotTypeVersionResponse
CreateSlotTypeVersionResponse'
            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
"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 CreateSlotTypeVersion where
  hashWithSalt :: Int -> CreateSlotTypeVersion -> Int
hashWithSalt Int
_salt CreateSlotTypeVersion' {Maybe Text
Text
name :: Text
checksum :: Maybe Text
$sel:name:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> Text
$sel:checksum:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> 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` Text
name

instance Prelude.NFData CreateSlotTypeVersion where
  rnf :: CreateSlotTypeVersion -> ()
rnf CreateSlotTypeVersion' {Maybe Text
Text
name :: Text
checksum :: Maybe Text
$sel:name:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> Text
$sel:checksum:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> 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 Text
name

instance Data.ToHeaders CreateSlotTypeVersion where
  toHeaders :: CreateSlotTypeVersion -> 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 CreateSlotTypeVersion where
  toJSON :: CreateSlotTypeVersion -> Value
toJSON CreateSlotTypeVersion' {Maybe Text
Text
name :: Text
checksum :: Maybe Text
$sel:name:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> Text
$sel:checksum:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> 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]
      )

instance Data.ToPath CreateSlotTypeVersion where
  toPath :: CreateSlotTypeVersion -> ByteString
toPath CreateSlotTypeVersion' {Maybe Text
Text
name :: Text
checksum :: Maybe Text
$sel:name:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> Text
$sel:checksum:CreateSlotTypeVersion' :: CreateSlotTypeVersion -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/slottypes/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name, ByteString
"/versions"]

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

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

-- |
-- Create a value of 'CreateSlotTypeVersionResponse' 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', 'createSlotTypeVersionResponse_checksum' - Checksum of the @$LATEST@ version of the slot type.
--
-- 'createdDate', 'createSlotTypeVersionResponse_createdDate' - The date that the slot type was created.
--
-- 'description', 'createSlotTypeVersionResponse_description' - A description of the slot type.
--
-- 'enumerationValues', 'createSlotTypeVersionResponse_enumerationValues' - A list of @EnumerationValue@ objects that defines the values that the
-- slot type can take.
--
-- 'lastUpdatedDate', 'createSlotTypeVersionResponse_lastUpdatedDate' - The date that the slot type was updated. When you create a resource, the
-- creation date and last update date are the same.
--
-- 'name', 'createSlotTypeVersionResponse_name' - The name of the slot type.
--
-- 'parentSlotTypeSignature', 'createSlotTypeVersionResponse_parentSlotTypeSignature' - The built-in slot type used a the parent of the slot type.
--
-- 'slotTypeConfigurations', 'createSlotTypeVersionResponse_slotTypeConfigurations' - Configuration information that extends the parent built-in slot type.
--
-- 'valueSelectionStrategy', 'createSlotTypeVersionResponse_valueSelectionStrategy' - The strategy that Amazon Lex uses to determine the value of the slot.
-- For more information, see PutSlotType.
--
-- 'version', 'createSlotTypeVersionResponse_version' - The version assigned to the new slot type version.
--
-- 'httpStatus', 'createSlotTypeVersionResponse_httpStatus' - The response's http status code.
newCreateSlotTypeVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateSlotTypeVersionResponse
newCreateSlotTypeVersionResponse :: Int -> CreateSlotTypeVersionResponse
newCreateSlotTypeVersionResponse Int
pHttpStatus_ =
  CreateSlotTypeVersionResponse'
    { $sel:checksum:CreateSlotTypeVersionResponse' :: Maybe Text
checksum =
        forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:CreateSlotTypeVersionResponse' :: Maybe POSIX
createdDate = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateSlotTypeVersionResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:enumerationValues:CreateSlotTypeVersionResponse' :: Maybe [EnumerationValue]
enumerationValues = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:CreateSlotTypeVersionResponse' :: Maybe POSIX
lastUpdatedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateSlotTypeVersionResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:parentSlotTypeSignature:CreateSlotTypeVersionResponse' :: Maybe Text
parentSlotTypeSignature = forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeConfigurations:CreateSlotTypeVersionResponse' :: Maybe [SlotTypeConfiguration]
slotTypeConfigurations = forall a. Maybe a
Prelude.Nothing,
      $sel:valueSelectionStrategy:CreateSlotTypeVersionResponse' :: Maybe SlotValueSelectionStrategy
valueSelectionStrategy = forall a. Maybe a
Prelude.Nothing,
      $sel:version:CreateSlotTypeVersionResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateSlotTypeVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | A list of @EnumerationValue@ objects that defines the values that the
-- slot type can take.
createSlotTypeVersionResponse_enumerationValues :: Lens.Lens' CreateSlotTypeVersionResponse (Prelude.Maybe [EnumerationValue])
createSlotTypeVersionResponse_enumerationValues :: Lens' CreateSlotTypeVersionResponse (Maybe [EnumerationValue])
createSlotTypeVersionResponse_enumerationValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeVersionResponse' {Maybe [EnumerationValue]
enumerationValues :: Maybe [EnumerationValue]
$sel:enumerationValues:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe [EnumerationValue]
enumerationValues} -> Maybe [EnumerationValue]
enumerationValues) (\s :: CreateSlotTypeVersionResponse
s@CreateSlotTypeVersionResponse' {} Maybe [EnumerationValue]
a -> CreateSlotTypeVersionResponse
s {$sel:enumerationValues:CreateSlotTypeVersionResponse' :: Maybe [EnumerationValue]
enumerationValues = Maybe [EnumerationValue]
a} :: CreateSlotTypeVersionResponse) 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 resource, the
-- creation date and last update date are the same.
createSlotTypeVersionResponse_lastUpdatedDate :: Lens.Lens' CreateSlotTypeVersionResponse (Prelude.Maybe Prelude.UTCTime)
createSlotTypeVersionResponse_lastUpdatedDate :: Lens' CreateSlotTypeVersionResponse (Maybe UTCTime)
createSlotTypeVersionResponse_lastUpdatedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeVersionResponse' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: CreateSlotTypeVersionResponse
s@CreateSlotTypeVersionResponse' {} Maybe POSIX
a -> CreateSlotTypeVersionResponse
s {$sel:lastUpdatedDate:CreateSlotTypeVersionResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: CreateSlotTypeVersionResponse) 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.
createSlotTypeVersionResponse_name :: Lens.Lens' CreateSlotTypeVersionResponse (Prelude.Maybe Prelude.Text)
createSlotTypeVersionResponse_name :: Lens' CreateSlotTypeVersionResponse (Maybe Text)
createSlotTypeVersionResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeVersionResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateSlotTypeVersionResponse
s@CreateSlotTypeVersionResponse' {} Maybe Text
a -> CreateSlotTypeVersionResponse
s {$sel:name:CreateSlotTypeVersionResponse' :: Maybe Text
name = Maybe Text
a} :: CreateSlotTypeVersionResponse)

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

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

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

-- | The version assigned to the new slot type version.
createSlotTypeVersionResponse_version :: Lens.Lens' CreateSlotTypeVersionResponse (Prelude.Maybe Prelude.Text)
createSlotTypeVersionResponse_version :: Lens' CreateSlotTypeVersionResponse (Maybe Text)
createSlotTypeVersionResponse_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlotTypeVersionResponse' {Maybe Text
version :: Maybe Text
$sel:version:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: CreateSlotTypeVersionResponse
s@CreateSlotTypeVersionResponse' {} Maybe Text
a -> CreateSlotTypeVersionResponse
s {$sel:version:CreateSlotTypeVersionResponse' :: Maybe Text
version = Maybe Text
a} :: CreateSlotTypeVersionResponse)

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

instance Prelude.NFData CreateSlotTypeVersionResponse where
  rnf :: CreateSlotTypeVersionResponse -> ()
rnf CreateSlotTypeVersionResponse' {Int
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
checksum :: Maybe Text
$sel:httpStatus:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Int
$sel:version:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe Text
$sel:valueSelectionStrategy:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe SlotValueSelectionStrategy
$sel:slotTypeConfigurations:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe [SlotTypeConfiguration]
$sel:parentSlotTypeSignature:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe Text
$sel:name:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe Text
$sel:lastUpdatedDate:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe POSIX
$sel:enumerationValues:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe [EnumerationValue]
$sel:description:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe Text
$sel:createdDate:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> Maybe POSIX
$sel:checksum:CreateSlotTypeVersionResponse' :: CreateSlotTypeVersionResponse -> 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 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