{-# 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.LookoutVision.Types.DatasetDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutVision.Types.DatasetImageStats
import Amazonka.LookoutVision.Types.DatasetStatus
import qualified Amazonka.Prelude as Prelude
data DatasetDescription = DatasetDescription'
{
DatasetDescription -> Maybe DatasetStatus
status :: Prelude.Maybe DatasetStatus,
DatasetDescription -> Maybe DatasetImageStats
imageStats :: Prelude.Maybe DatasetImageStats,
DatasetDescription -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
DatasetDescription -> Maybe POSIX
creationTimestamp :: Prelude.Maybe Core.POSIX,
DatasetDescription -> Maybe Text
datasetType :: Prelude.Maybe Prelude.Text,
DatasetDescription -> Maybe Text
projectName :: Prelude.Maybe Prelude.Text,
DatasetDescription -> Maybe POSIX
lastUpdatedTimestamp :: Prelude.Maybe Core.POSIX
}
deriving (DatasetDescription -> DatasetDescription -> Bool
(DatasetDescription -> DatasetDescription -> Bool)
-> (DatasetDescription -> DatasetDescription -> Bool)
-> Eq DatasetDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatasetDescription -> DatasetDescription -> Bool
$c/= :: DatasetDescription -> DatasetDescription -> Bool
== :: DatasetDescription -> DatasetDescription -> Bool
$c== :: DatasetDescription -> DatasetDescription -> Bool
Prelude.Eq, ReadPrec [DatasetDescription]
ReadPrec DatasetDescription
Int -> ReadS DatasetDescription
ReadS [DatasetDescription]
(Int -> ReadS DatasetDescription)
-> ReadS [DatasetDescription]
-> ReadPrec DatasetDescription
-> ReadPrec [DatasetDescription]
-> Read DatasetDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatasetDescription]
$creadListPrec :: ReadPrec [DatasetDescription]
readPrec :: ReadPrec DatasetDescription
$creadPrec :: ReadPrec DatasetDescription
readList :: ReadS [DatasetDescription]
$creadList :: ReadS [DatasetDescription]
readsPrec :: Int -> ReadS DatasetDescription
$creadsPrec :: Int -> ReadS DatasetDescription
Prelude.Read, Int -> DatasetDescription -> ShowS
[DatasetDescription] -> ShowS
DatasetDescription -> String
(Int -> DatasetDescription -> ShowS)
-> (DatasetDescription -> String)
-> ([DatasetDescription] -> ShowS)
-> Show DatasetDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatasetDescription] -> ShowS
$cshowList :: [DatasetDescription] -> ShowS
show :: DatasetDescription -> String
$cshow :: DatasetDescription -> String
showsPrec :: Int -> DatasetDescription -> ShowS
$cshowsPrec :: Int -> DatasetDescription -> ShowS
Prelude.Show, (forall x. DatasetDescription -> Rep DatasetDescription x)
-> (forall x. Rep DatasetDescription x -> DatasetDescription)
-> Generic DatasetDescription
forall x. Rep DatasetDescription x -> DatasetDescription
forall x. DatasetDescription -> Rep DatasetDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatasetDescription x -> DatasetDescription
$cfrom :: forall x. DatasetDescription -> Rep DatasetDescription x
Prelude.Generic)
newDatasetDescription ::
DatasetDescription
newDatasetDescription :: DatasetDescription
newDatasetDescription =
DatasetDescription' :: Maybe DatasetStatus
-> Maybe DatasetImageStats
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetDescription
DatasetDescription'
{ $sel:status:DatasetDescription' :: Maybe DatasetStatus
status = Maybe DatasetStatus
forall a. Maybe a
Prelude.Nothing,
$sel:imageStats:DatasetDescription' :: Maybe DatasetImageStats
imageStats = Maybe DatasetImageStats
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:DatasetDescription' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimestamp:DatasetDescription' :: Maybe POSIX
creationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:datasetType:DatasetDescription' :: Maybe Text
datasetType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:projectName:DatasetDescription' :: Maybe Text
projectName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimestamp:DatasetDescription' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
datasetDescription_status :: Lens.Lens' DatasetDescription (Prelude.Maybe DatasetStatus)
datasetDescription_status :: (Maybe DatasetStatus -> f (Maybe DatasetStatus))
-> DatasetDescription -> f DatasetDescription
datasetDescription_status = (DatasetDescription -> Maybe DatasetStatus)
-> (DatasetDescription
-> Maybe DatasetStatus -> DatasetDescription)
-> Lens
DatasetDescription
DatasetDescription
(Maybe DatasetStatus)
(Maybe DatasetStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetDescription' {Maybe DatasetStatus
status :: Maybe DatasetStatus
$sel:status:DatasetDescription' :: DatasetDescription -> Maybe DatasetStatus
status} -> Maybe DatasetStatus
status) (\s :: DatasetDescription
s@DatasetDescription' {} Maybe DatasetStatus
a -> DatasetDescription
s {$sel:status:DatasetDescription' :: Maybe DatasetStatus
status = Maybe DatasetStatus
a} :: DatasetDescription)
datasetDescription_imageStats :: Lens.Lens' DatasetDescription (Prelude.Maybe DatasetImageStats)
datasetDescription_imageStats :: (Maybe DatasetImageStats -> f (Maybe DatasetImageStats))
-> DatasetDescription -> f DatasetDescription
datasetDescription_imageStats = (DatasetDescription -> Maybe DatasetImageStats)
-> (DatasetDescription
-> Maybe DatasetImageStats -> DatasetDescription)
-> Lens
DatasetDescription
DatasetDescription
(Maybe DatasetImageStats)
(Maybe DatasetImageStats)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetDescription' {Maybe DatasetImageStats
imageStats :: Maybe DatasetImageStats
$sel:imageStats:DatasetDescription' :: DatasetDescription -> Maybe DatasetImageStats
imageStats} -> Maybe DatasetImageStats
imageStats) (\s :: DatasetDescription
s@DatasetDescription' {} Maybe DatasetImageStats
a -> DatasetDescription
s {$sel:imageStats:DatasetDescription' :: Maybe DatasetImageStats
imageStats = Maybe DatasetImageStats
a} :: DatasetDescription)
datasetDescription_statusMessage :: Lens.Lens' DatasetDescription (Prelude.Maybe Prelude.Text)
datasetDescription_statusMessage :: (Maybe Text -> f (Maybe Text))
-> DatasetDescription -> f DatasetDescription
datasetDescription_statusMessage = (DatasetDescription -> Maybe Text)
-> (DatasetDescription -> Maybe Text -> DatasetDescription)
-> Lens
DatasetDescription DatasetDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetDescription' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:DatasetDescription' :: DatasetDescription -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: DatasetDescription
s@DatasetDescription' {} Maybe Text
a -> DatasetDescription
s {$sel:statusMessage:DatasetDescription' :: Maybe Text
statusMessage = Maybe Text
a} :: DatasetDescription)
datasetDescription_creationTimestamp :: Lens.Lens' DatasetDescription (Prelude.Maybe Prelude.UTCTime)
datasetDescription_creationTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetDescription -> f DatasetDescription
datasetDescription_creationTimestamp = (DatasetDescription -> Maybe POSIX)
-> (DatasetDescription -> Maybe POSIX -> DatasetDescription)
-> Lens
DatasetDescription DatasetDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetDescription' {Maybe POSIX
creationTimestamp :: Maybe POSIX
$sel:creationTimestamp:DatasetDescription' :: DatasetDescription -> Maybe POSIX
creationTimestamp} -> Maybe POSIX
creationTimestamp) (\s :: DatasetDescription
s@DatasetDescription' {} Maybe POSIX
a -> DatasetDescription
s {$sel:creationTimestamp:DatasetDescription' :: Maybe POSIX
creationTimestamp = Maybe POSIX
a} :: DatasetDescription) ((Maybe POSIX -> f (Maybe POSIX))
-> DatasetDescription -> f DatasetDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetDescription
-> f DatasetDescription
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
datasetDescription_datasetType :: Lens.Lens' DatasetDescription (Prelude.Maybe Prelude.Text)
datasetDescription_datasetType :: (Maybe Text -> f (Maybe Text))
-> DatasetDescription -> f DatasetDescription
datasetDescription_datasetType = (DatasetDescription -> Maybe Text)
-> (DatasetDescription -> Maybe Text -> DatasetDescription)
-> Lens
DatasetDescription DatasetDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetDescription' {Maybe Text
datasetType :: Maybe Text
$sel:datasetType:DatasetDescription' :: DatasetDescription -> Maybe Text
datasetType} -> Maybe Text
datasetType) (\s :: DatasetDescription
s@DatasetDescription' {} Maybe Text
a -> DatasetDescription
s {$sel:datasetType:DatasetDescription' :: Maybe Text
datasetType = Maybe Text
a} :: DatasetDescription)
datasetDescription_projectName :: Lens.Lens' DatasetDescription (Prelude.Maybe Prelude.Text)
datasetDescription_projectName :: (Maybe Text -> f (Maybe Text))
-> DatasetDescription -> f DatasetDescription
datasetDescription_projectName = (DatasetDescription -> Maybe Text)
-> (DatasetDescription -> Maybe Text -> DatasetDescription)
-> Lens
DatasetDescription DatasetDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetDescription' {Maybe Text
projectName :: Maybe Text
$sel:projectName:DatasetDescription' :: DatasetDescription -> Maybe Text
projectName} -> Maybe Text
projectName) (\s :: DatasetDescription
s@DatasetDescription' {} Maybe Text
a -> DatasetDescription
s {$sel:projectName:DatasetDescription' :: Maybe Text
projectName = Maybe Text
a} :: DatasetDescription)
datasetDescription_lastUpdatedTimestamp :: Lens.Lens' DatasetDescription (Prelude.Maybe Prelude.UTCTime)
datasetDescription_lastUpdatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetDescription -> f DatasetDescription
datasetDescription_lastUpdatedTimestamp = (DatasetDescription -> Maybe POSIX)
-> (DatasetDescription -> Maybe POSIX -> DatasetDescription)
-> Lens
DatasetDescription DatasetDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetDescription' {Maybe POSIX
lastUpdatedTimestamp :: Maybe POSIX
$sel:lastUpdatedTimestamp:DatasetDescription' :: DatasetDescription -> Maybe POSIX
lastUpdatedTimestamp} -> Maybe POSIX
lastUpdatedTimestamp) (\s :: DatasetDescription
s@DatasetDescription' {} Maybe POSIX
a -> DatasetDescription
s {$sel:lastUpdatedTimestamp:DatasetDescription' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
a} :: DatasetDescription) ((Maybe POSIX -> f (Maybe POSIX))
-> DatasetDescription -> f DatasetDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetDescription
-> f DatasetDescription
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 DatasetDescription where
parseJSON :: Value -> Parser DatasetDescription
parseJSON =
String
-> (Object -> Parser DatasetDescription)
-> Value
-> Parser DatasetDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DatasetDescription"
( \Object
x ->
Maybe DatasetStatus
-> Maybe DatasetImageStats
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetDescription
DatasetDescription'
(Maybe DatasetStatus
-> Maybe DatasetImageStats
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetDescription)
-> Parser (Maybe DatasetStatus)
-> Parser
(Maybe DatasetImageStats
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DatasetStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe DatasetImageStats
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetDescription)
-> Parser (Maybe DatasetImageStats)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DatasetImageStats)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ImageStats")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> DatasetDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetDescription)
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
"StatusMessage")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetDescription)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetDescription)
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
"CreationTimestamp")
Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> DatasetDescription)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> DatasetDescription)
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 Text -> Maybe POSIX -> DatasetDescription)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> DatasetDescription)
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
"ProjectName")
Parser (Maybe POSIX -> DatasetDescription)
-> Parser (Maybe POSIX) -> Parser DatasetDescription
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
"LastUpdatedTimestamp")
)
instance Prelude.Hashable DatasetDescription
instance Prelude.NFData DatasetDescription