{-# 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.GetSlotType
-- 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)
--
-- Returns information about a specific version of a slot type. In addition
-- to specifying the slot type name, you must specify the slot type
-- version.
--
-- This operation requires permissions for the @lex:GetSlotType@ action.
module Amazonka.LexModels.GetSlotType
  ( -- * Creating a Request
    GetSlotType (..),
    newGetSlotType,

    -- * Request Lenses
    getSlotType_name,
    getSlotType_version,

    -- * Destructuring the Response
    GetSlotTypeResponse (..),
    newGetSlotTypeResponse,

    -- * Response Lenses
    getSlotTypeResponse_parentSlotTypeSignature,
    getSlotTypeResponse_slotTypeConfigurations,
    getSlotTypeResponse_checksum,
    getSlotTypeResponse_valueSelectionStrategy,
    getSlotTypeResponse_createdDate,
    getSlotTypeResponse_name,
    getSlotTypeResponse_version,
    getSlotTypeResponse_lastUpdatedDate,
    getSlotTypeResponse_description,
    getSlotTypeResponse_enumerationValues,
    getSlotTypeResponse_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:/ 'newGetSlotType' smart constructor.
data GetSlotType = GetSlotType'
  { -- | The name of the slot type. The name is case sensitive.
    GetSlotType -> Text
name :: Prelude.Text,
    -- | The version of the slot type.
    GetSlotType -> Text
version :: Prelude.Text
  }
  deriving (GetSlotType -> GetSlotType -> Bool
(GetSlotType -> GetSlotType -> Bool)
-> (GetSlotType -> GetSlotType -> Bool) -> Eq GetSlotType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSlotType -> GetSlotType -> Bool
$c/= :: GetSlotType -> GetSlotType -> Bool
== :: GetSlotType -> GetSlotType -> Bool
$c== :: GetSlotType -> GetSlotType -> Bool
Prelude.Eq, ReadPrec [GetSlotType]
ReadPrec GetSlotType
Int -> ReadS GetSlotType
ReadS [GetSlotType]
(Int -> ReadS GetSlotType)
-> ReadS [GetSlotType]
-> ReadPrec GetSlotType
-> ReadPrec [GetSlotType]
-> Read GetSlotType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSlotType]
$creadListPrec :: ReadPrec [GetSlotType]
readPrec :: ReadPrec GetSlotType
$creadPrec :: ReadPrec GetSlotType
readList :: ReadS [GetSlotType]
$creadList :: ReadS [GetSlotType]
readsPrec :: Int -> ReadS GetSlotType
$creadsPrec :: Int -> ReadS GetSlotType
Prelude.Read, Int -> GetSlotType -> ShowS
[GetSlotType] -> ShowS
GetSlotType -> String
(Int -> GetSlotType -> ShowS)
-> (GetSlotType -> String)
-> ([GetSlotType] -> ShowS)
-> Show GetSlotType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSlotType] -> ShowS
$cshowList :: [GetSlotType] -> ShowS
show :: GetSlotType -> String
$cshow :: GetSlotType -> String
showsPrec :: Int -> GetSlotType -> ShowS
$cshowsPrec :: Int -> GetSlotType -> ShowS
Prelude.Show, (forall x. GetSlotType -> Rep GetSlotType x)
-> (forall x. Rep GetSlotType x -> GetSlotType)
-> Generic GetSlotType
forall x. Rep GetSlotType x -> GetSlotType
forall x. GetSlotType -> Rep GetSlotType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetSlotType x -> GetSlotType
$cfrom :: forall x. GetSlotType -> Rep GetSlotType x
Prelude.Generic)

-- |
-- Create a value of 'GetSlotType' 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:
--
-- 'name', 'getSlotType_name' - The name of the slot type. The name is case sensitive.
--
-- 'version', 'getSlotType_version' - The version of the slot type.
newGetSlotType ::
  -- | 'name'
  Prelude.Text ->
  -- | 'version'
  Prelude.Text ->
  GetSlotType
newGetSlotType :: Text -> Text -> GetSlotType
newGetSlotType Text
pName_ Text
pVersion_ =
  GetSlotType' :: Text -> Text -> GetSlotType
GetSlotType' {$sel:name:GetSlotType' :: Text
name = Text
pName_, $sel:version:GetSlotType' :: Text
version = Text
pVersion_}

-- | The name of the slot type. The name is case sensitive.
getSlotType_name :: Lens.Lens' GetSlotType Prelude.Text
getSlotType_name :: (Text -> f Text) -> GetSlotType -> f GetSlotType
getSlotType_name = (GetSlotType -> Text)
-> (GetSlotType -> Text -> GetSlotType)
-> Lens GetSlotType GetSlotType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotType' {Text
name :: Text
$sel:name:GetSlotType' :: GetSlotType -> Text
name} -> Text
name) (\s :: GetSlotType
s@GetSlotType' {} Text
a -> GetSlotType
s {$sel:name:GetSlotType' :: Text
name = Text
a} :: GetSlotType)

-- | The version of the slot type.
getSlotType_version :: Lens.Lens' GetSlotType Prelude.Text
getSlotType_version :: (Text -> f Text) -> GetSlotType -> f GetSlotType
getSlotType_version = (GetSlotType -> Text)
-> (GetSlotType -> Text -> GetSlotType)
-> Lens GetSlotType GetSlotType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotType' {Text
version :: Text
$sel:version:GetSlotType' :: GetSlotType -> Text
version} -> Text
version) (\s :: GetSlotType
s@GetSlotType' {} Text
a -> GetSlotType
s {$sel:version:GetSlotType' :: Text
version = Text
a} :: GetSlotType)

instance Core.AWSRequest GetSlotType where
  type AWSResponse GetSlotType = GetSlotTypeResponse
  request :: GetSlotType -> Request GetSlotType
request = Service -> GetSlotType -> Request GetSlotType
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetSlotType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetSlotType)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetSlotType))
-> Logger
-> Service
-> Proxy GetSlotType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetSlotType)))
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 Text
-> Maybe [EnumerationValue]
-> Int
-> GetSlotTypeResponse
GetSlotTypeResponse'
            (Maybe Text
 -> Maybe [SlotTypeConfiguration]
 -> Maybe Text
 -> Maybe SlotValueSelectionStrategy
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe [EnumerationValue]
 -> Int
 -> GetSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [SlotTypeConfiguration]
      -> Maybe Text
      -> Maybe SlotValueSelectionStrategy
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> GetSlotTypeResponse)
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 Text
   -> Maybe [EnumerationValue]
   -> Int
   -> GetSlotTypeResponse)
-> Either String (Maybe [SlotTypeConfiguration])
-> Either
     String
     (Maybe Text
      -> Maybe SlotValueSelectionStrategy
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> GetSlotTypeResponse)
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 Text
   -> Maybe [EnumerationValue]
   -> Int
   -> GetSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe SlotValueSelectionStrategy
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> GetSlotTypeResponse)
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 Text
   -> Maybe [EnumerationValue]
   -> Int
   -> GetSlotTypeResponse)
-> Either String (Maybe SlotValueSelectionStrategy)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> GetSlotTypeResponse)
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 Text
   -> Maybe [EnumerationValue]
   -> Int
   -> GetSlotTypeResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> GetSlotTypeResponse)
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 Text
   -> Maybe [EnumerationValue]
   -> Int
   -> GetSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> GetSlotTypeResponse)
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 Text
   -> Maybe [EnumerationValue]
   -> Int
   -> GetSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe [EnumerationValue]
      -> Int
      -> GetSlotTypeResponse)
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 Text
   -> Maybe [EnumerationValue]
   -> Int
   -> GetSlotTypeResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe [EnumerationValue] -> Int -> GetSlotTypeResponse)
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 Text
   -> Maybe [EnumerationValue] -> Int -> GetSlotTypeResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [EnumerationValue] -> Int -> GetSlotTypeResponse)
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 -> GetSlotTypeResponse)
-> Either String (Maybe [EnumerationValue])
-> Either String (Int -> GetSlotTypeResponse)
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 -> GetSlotTypeResponse)
-> Either String Int -> Either String GetSlotTypeResponse
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 GetSlotType

instance Prelude.NFData GetSlotType

instance Core.ToHeaders GetSlotType where
  toHeaders :: GetSlotType -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetSlotType -> 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.ToPath GetSlotType where
  toPath :: GetSlotType -> ByteString
toPath GetSlotType' {Text
version :: Text
name :: Text
$sel:version:GetSlotType' :: GetSlotType -> Text
$sel:name:GetSlotType' :: GetSlotType -> 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/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
version
      ]

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

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

-- |
-- Create a value of 'GetSlotTypeResponse' 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', 'getSlotTypeResponse_parentSlotTypeSignature' - The built-in slot type used as a parent for the slot type.
--
-- 'slotTypeConfigurations', 'getSlotTypeResponse_slotTypeConfigurations' - Configuration information that extends the parent built-in slot type.
--
-- 'checksum', 'getSlotTypeResponse_checksum' - Checksum of the @$LATEST@ version of the slot type.
--
-- 'valueSelectionStrategy', 'getSlotTypeResponse_valueSelectionStrategy' - The strategy that Amazon Lex uses to determine the value of the slot.
-- For more information, see PutSlotType.
--
-- 'createdDate', 'getSlotTypeResponse_createdDate' - The date that the slot type was created.
--
-- 'name', 'getSlotTypeResponse_name' - The name of the slot type.
--
-- 'version', 'getSlotTypeResponse_version' - The version of the slot type.
--
-- 'lastUpdatedDate', 'getSlotTypeResponse_lastUpdatedDate' - The date that the slot type was updated. When you create a resource, the
-- creation date and last update date are the same.
--
-- 'description', 'getSlotTypeResponse_description' - A description of the slot type.
--
-- 'enumerationValues', 'getSlotTypeResponse_enumerationValues' - A list of @EnumerationValue@ objects that defines the values that the
-- slot type can take.
--
-- 'httpStatus', 'getSlotTypeResponse_httpStatus' - The response's http status code.
newGetSlotTypeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetSlotTypeResponse
newGetSlotTypeResponse :: Int -> GetSlotTypeResponse
newGetSlotTypeResponse Int
pHttpStatus_ =
  GetSlotTypeResponse' :: Maybe Text
-> Maybe [SlotTypeConfiguration]
-> Maybe Text
-> Maybe SlotValueSelectionStrategy
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [EnumerationValue]
-> Int
-> GetSlotTypeResponse
GetSlotTypeResponse'
    { $sel:parentSlotTypeSignature:GetSlotTypeResponse' :: Maybe Text
parentSlotTypeSignature =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypeConfigurations:GetSlotTypeResponse' :: Maybe [SlotTypeConfiguration]
slotTypeConfigurations = Maybe [SlotTypeConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:checksum:GetSlotTypeResponse' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:valueSelectionStrategy:GetSlotTypeResponse' :: Maybe SlotValueSelectionStrategy
valueSelectionStrategy = Maybe SlotValueSelectionStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:GetSlotTypeResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetSlotTypeResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:GetSlotTypeResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:GetSlotTypeResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetSlotTypeResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enumerationValues:GetSlotTypeResponse' :: Maybe [EnumerationValue]
enumerationValues = Maybe [EnumerationValue]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetSlotTypeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | Configuration information that extends the parent built-in slot type.
getSlotTypeResponse_slotTypeConfigurations :: Lens.Lens' GetSlotTypeResponse (Prelude.Maybe [SlotTypeConfiguration])
getSlotTypeResponse_slotTypeConfigurations :: (Maybe [SlotTypeConfiguration]
 -> f (Maybe [SlotTypeConfiguration]))
-> GetSlotTypeResponse -> f GetSlotTypeResponse
getSlotTypeResponse_slotTypeConfigurations = (GetSlotTypeResponse -> Maybe [SlotTypeConfiguration])
-> (GetSlotTypeResponse
    -> Maybe [SlotTypeConfiguration] -> GetSlotTypeResponse)
-> Lens
     GetSlotTypeResponse
     GetSlotTypeResponse
     (Maybe [SlotTypeConfiguration])
     (Maybe [SlotTypeConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeResponse' {Maybe [SlotTypeConfiguration]
slotTypeConfigurations :: Maybe [SlotTypeConfiguration]
$sel:slotTypeConfigurations:GetSlotTypeResponse' :: GetSlotTypeResponse -> Maybe [SlotTypeConfiguration]
slotTypeConfigurations} -> Maybe [SlotTypeConfiguration]
slotTypeConfigurations) (\s :: GetSlotTypeResponse
s@GetSlotTypeResponse' {} Maybe [SlotTypeConfiguration]
a -> GetSlotTypeResponse
s {$sel:slotTypeConfigurations:GetSlotTypeResponse' :: Maybe [SlotTypeConfiguration]
slotTypeConfigurations = Maybe [SlotTypeConfiguration]
a} :: GetSlotTypeResponse) ((Maybe [SlotTypeConfiguration]
  -> f (Maybe [SlotTypeConfiguration]))
 -> GetSlotTypeResponse -> f GetSlotTypeResponse)
-> ((Maybe [SlotTypeConfiguration]
     -> f (Maybe [SlotTypeConfiguration]))
    -> Maybe [SlotTypeConfiguration]
    -> f (Maybe [SlotTypeConfiguration]))
-> (Maybe [SlotTypeConfiguration]
    -> f (Maybe [SlotTypeConfiguration]))
-> GetSlotTypeResponse
-> f GetSlotTypeResponse
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.
getSlotTypeResponse_checksum :: Lens.Lens' GetSlotTypeResponse (Prelude.Maybe Prelude.Text)
getSlotTypeResponse_checksum :: (Maybe Text -> f (Maybe Text))
-> GetSlotTypeResponse -> f GetSlotTypeResponse
getSlotTypeResponse_checksum = (GetSlotTypeResponse -> Maybe Text)
-> (GetSlotTypeResponse -> Maybe Text -> GetSlotTypeResponse)
-> Lens
     GetSlotTypeResponse GetSlotTypeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeResponse' {Maybe Text
checksum :: Maybe Text
$sel:checksum:GetSlotTypeResponse' :: GetSlotTypeResponse -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: GetSlotTypeResponse
s@GetSlotTypeResponse' {} Maybe Text
a -> GetSlotTypeResponse
s {$sel:checksum:GetSlotTypeResponse' :: Maybe Text
checksum = Maybe Text
a} :: GetSlotTypeResponse)

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

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

-- | The version of the slot type.
getSlotTypeResponse_version :: Lens.Lens' GetSlotTypeResponse (Prelude.Maybe Prelude.Text)
getSlotTypeResponse_version :: (Maybe Text -> f (Maybe Text))
-> GetSlotTypeResponse -> f GetSlotTypeResponse
getSlotTypeResponse_version = (GetSlotTypeResponse -> Maybe Text)
-> (GetSlotTypeResponse -> Maybe Text -> GetSlotTypeResponse)
-> Lens
     GetSlotTypeResponse GetSlotTypeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeResponse' {Maybe Text
version :: Maybe Text
$sel:version:GetSlotTypeResponse' :: GetSlotTypeResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: GetSlotTypeResponse
s@GetSlotTypeResponse' {} Maybe Text
a -> GetSlotTypeResponse
s {$sel:version:GetSlotTypeResponse' :: Maybe Text
version = Maybe Text
a} :: GetSlotTypeResponse)

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

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

-- | A list of @EnumerationValue@ objects that defines the values that the
-- slot type can take.
getSlotTypeResponse_enumerationValues :: Lens.Lens' GetSlotTypeResponse (Prelude.Maybe [EnumerationValue])
getSlotTypeResponse_enumerationValues :: (Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
-> GetSlotTypeResponse -> f GetSlotTypeResponse
getSlotTypeResponse_enumerationValues = (GetSlotTypeResponse -> Maybe [EnumerationValue])
-> (GetSlotTypeResponse
    -> Maybe [EnumerationValue] -> GetSlotTypeResponse)
-> Lens
     GetSlotTypeResponse
     GetSlotTypeResponse
     (Maybe [EnumerationValue])
     (Maybe [EnumerationValue])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeResponse' {Maybe [EnumerationValue]
enumerationValues :: Maybe [EnumerationValue]
$sel:enumerationValues:GetSlotTypeResponse' :: GetSlotTypeResponse -> Maybe [EnumerationValue]
enumerationValues} -> Maybe [EnumerationValue]
enumerationValues) (\s :: GetSlotTypeResponse
s@GetSlotTypeResponse' {} Maybe [EnumerationValue]
a -> GetSlotTypeResponse
s {$sel:enumerationValues:GetSlotTypeResponse' :: Maybe [EnumerationValue]
enumerationValues = Maybe [EnumerationValue]
a} :: GetSlotTypeResponse) ((Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
 -> GetSlotTypeResponse -> f GetSlotTypeResponse)
-> ((Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
    -> Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
-> (Maybe [EnumerationValue] -> f (Maybe [EnumerationValue]))
-> GetSlotTypeResponse
-> f GetSlotTypeResponse
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.
getSlotTypeResponse_httpStatus :: Lens.Lens' GetSlotTypeResponse Prelude.Int
getSlotTypeResponse_httpStatus :: (Int -> f Int) -> GetSlotTypeResponse -> f GetSlotTypeResponse
getSlotTypeResponse_httpStatus = (GetSlotTypeResponse -> Int)
-> (GetSlotTypeResponse -> Int -> GetSlotTypeResponse)
-> Lens GetSlotTypeResponse GetSlotTypeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetSlotTypeResponse' :: GetSlotTypeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetSlotTypeResponse
s@GetSlotTypeResponse' {} Int
a -> GetSlotTypeResponse
s {$sel:httpStatus:GetSlotTypeResponse' :: Int
httpStatus = Int
a} :: GetSlotTypeResponse)

instance Prelude.NFData GetSlotTypeResponse