{-# 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.PipelineExecutionStep where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.CacheHitResult
import Amazonka.SageMaker.Types.PipelineExecutionStepMetadata
import Amazonka.SageMaker.Types.StepStatus
data PipelineExecutionStep = PipelineExecutionStep'
{
PipelineExecutionStep -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
PipelineExecutionStep -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
PipelineExecutionStep -> Maybe Text
stepName :: Prelude.Maybe Prelude.Text,
PipelineExecutionStep -> Maybe StepStatus
stepStatus :: Prelude.Maybe StepStatus,
PipelineExecutionStep -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
PipelineExecutionStep -> Maybe PipelineExecutionStepMetadata
metadata :: Prelude.Maybe PipelineExecutionStepMetadata,
PipelineExecutionStep -> Maybe CacheHitResult
cacheHitResult :: Prelude.Maybe CacheHitResult
}
deriving (PipelineExecutionStep -> PipelineExecutionStep -> Bool
(PipelineExecutionStep -> PipelineExecutionStep -> Bool)
-> (PipelineExecutionStep -> PipelineExecutionStep -> Bool)
-> Eq PipelineExecutionStep
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineExecutionStep -> PipelineExecutionStep -> Bool
$c/= :: PipelineExecutionStep -> PipelineExecutionStep -> Bool
== :: PipelineExecutionStep -> PipelineExecutionStep -> Bool
$c== :: PipelineExecutionStep -> PipelineExecutionStep -> Bool
Prelude.Eq, ReadPrec [PipelineExecutionStep]
ReadPrec PipelineExecutionStep
Int -> ReadS PipelineExecutionStep
ReadS [PipelineExecutionStep]
(Int -> ReadS PipelineExecutionStep)
-> ReadS [PipelineExecutionStep]
-> ReadPrec PipelineExecutionStep
-> ReadPrec [PipelineExecutionStep]
-> Read PipelineExecutionStep
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PipelineExecutionStep]
$creadListPrec :: ReadPrec [PipelineExecutionStep]
readPrec :: ReadPrec PipelineExecutionStep
$creadPrec :: ReadPrec PipelineExecutionStep
readList :: ReadS [PipelineExecutionStep]
$creadList :: ReadS [PipelineExecutionStep]
readsPrec :: Int -> ReadS PipelineExecutionStep
$creadsPrec :: Int -> ReadS PipelineExecutionStep
Prelude.Read, Int -> PipelineExecutionStep -> ShowS
[PipelineExecutionStep] -> ShowS
PipelineExecutionStep -> String
(Int -> PipelineExecutionStep -> ShowS)
-> (PipelineExecutionStep -> String)
-> ([PipelineExecutionStep] -> ShowS)
-> Show PipelineExecutionStep
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PipelineExecutionStep] -> ShowS
$cshowList :: [PipelineExecutionStep] -> ShowS
show :: PipelineExecutionStep -> String
$cshow :: PipelineExecutionStep -> String
showsPrec :: Int -> PipelineExecutionStep -> ShowS
$cshowsPrec :: Int -> PipelineExecutionStep -> ShowS
Prelude.Show, (forall x. PipelineExecutionStep -> Rep PipelineExecutionStep x)
-> (forall x. Rep PipelineExecutionStep x -> PipelineExecutionStep)
-> Generic PipelineExecutionStep
forall x. Rep PipelineExecutionStep x -> PipelineExecutionStep
forall x. PipelineExecutionStep -> Rep PipelineExecutionStep x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PipelineExecutionStep x -> PipelineExecutionStep
$cfrom :: forall x. PipelineExecutionStep -> Rep PipelineExecutionStep x
Prelude.Generic)
newPipelineExecutionStep ::
PipelineExecutionStep
newPipelineExecutionStep :: PipelineExecutionStep
newPipelineExecutionStep =
PipelineExecutionStep' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe StepStatus
-> Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep
PipelineExecutionStep'
{ $sel:failureReason:PipelineExecutionStep' :: Maybe Text
failureReason =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:PipelineExecutionStep' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:stepName:PipelineExecutionStep' :: Maybe Text
stepName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:stepStatus:PipelineExecutionStep' :: Maybe StepStatus
stepStatus = Maybe StepStatus
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:PipelineExecutionStep' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:metadata:PipelineExecutionStep' :: Maybe PipelineExecutionStepMetadata
metadata = Maybe PipelineExecutionStepMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:cacheHitResult:PipelineExecutionStep' :: Maybe CacheHitResult
cacheHitResult = Maybe CacheHitResult
forall a. Maybe a
Prelude.Nothing
}
pipelineExecutionStep_failureReason :: Lens.Lens' PipelineExecutionStep (Prelude.Maybe Prelude.Text)
pipelineExecutionStep_failureReason :: (Maybe Text -> f (Maybe Text))
-> PipelineExecutionStep -> f PipelineExecutionStep
pipelineExecutionStep_failureReason = (PipelineExecutionStep -> Maybe Text)
-> (PipelineExecutionStep -> Maybe Text -> PipelineExecutionStep)
-> Lens
PipelineExecutionStep
PipelineExecutionStep
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionStep' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:PipelineExecutionStep' :: PipelineExecutionStep -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: PipelineExecutionStep
s@PipelineExecutionStep' {} Maybe Text
a -> PipelineExecutionStep
s {$sel:failureReason:PipelineExecutionStep' :: Maybe Text
failureReason = Maybe Text
a} :: PipelineExecutionStep)
pipelineExecutionStep_startTime :: Lens.Lens' PipelineExecutionStep (Prelude.Maybe Prelude.UTCTime)
pipelineExecutionStep_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecutionStep -> f PipelineExecutionStep
pipelineExecutionStep_startTime = (PipelineExecutionStep -> Maybe POSIX)
-> (PipelineExecutionStep -> Maybe POSIX -> PipelineExecutionStep)
-> Lens
PipelineExecutionStep
PipelineExecutionStep
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionStep' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:PipelineExecutionStep' :: PipelineExecutionStep -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: PipelineExecutionStep
s@PipelineExecutionStep' {} Maybe POSIX
a -> PipelineExecutionStep
s {$sel:startTime:PipelineExecutionStep' :: Maybe POSIX
startTime = Maybe POSIX
a} :: PipelineExecutionStep) ((Maybe POSIX -> f (Maybe POSIX))
-> PipelineExecutionStep -> f PipelineExecutionStep)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecutionStep
-> f PipelineExecutionStep
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
pipelineExecutionStep_stepName :: Lens.Lens' PipelineExecutionStep (Prelude.Maybe Prelude.Text)
pipelineExecutionStep_stepName :: (Maybe Text -> f (Maybe Text))
-> PipelineExecutionStep -> f PipelineExecutionStep
pipelineExecutionStep_stepName = (PipelineExecutionStep -> Maybe Text)
-> (PipelineExecutionStep -> Maybe Text -> PipelineExecutionStep)
-> Lens
PipelineExecutionStep
PipelineExecutionStep
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionStep' {Maybe Text
stepName :: Maybe Text
$sel:stepName:PipelineExecutionStep' :: PipelineExecutionStep -> Maybe Text
stepName} -> Maybe Text
stepName) (\s :: PipelineExecutionStep
s@PipelineExecutionStep' {} Maybe Text
a -> PipelineExecutionStep
s {$sel:stepName:PipelineExecutionStep' :: Maybe Text
stepName = Maybe Text
a} :: PipelineExecutionStep)
pipelineExecutionStep_stepStatus :: Lens.Lens' PipelineExecutionStep (Prelude.Maybe StepStatus)
pipelineExecutionStep_stepStatus :: (Maybe StepStatus -> f (Maybe StepStatus))
-> PipelineExecutionStep -> f PipelineExecutionStep
pipelineExecutionStep_stepStatus = (PipelineExecutionStep -> Maybe StepStatus)
-> (PipelineExecutionStep
-> Maybe StepStatus -> PipelineExecutionStep)
-> Lens
PipelineExecutionStep
PipelineExecutionStep
(Maybe StepStatus)
(Maybe StepStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionStep' {Maybe StepStatus
stepStatus :: Maybe StepStatus
$sel:stepStatus:PipelineExecutionStep' :: PipelineExecutionStep -> Maybe StepStatus
stepStatus} -> Maybe StepStatus
stepStatus) (\s :: PipelineExecutionStep
s@PipelineExecutionStep' {} Maybe StepStatus
a -> PipelineExecutionStep
s {$sel:stepStatus:PipelineExecutionStep' :: Maybe StepStatus
stepStatus = Maybe StepStatus
a} :: PipelineExecutionStep)
pipelineExecutionStep_endTime :: Lens.Lens' PipelineExecutionStep (Prelude.Maybe Prelude.UTCTime)
pipelineExecutionStep_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecutionStep -> f PipelineExecutionStep
pipelineExecutionStep_endTime = (PipelineExecutionStep -> Maybe POSIX)
-> (PipelineExecutionStep -> Maybe POSIX -> PipelineExecutionStep)
-> Lens
PipelineExecutionStep
PipelineExecutionStep
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionStep' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:PipelineExecutionStep' :: PipelineExecutionStep -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: PipelineExecutionStep
s@PipelineExecutionStep' {} Maybe POSIX
a -> PipelineExecutionStep
s {$sel:endTime:PipelineExecutionStep' :: Maybe POSIX
endTime = Maybe POSIX
a} :: PipelineExecutionStep) ((Maybe POSIX -> f (Maybe POSIX))
-> PipelineExecutionStep -> f PipelineExecutionStep)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecutionStep
-> f PipelineExecutionStep
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
pipelineExecutionStep_metadata :: Lens.Lens' PipelineExecutionStep (Prelude.Maybe PipelineExecutionStepMetadata)
pipelineExecutionStep_metadata :: (Maybe PipelineExecutionStepMetadata
-> f (Maybe PipelineExecutionStepMetadata))
-> PipelineExecutionStep -> f PipelineExecutionStep
pipelineExecutionStep_metadata = (PipelineExecutionStep -> Maybe PipelineExecutionStepMetadata)
-> (PipelineExecutionStep
-> Maybe PipelineExecutionStepMetadata -> PipelineExecutionStep)
-> Lens
PipelineExecutionStep
PipelineExecutionStep
(Maybe PipelineExecutionStepMetadata)
(Maybe PipelineExecutionStepMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionStep' {Maybe PipelineExecutionStepMetadata
metadata :: Maybe PipelineExecutionStepMetadata
$sel:metadata:PipelineExecutionStep' :: PipelineExecutionStep -> Maybe PipelineExecutionStepMetadata
metadata} -> Maybe PipelineExecutionStepMetadata
metadata) (\s :: PipelineExecutionStep
s@PipelineExecutionStep' {} Maybe PipelineExecutionStepMetadata
a -> PipelineExecutionStep
s {$sel:metadata:PipelineExecutionStep' :: Maybe PipelineExecutionStepMetadata
metadata = Maybe PipelineExecutionStepMetadata
a} :: PipelineExecutionStep)
pipelineExecutionStep_cacheHitResult :: Lens.Lens' PipelineExecutionStep (Prelude.Maybe CacheHitResult)
pipelineExecutionStep_cacheHitResult :: (Maybe CacheHitResult -> f (Maybe CacheHitResult))
-> PipelineExecutionStep -> f PipelineExecutionStep
pipelineExecutionStep_cacheHitResult = (PipelineExecutionStep -> Maybe CacheHitResult)
-> (PipelineExecutionStep
-> Maybe CacheHitResult -> PipelineExecutionStep)
-> Lens
PipelineExecutionStep
PipelineExecutionStep
(Maybe CacheHitResult)
(Maybe CacheHitResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionStep' {Maybe CacheHitResult
cacheHitResult :: Maybe CacheHitResult
$sel:cacheHitResult:PipelineExecutionStep' :: PipelineExecutionStep -> Maybe CacheHitResult
cacheHitResult} -> Maybe CacheHitResult
cacheHitResult) (\s :: PipelineExecutionStep
s@PipelineExecutionStep' {} Maybe CacheHitResult
a -> PipelineExecutionStep
s {$sel:cacheHitResult:PipelineExecutionStep' :: Maybe CacheHitResult
cacheHitResult = Maybe CacheHitResult
a} :: PipelineExecutionStep)
instance Core.FromJSON PipelineExecutionStep where
parseJSON :: Value -> Parser PipelineExecutionStep
parseJSON =
String
-> (Object -> Parser PipelineExecutionStep)
-> Value
-> Parser PipelineExecutionStep
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PipelineExecutionStep"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe StepStatus
-> Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep
PipelineExecutionStep'
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe StepStatus
-> Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe StepStatus
-> Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep)
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 POSIX
-> Maybe Text
-> Maybe StepStatus
-> Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe StepStatus
-> Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep)
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
"StartTime")
Parser
(Maybe Text
-> Maybe StepStatus
-> Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep)
-> Parser (Maybe Text)
-> Parser
(Maybe StepStatus
-> Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep)
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
"StepName")
Parser
(Maybe StepStatus
-> Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep)
-> Parser (Maybe StepStatus)
-> Parser
(Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StepStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StepStatus")
Parser
(Maybe POSIX
-> Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult
-> PipelineExecutionStep)
-> Parser (Maybe POSIX)
-> Parser
(Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult -> PipelineExecutionStep)
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
"EndTime")
Parser
(Maybe PipelineExecutionStepMetadata
-> Maybe CacheHitResult -> PipelineExecutionStep)
-> Parser (Maybe PipelineExecutionStepMetadata)
-> Parser (Maybe CacheHitResult -> PipelineExecutionStep)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PipelineExecutionStepMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Metadata")
Parser (Maybe CacheHitResult -> PipelineExecutionStep)
-> Parser (Maybe CacheHitResult) -> Parser PipelineExecutionStep
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CacheHitResult)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CacheHitResult")
)
instance Prelude.Hashable PipelineExecutionStep
instance Prelude.NFData PipelineExecutionStep