{-# 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.PipelineExecution
-- 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.PipelineExecution where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.Parameter
import Amazonka.SageMaker.Types.PipelineExecutionStatus
import Amazonka.SageMaker.Types.PipelineExperimentConfig
import Amazonka.SageMaker.Types.UserContext

-- | An execution of a pipeline.
--
-- /See:/ 'newPipelineExecution' smart constructor.
data PipelineExecution = PipelineExecution'
  { -- | The creation time of the pipeline execution.
    PipelineExecution -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the pipeline status.
    PipelineExecution -> Maybe PipelineExecutionStatus
pipelineExecutionStatus :: Prelude.Maybe PipelineExecutionStatus,
    -- | If the execution failed, a message describing why.
    PipelineExecution -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the pipeline execution.
    PipelineExecution -> Maybe Text
pipelineExecutionArn :: Prelude.Maybe Prelude.Text,
    -- | Contains a list of pipeline parameters. This list can be empty.
    PipelineExecution -> Maybe [Parameter]
pipelineParameters :: Prelude.Maybe [Parameter],
    PipelineExecution -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
    -- | The time that the pipeline execution was last modified.
    PipelineExecution -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the pipeline that was executed.
    PipelineExecution -> Maybe Text
pipelineArn :: Prelude.Maybe Prelude.Text,
    -- | The display name of the pipeline execution.
    PipelineExecution -> Maybe Text
pipelineExecutionDisplayName :: Prelude.Maybe Prelude.Text,
    PipelineExecution -> Maybe UserContext
lastModifiedBy :: Prelude.Maybe UserContext,
    -- | The description of the pipeline execution.
    PipelineExecution -> Maybe Text
pipelineExecutionDescription :: Prelude.Maybe Prelude.Text,
    PipelineExecution -> Maybe PipelineExperimentConfig
pipelineExperimentConfig :: Prelude.Maybe PipelineExperimentConfig
  }
  deriving (PipelineExecution -> PipelineExecution -> Bool
(PipelineExecution -> PipelineExecution -> Bool)
-> (PipelineExecution -> PipelineExecution -> Bool)
-> Eq PipelineExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineExecution -> PipelineExecution -> Bool
$c/= :: PipelineExecution -> PipelineExecution -> Bool
== :: PipelineExecution -> PipelineExecution -> Bool
$c== :: PipelineExecution -> PipelineExecution -> Bool
Prelude.Eq, ReadPrec [PipelineExecution]
ReadPrec PipelineExecution
Int -> ReadS PipelineExecution
ReadS [PipelineExecution]
(Int -> ReadS PipelineExecution)
-> ReadS [PipelineExecution]
-> ReadPrec PipelineExecution
-> ReadPrec [PipelineExecution]
-> Read PipelineExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PipelineExecution]
$creadListPrec :: ReadPrec [PipelineExecution]
readPrec :: ReadPrec PipelineExecution
$creadPrec :: ReadPrec PipelineExecution
readList :: ReadS [PipelineExecution]
$creadList :: ReadS [PipelineExecution]
readsPrec :: Int -> ReadS PipelineExecution
$creadsPrec :: Int -> ReadS PipelineExecution
Prelude.Read, Int -> PipelineExecution -> ShowS
[PipelineExecution] -> ShowS
PipelineExecution -> String
(Int -> PipelineExecution -> ShowS)
-> (PipelineExecution -> String)
-> ([PipelineExecution] -> ShowS)
-> Show PipelineExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PipelineExecution] -> ShowS
$cshowList :: [PipelineExecution] -> ShowS
show :: PipelineExecution -> String
$cshow :: PipelineExecution -> String
showsPrec :: Int -> PipelineExecution -> ShowS
$cshowsPrec :: Int -> PipelineExecution -> ShowS
Prelude.Show, (forall x. PipelineExecution -> Rep PipelineExecution x)
-> (forall x. Rep PipelineExecution x -> PipelineExecution)
-> Generic PipelineExecution
forall x. Rep PipelineExecution x -> PipelineExecution
forall x. PipelineExecution -> Rep PipelineExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PipelineExecution x -> PipelineExecution
$cfrom :: forall x. PipelineExecution -> Rep PipelineExecution x
Prelude.Generic)

-- |
-- Create a value of 'PipelineExecution' 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:
--
-- 'creationTime', 'pipelineExecution_creationTime' - The creation time of the pipeline execution.
--
-- 'pipelineExecutionStatus', 'pipelineExecution_pipelineExecutionStatus' - The status of the pipeline status.
--
-- 'failureReason', 'pipelineExecution_failureReason' - If the execution failed, a message describing why.
--
-- 'pipelineExecutionArn', 'pipelineExecution_pipelineExecutionArn' - The Amazon Resource Name (ARN) of the pipeline execution.
--
-- 'pipelineParameters', 'pipelineExecution_pipelineParameters' - Contains a list of pipeline parameters. This list can be empty.
--
-- 'createdBy', 'pipelineExecution_createdBy' - Undocumented member.
--
-- 'lastModifiedTime', 'pipelineExecution_lastModifiedTime' - The time that the pipeline execution was last modified.
--
-- 'pipelineArn', 'pipelineExecution_pipelineArn' - The Amazon Resource Name (ARN) of the pipeline that was executed.
--
-- 'pipelineExecutionDisplayName', 'pipelineExecution_pipelineExecutionDisplayName' - The display name of the pipeline execution.
--
-- 'lastModifiedBy', 'pipelineExecution_lastModifiedBy' - Undocumented member.
--
-- 'pipelineExecutionDescription', 'pipelineExecution_pipelineExecutionDescription' - The description of the pipeline execution.
--
-- 'pipelineExperimentConfig', 'pipelineExecution_pipelineExperimentConfig' - Undocumented member.
newPipelineExecution ::
  PipelineExecution
newPipelineExecution :: PipelineExecution
newPipelineExecution =
  PipelineExecution' :: Maybe POSIX
-> Maybe PipelineExecutionStatus
-> Maybe Text
-> Maybe Text
-> Maybe [Parameter]
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe PipelineExperimentConfig
-> PipelineExecution
PipelineExecution'
    { $sel:creationTime:PipelineExecution' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionStatus:PipelineExecution' :: Maybe PipelineExecutionStatus
pipelineExecutionStatus = Maybe PipelineExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:PipelineExecution' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionArn:PipelineExecution' :: Maybe Text
pipelineExecutionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineParameters:PipelineExecution' :: Maybe [Parameter]
pipelineParameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:PipelineExecution' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:PipelineExecution' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineArn:PipelineExecution' :: Maybe Text
pipelineArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionDisplayName:PipelineExecution' :: Maybe Text
pipelineExecutionDisplayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:PipelineExecution' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionDescription:PipelineExecution' :: Maybe Text
pipelineExecutionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExperimentConfig:PipelineExecution' :: Maybe PipelineExperimentConfig
pipelineExperimentConfig = Maybe PipelineExperimentConfig
forall a. Maybe a
Prelude.Nothing
    }

-- | The creation time of the pipeline execution.
pipelineExecution_creationTime :: Lens.Lens' PipelineExecution (Prelude.Maybe Prelude.UTCTime)
pipelineExecution_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_creationTime = (PipelineExecution -> Maybe POSIX)
-> (PipelineExecution -> Maybe POSIX -> PipelineExecution)
-> Lens
     PipelineExecution PipelineExecution (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:PipelineExecution' :: PipelineExecution -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe POSIX
a -> PipelineExecution
s {$sel:creationTime:PipelineExecution' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: PipelineExecution) ((Maybe POSIX -> f (Maybe POSIX))
 -> PipelineExecution -> f PipelineExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecution
-> f PipelineExecution
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 status of the pipeline status.
pipelineExecution_pipelineExecutionStatus :: Lens.Lens' PipelineExecution (Prelude.Maybe PipelineExecutionStatus)
pipelineExecution_pipelineExecutionStatus :: (Maybe PipelineExecutionStatus
 -> f (Maybe PipelineExecutionStatus))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_pipelineExecutionStatus = (PipelineExecution -> Maybe PipelineExecutionStatus)
-> (PipelineExecution
    -> Maybe PipelineExecutionStatus -> PipelineExecution)
-> Lens
     PipelineExecution
     PipelineExecution
     (Maybe PipelineExecutionStatus)
     (Maybe PipelineExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe PipelineExecutionStatus
pipelineExecutionStatus :: Maybe PipelineExecutionStatus
$sel:pipelineExecutionStatus:PipelineExecution' :: PipelineExecution -> Maybe PipelineExecutionStatus
pipelineExecutionStatus} -> Maybe PipelineExecutionStatus
pipelineExecutionStatus) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe PipelineExecutionStatus
a -> PipelineExecution
s {$sel:pipelineExecutionStatus:PipelineExecution' :: Maybe PipelineExecutionStatus
pipelineExecutionStatus = Maybe PipelineExecutionStatus
a} :: PipelineExecution)

-- | If the execution failed, a message describing why.
pipelineExecution_failureReason :: Lens.Lens' PipelineExecution (Prelude.Maybe Prelude.Text)
pipelineExecution_failureReason :: (Maybe Text -> f (Maybe Text))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_failureReason = (PipelineExecution -> Maybe Text)
-> (PipelineExecution -> Maybe Text -> PipelineExecution)
-> Lens
     PipelineExecution PipelineExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:PipelineExecution' :: PipelineExecution -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe Text
a -> PipelineExecution
s {$sel:failureReason:PipelineExecution' :: Maybe Text
failureReason = Maybe Text
a} :: PipelineExecution)

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

-- | Contains a list of pipeline parameters. This list can be empty.
pipelineExecution_pipelineParameters :: Lens.Lens' PipelineExecution (Prelude.Maybe [Parameter])
pipelineExecution_pipelineParameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_pipelineParameters = (PipelineExecution -> Maybe [Parameter])
-> (PipelineExecution -> Maybe [Parameter] -> PipelineExecution)
-> Lens
     PipelineExecution
     PipelineExecution
     (Maybe [Parameter])
     (Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe [Parameter]
pipelineParameters :: Maybe [Parameter]
$sel:pipelineParameters:PipelineExecution' :: PipelineExecution -> Maybe [Parameter]
pipelineParameters} -> Maybe [Parameter]
pipelineParameters) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe [Parameter]
a -> PipelineExecution
s {$sel:pipelineParameters:PipelineExecution' :: Maybe [Parameter]
pipelineParameters = Maybe [Parameter]
a} :: PipelineExecution) ((Maybe [Parameter] -> f (Maybe [Parameter]))
 -> PipelineExecution -> f PipelineExecution)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> PipelineExecution
-> f PipelineExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Parameter] [Parameter] [Parameter] [Parameter]
-> Iso
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
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 [Parameter] [Parameter] [Parameter] [Parameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
pipelineExecution_createdBy :: Lens.Lens' PipelineExecution (Prelude.Maybe UserContext)
pipelineExecution_createdBy :: (Maybe UserContext -> f (Maybe UserContext))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_createdBy = (PipelineExecution -> Maybe UserContext)
-> (PipelineExecution -> Maybe UserContext -> PipelineExecution)
-> Lens
     PipelineExecution
     PipelineExecution
     (Maybe UserContext)
     (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe UserContext
createdBy :: Maybe UserContext
$sel:createdBy:PipelineExecution' :: PipelineExecution -> Maybe UserContext
createdBy} -> Maybe UserContext
createdBy) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe UserContext
a -> PipelineExecution
s {$sel:createdBy:PipelineExecution' :: Maybe UserContext
createdBy = Maybe UserContext
a} :: PipelineExecution)

-- | The time that the pipeline execution was last modified.
pipelineExecution_lastModifiedTime :: Lens.Lens' PipelineExecution (Prelude.Maybe Prelude.UTCTime)
pipelineExecution_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_lastModifiedTime = (PipelineExecution -> Maybe POSIX)
-> (PipelineExecution -> Maybe POSIX -> PipelineExecution)
-> Lens
     PipelineExecution PipelineExecution (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:PipelineExecution' :: PipelineExecution -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe POSIX
a -> PipelineExecution
s {$sel:lastModifiedTime:PipelineExecution' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: PipelineExecution) ((Maybe POSIX -> f (Maybe POSIX))
 -> PipelineExecution -> f PipelineExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecution
-> f PipelineExecution
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 that was executed.
pipelineExecution_pipelineArn :: Lens.Lens' PipelineExecution (Prelude.Maybe Prelude.Text)
pipelineExecution_pipelineArn :: (Maybe Text -> f (Maybe Text))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_pipelineArn = (PipelineExecution -> Maybe Text)
-> (PipelineExecution -> Maybe Text -> PipelineExecution)
-> Lens
     PipelineExecution PipelineExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe Text
pipelineArn :: Maybe Text
$sel:pipelineArn:PipelineExecution' :: PipelineExecution -> Maybe Text
pipelineArn} -> Maybe Text
pipelineArn) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe Text
a -> PipelineExecution
s {$sel:pipelineArn:PipelineExecution' :: Maybe Text
pipelineArn = Maybe Text
a} :: PipelineExecution)

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

-- | Undocumented member.
pipelineExecution_lastModifiedBy :: Lens.Lens' PipelineExecution (Prelude.Maybe UserContext)
pipelineExecution_lastModifiedBy :: (Maybe UserContext -> f (Maybe UserContext))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_lastModifiedBy = (PipelineExecution -> Maybe UserContext)
-> (PipelineExecution -> Maybe UserContext -> PipelineExecution)
-> Lens
     PipelineExecution
     PipelineExecution
     (Maybe UserContext)
     (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe UserContext
lastModifiedBy :: Maybe UserContext
$sel:lastModifiedBy:PipelineExecution' :: PipelineExecution -> Maybe UserContext
lastModifiedBy} -> Maybe UserContext
lastModifiedBy) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe UserContext
a -> PipelineExecution
s {$sel:lastModifiedBy:PipelineExecution' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
a} :: PipelineExecution)

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

-- | Undocumented member.
pipelineExecution_pipelineExperimentConfig :: Lens.Lens' PipelineExecution (Prelude.Maybe PipelineExperimentConfig)
pipelineExecution_pipelineExperimentConfig :: (Maybe PipelineExperimentConfig
 -> f (Maybe PipelineExperimentConfig))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_pipelineExperimentConfig = (PipelineExecution -> Maybe PipelineExperimentConfig)
-> (PipelineExecution
    -> Maybe PipelineExperimentConfig -> PipelineExecution)
-> Lens
     PipelineExecution
     PipelineExecution
     (Maybe PipelineExperimentConfig)
     (Maybe PipelineExperimentConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe PipelineExperimentConfig
pipelineExperimentConfig :: Maybe PipelineExperimentConfig
$sel:pipelineExperimentConfig:PipelineExecution' :: PipelineExecution -> Maybe PipelineExperimentConfig
pipelineExperimentConfig} -> Maybe PipelineExperimentConfig
pipelineExperimentConfig) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe PipelineExperimentConfig
a -> PipelineExecution
s {$sel:pipelineExperimentConfig:PipelineExecution' :: Maybe PipelineExperimentConfig
pipelineExperimentConfig = Maybe PipelineExperimentConfig
a} :: PipelineExecution)

instance Core.FromJSON PipelineExecution where
  parseJSON :: Value -> Parser PipelineExecution
parseJSON =
    String
-> (Object -> Parser PipelineExecution)
-> Value
-> Parser PipelineExecution
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PipelineExecution"
      ( \Object
x ->
          Maybe POSIX
-> Maybe PipelineExecutionStatus
-> Maybe Text
-> Maybe Text
-> Maybe [Parameter]
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe PipelineExperimentConfig
-> PipelineExecution
PipelineExecution'
            (Maybe POSIX
 -> Maybe PipelineExecutionStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Parameter]
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe Text
 -> Maybe PipelineExperimentConfig
 -> PipelineExecution)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe PipelineExecutionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Parameter]
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe PipelineExperimentConfig
      -> PipelineExecution)
forall (f :: * -> *) a b. Functor 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
"CreationTime")
            Parser
  (Maybe PipelineExecutionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Parameter]
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe PipelineExperimentConfig
   -> PipelineExecution)
-> Parser (Maybe PipelineExecutionStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Parameter]
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe PipelineExperimentConfig
      -> PipelineExecution)
forall (f :: * -> *) a b. Applicative f => 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 Text
   -> Maybe Text
   -> Maybe [Parameter]
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe PipelineExperimentConfig
   -> PipelineExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Parameter]
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe PipelineExperimentConfig
      -> PipelineExecution)
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
"FailureReason")
            Parser
  (Maybe Text
   -> Maybe [Parameter]
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe PipelineExperimentConfig
   -> PipelineExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Parameter]
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe PipelineExperimentConfig
      -> PipelineExecution)
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 [Parameter]
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe PipelineExperimentConfig
   -> PipelineExecution)
-> Parser (Maybe [Parameter])
-> Parser
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe PipelineExperimentConfig
      -> PipelineExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Parameter]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PipelineParameters"
                            Parser (Maybe (Maybe [Parameter]))
-> Maybe [Parameter] -> Parser (Maybe [Parameter])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Parameter]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe PipelineExperimentConfig
   -> PipelineExecution)
-> Parser (Maybe UserContext)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe PipelineExperimentConfig
      -> PipelineExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedBy")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe PipelineExperimentConfig
   -> PipelineExecution)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe PipelineExperimentConfig
      -> PipelineExecution)
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
"LastModifiedTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe PipelineExperimentConfig
   -> PipelineExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe PipelineExperimentConfig
      -> PipelineExecution)
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
"PipelineArn")
            Parser
  (Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe PipelineExperimentConfig
   -> PipelineExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe UserContext
      -> Maybe Text
      -> Maybe PipelineExperimentConfig
      -> PipelineExecution)
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 UserContext
   -> Maybe Text
   -> Maybe PipelineExperimentConfig
   -> PipelineExecution)
-> Parser (Maybe UserContext)
-> Parser
     (Maybe Text -> Maybe PipelineExperimentConfig -> PipelineExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedBy")
            Parser
  (Maybe Text -> Maybe PipelineExperimentConfig -> PipelineExecution)
-> Parser (Maybe Text)
-> Parser (Maybe PipelineExperimentConfig -> PipelineExecution)
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")
            Parser (Maybe PipelineExperimentConfig -> PipelineExecution)
-> Parser (Maybe PipelineExperimentConfig)
-> Parser PipelineExecution
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PipelineExperimentConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PipelineExperimentConfig")
      )

instance Prelude.Hashable PipelineExecution

instance Prelude.NFData PipelineExecution