{-# 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.SageMaker.Types.ProcessingJobSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ProcessingJobStatus
data ProcessingJobSummary = ProcessingJobSummary'
{
ProcessingJobSummary -> Maybe Text
exitMessage :: Prelude.Maybe Prelude.Text,
ProcessingJobSummary -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
ProcessingJobSummary -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
ProcessingJobSummary -> Maybe POSIX
processingEndTime :: Prelude.Maybe Data.POSIX,
ProcessingJobSummary -> Text
processingJobName :: Prelude.Text,
ProcessingJobSummary -> Text
processingJobArn :: Prelude.Text,
ProcessingJobSummary -> POSIX
creationTime :: Data.POSIX,
ProcessingJobSummary -> ProcessingJobStatus
processingJobStatus :: ProcessingJobStatus
}
deriving (ProcessingJobSummary -> ProcessingJobSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProcessingJobSummary -> ProcessingJobSummary -> Bool
$c/= :: ProcessingJobSummary -> ProcessingJobSummary -> Bool
== :: ProcessingJobSummary -> ProcessingJobSummary -> Bool
$c== :: ProcessingJobSummary -> ProcessingJobSummary -> Bool
Prelude.Eq, ReadPrec [ProcessingJobSummary]
ReadPrec ProcessingJobSummary
Int -> ReadS ProcessingJobSummary
ReadS [ProcessingJobSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProcessingJobSummary]
$creadListPrec :: ReadPrec [ProcessingJobSummary]
readPrec :: ReadPrec ProcessingJobSummary
$creadPrec :: ReadPrec ProcessingJobSummary
readList :: ReadS [ProcessingJobSummary]
$creadList :: ReadS [ProcessingJobSummary]
readsPrec :: Int -> ReadS ProcessingJobSummary
$creadsPrec :: Int -> ReadS ProcessingJobSummary
Prelude.Read, Int -> ProcessingJobSummary -> ShowS
[ProcessingJobSummary] -> ShowS
ProcessingJobSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProcessingJobSummary] -> ShowS
$cshowList :: [ProcessingJobSummary] -> ShowS
show :: ProcessingJobSummary -> String
$cshow :: ProcessingJobSummary -> String
showsPrec :: Int -> ProcessingJobSummary -> ShowS
$cshowsPrec :: Int -> ProcessingJobSummary -> ShowS
Prelude.Show, forall x. Rep ProcessingJobSummary x -> ProcessingJobSummary
forall x. ProcessingJobSummary -> Rep ProcessingJobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProcessingJobSummary x -> ProcessingJobSummary
$cfrom :: forall x. ProcessingJobSummary -> Rep ProcessingJobSummary x
Prelude.Generic)
newProcessingJobSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
ProcessingJobStatus ->
ProcessingJobSummary
newProcessingJobSummary :: Text
-> Text -> UTCTime -> ProcessingJobStatus -> ProcessingJobSummary
newProcessingJobSummary
Text
pProcessingJobName_
Text
pProcessingJobArn_
UTCTime
pCreationTime_
ProcessingJobStatus
pProcessingJobStatus_ =
ProcessingJobSummary'
{ $sel:exitMessage:ProcessingJobSummary' :: Maybe Text
exitMessage =
forall a. Maybe a
Prelude.Nothing,
$sel:failureReason:ProcessingJobSummary' :: Maybe Text
failureReason = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTime:ProcessingJobSummary' :: Maybe POSIX
lastModifiedTime = forall a. Maybe a
Prelude.Nothing,
$sel:processingEndTime:ProcessingJobSummary' :: Maybe POSIX
processingEndTime = forall a. Maybe a
Prelude.Nothing,
$sel:processingJobName:ProcessingJobSummary' :: Text
processingJobName = Text
pProcessingJobName_,
$sel:processingJobArn:ProcessingJobSummary' :: Text
processingJobArn = Text
pProcessingJobArn_,
$sel:creationTime:ProcessingJobSummary' :: POSIX
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
$sel:processingJobStatus:ProcessingJobSummary' :: ProcessingJobStatus
processingJobStatus = ProcessingJobStatus
pProcessingJobStatus_
}
processingJobSummary_exitMessage :: Lens.Lens' ProcessingJobSummary (Prelude.Maybe Prelude.Text)
processingJobSummary_exitMessage :: Lens' ProcessingJobSummary (Maybe Text)
processingJobSummary_exitMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingJobSummary' {Maybe Text
exitMessage :: Maybe Text
$sel:exitMessage:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe Text
exitMessage} -> Maybe Text
exitMessage) (\s :: ProcessingJobSummary
s@ProcessingJobSummary' {} Maybe Text
a -> ProcessingJobSummary
s {$sel:exitMessage:ProcessingJobSummary' :: Maybe Text
exitMessage = Maybe Text
a} :: ProcessingJobSummary)
processingJobSummary_failureReason :: Lens.Lens' ProcessingJobSummary (Prelude.Maybe Prelude.Text)
processingJobSummary_failureReason :: Lens' ProcessingJobSummary (Maybe Text)
processingJobSummary_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingJobSummary' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: ProcessingJobSummary
s@ProcessingJobSummary' {} Maybe Text
a -> ProcessingJobSummary
s {$sel:failureReason:ProcessingJobSummary' :: Maybe Text
failureReason = Maybe Text
a} :: ProcessingJobSummary)
processingJobSummary_lastModifiedTime :: Lens.Lens' ProcessingJobSummary (Prelude.Maybe Prelude.UTCTime)
processingJobSummary_lastModifiedTime :: Lens' ProcessingJobSummary (Maybe UTCTime)
processingJobSummary_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingJobSummary' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: ProcessingJobSummary
s@ProcessingJobSummary' {} Maybe POSIX
a -> ProcessingJobSummary
s {$sel:lastModifiedTime:ProcessingJobSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: ProcessingJobSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
processingJobSummary_processingEndTime :: Lens.Lens' ProcessingJobSummary (Prelude.Maybe Prelude.UTCTime)
processingJobSummary_processingEndTime :: Lens' ProcessingJobSummary (Maybe UTCTime)
processingJobSummary_processingEndTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingJobSummary' {Maybe POSIX
processingEndTime :: Maybe POSIX
$sel:processingEndTime:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe POSIX
processingEndTime} -> Maybe POSIX
processingEndTime) (\s :: ProcessingJobSummary
s@ProcessingJobSummary' {} Maybe POSIX
a -> ProcessingJobSummary
s {$sel:processingEndTime:ProcessingJobSummary' :: Maybe POSIX
processingEndTime = Maybe POSIX
a} :: ProcessingJobSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
processingJobSummary_processingJobName :: Lens.Lens' ProcessingJobSummary Prelude.Text
processingJobSummary_processingJobName :: Lens' ProcessingJobSummary Text
processingJobSummary_processingJobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingJobSummary' {Text
processingJobName :: Text
$sel:processingJobName:ProcessingJobSummary' :: ProcessingJobSummary -> Text
processingJobName} -> Text
processingJobName) (\s :: ProcessingJobSummary
s@ProcessingJobSummary' {} Text
a -> ProcessingJobSummary
s {$sel:processingJobName:ProcessingJobSummary' :: Text
processingJobName = Text
a} :: ProcessingJobSummary)
processingJobSummary_processingJobArn :: Lens.Lens' ProcessingJobSummary Prelude.Text
processingJobSummary_processingJobArn :: Lens' ProcessingJobSummary Text
processingJobSummary_processingJobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingJobSummary' {Text
processingJobArn :: Text
$sel:processingJobArn:ProcessingJobSummary' :: ProcessingJobSummary -> Text
processingJobArn} -> Text
processingJobArn) (\s :: ProcessingJobSummary
s@ProcessingJobSummary' {} Text
a -> ProcessingJobSummary
s {$sel:processingJobArn:ProcessingJobSummary' :: Text
processingJobArn = Text
a} :: ProcessingJobSummary)
processingJobSummary_creationTime :: Lens.Lens' ProcessingJobSummary Prelude.UTCTime
processingJobSummary_creationTime :: Lens' ProcessingJobSummary UTCTime
processingJobSummary_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingJobSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:ProcessingJobSummary' :: ProcessingJobSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: ProcessingJobSummary
s@ProcessingJobSummary' {} POSIX
a -> ProcessingJobSummary
s {$sel:creationTime:ProcessingJobSummary' :: POSIX
creationTime = POSIX
a} :: ProcessingJobSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
processingJobSummary_processingJobStatus :: Lens.Lens' ProcessingJobSummary ProcessingJobStatus
processingJobSummary_processingJobStatus :: Lens' ProcessingJobSummary ProcessingJobStatus
processingJobSummary_processingJobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingJobSummary' {ProcessingJobStatus
processingJobStatus :: ProcessingJobStatus
$sel:processingJobStatus:ProcessingJobSummary' :: ProcessingJobSummary -> ProcessingJobStatus
processingJobStatus} -> ProcessingJobStatus
processingJobStatus) (\s :: ProcessingJobSummary
s@ProcessingJobSummary' {} ProcessingJobStatus
a -> ProcessingJobSummary
s {$sel:processingJobStatus:ProcessingJobSummary' :: ProcessingJobStatus
processingJobStatus = ProcessingJobStatus
a} :: ProcessingJobSummary)
instance Data.FromJSON ProcessingJobSummary where
parseJSON :: Value -> Parser ProcessingJobSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProcessingJobSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Text
-> Text
-> POSIX
-> ProcessingJobStatus
-> ProcessingJobSummary
ProcessingJobSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ExitMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FailureReason")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ProcessingEndTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ProcessingJobName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ProcessingJobArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CreationTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ProcessingJobStatus")
)
instance Prelude.Hashable ProcessingJobSummary where
hashWithSalt :: Int -> ProcessingJobSummary -> Int
hashWithSalt Int
_salt ProcessingJobSummary' {Maybe Text
Maybe POSIX
Text
POSIX
ProcessingJobStatus
processingJobStatus :: ProcessingJobStatus
creationTime :: POSIX
processingJobArn :: Text
processingJobName :: Text
processingEndTime :: Maybe POSIX
lastModifiedTime :: Maybe POSIX
failureReason :: Maybe Text
exitMessage :: Maybe Text
$sel:processingJobStatus:ProcessingJobSummary' :: ProcessingJobSummary -> ProcessingJobStatus
$sel:creationTime:ProcessingJobSummary' :: ProcessingJobSummary -> POSIX
$sel:processingJobArn:ProcessingJobSummary' :: ProcessingJobSummary -> Text
$sel:processingJobName:ProcessingJobSummary' :: ProcessingJobSummary -> Text
$sel:processingEndTime:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe POSIX
$sel:lastModifiedTime:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe POSIX
$sel:failureReason:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe Text
$sel:exitMessage:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
exitMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
failureReason
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
processingEndTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
processingJobName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
processingJobArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ProcessingJobStatus
processingJobStatus
instance Prelude.NFData ProcessingJobSummary where
rnf :: ProcessingJobSummary -> ()
rnf ProcessingJobSummary' {Maybe Text
Maybe POSIX
Text
POSIX
ProcessingJobStatus
processingJobStatus :: ProcessingJobStatus
creationTime :: POSIX
processingJobArn :: Text
processingJobName :: Text
processingEndTime :: Maybe POSIX
lastModifiedTime :: Maybe POSIX
failureReason :: Maybe Text
exitMessage :: Maybe Text
$sel:processingJobStatus:ProcessingJobSummary' :: ProcessingJobSummary -> ProcessingJobStatus
$sel:creationTime:ProcessingJobSummary' :: ProcessingJobSummary -> POSIX
$sel:processingJobArn:ProcessingJobSummary' :: ProcessingJobSummary -> Text
$sel:processingJobName:ProcessingJobSummary' :: ProcessingJobSummary -> Text
$sel:processingEndTime:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe POSIX
$sel:lastModifiedTime:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe POSIX
$sel:failureReason:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe Text
$sel:exitMessage:ProcessingJobSummary' :: ProcessingJobSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
exitMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureReason
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
processingEndTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
processingJobName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
processingJobArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ProcessingJobStatus
processingJobStatus