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