{-# 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.CodePipeline.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.CodePipeline.Types.PipelineExecutionSummary where

import Amazonka.CodePipeline.Types.ExecutionTrigger
import Amazonka.CodePipeline.Types.PipelineExecutionStatus
import Amazonka.CodePipeline.Types.SourceRevision
import Amazonka.CodePipeline.Types.StopExecutionTrigger
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Summary information about a pipeline execution.
--
-- /See:/ 'newPipelineExecutionSummary' smart constructor.
data PipelineExecutionSummary = PipelineExecutionSummary'
  { -- | The status of the pipeline execution.
    --
    -- -   InProgress: The pipeline execution is currently running.
    --
    -- -   Stopped: The pipeline execution was manually stopped. For more
    --     information, see
    --     <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-executions-stopped Stopped Executions>.
    --
    -- -   Stopping: The pipeline execution received a request to be manually
    --     stopped. Depending on the selected stop mode, the execution is
    --     either completing or abandoning in-progress actions. For more
    --     information, see
    --     <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-executions-stopped Stopped Executions>.
    --
    -- -   Succeeded: The pipeline execution was completed successfully.
    --
    -- -   Superseded: While this pipeline execution was waiting for the next
    --     stage to be completed, a newer pipeline execution advanced and
    --     continued through the pipeline instead. For more information, see
    --     <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-superseded Superseded Executions>.
    --
    -- -   Failed: The pipeline execution was not completed successfully.
    PipelineExecutionSummary -> Maybe PipelineExecutionStatus
status :: Prelude.Maybe PipelineExecutionStatus,
    -- | The date and time when the pipeline execution began, in timestamp
    -- format.
    PipelineExecutionSummary -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | The interaction that stopped a pipeline execution.
    PipelineExecutionSummary -> Maybe StopExecutionTrigger
stopTrigger :: Prelude.Maybe StopExecutionTrigger,
    -- | The ID of the pipeline execution.
    PipelineExecutionSummary -> Maybe Text
pipelineExecutionId :: Prelude.Maybe Prelude.Text,
    -- | A list of the source artifact revisions that initiated a pipeline
    -- execution.
    PipelineExecutionSummary -> Maybe [SourceRevision]
sourceRevisions :: Prelude.Maybe [SourceRevision],
    -- | The interaction or event that started a pipeline execution, such as
    -- automated change detection or a @StartPipelineExecution@ API call.
    PipelineExecutionSummary -> Maybe ExecutionTrigger
trigger :: Prelude.Maybe ExecutionTrigger,
    -- | The date and time of the last change to the pipeline execution, in
    -- timestamp format.
    PipelineExecutionSummary -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Core.POSIX
  }
  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:
--
-- 'status', 'pipelineExecutionSummary_status' - The status of the pipeline execution.
--
-- -   InProgress: The pipeline execution is currently running.
--
-- -   Stopped: The pipeline execution was manually stopped. For more
--     information, see
--     <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-executions-stopped Stopped Executions>.
--
-- -   Stopping: The pipeline execution received a request to be manually
--     stopped. Depending on the selected stop mode, the execution is
--     either completing or abandoning in-progress actions. For more
--     information, see
--     <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-executions-stopped Stopped Executions>.
--
-- -   Succeeded: The pipeline execution was completed successfully.
--
-- -   Superseded: While this pipeline execution was waiting for the next
--     stage to be completed, a newer pipeline execution advanced and
--     continued through the pipeline instead. For more information, see
--     <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-superseded Superseded Executions>.
--
-- -   Failed: The pipeline execution was not completed successfully.
--
-- 'startTime', 'pipelineExecutionSummary_startTime' - The date and time when the pipeline execution began, in timestamp
-- format.
--
-- 'stopTrigger', 'pipelineExecutionSummary_stopTrigger' - The interaction that stopped a pipeline execution.
--
-- 'pipelineExecutionId', 'pipelineExecutionSummary_pipelineExecutionId' - The ID of the pipeline execution.
--
-- 'sourceRevisions', 'pipelineExecutionSummary_sourceRevisions' - A list of the source artifact revisions that initiated a pipeline
-- execution.
--
-- 'trigger', 'pipelineExecutionSummary_trigger' - The interaction or event that started a pipeline execution, such as
-- automated change detection or a @StartPipelineExecution@ API call.
--
-- 'lastUpdateTime', 'pipelineExecutionSummary_lastUpdateTime' - The date and time of the last change to the pipeline execution, in
-- timestamp format.
newPipelineExecutionSummary ::
  PipelineExecutionSummary
newPipelineExecutionSummary :: PipelineExecutionSummary
newPipelineExecutionSummary =
  PipelineExecutionSummary' :: Maybe PipelineExecutionStatus
-> Maybe POSIX
-> Maybe StopExecutionTrigger
-> Maybe Text
-> Maybe [SourceRevision]
-> Maybe ExecutionTrigger
-> Maybe POSIX
-> PipelineExecutionSummary
PipelineExecutionSummary'
    { $sel:status:PipelineExecutionSummary' :: Maybe PipelineExecutionStatus
status = Maybe PipelineExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:PipelineExecutionSummary' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:stopTrigger:PipelineExecutionSummary' :: Maybe StopExecutionTrigger
stopTrigger = Maybe StopExecutionTrigger
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionId:PipelineExecutionSummary' :: Maybe Text
pipelineExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceRevisions:PipelineExecutionSummary' :: Maybe [SourceRevision]
sourceRevisions = Maybe [SourceRevision]
forall a. Maybe a
Prelude.Nothing,
      $sel:trigger:PipelineExecutionSummary' :: Maybe ExecutionTrigger
trigger = Maybe ExecutionTrigger
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdateTime:PipelineExecutionSummary' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the pipeline execution.
--
-- -   InProgress: The pipeline execution is currently running.
--
-- -   Stopped: The pipeline execution was manually stopped. For more
--     information, see
--     <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-executions-stopped Stopped Executions>.
--
-- -   Stopping: The pipeline execution received a request to be manually
--     stopped. Depending on the selected stop mode, the execution is
--     either completing or abandoning in-progress actions. For more
--     information, see
--     <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-executions-stopped Stopped Executions>.
--
-- -   Succeeded: The pipeline execution was completed successfully.
--
-- -   Superseded: While this pipeline execution was waiting for the next
--     stage to be completed, a newer pipeline execution advanced and
--     continued through the pipeline instead. For more information, see
--     <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-superseded Superseded Executions>.
--
-- -   Failed: The pipeline execution was not completed successfully.
pipelineExecutionSummary_status :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe PipelineExecutionStatus)
pipelineExecutionSummary_status :: (Maybe PipelineExecutionStatus
 -> f (Maybe PipelineExecutionStatus))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_status = (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
status :: Maybe PipelineExecutionStatus
$sel:status:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe PipelineExecutionStatus
status} -> Maybe PipelineExecutionStatus
status) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe PipelineExecutionStatus
a -> PipelineExecutionSummary
s {$sel:status:PipelineExecutionSummary' :: Maybe PipelineExecutionStatus
status = Maybe PipelineExecutionStatus
a} :: PipelineExecutionSummary)

-- | The date and time when the pipeline execution began, in timestamp
-- format.
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 interaction that stopped a pipeline execution.
pipelineExecutionSummary_stopTrigger :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe StopExecutionTrigger)
pipelineExecutionSummary_stopTrigger :: (Maybe StopExecutionTrigger -> f (Maybe StopExecutionTrigger))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_stopTrigger = (PipelineExecutionSummary -> Maybe StopExecutionTrigger)
-> (PipelineExecutionSummary
    -> Maybe StopExecutionTrigger -> PipelineExecutionSummary)
-> Lens
     PipelineExecutionSummary
     PipelineExecutionSummary
     (Maybe StopExecutionTrigger)
     (Maybe StopExecutionTrigger)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionSummary' {Maybe StopExecutionTrigger
stopTrigger :: Maybe StopExecutionTrigger
$sel:stopTrigger:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe StopExecutionTrigger
stopTrigger} -> Maybe StopExecutionTrigger
stopTrigger) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe StopExecutionTrigger
a -> PipelineExecutionSummary
s {$sel:stopTrigger:PipelineExecutionSummary' :: Maybe StopExecutionTrigger
stopTrigger = Maybe StopExecutionTrigger
a} :: PipelineExecutionSummary)

-- | The ID of the pipeline execution.
pipelineExecutionSummary_pipelineExecutionId :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe Prelude.Text)
pipelineExecutionSummary_pipelineExecutionId :: (Maybe Text -> f (Maybe Text))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_pipelineExecutionId = (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
pipelineExecutionId :: Maybe Text
$sel:pipelineExecutionId:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe Text
pipelineExecutionId} -> Maybe Text
pipelineExecutionId) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe Text
a -> PipelineExecutionSummary
s {$sel:pipelineExecutionId:PipelineExecutionSummary' :: Maybe Text
pipelineExecutionId = Maybe Text
a} :: PipelineExecutionSummary)

-- | A list of the source artifact revisions that initiated a pipeline
-- execution.
pipelineExecutionSummary_sourceRevisions :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe [SourceRevision])
pipelineExecutionSummary_sourceRevisions :: (Maybe [SourceRevision] -> f (Maybe [SourceRevision]))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_sourceRevisions = (PipelineExecutionSummary -> Maybe [SourceRevision])
-> (PipelineExecutionSummary
    -> Maybe [SourceRevision] -> PipelineExecutionSummary)
-> Lens
     PipelineExecutionSummary
     PipelineExecutionSummary
     (Maybe [SourceRevision])
     (Maybe [SourceRevision])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionSummary' {Maybe [SourceRevision]
sourceRevisions :: Maybe [SourceRevision]
$sel:sourceRevisions:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe [SourceRevision]
sourceRevisions} -> Maybe [SourceRevision]
sourceRevisions) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe [SourceRevision]
a -> PipelineExecutionSummary
s {$sel:sourceRevisions:PipelineExecutionSummary' :: Maybe [SourceRevision]
sourceRevisions = Maybe [SourceRevision]
a} :: PipelineExecutionSummary) ((Maybe [SourceRevision] -> f (Maybe [SourceRevision]))
 -> PipelineExecutionSummary -> f PipelineExecutionSummary)
-> ((Maybe [SourceRevision] -> f (Maybe [SourceRevision]))
    -> Maybe [SourceRevision] -> f (Maybe [SourceRevision]))
-> (Maybe [SourceRevision] -> f (Maybe [SourceRevision]))
-> PipelineExecutionSummary
-> f PipelineExecutionSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SourceRevision] [SourceRevision] [SourceRevision] [SourceRevision]
-> Iso
     (Maybe [SourceRevision])
     (Maybe [SourceRevision])
     (Maybe [SourceRevision])
     (Maybe [SourceRevision])
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
  [SourceRevision] [SourceRevision] [SourceRevision] [SourceRevision]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The interaction or event that started a pipeline execution, such as
-- automated change detection or a @StartPipelineExecution@ API call.
pipelineExecutionSummary_trigger :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe ExecutionTrigger)
pipelineExecutionSummary_trigger :: (Maybe ExecutionTrigger -> f (Maybe ExecutionTrigger))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_trigger = (PipelineExecutionSummary -> Maybe ExecutionTrigger)
-> (PipelineExecutionSummary
    -> Maybe ExecutionTrigger -> PipelineExecutionSummary)
-> Lens
     PipelineExecutionSummary
     PipelineExecutionSummary
     (Maybe ExecutionTrigger)
     (Maybe ExecutionTrigger)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecutionSummary' {Maybe ExecutionTrigger
trigger :: Maybe ExecutionTrigger
$sel:trigger:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe ExecutionTrigger
trigger} -> Maybe ExecutionTrigger
trigger) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe ExecutionTrigger
a -> PipelineExecutionSummary
s {$sel:trigger:PipelineExecutionSummary' :: Maybe ExecutionTrigger
trigger = Maybe ExecutionTrigger
a} :: PipelineExecutionSummary)

-- | The date and time of the last change to the pipeline execution, in
-- timestamp format.
pipelineExecutionSummary_lastUpdateTime :: Lens.Lens' PipelineExecutionSummary (Prelude.Maybe Prelude.UTCTime)
pipelineExecutionSummary_lastUpdateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineExecutionSummary -> f PipelineExecutionSummary
pipelineExecutionSummary_lastUpdateTime = (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
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:PipelineExecutionSummary' :: PipelineExecutionSummary -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: PipelineExecutionSummary
s@PipelineExecutionSummary' {} Maybe POSIX
a -> PipelineExecutionSummary
s {$sel:lastUpdateTime:PipelineExecutionSummary' :: Maybe POSIX
lastUpdateTime = 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

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 StopExecutionTrigger
-> Maybe Text
-> Maybe [SourceRevision]
-> Maybe ExecutionTrigger
-> Maybe POSIX
-> PipelineExecutionSummary
PipelineExecutionSummary'
            (Maybe PipelineExecutionStatus
 -> Maybe POSIX
 -> Maybe StopExecutionTrigger
 -> Maybe Text
 -> Maybe [SourceRevision]
 -> Maybe ExecutionTrigger
 -> Maybe POSIX
 -> PipelineExecutionSummary)
-> Parser (Maybe PipelineExecutionStatus)
-> Parser
     (Maybe POSIX
      -> Maybe StopExecutionTrigger
      -> Maybe Text
      -> Maybe [SourceRevision]
      -> Maybe ExecutionTrigger
      -> Maybe POSIX
      -> 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
"status")
            Parser
  (Maybe POSIX
   -> Maybe StopExecutionTrigger
   -> Maybe Text
   -> Maybe [SourceRevision]
   -> Maybe ExecutionTrigger
   -> Maybe POSIX
   -> PipelineExecutionSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe StopExecutionTrigger
      -> Maybe Text
      -> Maybe [SourceRevision]
      -> Maybe ExecutionTrigger
      -> Maybe POSIX
      -> 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 StopExecutionTrigger
   -> Maybe Text
   -> Maybe [SourceRevision]
   -> Maybe ExecutionTrigger
   -> Maybe POSIX
   -> PipelineExecutionSummary)
-> Parser (Maybe StopExecutionTrigger)
-> Parser
     (Maybe Text
      -> Maybe [SourceRevision]
      -> Maybe ExecutionTrigger
      -> Maybe POSIX
      -> PipelineExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StopExecutionTrigger)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"stopTrigger")
            Parser
  (Maybe Text
   -> Maybe [SourceRevision]
   -> Maybe ExecutionTrigger
   -> Maybe POSIX
   -> PipelineExecutionSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe [SourceRevision]
      -> Maybe ExecutionTrigger
      -> Maybe POSIX
      -> 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
"pipelineExecutionId")
            Parser
  (Maybe [SourceRevision]
   -> Maybe ExecutionTrigger
   -> Maybe POSIX
   -> PipelineExecutionSummary)
-> Parser (Maybe [SourceRevision])
-> Parser
     (Maybe ExecutionTrigger -> Maybe POSIX -> PipelineExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [SourceRevision]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceRevisions"
                            Parser (Maybe (Maybe [SourceRevision]))
-> Maybe [SourceRevision] -> Parser (Maybe [SourceRevision])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SourceRevision]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe ExecutionTrigger -> Maybe POSIX -> PipelineExecutionSummary)
-> Parser (Maybe ExecutionTrigger)
-> Parser (Maybe POSIX -> PipelineExecutionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExecutionTrigger)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"trigger")
            Parser (Maybe POSIX -> PipelineExecutionSummary)
-> Parser (Maybe POSIX) -> Parser 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
"lastUpdateTime")
      )

instance Prelude.Hashable PipelineExecutionSummary

instance Prelude.NFData PipelineExecutionSummary