{-# 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.CognitoSync.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 POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
Dataset -> Maybe Integer
numRecords :: Prelude.Maybe Prelude.Integer,
Dataset -> Maybe Integer
dataStorage :: Prelude.Maybe Prelude.Integer,
Dataset -> Maybe Text
datasetName :: Prelude.Maybe Prelude.Text,
Dataset -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
Dataset -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
Dataset -> Maybe Text
identityId :: 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 POSIX
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Dataset
Dataset'
{ $sel:lastModifiedDate:Dataset' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:numRecords:Dataset' :: Maybe Integer
numRecords = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:dataStorage:Dataset' :: Maybe Integer
dataStorage = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:datasetName:Dataset' :: Maybe Text
datasetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:Dataset' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedBy:Dataset' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityId:Dataset' :: Maybe Text
identityId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dataset_lastModifiedDate :: Lens.Lens' Dataset (Prelude.Maybe Prelude.UTCTime)
dataset_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Dataset -> f Dataset
dataset_lastModifiedDate = (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
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:Dataset' :: Dataset -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: Dataset
s@Dataset' {} Maybe POSIX
a -> Dataset
s {$sel:lastModifiedDate:Dataset' :: Maybe POSIX
lastModifiedDate = 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_numRecords :: Lens.Lens' Dataset (Prelude.Maybe Prelude.Integer)
dataset_numRecords :: (Maybe Integer -> f (Maybe Integer)) -> Dataset -> f Dataset
dataset_numRecords = (Dataset -> Maybe Integer)
-> (Dataset -> Maybe Integer -> Dataset)
-> Lens Dataset Dataset (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe Integer
numRecords :: Maybe Integer
$sel:numRecords:Dataset' :: Dataset -> Maybe Integer
numRecords} -> Maybe Integer
numRecords) (\s :: Dataset
s@Dataset' {} Maybe Integer
a -> Dataset
s {$sel:numRecords:Dataset' :: Maybe Integer
numRecords = Maybe Integer
a} :: Dataset)
dataset_dataStorage :: Lens.Lens' Dataset (Prelude.Maybe Prelude.Integer)
dataset_dataStorage :: (Maybe Integer -> f (Maybe Integer)) -> Dataset -> f Dataset
dataset_dataStorage = (Dataset -> Maybe Integer)
-> (Dataset -> Maybe Integer -> Dataset)
-> Lens Dataset Dataset (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe Integer
dataStorage :: Maybe Integer
$sel:dataStorage:Dataset' :: Dataset -> Maybe Integer
dataStorage} -> Maybe Integer
dataStorage) (\s :: Dataset
s@Dataset' {} Maybe Integer
a -> Dataset
s {$sel:dataStorage:Dataset' :: Maybe Integer
dataStorage = Maybe Integer
a} :: Dataset)
dataset_datasetName :: Lens.Lens' Dataset (Prelude.Maybe Prelude.Text)
dataset_datasetName :: (Maybe Text -> f (Maybe Text)) -> Dataset -> f Dataset
dataset_datasetName = (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
datasetName :: Maybe Text
$sel:datasetName:Dataset' :: Dataset -> Maybe Text
datasetName} -> Maybe Text
datasetName) (\s :: Dataset
s@Dataset' {} Maybe Text
a -> Dataset
s {$sel:datasetName:Dataset' :: Maybe Text
datasetName = Maybe Text
a} :: Dataset)
dataset_creationDate :: Lens.Lens' Dataset (Prelude.Maybe Prelude.UTCTime)
dataset_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Dataset -> f Dataset
dataset_creationDate = (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
creationDate :: Maybe POSIX
$sel:creationDate:Dataset' :: Dataset -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: Dataset
s@Dataset' {} Maybe POSIX
a -> Dataset
s {$sel:creationDate:Dataset' :: Maybe POSIX
creationDate = 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_lastModifiedBy :: Lens.Lens' Dataset (Prelude.Maybe Prelude.Text)
dataset_lastModifiedBy :: (Maybe Text -> f (Maybe Text)) -> Dataset -> f Dataset
dataset_lastModifiedBy = (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
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:Dataset' :: Dataset -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: Dataset
s@Dataset' {} Maybe Text
a -> Dataset
s {$sel:lastModifiedBy:Dataset' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: Dataset)
dataset_identityId :: Lens.Lens' Dataset (Prelude.Maybe Prelude.Text)
dataset_identityId :: (Maybe Text -> f (Maybe Text)) -> Dataset -> f Dataset
dataset_identityId = (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
identityId :: Maybe Text
$sel:identityId:Dataset' :: Dataset -> Maybe Text
identityId} -> Maybe Text
identityId) (\s :: Dataset
s@Dataset' {} Maybe Text
a -> Dataset
s {$sel:identityId:Dataset' :: Maybe Text
identityId = 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 POSIX
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Dataset
Dataset'
(Maybe POSIX
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Dataset)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Dataset)
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
"LastModifiedDate")
Parser
(Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Dataset)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Dataset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumRecords")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Dataset)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe Text -> Dataset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataStorage")
Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe Text -> Dataset)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> 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
"DatasetName")
Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> Dataset)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> 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
"CreationDate")
Parser (Maybe Text -> Maybe Text -> Dataset)
-> Parser (Maybe Text) -> Parser (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
"LastModifiedBy")
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
"IdentityId")
)
instance Prelude.Hashable Dataset
instance Prelude.NFData Dataset