{-# 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.DatasetExportJobSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DatasetExportJobSummary = DatasetExportJobSummary'
{
DatasetExportJobSummary -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
DatasetExportJobSummary -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
DatasetExportJobSummary -> Maybe Text
datasetExportJobArn :: Prelude.Maybe Prelude.Text,
DatasetExportJobSummary -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
DatasetExportJobSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
DatasetExportJobSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX
}
deriving (DatasetExportJobSummary -> DatasetExportJobSummary -> Bool
(DatasetExportJobSummary -> DatasetExportJobSummary -> Bool)
-> (DatasetExportJobSummary -> DatasetExportJobSummary -> Bool)
-> Eq DatasetExportJobSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatasetExportJobSummary -> DatasetExportJobSummary -> Bool
$c/= :: DatasetExportJobSummary -> DatasetExportJobSummary -> Bool
== :: DatasetExportJobSummary -> DatasetExportJobSummary -> Bool
$c== :: DatasetExportJobSummary -> DatasetExportJobSummary -> Bool
Prelude.Eq, ReadPrec [DatasetExportJobSummary]
ReadPrec DatasetExportJobSummary
Int -> ReadS DatasetExportJobSummary
ReadS [DatasetExportJobSummary]
(Int -> ReadS DatasetExportJobSummary)
-> ReadS [DatasetExportJobSummary]
-> ReadPrec DatasetExportJobSummary
-> ReadPrec [DatasetExportJobSummary]
-> Read DatasetExportJobSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatasetExportJobSummary]
$creadListPrec :: ReadPrec [DatasetExportJobSummary]
readPrec :: ReadPrec DatasetExportJobSummary
$creadPrec :: ReadPrec DatasetExportJobSummary
readList :: ReadS [DatasetExportJobSummary]
$creadList :: ReadS [DatasetExportJobSummary]
readsPrec :: Int -> ReadS DatasetExportJobSummary
$creadsPrec :: Int -> ReadS DatasetExportJobSummary
Prelude.Read, Int -> DatasetExportJobSummary -> ShowS
[DatasetExportJobSummary] -> ShowS
DatasetExportJobSummary -> String
(Int -> DatasetExportJobSummary -> ShowS)
-> (DatasetExportJobSummary -> String)
-> ([DatasetExportJobSummary] -> ShowS)
-> Show DatasetExportJobSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatasetExportJobSummary] -> ShowS
$cshowList :: [DatasetExportJobSummary] -> ShowS
show :: DatasetExportJobSummary -> String
$cshow :: DatasetExportJobSummary -> String
showsPrec :: Int -> DatasetExportJobSummary -> ShowS
$cshowsPrec :: Int -> DatasetExportJobSummary -> ShowS
Prelude.Show, (forall x.
DatasetExportJobSummary -> Rep DatasetExportJobSummary x)
-> (forall x.
Rep DatasetExportJobSummary x -> DatasetExportJobSummary)
-> Generic DatasetExportJobSummary
forall x. Rep DatasetExportJobSummary x -> DatasetExportJobSummary
forall x. DatasetExportJobSummary -> Rep DatasetExportJobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatasetExportJobSummary x -> DatasetExportJobSummary
$cfrom :: forall x. DatasetExportJobSummary -> Rep DatasetExportJobSummary x
Prelude.Generic)
newDatasetExportJobSummary ::
DatasetExportJobSummary
newDatasetExportJobSummary :: DatasetExportJobSummary
newDatasetExportJobSummary =
DatasetExportJobSummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> DatasetExportJobSummary
DatasetExportJobSummary'
{ $sel:failureReason:DatasetExportJobSummary' :: Maybe Text
failureReason =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:DatasetExportJobSummary' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:datasetExportJobArn:DatasetExportJobSummary' :: Maybe Text
datasetExportJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobName:DatasetExportJobSummary' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:DatasetExportJobSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:DatasetExportJobSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
datasetExportJobSummary_failureReason :: Lens.Lens' DatasetExportJobSummary (Prelude.Maybe Prelude.Text)
datasetExportJobSummary_failureReason :: (Maybe Text -> f (Maybe Text))
-> DatasetExportJobSummary -> f DatasetExportJobSummary
datasetExportJobSummary_failureReason = (DatasetExportJobSummary -> Maybe Text)
-> (DatasetExportJobSummary
-> Maybe Text -> DatasetExportJobSummary)
-> Lens
DatasetExportJobSummary
DatasetExportJobSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetExportJobSummary' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:DatasetExportJobSummary' :: DatasetExportJobSummary -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: DatasetExportJobSummary
s@DatasetExportJobSummary' {} Maybe Text
a -> DatasetExportJobSummary
s {$sel:failureReason:DatasetExportJobSummary' :: Maybe Text
failureReason = Maybe Text
a} :: DatasetExportJobSummary)
datasetExportJobSummary_status :: Lens.Lens' DatasetExportJobSummary (Prelude.Maybe Prelude.Text)
datasetExportJobSummary_status :: (Maybe Text -> f (Maybe Text))
-> DatasetExportJobSummary -> f DatasetExportJobSummary
datasetExportJobSummary_status = (DatasetExportJobSummary -> Maybe Text)
-> (DatasetExportJobSummary
-> Maybe Text -> DatasetExportJobSummary)
-> Lens
DatasetExportJobSummary
DatasetExportJobSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetExportJobSummary' {Maybe Text
status :: Maybe Text
$sel:status:DatasetExportJobSummary' :: DatasetExportJobSummary -> Maybe Text
status} -> Maybe Text
status) (\s :: DatasetExportJobSummary
s@DatasetExportJobSummary' {} Maybe Text
a -> DatasetExportJobSummary
s {$sel:status:DatasetExportJobSummary' :: Maybe Text
status = Maybe Text
a} :: DatasetExportJobSummary)
datasetExportJobSummary_datasetExportJobArn :: Lens.Lens' DatasetExportJobSummary (Prelude.Maybe Prelude.Text)
datasetExportJobSummary_datasetExportJobArn :: (Maybe Text -> f (Maybe Text))
-> DatasetExportJobSummary -> f DatasetExportJobSummary
datasetExportJobSummary_datasetExportJobArn = (DatasetExportJobSummary -> Maybe Text)
-> (DatasetExportJobSummary
-> Maybe Text -> DatasetExportJobSummary)
-> Lens
DatasetExportJobSummary
DatasetExportJobSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetExportJobSummary' {Maybe Text
datasetExportJobArn :: Maybe Text
$sel:datasetExportJobArn:DatasetExportJobSummary' :: DatasetExportJobSummary -> Maybe Text
datasetExportJobArn} -> Maybe Text
datasetExportJobArn) (\s :: DatasetExportJobSummary
s@DatasetExportJobSummary' {} Maybe Text
a -> DatasetExportJobSummary
s {$sel:datasetExportJobArn:DatasetExportJobSummary' :: Maybe Text
datasetExportJobArn = Maybe Text
a} :: DatasetExportJobSummary)
datasetExportJobSummary_jobName :: Lens.Lens' DatasetExportJobSummary (Prelude.Maybe Prelude.Text)
datasetExportJobSummary_jobName :: (Maybe Text -> f (Maybe Text))
-> DatasetExportJobSummary -> f DatasetExportJobSummary
datasetExportJobSummary_jobName = (DatasetExportJobSummary -> Maybe Text)
-> (DatasetExportJobSummary
-> Maybe Text -> DatasetExportJobSummary)
-> Lens
DatasetExportJobSummary
DatasetExportJobSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetExportJobSummary' {Maybe Text
jobName :: Maybe Text
$sel:jobName:DatasetExportJobSummary' :: DatasetExportJobSummary -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: DatasetExportJobSummary
s@DatasetExportJobSummary' {} Maybe Text
a -> DatasetExportJobSummary
s {$sel:jobName:DatasetExportJobSummary' :: Maybe Text
jobName = Maybe Text
a} :: DatasetExportJobSummary)
datasetExportJobSummary_lastUpdatedDateTime :: Lens.Lens' DatasetExportJobSummary (Prelude.Maybe Prelude.UTCTime)
datasetExportJobSummary_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetExportJobSummary -> f DatasetExportJobSummary
datasetExportJobSummary_lastUpdatedDateTime = (DatasetExportJobSummary -> Maybe POSIX)
-> (DatasetExportJobSummary
-> Maybe POSIX -> DatasetExportJobSummary)
-> Lens
DatasetExportJobSummary
DatasetExportJobSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetExportJobSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:DatasetExportJobSummary' :: DatasetExportJobSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: DatasetExportJobSummary
s@DatasetExportJobSummary' {} Maybe POSIX
a -> DatasetExportJobSummary
s {$sel:lastUpdatedDateTime:DatasetExportJobSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: DatasetExportJobSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DatasetExportJobSummary -> f DatasetExportJobSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetExportJobSummary
-> f DatasetExportJobSummary
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
datasetExportJobSummary_creationDateTime :: Lens.Lens' DatasetExportJobSummary (Prelude.Maybe Prelude.UTCTime)
datasetExportJobSummary_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetExportJobSummary -> f DatasetExportJobSummary
datasetExportJobSummary_creationDateTime = (DatasetExportJobSummary -> Maybe POSIX)
-> (DatasetExportJobSummary
-> Maybe POSIX -> DatasetExportJobSummary)
-> Lens
DatasetExportJobSummary
DatasetExportJobSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetExportJobSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:DatasetExportJobSummary' :: DatasetExportJobSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: DatasetExportJobSummary
s@DatasetExportJobSummary' {} Maybe POSIX
a -> DatasetExportJobSummary
s {$sel:creationDateTime:DatasetExportJobSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: DatasetExportJobSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DatasetExportJobSummary -> f DatasetExportJobSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetExportJobSummary
-> f DatasetExportJobSummary
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 DatasetExportJobSummary where
parseJSON :: Value -> Parser DatasetExportJobSummary
parseJSON =
String
-> (Object -> Parser DatasetExportJobSummary)
-> Value
-> Parser DatasetExportJobSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DatasetExportJobSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> DatasetExportJobSummary
DatasetExportJobSummary'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> DatasetExportJobSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> DatasetExportJobSummary)
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
"failureReason")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> DatasetExportJobSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> DatasetExportJobSummary)
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
"status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> DatasetExportJobSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX -> Maybe POSIX -> DatasetExportJobSummary)
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
"datasetExportJobArn")
Parser
(Maybe Text
-> Maybe POSIX -> Maybe POSIX -> DatasetExportJobSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe POSIX -> DatasetExportJobSummary)
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
"jobName")
Parser (Maybe POSIX -> Maybe POSIX -> DatasetExportJobSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> DatasetExportJobSummary)
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 POSIX -> DatasetExportJobSummary)
-> Parser (Maybe POSIX) -> Parser DatasetExportJobSummary
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 DatasetExportJobSummary
instance Prelude.NFData DatasetExportJobSummary