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