{-# 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.LexModels.Types.SlotTypeMetadata where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SlotTypeMetadata = SlotTypeMetadata'
{
SlotTypeMetadata -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
SlotTypeMetadata -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
SlotTypeMetadata -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
SlotTypeMetadata -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Core.POSIX,
SlotTypeMetadata -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (SlotTypeMetadata -> SlotTypeMetadata -> Bool
(SlotTypeMetadata -> SlotTypeMetadata -> Bool)
-> (SlotTypeMetadata -> SlotTypeMetadata -> Bool)
-> Eq SlotTypeMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SlotTypeMetadata -> SlotTypeMetadata -> Bool
$c/= :: SlotTypeMetadata -> SlotTypeMetadata -> Bool
== :: SlotTypeMetadata -> SlotTypeMetadata -> Bool
$c== :: SlotTypeMetadata -> SlotTypeMetadata -> Bool
Prelude.Eq, ReadPrec [SlotTypeMetadata]
ReadPrec SlotTypeMetadata
Int -> ReadS SlotTypeMetadata
ReadS [SlotTypeMetadata]
(Int -> ReadS SlotTypeMetadata)
-> ReadS [SlotTypeMetadata]
-> ReadPrec SlotTypeMetadata
-> ReadPrec [SlotTypeMetadata]
-> Read SlotTypeMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SlotTypeMetadata]
$creadListPrec :: ReadPrec [SlotTypeMetadata]
readPrec :: ReadPrec SlotTypeMetadata
$creadPrec :: ReadPrec SlotTypeMetadata
readList :: ReadS [SlotTypeMetadata]
$creadList :: ReadS [SlotTypeMetadata]
readsPrec :: Int -> ReadS SlotTypeMetadata
$creadsPrec :: Int -> ReadS SlotTypeMetadata
Prelude.Read, Int -> SlotTypeMetadata -> ShowS
[SlotTypeMetadata] -> ShowS
SlotTypeMetadata -> String
(Int -> SlotTypeMetadata -> ShowS)
-> (SlotTypeMetadata -> String)
-> ([SlotTypeMetadata] -> ShowS)
-> Show SlotTypeMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SlotTypeMetadata] -> ShowS
$cshowList :: [SlotTypeMetadata] -> ShowS
show :: SlotTypeMetadata -> String
$cshow :: SlotTypeMetadata -> String
showsPrec :: Int -> SlotTypeMetadata -> ShowS
$cshowsPrec :: Int -> SlotTypeMetadata -> ShowS
Prelude.Show, (forall x. SlotTypeMetadata -> Rep SlotTypeMetadata x)
-> (forall x. Rep SlotTypeMetadata x -> SlotTypeMetadata)
-> Generic SlotTypeMetadata
forall x. Rep SlotTypeMetadata x -> SlotTypeMetadata
forall x. SlotTypeMetadata -> Rep SlotTypeMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SlotTypeMetadata x -> SlotTypeMetadata
$cfrom :: forall x. SlotTypeMetadata -> Rep SlotTypeMetadata x
Prelude.Generic)
newSlotTypeMetadata ::
SlotTypeMetadata
newSlotTypeMetadata :: SlotTypeMetadata
newSlotTypeMetadata =
SlotTypeMetadata' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> SlotTypeMetadata
SlotTypeMetadata'
{ $sel:createdDate:SlotTypeMetadata' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:SlotTypeMetadata' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:SlotTypeMetadata' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDate:SlotTypeMetadata' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:SlotTypeMetadata' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
slotTypeMetadata_createdDate :: Lens.Lens' SlotTypeMetadata (Prelude.Maybe Prelude.UTCTime)
slotTypeMetadata_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SlotTypeMetadata -> f SlotTypeMetadata
slotTypeMetadata_createdDate = (SlotTypeMetadata -> Maybe POSIX)
-> (SlotTypeMetadata -> Maybe POSIX -> SlotTypeMetadata)
-> Lens
SlotTypeMetadata SlotTypeMetadata (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotTypeMetadata' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:SlotTypeMetadata' :: SlotTypeMetadata -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: SlotTypeMetadata
s@SlotTypeMetadata' {} Maybe POSIX
a -> SlotTypeMetadata
s {$sel:createdDate:SlotTypeMetadata' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: SlotTypeMetadata) ((Maybe POSIX -> f (Maybe POSIX))
-> SlotTypeMetadata -> f SlotTypeMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SlotTypeMetadata
-> f SlotTypeMetadata
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
slotTypeMetadata_name :: Lens.Lens' SlotTypeMetadata (Prelude.Maybe Prelude.Text)
slotTypeMetadata_name :: (Maybe Text -> f (Maybe Text))
-> SlotTypeMetadata -> f SlotTypeMetadata
slotTypeMetadata_name = (SlotTypeMetadata -> Maybe Text)
-> (SlotTypeMetadata -> Maybe Text -> SlotTypeMetadata)
-> Lens SlotTypeMetadata SlotTypeMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotTypeMetadata' {Maybe Text
name :: Maybe Text
$sel:name:SlotTypeMetadata' :: SlotTypeMetadata -> Maybe Text
name} -> Maybe Text
name) (\s :: SlotTypeMetadata
s@SlotTypeMetadata' {} Maybe Text
a -> SlotTypeMetadata
s {$sel:name:SlotTypeMetadata' :: Maybe Text
name = Maybe Text
a} :: SlotTypeMetadata)
slotTypeMetadata_version :: Lens.Lens' SlotTypeMetadata (Prelude.Maybe Prelude.Text)
slotTypeMetadata_version :: (Maybe Text -> f (Maybe Text))
-> SlotTypeMetadata -> f SlotTypeMetadata
slotTypeMetadata_version = (SlotTypeMetadata -> Maybe Text)
-> (SlotTypeMetadata -> Maybe Text -> SlotTypeMetadata)
-> Lens SlotTypeMetadata SlotTypeMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotTypeMetadata' {Maybe Text
version :: Maybe Text
$sel:version:SlotTypeMetadata' :: SlotTypeMetadata -> Maybe Text
version} -> Maybe Text
version) (\s :: SlotTypeMetadata
s@SlotTypeMetadata' {} Maybe Text
a -> SlotTypeMetadata
s {$sel:version:SlotTypeMetadata' :: Maybe Text
version = Maybe Text
a} :: SlotTypeMetadata)
slotTypeMetadata_lastUpdatedDate :: Lens.Lens' SlotTypeMetadata (Prelude.Maybe Prelude.UTCTime)
slotTypeMetadata_lastUpdatedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SlotTypeMetadata -> f SlotTypeMetadata
slotTypeMetadata_lastUpdatedDate = (SlotTypeMetadata -> Maybe POSIX)
-> (SlotTypeMetadata -> Maybe POSIX -> SlotTypeMetadata)
-> Lens
SlotTypeMetadata SlotTypeMetadata (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotTypeMetadata' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:SlotTypeMetadata' :: SlotTypeMetadata -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: SlotTypeMetadata
s@SlotTypeMetadata' {} Maybe POSIX
a -> SlotTypeMetadata
s {$sel:lastUpdatedDate:SlotTypeMetadata' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: SlotTypeMetadata) ((Maybe POSIX -> f (Maybe POSIX))
-> SlotTypeMetadata -> f SlotTypeMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SlotTypeMetadata
-> f SlotTypeMetadata
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
slotTypeMetadata_description :: Lens.Lens' SlotTypeMetadata (Prelude.Maybe Prelude.Text)
slotTypeMetadata_description :: (Maybe Text -> f (Maybe Text))
-> SlotTypeMetadata -> f SlotTypeMetadata
slotTypeMetadata_description = (SlotTypeMetadata -> Maybe Text)
-> (SlotTypeMetadata -> Maybe Text -> SlotTypeMetadata)
-> Lens SlotTypeMetadata SlotTypeMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotTypeMetadata' {Maybe Text
description :: Maybe Text
$sel:description:SlotTypeMetadata' :: SlotTypeMetadata -> Maybe Text
description} -> Maybe Text
description) (\s :: SlotTypeMetadata
s@SlotTypeMetadata' {} Maybe Text
a -> SlotTypeMetadata
s {$sel:description:SlotTypeMetadata' :: Maybe Text
description = Maybe Text
a} :: SlotTypeMetadata)
instance Core.FromJSON SlotTypeMetadata where
parseJSON :: Value -> Parser SlotTypeMetadata
parseJSON =
String
-> (Object -> Parser SlotTypeMetadata)
-> Value
-> Parser SlotTypeMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SlotTypeMetadata"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> SlotTypeMetadata
SlotTypeMetadata'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> SlotTypeMetadata)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> Maybe Text -> SlotTypeMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdDate")
Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> Maybe Text -> SlotTypeMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> SlotTypeMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> SlotTypeMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> SlotTypeMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"version")
Parser (Maybe POSIX -> Maybe Text -> SlotTypeMetadata)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> SlotTypeMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedDate")
Parser (Maybe Text -> SlotTypeMetadata)
-> Parser (Maybe Text) -> Parser SlotTypeMetadata
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
)
instance Prelude.Hashable SlotTypeMetadata
instance Prelude.NFData SlotTypeMetadata