{-# 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.DatasetSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DatasetSummary = DatasetSummary'
{
DatasetSummary -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
DatasetSummary -> Maybe Text
datasetArn :: Prelude.Maybe Prelude.Text,
DatasetSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
DatasetSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DatasetSummary -> Maybe Text
datasetType :: Prelude.Maybe Prelude.Text,
DatasetSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX
}
deriving (DatasetSummary -> DatasetSummary -> Bool
(DatasetSummary -> DatasetSummary -> Bool)
-> (DatasetSummary -> DatasetSummary -> Bool) -> Eq DatasetSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatasetSummary -> DatasetSummary -> Bool
$c/= :: DatasetSummary -> DatasetSummary -> Bool
== :: DatasetSummary -> DatasetSummary -> Bool
$c== :: DatasetSummary -> DatasetSummary -> Bool
Prelude.Eq, ReadPrec [DatasetSummary]
ReadPrec DatasetSummary
Int -> ReadS DatasetSummary
ReadS [DatasetSummary]
(Int -> ReadS DatasetSummary)
-> ReadS [DatasetSummary]
-> ReadPrec DatasetSummary
-> ReadPrec [DatasetSummary]
-> Read DatasetSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatasetSummary]
$creadListPrec :: ReadPrec [DatasetSummary]
readPrec :: ReadPrec DatasetSummary
$creadPrec :: ReadPrec DatasetSummary
readList :: ReadS [DatasetSummary]
$creadList :: ReadS [DatasetSummary]
readsPrec :: Int -> ReadS DatasetSummary
$creadsPrec :: Int -> ReadS DatasetSummary
Prelude.Read, Int -> DatasetSummary -> ShowS
[DatasetSummary] -> ShowS
DatasetSummary -> String
(Int -> DatasetSummary -> ShowS)
-> (DatasetSummary -> String)
-> ([DatasetSummary] -> ShowS)
-> Show DatasetSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatasetSummary] -> ShowS
$cshowList :: [DatasetSummary] -> ShowS
show :: DatasetSummary -> String
$cshow :: DatasetSummary -> String
showsPrec :: Int -> DatasetSummary -> ShowS
$cshowsPrec :: Int -> DatasetSummary -> ShowS
Prelude.Show, (forall x. DatasetSummary -> Rep DatasetSummary x)
-> (forall x. Rep DatasetSummary x -> DatasetSummary)
-> Generic DatasetSummary
forall x. Rep DatasetSummary x -> DatasetSummary
forall x. DatasetSummary -> Rep DatasetSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatasetSummary x -> DatasetSummary
$cfrom :: forall x. DatasetSummary -> Rep DatasetSummary x
Prelude.Generic)
newDatasetSummary ::
DatasetSummary
newDatasetSummary :: DatasetSummary
newDatasetSummary =
DatasetSummary' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetSummary
DatasetSummary'
{ $sel:status:DatasetSummary' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:datasetArn:DatasetSummary' :: Maybe Text
datasetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:DatasetSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:DatasetSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:datasetType:DatasetSummary' :: Maybe Text
datasetType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:DatasetSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
datasetSummary_status :: Lens.Lens' DatasetSummary (Prelude.Maybe Prelude.Text)
datasetSummary_status :: (Maybe Text -> f (Maybe Text))
-> DatasetSummary -> f DatasetSummary
datasetSummary_status = (DatasetSummary -> Maybe Text)
-> (DatasetSummary -> Maybe Text -> DatasetSummary)
-> Lens DatasetSummary DatasetSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSummary' {Maybe Text
status :: Maybe Text
$sel:status:DatasetSummary' :: DatasetSummary -> Maybe Text
status} -> Maybe Text
status) (\s :: DatasetSummary
s@DatasetSummary' {} Maybe Text
a -> DatasetSummary
s {$sel:status:DatasetSummary' :: Maybe Text
status = Maybe Text
a} :: DatasetSummary)
datasetSummary_datasetArn :: Lens.Lens' DatasetSummary (Prelude.Maybe Prelude.Text)
datasetSummary_datasetArn :: (Maybe Text -> f (Maybe Text))
-> DatasetSummary -> f DatasetSummary
datasetSummary_datasetArn = (DatasetSummary -> Maybe Text)
-> (DatasetSummary -> Maybe Text -> DatasetSummary)
-> Lens DatasetSummary DatasetSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSummary' {Maybe Text
datasetArn :: Maybe Text
$sel:datasetArn:DatasetSummary' :: DatasetSummary -> Maybe Text
datasetArn} -> Maybe Text
datasetArn) (\s :: DatasetSummary
s@DatasetSummary' {} Maybe Text
a -> DatasetSummary
s {$sel:datasetArn:DatasetSummary' :: Maybe Text
datasetArn = Maybe Text
a} :: DatasetSummary)
datasetSummary_lastUpdatedDateTime :: Lens.Lens' DatasetSummary (Prelude.Maybe Prelude.UTCTime)
datasetSummary_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetSummary -> f DatasetSummary
datasetSummary_lastUpdatedDateTime = (DatasetSummary -> Maybe POSIX)
-> (DatasetSummary -> Maybe POSIX -> DatasetSummary)
-> Lens DatasetSummary DatasetSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:DatasetSummary' :: DatasetSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: DatasetSummary
s@DatasetSummary' {} Maybe POSIX
a -> DatasetSummary
s {$sel:lastUpdatedDateTime:DatasetSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: DatasetSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DatasetSummary -> f DatasetSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetSummary
-> f DatasetSummary
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
datasetSummary_name :: Lens.Lens' DatasetSummary (Prelude.Maybe Prelude.Text)
datasetSummary_name :: (Maybe Text -> f (Maybe Text))
-> DatasetSummary -> f DatasetSummary
datasetSummary_name = (DatasetSummary -> Maybe Text)
-> (DatasetSummary -> Maybe Text -> DatasetSummary)
-> Lens DatasetSummary DatasetSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSummary' {Maybe Text
name :: Maybe Text
$sel:name:DatasetSummary' :: DatasetSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: DatasetSummary
s@DatasetSummary' {} Maybe Text
a -> DatasetSummary
s {$sel:name:DatasetSummary' :: Maybe Text
name = Maybe Text
a} :: DatasetSummary)
datasetSummary_datasetType :: Lens.Lens' DatasetSummary (Prelude.Maybe Prelude.Text)
datasetSummary_datasetType :: (Maybe Text -> f (Maybe Text))
-> DatasetSummary -> f DatasetSummary
datasetSummary_datasetType = (DatasetSummary -> Maybe Text)
-> (DatasetSummary -> Maybe Text -> DatasetSummary)
-> Lens DatasetSummary DatasetSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSummary' {Maybe Text
datasetType :: Maybe Text
$sel:datasetType:DatasetSummary' :: DatasetSummary -> Maybe Text
datasetType} -> Maybe Text
datasetType) (\s :: DatasetSummary
s@DatasetSummary' {} Maybe Text
a -> DatasetSummary
s {$sel:datasetType:DatasetSummary' :: Maybe Text
datasetType = Maybe Text
a} :: DatasetSummary)
datasetSummary_creationDateTime :: Lens.Lens' DatasetSummary (Prelude.Maybe Prelude.UTCTime)
datasetSummary_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetSummary -> f DatasetSummary
datasetSummary_creationDateTime = (DatasetSummary -> Maybe POSIX)
-> (DatasetSummary -> Maybe POSIX -> DatasetSummary)
-> Lens DatasetSummary DatasetSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:DatasetSummary' :: DatasetSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: DatasetSummary
s@DatasetSummary' {} Maybe POSIX
a -> DatasetSummary
s {$sel:creationDateTime:DatasetSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: DatasetSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DatasetSummary -> f DatasetSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetSummary
-> f DatasetSummary
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 DatasetSummary where
parseJSON :: Value -> Parser DatasetSummary
parseJSON =
String
-> (Object -> Parser DatasetSummary)
-> Value
-> Parser DatasetSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DatasetSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetSummary
DatasetSummary'
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetSummary)
forall (f :: * -> *) a b. Functor 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
"status")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetSummary)
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
"datasetArn")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetSummary)
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
"lastUpdatedDateTime")
Parser (Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> DatasetSummary)
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 -> DatasetSummary)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> DatasetSummary)
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
"datasetType")
Parser (Maybe POSIX -> DatasetSummary)
-> Parser (Maybe POSIX) -> Parser DatasetSummary
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 DatasetSummary
instance Prelude.NFData DatasetSummary