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

import Amazonka.CodePipeline.Types.ActionExecutionStatus
import Amazonka.CodePipeline.Types.ErrorDetails
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents information about the run of an action.
--
-- /See:/ 'newActionExecution' smart constructor.
data ActionExecution = ActionExecution'
  { -- | The ARN of the user who last changed the pipeline.
    ActionExecution -> Maybe Text
lastUpdatedBy :: Prelude.Maybe Prelude.Text,
    -- | A summary of the run of the action.
    ActionExecution -> Maybe Text
summary :: Prelude.Maybe Prelude.Text,
    -- | The status of the action, or for a completed action, the last status of
    -- the action.
    ActionExecution -> Maybe ActionExecutionStatus
status :: Prelude.Maybe ActionExecutionStatus,
    -- | The last status change of the action.
    ActionExecution -> Maybe POSIX
lastStatusChange :: Prelude.Maybe Core.POSIX,
    -- | The system-generated token used to identify a unique approval request.
    -- The token for each open approval request can be obtained using the
    -- @GetPipelineState@ command. It is used to validate that the approval
    -- request corresponding to this token is still valid.
    ActionExecution -> Maybe Text
token :: Prelude.Maybe Prelude.Text,
    -- | The URL of a resource external to AWS that is used when running the
    -- action (for example, an external repository URL).
    ActionExecution -> Maybe Text
externalExecutionUrl :: Prelude.Maybe Prelude.Text,
    -- | The external ID of the run of the action.
    ActionExecution -> Maybe Text
externalExecutionId :: Prelude.Maybe Prelude.Text,
    -- | The details of an error returned by a URL external to AWS.
    ActionExecution -> Maybe ErrorDetails
errorDetails :: Prelude.Maybe ErrorDetails,
    -- | A percentage of completeness of the action as it runs.
    ActionExecution -> Maybe Natural
percentComplete :: Prelude.Maybe Prelude.Natural,
    -- | ID of the workflow action execution in the current stage. Use the
    -- GetPipelineState action to retrieve the current action execution details
    -- of the current stage.
    --
    -- For older executions, this field might be empty. The action execution ID
    -- is available for executions run on or after March 2020.
    ActionExecution -> Maybe Text
actionExecutionId :: Prelude.Maybe Prelude.Text
  }
  deriving (ActionExecution -> ActionExecution -> Bool
(ActionExecution -> ActionExecution -> Bool)
-> (ActionExecution -> ActionExecution -> Bool)
-> Eq ActionExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionExecution -> ActionExecution -> Bool
$c/= :: ActionExecution -> ActionExecution -> Bool
== :: ActionExecution -> ActionExecution -> Bool
$c== :: ActionExecution -> ActionExecution -> Bool
Prelude.Eq, ReadPrec [ActionExecution]
ReadPrec ActionExecution
Int -> ReadS ActionExecution
ReadS [ActionExecution]
(Int -> ReadS ActionExecution)
-> ReadS [ActionExecution]
-> ReadPrec ActionExecution
-> ReadPrec [ActionExecution]
-> Read ActionExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionExecution]
$creadListPrec :: ReadPrec [ActionExecution]
readPrec :: ReadPrec ActionExecution
$creadPrec :: ReadPrec ActionExecution
readList :: ReadS [ActionExecution]
$creadList :: ReadS [ActionExecution]
readsPrec :: Int -> ReadS ActionExecution
$creadsPrec :: Int -> ReadS ActionExecution
Prelude.Read, Int -> ActionExecution -> ShowS
[ActionExecution] -> ShowS
ActionExecution -> String
(Int -> ActionExecution -> ShowS)
-> (ActionExecution -> String)
-> ([ActionExecution] -> ShowS)
-> Show ActionExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionExecution] -> ShowS
$cshowList :: [ActionExecution] -> ShowS
show :: ActionExecution -> String
$cshow :: ActionExecution -> String
showsPrec :: Int -> ActionExecution -> ShowS
$cshowsPrec :: Int -> ActionExecution -> ShowS
Prelude.Show, (forall x. ActionExecution -> Rep ActionExecution x)
-> (forall x. Rep ActionExecution x -> ActionExecution)
-> Generic ActionExecution
forall x. Rep ActionExecution x -> ActionExecution
forall x. ActionExecution -> Rep ActionExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActionExecution x -> ActionExecution
$cfrom :: forall x. ActionExecution -> Rep ActionExecution x
Prelude.Generic)

-- |
-- Create a value of 'ActionExecution' 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:
--
-- 'lastUpdatedBy', 'actionExecution_lastUpdatedBy' - The ARN of the user who last changed the pipeline.
--
-- 'summary', 'actionExecution_summary' - A summary of the run of the action.
--
-- 'status', 'actionExecution_status' - The status of the action, or for a completed action, the last status of
-- the action.
--
-- 'lastStatusChange', 'actionExecution_lastStatusChange' - The last status change of the action.
--
-- 'token', 'actionExecution_token' - The system-generated token used to identify a unique approval request.
-- The token for each open approval request can be obtained using the
-- @GetPipelineState@ command. It is used to validate that the approval
-- request corresponding to this token is still valid.
--
-- 'externalExecutionUrl', 'actionExecution_externalExecutionUrl' - The URL of a resource external to AWS that is used when running the
-- action (for example, an external repository URL).
--
-- 'externalExecutionId', 'actionExecution_externalExecutionId' - The external ID of the run of the action.
--
-- 'errorDetails', 'actionExecution_errorDetails' - The details of an error returned by a URL external to AWS.
--
-- 'percentComplete', 'actionExecution_percentComplete' - A percentage of completeness of the action as it runs.
--
-- 'actionExecutionId', 'actionExecution_actionExecutionId' - ID of the workflow action execution in the current stage. Use the
-- GetPipelineState action to retrieve the current action execution details
-- of the current stage.
--
-- For older executions, this field might be empty. The action execution ID
-- is available for executions run on or after March 2020.
newActionExecution ::
  ActionExecution
newActionExecution :: ActionExecution
newActionExecution =
  ActionExecution' :: Maybe Text
-> Maybe Text
-> Maybe ActionExecutionStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ErrorDetails
-> Maybe Natural
-> Maybe Text
-> ActionExecution
ActionExecution'
    { $sel:lastUpdatedBy:ActionExecution' :: Maybe Text
lastUpdatedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:summary:ActionExecution' :: Maybe Text
summary = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ActionExecution' :: Maybe ActionExecutionStatus
status = Maybe ActionExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:lastStatusChange:ActionExecution' :: Maybe POSIX
lastStatusChange = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:token:ActionExecution' :: Maybe Text
token = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:externalExecutionUrl:ActionExecution' :: Maybe Text
externalExecutionUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:externalExecutionId:ActionExecution' :: Maybe Text
externalExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorDetails:ActionExecution' :: Maybe ErrorDetails
errorDetails = Maybe ErrorDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:percentComplete:ActionExecution' :: Maybe Natural
percentComplete = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:actionExecutionId:ActionExecution' :: Maybe Text
actionExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the user who last changed the pipeline.
actionExecution_lastUpdatedBy :: Lens.Lens' ActionExecution (Prelude.Maybe Prelude.Text)
actionExecution_lastUpdatedBy :: (Maybe Text -> f (Maybe Text))
-> ActionExecution -> f ActionExecution
actionExecution_lastUpdatedBy = (ActionExecution -> Maybe Text)
-> (ActionExecution -> Maybe Text -> ActionExecution)
-> Lens ActionExecution ActionExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe Text
lastUpdatedBy :: Maybe Text
$sel:lastUpdatedBy:ActionExecution' :: ActionExecution -> Maybe Text
lastUpdatedBy} -> Maybe Text
lastUpdatedBy) (\s :: ActionExecution
s@ActionExecution' {} Maybe Text
a -> ActionExecution
s {$sel:lastUpdatedBy:ActionExecution' :: Maybe Text
lastUpdatedBy = Maybe Text
a} :: ActionExecution)

-- | A summary of the run of the action.
actionExecution_summary :: Lens.Lens' ActionExecution (Prelude.Maybe Prelude.Text)
actionExecution_summary :: (Maybe Text -> f (Maybe Text))
-> ActionExecution -> f ActionExecution
actionExecution_summary = (ActionExecution -> Maybe Text)
-> (ActionExecution -> Maybe Text -> ActionExecution)
-> Lens ActionExecution ActionExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe Text
summary :: Maybe Text
$sel:summary:ActionExecution' :: ActionExecution -> Maybe Text
summary} -> Maybe Text
summary) (\s :: ActionExecution
s@ActionExecution' {} Maybe Text
a -> ActionExecution
s {$sel:summary:ActionExecution' :: Maybe Text
summary = Maybe Text
a} :: ActionExecution)

-- | The status of the action, or for a completed action, the last status of
-- the action.
actionExecution_status :: Lens.Lens' ActionExecution (Prelude.Maybe ActionExecutionStatus)
actionExecution_status :: (Maybe ActionExecutionStatus -> f (Maybe ActionExecutionStatus))
-> ActionExecution -> f ActionExecution
actionExecution_status = (ActionExecution -> Maybe ActionExecutionStatus)
-> (ActionExecution
    -> Maybe ActionExecutionStatus -> ActionExecution)
-> Lens
     ActionExecution
     ActionExecution
     (Maybe ActionExecutionStatus)
     (Maybe ActionExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe ActionExecutionStatus
status :: Maybe ActionExecutionStatus
$sel:status:ActionExecution' :: ActionExecution -> Maybe ActionExecutionStatus
status} -> Maybe ActionExecutionStatus
status) (\s :: ActionExecution
s@ActionExecution' {} Maybe ActionExecutionStatus
a -> ActionExecution
s {$sel:status:ActionExecution' :: Maybe ActionExecutionStatus
status = Maybe ActionExecutionStatus
a} :: ActionExecution)

-- | The last status change of the action.
actionExecution_lastStatusChange :: Lens.Lens' ActionExecution (Prelude.Maybe Prelude.UTCTime)
actionExecution_lastStatusChange :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ActionExecution -> f ActionExecution
actionExecution_lastStatusChange = (ActionExecution -> Maybe POSIX)
-> (ActionExecution -> Maybe POSIX -> ActionExecution)
-> Lens ActionExecution ActionExecution (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe POSIX
lastStatusChange :: Maybe POSIX
$sel:lastStatusChange:ActionExecution' :: ActionExecution -> Maybe POSIX
lastStatusChange} -> Maybe POSIX
lastStatusChange) (\s :: ActionExecution
s@ActionExecution' {} Maybe POSIX
a -> ActionExecution
s {$sel:lastStatusChange:ActionExecution' :: Maybe POSIX
lastStatusChange = Maybe POSIX
a} :: ActionExecution) ((Maybe POSIX -> f (Maybe POSIX))
 -> ActionExecution -> f ActionExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ActionExecution
-> f ActionExecution
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 system-generated token used to identify a unique approval request.
-- The token for each open approval request can be obtained using the
-- @GetPipelineState@ command. It is used to validate that the approval
-- request corresponding to this token is still valid.
actionExecution_token :: Lens.Lens' ActionExecution (Prelude.Maybe Prelude.Text)
actionExecution_token :: (Maybe Text -> f (Maybe Text))
-> ActionExecution -> f ActionExecution
actionExecution_token = (ActionExecution -> Maybe Text)
-> (ActionExecution -> Maybe Text -> ActionExecution)
-> Lens ActionExecution ActionExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe Text
token :: Maybe Text
$sel:token:ActionExecution' :: ActionExecution -> Maybe Text
token} -> Maybe Text
token) (\s :: ActionExecution
s@ActionExecution' {} Maybe Text
a -> ActionExecution
s {$sel:token:ActionExecution' :: Maybe Text
token = Maybe Text
a} :: ActionExecution)

-- | The URL of a resource external to AWS that is used when running the
-- action (for example, an external repository URL).
actionExecution_externalExecutionUrl :: Lens.Lens' ActionExecution (Prelude.Maybe Prelude.Text)
actionExecution_externalExecutionUrl :: (Maybe Text -> f (Maybe Text))
-> ActionExecution -> f ActionExecution
actionExecution_externalExecutionUrl = (ActionExecution -> Maybe Text)
-> (ActionExecution -> Maybe Text -> ActionExecution)
-> Lens ActionExecution ActionExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe Text
externalExecutionUrl :: Maybe Text
$sel:externalExecutionUrl:ActionExecution' :: ActionExecution -> Maybe Text
externalExecutionUrl} -> Maybe Text
externalExecutionUrl) (\s :: ActionExecution
s@ActionExecution' {} Maybe Text
a -> ActionExecution
s {$sel:externalExecutionUrl:ActionExecution' :: Maybe Text
externalExecutionUrl = Maybe Text
a} :: ActionExecution)

-- | The external ID of the run of the action.
actionExecution_externalExecutionId :: Lens.Lens' ActionExecution (Prelude.Maybe Prelude.Text)
actionExecution_externalExecutionId :: (Maybe Text -> f (Maybe Text))
-> ActionExecution -> f ActionExecution
actionExecution_externalExecutionId = (ActionExecution -> Maybe Text)
-> (ActionExecution -> Maybe Text -> ActionExecution)
-> Lens ActionExecution ActionExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe Text
externalExecutionId :: Maybe Text
$sel:externalExecutionId:ActionExecution' :: ActionExecution -> Maybe Text
externalExecutionId} -> Maybe Text
externalExecutionId) (\s :: ActionExecution
s@ActionExecution' {} Maybe Text
a -> ActionExecution
s {$sel:externalExecutionId:ActionExecution' :: Maybe Text
externalExecutionId = Maybe Text
a} :: ActionExecution)

-- | The details of an error returned by a URL external to AWS.
actionExecution_errorDetails :: Lens.Lens' ActionExecution (Prelude.Maybe ErrorDetails)
actionExecution_errorDetails :: (Maybe ErrorDetails -> f (Maybe ErrorDetails))
-> ActionExecution -> f ActionExecution
actionExecution_errorDetails = (ActionExecution -> Maybe ErrorDetails)
-> (ActionExecution -> Maybe ErrorDetails -> ActionExecution)
-> Lens
     ActionExecution
     ActionExecution
     (Maybe ErrorDetails)
     (Maybe ErrorDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe ErrorDetails
errorDetails :: Maybe ErrorDetails
$sel:errorDetails:ActionExecution' :: ActionExecution -> Maybe ErrorDetails
errorDetails} -> Maybe ErrorDetails
errorDetails) (\s :: ActionExecution
s@ActionExecution' {} Maybe ErrorDetails
a -> ActionExecution
s {$sel:errorDetails:ActionExecution' :: Maybe ErrorDetails
errorDetails = Maybe ErrorDetails
a} :: ActionExecution)

-- | A percentage of completeness of the action as it runs.
actionExecution_percentComplete :: Lens.Lens' ActionExecution (Prelude.Maybe Prelude.Natural)
actionExecution_percentComplete :: (Maybe Natural -> f (Maybe Natural))
-> ActionExecution -> f ActionExecution
actionExecution_percentComplete = (ActionExecution -> Maybe Natural)
-> (ActionExecution -> Maybe Natural -> ActionExecution)
-> Lens
     ActionExecution ActionExecution (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe Natural
percentComplete :: Maybe Natural
$sel:percentComplete:ActionExecution' :: ActionExecution -> Maybe Natural
percentComplete} -> Maybe Natural
percentComplete) (\s :: ActionExecution
s@ActionExecution' {} Maybe Natural
a -> ActionExecution
s {$sel:percentComplete:ActionExecution' :: Maybe Natural
percentComplete = Maybe Natural
a} :: ActionExecution)

-- | ID of the workflow action execution in the current stage. Use the
-- GetPipelineState action to retrieve the current action execution details
-- of the current stage.
--
-- For older executions, this field might be empty. The action execution ID
-- is available for executions run on or after March 2020.
actionExecution_actionExecutionId :: Lens.Lens' ActionExecution (Prelude.Maybe Prelude.Text)
actionExecution_actionExecutionId :: (Maybe Text -> f (Maybe Text))
-> ActionExecution -> f ActionExecution
actionExecution_actionExecutionId = (ActionExecution -> Maybe Text)
-> (ActionExecution -> Maybe Text -> ActionExecution)
-> Lens ActionExecution ActionExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionExecution' {Maybe Text
actionExecutionId :: Maybe Text
$sel:actionExecutionId:ActionExecution' :: ActionExecution -> Maybe Text
actionExecutionId} -> Maybe Text
actionExecutionId) (\s :: ActionExecution
s@ActionExecution' {} Maybe Text
a -> ActionExecution
s {$sel:actionExecutionId:ActionExecution' :: Maybe Text
actionExecutionId = Maybe Text
a} :: ActionExecution)

instance Core.FromJSON ActionExecution where
  parseJSON :: Value -> Parser ActionExecution
parseJSON =
    String
-> (Object -> Parser ActionExecution)
-> Value
-> Parser ActionExecution
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ActionExecution"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe ActionExecutionStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ErrorDetails
-> Maybe Natural
-> Maybe Text
-> ActionExecution
ActionExecution'
            (Maybe Text
 -> Maybe Text
 -> Maybe ActionExecutionStatus
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ErrorDetails
 -> Maybe Natural
 -> Maybe Text
 -> ActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ActionExecutionStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Natural
      -> Maybe Text
      -> ActionExecution)
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
"lastUpdatedBy")
            Parser
  (Maybe Text
   -> Maybe ActionExecutionStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Natural
   -> Maybe Text
   -> ActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe ActionExecutionStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Natural
      -> Maybe Text
      -> ActionExecution)
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
"summary")
            Parser
  (Maybe ActionExecutionStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Natural
   -> Maybe Text
   -> ActionExecution)
-> Parser (Maybe ActionExecutionStatus)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Natural
      -> Maybe Text
      -> ActionExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ActionExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Natural
   -> Maybe Text
   -> ActionExecution)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Natural
      -> Maybe Text
      -> ActionExecution)
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
"lastStatusChange")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Natural
   -> Maybe Text
   -> ActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Natural
      -> Maybe Text
      -> ActionExecution)
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
"token")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Natural
   -> Maybe Text
   -> ActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Natural
      -> Maybe Text
      -> ActionExecution)
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
"externalExecutionUrl")
            Parser
  (Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Natural
   -> Maybe Text
   -> ActionExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe ErrorDetails
      -> Maybe Natural -> Maybe Text -> ActionExecution)
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
"externalExecutionId")
            Parser
  (Maybe ErrorDetails
   -> Maybe Natural -> Maybe Text -> ActionExecution)
-> Parser (Maybe ErrorDetails)
-> Parser (Maybe Natural -> Maybe Text -> ActionExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ErrorDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"errorDetails")
            Parser (Maybe Natural -> Maybe Text -> ActionExecution)
-> Parser (Maybe Natural) -> Parser (Maybe Text -> ActionExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"percentComplete")
            Parser (Maybe Text -> ActionExecution)
-> Parser (Maybe Text) -> Parser ActionExecution
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
"actionExecutionId")
      )

instance Prelude.Hashable ActionExecution

instance Prelude.NFData ActionExecution