{-# 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.Personalize.Types.DatasetSchemaSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DatasetSchemaSummary = DatasetSchemaSummary'
{
DatasetSchemaSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
DatasetSchemaSummary -> Maybe Text
schemaArn :: Prelude.Maybe Prelude.Text,
DatasetSchemaSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DatasetSchemaSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX
}
deriving (DatasetSchemaSummary -> DatasetSchemaSummary -> Bool
(DatasetSchemaSummary -> DatasetSchemaSummary -> Bool)
-> (DatasetSchemaSummary -> DatasetSchemaSummary -> Bool)
-> Eq DatasetSchemaSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatasetSchemaSummary -> DatasetSchemaSummary -> Bool
$c/= :: DatasetSchemaSummary -> DatasetSchemaSummary -> Bool
== :: DatasetSchemaSummary -> DatasetSchemaSummary -> Bool
$c== :: DatasetSchemaSummary -> DatasetSchemaSummary -> Bool
Prelude.Eq, ReadPrec [DatasetSchemaSummary]
ReadPrec DatasetSchemaSummary
Int -> ReadS DatasetSchemaSummary
ReadS [DatasetSchemaSummary]
(Int -> ReadS DatasetSchemaSummary)
-> ReadS [DatasetSchemaSummary]
-> ReadPrec DatasetSchemaSummary
-> ReadPrec [DatasetSchemaSummary]
-> Read DatasetSchemaSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatasetSchemaSummary]
$creadListPrec :: ReadPrec [DatasetSchemaSummary]
readPrec :: ReadPrec DatasetSchemaSummary
$creadPrec :: ReadPrec DatasetSchemaSummary
readList :: ReadS [DatasetSchemaSummary]
$creadList :: ReadS [DatasetSchemaSummary]
readsPrec :: Int -> ReadS DatasetSchemaSummary
$creadsPrec :: Int -> ReadS DatasetSchemaSummary
Prelude.Read, Int -> DatasetSchemaSummary -> ShowS
[DatasetSchemaSummary] -> ShowS
DatasetSchemaSummary -> String
(Int -> DatasetSchemaSummary -> ShowS)
-> (DatasetSchemaSummary -> String)
-> ([DatasetSchemaSummary] -> ShowS)
-> Show DatasetSchemaSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatasetSchemaSummary] -> ShowS
$cshowList :: [DatasetSchemaSummary] -> ShowS
show :: DatasetSchemaSummary -> String
$cshow :: DatasetSchemaSummary -> String
showsPrec :: Int -> DatasetSchemaSummary -> ShowS
$cshowsPrec :: Int -> DatasetSchemaSummary -> ShowS
Prelude.Show, (forall x. DatasetSchemaSummary -> Rep DatasetSchemaSummary x)
-> (forall x. Rep DatasetSchemaSummary x -> DatasetSchemaSummary)
-> Generic DatasetSchemaSummary
forall x. Rep DatasetSchemaSummary x -> DatasetSchemaSummary
forall x. DatasetSchemaSummary -> Rep DatasetSchemaSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatasetSchemaSummary x -> DatasetSchemaSummary
$cfrom :: forall x. DatasetSchemaSummary -> Rep DatasetSchemaSummary x
Prelude.Generic)
newDatasetSchemaSummary ::
DatasetSchemaSummary
newDatasetSchemaSummary :: DatasetSchemaSummary
newDatasetSchemaSummary =
DatasetSchemaSummary' :: Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetSchemaSummary
DatasetSchemaSummary'
{ $sel:lastUpdatedDateTime:DatasetSchemaSummary' :: Maybe POSIX
lastUpdatedDateTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:schemaArn:DatasetSchemaSummary' :: Maybe Text
schemaArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:DatasetSchemaSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:DatasetSchemaSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
datasetSchemaSummary_lastUpdatedDateTime :: Lens.Lens' DatasetSchemaSummary (Prelude.Maybe Prelude.UTCTime)
datasetSchemaSummary_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetSchemaSummary -> f DatasetSchemaSummary
datasetSchemaSummary_lastUpdatedDateTime = (DatasetSchemaSummary -> Maybe POSIX)
-> (DatasetSchemaSummary -> Maybe POSIX -> DatasetSchemaSummary)
-> Lens
DatasetSchemaSummary
DatasetSchemaSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSchemaSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:DatasetSchemaSummary' :: DatasetSchemaSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: DatasetSchemaSummary
s@DatasetSchemaSummary' {} Maybe POSIX
a -> DatasetSchemaSummary
s {$sel:lastUpdatedDateTime:DatasetSchemaSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: DatasetSchemaSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DatasetSchemaSummary -> f DatasetSchemaSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetSchemaSummary
-> f DatasetSchemaSummary
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
datasetSchemaSummary_schemaArn :: Lens.Lens' DatasetSchemaSummary (Prelude.Maybe Prelude.Text)
datasetSchemaSummary_schemaArn :: (Maybe Text -> f (Maybe Text))
-> DatasetSchemaSummary -> f DatasetSchemaSummary
datasetSchemaSummary_schemaArn = (DatasetSchemaSummary -> Maybe Text)
-> (DatasetSchemaSummary -> Maybe Text -> DatasetSchemaSummary)
-> Lens
DatasetSchemaSummary DatasetSchemaSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSchemaSummary' {Maybe Text
schemaArn :: Maybe Text
$sel:schemaArn:DatasetSchemaSummary' :: DatasetSchemaSummary -> Maybe Text
schemaArn} -> Maybe Text
schemaArn) (\s :: DatasetSchemaSummary
s@DatasetSchemaSummary' {} Maybe Text
a -> DatasetSchemaSummary
s {$sel:schemaArn:DatasetSchemaSummary' :: Maybe Text
schemaArn = Maybe Text
a} :: DatasetSchemaSummary)
datasetSchemaSummary_name :: Lens.Lens' DatasetSchemaSummary (Prelude.Maybe Prelude.Text)
datasetSchemaSummary_name :: (Maybe Text -> f (Maybe Text))
-> DatasetSchemaSummary -> f DatasetSchemaSummary
datasetSchemaSummary_name = (DatasetSchemaSummary -> Maybe Text)
-> (DatasetSchemaSummary -> Maybe Text -> DatasetSchemaSummary)
-> Lens
DatasetSchemaSummary DatasetSchemaSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSchemaSummary' {Maybe Text
name :: Maybe Text
$sel:name:DatasetSchemaSummary' :: DatasetSchemaSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: DatasetSchemaSummary
s@DatasetSchemaSummary' {} Maybe Text
a -> DatasetSchemaSummary
s {$sel:name:DatasetSchemaSummary' :: Maybe Text
name = Maybe Text
a} :: DatasetSchemaSummary)
datasetSchemaSummary_creationDateTime :: Lens.Lens' DatasetSchemaSummary (Prelude.Maybe Prelude.UTCTime)
datasetSchemaSummary_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetSchemaSummary -> f DatasetSchemaSummary
datasetSchemaSummary_creationDateTime = (DatasetSchemaSummary -> Maybe POSIX)
-> (DatasetSchemaSummary -> Maybe POSIX -> DatasetSchemaSummary)
-> Lens
DatasetSchemaSummary
DatasetSchemaSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSchemaSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:DatasetSchemaSummary' :: DatasetSchemaSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: DatasetSchemaSummary
s@DatasetSchemaSummary' {} Maybe POSIX
a -> DatasetSchemaSummary
s {$sel:creationDateTime:DatasetSchemaSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: DatasetSchemaSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DatasetSchemaSummary -> f DatasetSchemaSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetSchemaSummary
-> f DatasetSchemaSummary
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
instance Core.FromJSON DatasetSchemaSummary where
parseJSON :: Value -> Parser DatasetSchemaSummary
parseJSON =
String
-> (Object -> Parser DatasetSchemaSummary)
-> Value
-> Parser DatasetSchemaSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DatasetSchemaSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetSchemaSummary
DatasetSchemaSummary'
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetSchemaSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetSchemaSummary)
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
"lastUpdatedDateTime")
Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetSchemaSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> DatasetSchemaSummary)
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
"schemaArn")
Parser (Maybe Text -> Maybe POSIX -> DatasetSchemaSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> DatasetSchemaSummary)
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 POSIX -> DatasetSchemaSummary)
-> Parser (Maybe POSIX) -> Parser DatasetSchemaSummary
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
"creationDateTime")
)
instance Prelude.Hashable DatasetSchemaSummary
instance Prelude.NFData DatasetSchemaSummary