{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.Types.PipelineExecutionSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.PipelineExecutionSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.PipelineExecutionStatus

-- | A pipeline execution summary.
--
-- /See:/ 'newPipelineExecutionSummary' smart constructor.
data PipelineExecutionSummary = PipelineExecutionSummary'
  { -- | The status of the pipeline execution.
    PipelineExecutionSummary -> Maybe PipelineExecutionStatus
pipelineExecutionStatus :: Prelude.Maybe PipelineExecutionStatus,
    -- | The start time of the pipeline execution.
    PipelineExecutionSummary -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the pipeline execution.
    PipelineExecutionSummary -> Maybe Text
pipelineExecutionArn :: Prelude.Maybe Prelude.Text,
    -- | The display name of the pipeline execution.
    PipelineExecutionSummary -> Maybe Text
pipelineExecutionDisplayName :: Prelude.Maybe Prelude.Text,
    -- | The description of the pipeline execution.
    PipelineExecutionSummary -> Maybe Text
pipelineExecutionDescription :: Prelude.Maybe Prelude.Text
  }
  deriving (PipelineExecutionSummary -> PipelineExecutionSummary -> Bool
(PipelineExecutionSummary -> PipelineExecutionSummary -> Bool)
-> (PipelineExecutionSummary -> PipelineExecutionSummary -> Bool)
-> Eq PipelineExecutionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineExecutionSummary -> PipelineExecutionSummary -> Bool
$c/= :: PipelineExecutionSummary -> PipelineExecutionSummary -> Bool
== :: PipelineExecutionSummary -> PipelineExecutionSummary -> Bool
$c== :: PipelineExecutionSummary -> PipelineExecutionSummary -> Bool
Prelude.Eq, ReadPrec [PipelineExecutionSummary]
ReadPrec PipelineExecutionSummary
Int -> ReadS PipelineExecutionSummary
ReadS [PipelineExecutionSummary]
(Int -> ReadS PipelineExecutionSummary)
-> ReadS [PipelineExecutionSummary]
-> ReadPrec PipelineExecutionSummary
-> ReadPrec [PipelineExecutionSummary]
-> Read PipelineExecutionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PipelineExecutionSummary]
$creadListPrec :: ReadPrec [PipelineExecutionSummary]
readPrec :: ReadPrec PipelineExecutionSummary
$creadPrec :: ReadPrec PipelineExecutionSummary
readList :: ReadS [PipelineExecutionSummary]
$creadList :: ReadS [PipelineExecutionSummary]
readsPrec :: Int -> ReadS PipelineExecutionSummary
$creadsPrec :: Int -> ReadS PipelineExecutionSummary
Prelude.Read, Int -> PipelineExecutionSummary -> ShowS
[PipelineExecutionSummary] -> ShowS
PipelineExecutionSummary -> String
(Int -> PipelineExecutionSummary -> ShowS)
-> (PipelineExecutionSummary -> String)
-> ([PipelineExecutionSummary] -> ShowS)
-> Show PipelineExecutionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PipelineExecutionSummary] -> ShowS
$cshowList :: [PipelineExecutionSummary] -> ShowS
show :: PipelineExecutionSummary -> String
$cshow :: PipelineExecutionSummary -> String
showsPrec :: Int -> PipelineExecutionSummary -> ShowS
$cshowsPrec :: Int -> PipelineExecutionSummary -> ShowS
Prelude.Show, (forall x.
 PipelineExecutionSummary -> Rep PipelineExecutionSummary x)
-> (forall x.
    Rep PipelineExecutionSummary x -> PipelineExecutionSummary)
-> Generic PipelineExecutionSummary
forall x.
Rep PipelineExecutionSummary x -> PipelineExecutionSummary
forall x.
PipelineExecutionSummary -> Rep PipelineExecutionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PipelineExecutionSummary x -> PipelineExecutionSummary
$cfrom :: forall x.
PipelineExecutionSummary -> Rep PipelineExecutionSummary x
Prelude.Generic)

-- |
-- Create a value of 'PipelineExecutionSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'pipelineExecutionStatus', 'pipelineExecutionSummary_pipelineExecutionStatus' - The status of the pipeline execution.
--
-- 'startTime', 'pipelineExecutionSummary_startTime' - The start time of the pipeline execution.
--
-- 'pipelineExecutionArn', 'pipelineExecutionSummary_pipelineExecutionArn' - The Amazon Resource Name (ARN) of the pipeline execution.
--
-- 'pipelineExecutionDisplayName', 'pipelineExecutionSummary_pipelineExecutionDisplayName' - The display name of the pipeline execution.
--
-- 'pipelineExecutionDescription', 'pipelineExecutionSummary_pipelineExecutionDescription' - The description of the pipeline execution.
newPipelineExecutionSummary ::
  PipelineExecutionSummary
newPipelineExecutionSummary :: PipelineExecutionSummary
newPipelineExecutionSummary =
  PipelineExecutionSummary' :: Maybe PipelineExecutionStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PipelineExecutionSummary
PipelineExecutionSummary'
    { $sel:pipelineExecutionStatus:PipelineExecutionSummary' :: Maybe PipelineExecutionStatus
pipelineExecutionStatus =
        Maybe PipelineExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:PipelineExecutionSummary' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionArn:PipelineExecutionSummary' :: Maybe Text
pipelineExecutionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionDisplayName:PipelineExecutionSummary' :: Maybe Text
pipelineExecutionDisplayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionDescription:PipelineExecutionSummary' :: Maybe Text
pipelineExecutionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the pipeline execution.
pipelineExecutionSummary_pipelineExecutionStatus :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe PipelineExecutionStatus)
pipelineExecutionSummary_pipelineExecutionStatus :: (Maybe PipelineExecutionStatus
 -> f (Maybe PipelineExecutionStatus))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_pipelineExecutionStatus = (PipelineExecutionSummary -> Maybe PipelineExecutionStatus)
-> (PipelineExecutionSummary
    -> Maybe PipelineExecutionStatus -> PipelineExecutionSummary)
-> Lens
     PipelineExecutionSummary
     PipelineExecutionSummary
     (Maybe PipelineExecutionStatus)
     (Maybe PipelineExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionSummary' {Maybe PipelineExecutionStatus
pipelineExecutionStatus :: Maybe PipelineExecutionStatus
$sel:pipelineExecutionStatus:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe PipelineExecutionStatus
pipelineExecutionStatus} -> Maybe PipelineExecutionStatus
pipelineExecutionStatus) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe PipelineExecutionStatus
a -> PipelineExecutionSummary
s {$sel:pipelineExecutionStatus:PipelineExecutionSummary' :: Maybe PipelineExecutionStatus
pipelineExecutionStatus = Maybe PipelineExecutionStatus
a} :: PipelineExecutionSummary)

-- | The start time of the pipeline execution.
pipelineExecutionSummary_startTime :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe Prelude.UTCTime)
pipelineExecutionSummary_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_startTime = (PipelineExecutionSummary -> Maybe POSIX)
-> (PipelineExecutionSummary
    -> Maybe POSIX -> PipelineExecutionSummary)
-> Lens
     PipelineExecutionSummary
     PipelineExecutionSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionSummary' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe POSIX
a -> PipelineExecutionSummary
s {$sel:startTime:PipelineExecutionSummary' :: Maybe POSIX
startTime = Maybe POSIX
a} :: PipelineExecutionSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> PipelineExecutionSummary -> f PipelineExecutionSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecutionSummary
-> f PipelineExecutionSummary
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

-- | The Amazon Resource Name (ARN) of the pipeline execution.
pipelineExecutionSummary_pipelineExecutionArn :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe Prelude.Text)
pipelineExecutionSummary_pipelineExecutionArn :: (Maybe Text -> f (Maybe Text))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_pipelineExecutionArn = (PipelineExecutionSummary -> Maybe Text)
-> (PipelineExecutionSummary
    -> Maybe Text -> PipelineExecutionSummary)
-> Lens
     PipelineExecutionSummary
     PipelineExecutionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionSummary' {Maybe Text
pipelineExecutionArn :: Maybe Text
$sel:pipelineExecutionArn:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe Text
pipelineExecutionArn} -> Maybe Text
pipelineExecutionArn) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe Text
a -> PipelineExecutionSummary
s {$sel:pipelineExecutionArn:PipelineExecutionSummary' :: Maybe Text
pipelineExecutionArn = Maybe Text
a} :: PipelineExecutionSummary)

-- | The display name of the pipeline execution.
pipelineExecutionSummary_pipelineExecutionDisplayName :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe Prelude.Text)
pipelineExecutionSummary_pipelineExecutionDisplayName :: (Maybe Text -> f (Maybe Text))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_pipelineExecutionDisplayName = (PipelineExecutionSummary -> Maybe Text)
-> (PipelineExecutionSummary
    -> Maybe Text -> PipelineExecutionSummary)
-> Lens
     PipelineExecutionSummary
     PipelineExecutionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionSummary' {Maybe Text
pipelineExecutionDisplayName :: Maybe Text
$sel:pipelineExecutionDisplayName:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe Text
pipelineExecutionDisplayName} -> Maybe Text
pipelineExecutionDisplayName) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe Text
a -> PipelineExecutionSummary
s {$sel:pipelineExecutionDisplayName:PipelineExecutionSummary' :: Maybe Text
pipelineExecutionDisplayName = Maybe Text
a} :: PipelineExecutionSummary)

-- | The description of the pipeline execution.
pipelineExecutionSummary_pipelineExecutionDescription :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe Prelude.Text)
pipelineExecutionSummary_pipelineExecutionDescription :: (Maybe Text -> f (Maybe Text))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_pipelineExecutionDescription = (PipelineExecutionSummary -> Maybe Text)
-> (PipelineExecutionSummary
    -> Maybe Text -> PipelineExecutionSummary)
-> Lens
     PipelineExecutionSummary
     PipelineExecutionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionSummary' {Maybe Text
pipelineExecutionDescription :: Maybe Text
$sel:pipelineExecutionDescription:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe Text
pipelineExecutionDescription} -> Maybe Text
pipelineExecutionDescription) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe Text
a -> PipelineExecutionSummary
s {$sel:pipelineExecutionDescription:PipelineExecutionSummary' :: Maybe Text
pipelineExecutionDescription = Maybe Text
a} :: PipelineExecutionSummary)

instance Core.FromJSON PipelineExecutionSummary where
  parseJSON :: Value -> Parser PipelineExecutionSummary
parseJSON =
    String
-> (Object -> Parser PipelineExecutionSummary)
-> Value
-> Parser PipelineExecutionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PipelineExecutionSummary"
      ( \Object
x ->
          Maybe PipelineExecutionStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PipelineExecutionSummary
PipelineExecutionSummary'
            (Maybe PipelineExecutionStatus
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> PipelineExecutionSummary)
-> Parser (Maybe PipelineExecutionStatus)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PipelineExecutionSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe PipelineExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PipelineExecutionStatus")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PipelineExecutionSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> PipelineExecutionSummary)
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 Text -> Maybe Text -> PipelineExecutionSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> PipelineExecutionSummary)
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
"PipelineExecutionArn")
            Parser (Maybe Text -> Maybe Text -> PipelineExecutionSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> PipelineExecutionSummary)
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
"PipelineExecutionDisplayName")
            Parser (Maybe Text -> PipelineExecutionSummary)
-> Parser (Maybe Text) -> Parser PipelineExecutionSummary
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
"PipelineExecutionDescription")
      )

instance Prelude.Hashable PipelineExecutionSummary

instance Prelude.NFData PipelineExecutionSummary