{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.LexV2Models.Types.SlotSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexV2Models.Types.PromptSpecification
import Amazonka.LexV2Models.Types.SlotConstraint
import qualified Amazonka.Prelude as Prelude
data SlotSummary = SlotSummary'
{
SlotSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
SlotSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
SlotSummary -> Maybe SlotConstraint
slotConstraint :: Prelude.Maybe SlotConstraint,
SlotSummary -> Maybe Text
slotId :: Prelude.Maybe Prelude.Text,
SlotSummary -> Maybe Text
slotName :: Prelude.Maybe Prelude.Text,
SlotSummary -> Maybe Text
slotTypeId :: Prelude.Maybe Prelude.Text,
SlotSummary -> Maybe PromptSpecification
valueElicitationPromptSpecification :: Prelude.Maybe PromptSpecification
}
deriving (SlotSummary -> SlotSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SlotSummary -> SlotSummary -> Bool
$c/= :: SlotSummary -> SlotSummary -> Bool
== :: SlotSummary -> SlotSummary -> Bool
$c== :: SlotSummary -> SlotSummary -> Bool
Prelude.Eq, ReadPrec [SlotSummary]
ReadPrec SlotSummary
Int -> ReadS SlotSummary
ReadS [SlotSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SlotSummary]
$creadListPrec :: ReadPrec [SlotSummary]
readPrec :: ReadPrec SlotSummary
$creadPrec :: ReadPrec SlotSummary
readList :: ReadS [SlotSummary]
$creadList :: ReadS [SlotSummary]
readsPrec :: Int -> ReadS SlotSummary
$creadsPrec :: Int -> ReadS SlotSummary
Prelude.Read, Int -> SlotSummary -> ShowS
[SlotSummary] -> ShowS
SlotSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SlotSummary] -> ShowS
$cshowList :: [SlotSummary] -> ShowS
show :: SlotSummary -> String
$cshow :: SlotSummary -> String
showsPrec :: Int -> SlotSummary -> ShowS
$cshowsPrec :: Int -> SlotSummary -> ShowS
Prelude.Show, forall x. Rep SlotSummary x -> SlotSummary
forall x. SlotSummary -> Rep SlotSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SlotSummary x -> SlotSummary
$cfrom :: forall x. SlotSummary -> Rep SlotSummary x
Prelude.Generic)
newSlotSummary ::
SlotSummary
newSlotSummary :: SlotSummary
newSlotSummary =
SlotSummary'
{ $sel:description:SlotSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:SlotSummary' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:slotConstraint:SlotSummary' :: Maybe SlotConstraint
slotConstraint = forall a. Maybe a
Prelude.Nothing,
$sel:slotId:SlotSummary' :: Maybe Text
slotId = forall a. Maybe a
Prelude.Nothing,
$sel:slotName:SlotSummary' :: Maybe Text
slotName = forall a. Maybe a
Prelude.Nothing,
$sel:slotTypeId:SlotSummary' :: Maybe Text
slotTypeId = forall a. Maybe a
Prelude.Nothing,
$sel:valueElicitationPromptSpecification:SlotSummary' :: Maybe PromptSpecification
valueElicitationPromptSpecification =
forall a. Maybe a
Prelude.Nothing
}
slotSummary_description :: Lens.Lens' SlotSummary (Prelude.Maybe Prelude.Text)
slotSummary_description :: Lens' SlotSummary (Maybe Text)
slotSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotSummary' {Maybe Text
description :: Maybe Text
$sel:description:SlotSummary' :: SlotSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: SlotSummary
s@SlotSummary' {} Maybe Text
a -> SlotSummary
s {$sel:description:SlotSummary' :: Maybe Text
description = Maybe Text
a} :: SlotSummary)
slotSummary_lastUpdatedDateTime :: Lens.Lens' SlotSummary (Prelude.Maybe Prelude.UTCTime)
slotSummary_lastUpdatedDateTime :: Lens' SlotSummary (Maybe UTCTime)
slotSummary_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:SlotSummary' :: SlotSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: SlotSummary
s@SlotSummary' {} Maybe POSIX
a -> SlotSummary
s {$sel:lastUpdatedDateTime:SlotSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: SlotSummary) 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
slotSummary_slotConstraint :: Lens.Lens' SlotSummary (Prelude.Maybe SlotConstraint)
slotSummary_slotConstraint :: Lens' SlotSummary (Maybe SlotConstraint)
slotSummary_slotConstraint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotSummary' {Maybe SlotConstraint
slotConstraint :: Maybe SlotConstraint
$sel:slotConstraint:SlotSummary' :: SlotSummary -> Maybe SlotConstraint
slotConstraint} -> Maybe SlotConstraint
slotConstraint) (\s :: SlotSummary
s@SlotSummary' {} Maybe SlotConstraint
a -> SlotSummary
s {$sel:slotConstraint:SlotSummary' :: Maybe SlotConstraint
slotConstraint = Maybe SlotConstraint
a} :: SlotSummary)
slotSummary_slotId :: Lens.Lens' SlotSummary (Prelude.Maybe Prelude.Text)
slotSummary_slotId :: Lens' SlotSummary (Maybe Text)
slotSummary_slotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotSummary' {Maybe Text
slotId :: Maybe Text
$sel:slotId:SlotSummary' :: SlotSummary -> Maybe Text
slotId} -> Maybe Text
slotId) (\s :: SlotSummary
s@SlotSummary' {} Maybe Text
a -> SlotSummary
s {$sel:slotId:SlotSummary' :: Maybe Text
slotId = Maybe Text
a} :: SlotSummary)
slotSummary_slotName :: Lens.Lens' SlotSummary (Prelude.Maybe Prelude.Text)
slotSummary_slotName :: Lens' SlotSummary (Maybe Text)
slotSummary_slotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotSummary' {Maybe Text
slotName :: Maybe Text
$sel:slotName:SlotSummary' :: SlotSummary -> Maybe Text
slotName} -> Maybe Text
slotName) (\s :: SlotSummary
s@SlotSummary' {} Maybe Text
a -> SlotSummary
s {$sel:slotName:SlotSummary' :: Maybe Text
slotName = Maybe Text
a} :: SlotSummary)
slotSummary_slotTypeId :: Lens.Lens' SlotSummary (Prelude.Maybe Prelude.Text)
slotSummary_slotTypeId :: Lens' SlotSummary (Maybe Text)
slotSummary_slotTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotSummary' {Maybe Text
slotTypeId :: Maybe Text
$sel:slotTypeId:SlotSummary' :: SlotSummary -> Maybe Text
slotTypeId} -> Maybe Text
slotTypeId) (\s :: SlotSummary
s@SlotSummary' {} Maybe Text
a -> SlotSummary
s {$sel:slotTypeId:SlotSummary' :: Maybe Text
slotTypeId = Maybe Text
a} :: SlotSummary)
slotSummary_valueElicitationPromptSpecification :: Lens.Lens' SlotSummary (Prelude.Maybe PromptSpecification)
slotSummary_valueElicitationPromptSpecification :: Lens' SlotSummary (Maybe PromptSpecification)
slotSummary_valueElicitationPromptSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotSummary' {Maybe PromptSpecification
valueElicitationPromptSpecification :: Maybe PromptSpecification
$sel:valueElicitationPromptSpecification:SlotSummary' :: SlotSummary -> Maybe PromptSpecification
valueElicitationPromptSpecification} -> Maybe PromptSpecification
valueElicitationPromptSpecification) (\s :: SlotSummary
s@SlotSummary' {} Maybe PromptSpecification
a -> SlotSummary
s {$sel:valueElicitationPromptSpecification:SlotSummary' :: Maybe PromptSpecification
valueElicitationPromptSpecification = Maybe PromptSpecification
a} :: SlotSummary)
instance Data.FromJSON SlotSummary where
parseJSON :: Value -> Parser SlotSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SlotSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe SlotConstraint
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PromptSpecification
-> SlotSummary
SlotSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"lastUpdatedDateTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"slotConstraint")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"slotId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"slotName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"slotTypeId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"valueElicitationPromptSpecification")
)
instance Prelude.Hashable SlotSummary where
hashWithSalt :: Int -> SlotSummary -> Int
hashWithSalt Int
_salt SlotSummary' {Maybe Text
Maybe POSIX
Maybe SlotConstraint
Maybe PromptSpecification
valueElicitationPromptSpecification :: Maybe PromptSpecification
slotTypeId :: Maybe Text
slotName :: Maybe Text
slotId :: Maybe Text
slotConstraint :: Maybe SlotConstraint
lastUpdatedDateTime :: Maybe POSIX
description :: Maybe Text
$sel:valueElicitationPromptSpecification:SlotSummary' :: SlotSummary -> Maybe PromptSpecification
$sel:slotTypeId:SlotSummary' :: SlotSummary -> Maybe Text
$sel:slotName:SlotSummary' :: SlotSummary -> Maybe Text
$sel:slotId:SlotSummary' :: SlotSummary -> Maybe Text
$sel:slotConstraint:SlotSummary' :: SlotSummary -> Maybe SlotConstraint
$sel:lastUpdatedDateTime:SlotSummary' :: SlotSummary -> Maybe POSIX
$sel:description:SlotSummary' :: SlotSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SlotConstraint
slotConstraint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
slotId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
slotName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
slotTypeId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PromptSpecification
valueElicitationPromptSpecification
instance Prelude.NFData SlotSummary where
rnf :: SlotSummary -> ()
rnf SlotSummary' {Maybe Text
Maybe POSIX
Maybe SlotConstraint
Maybe PromptSpecification
valueElicitationPromptSpecification :: Maybe PromptSpecification
slotTypeId :: Maybe Text
slotName :: Maybe Text
slotId :: Maybe Text
slotConstraint :: Maybe SlotConstraint
lastUpdatedDateTime :: Maybe POSIX
description :: Maybe Text
$sel:valueElicitationPromptSpecification:SlotSummary' :: SlotSummary -> Maybe PromptSpecification
$sel:slotTypeId:SlotSummary' :: SlotSummary -> Maybe Text
$sel:slotName:SlotSummary' :: SlotSummary -> Maybe Text
$sel:slotId:SlotSummary' :: SlotSummary -> Maybe Text
$sel:slotConstraint:SlotSummary' :: SlotSummary -> Maybe SlotConstraint
$sel:lastUpdatedDateTime:SlotSummary' :: SlotSummary -> Maybe POSIX
$sel:description:SlotSummary' :: SlotSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SlotConstraint
slotConstraint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
slotId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
slotName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
slotTypeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PromptSpecification
valueElicitationPromptSpecification