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