{-# 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.SSM.Types.AutomationExecution
-- 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.SSM.Types.AutomationExecution where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.AutomationExecutionStatus
import Amazonka.SSM.Types.AutomationSubtype
import Amazonka.SSM.Types.ExecutionMode
import Amazonka.SSM.Types.ProgressCounters
import Amazonka.SSM.Types.ResolvedTargets
import Amazonka.SSM.Types.Runbook
import Amazonka.SSM.Types.StepExecution
import Amazonka.SSM.Types.Target
import Amazonka.SSM.Types.TargetLocation

-- | Detailed information about the current state of an individual Automation
-- execution.
--
-- /See:/ 'newAutomationExecution' smart constructor.
data AutomationExecution = AutomationExecution'
  { -- | The date and time the Automation operation is scheduled to start.
    AutomationExecution -> Maybe POSIX
scheduledTime :: Prelude.Maybe Core.POSIX,
    -- | The ID of a State Manager association used in the Automation operation.
    AutomationExecution -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
    -- | The ID of an OpsItem that is created to represent a Change Manager
    -- change request.
    AutomationExecution -> Maybe Text
opsItemId :: Prelude.Maybe Prelude.Text,
    -- | The name of the step that is currently running.
    AutomationExecution -> Maybe Text
currentStepName :: Prelude.Maybe Prelude.Text,
    -- | The parameter name.
    AutomationExecution -> Maybe Text
targetParameterName :: Prelude.Maybe Prelude.Text,
    -- | The combination of Amazon Web Services Regions and\/or Amazon Web
    -- Services accounts where you want to run the Automation.
    AutomationExecution -> Maybe (NonEmpty TargetLocation)
targetLocations :: Prelude.Maybe (Prelude.NonEmpty TargetLocation),
    -- | An aggregate of step execution statuses displayed in the Amazon Web
    -- Services Systems Manager console for a multi-Region and multi-account
    -- Automation execution.
    AutomationExecution -> Maybe ProgressCounters
progressCounters :: Prelude.Maybe ProgressCounters,
    -- | The Amazon Resource Name (ARN) of the user who ran the automation.
    AutomationExecution -> Maybe Text
executedBy :: Prelude.Maybe Prelude.Text,
    -- | The name of the Automation runbook used during the execution.
    AutomationExecution -> Maybe Text
documentName :: Prelude.Maybe Prelude.Text,
    -- | The time the execution finished.
    AutomationExecution -> Maybe POSIX
executionEndTime :: Prelude.Maybe Core.POSIX,
    -- | A message describing why an execution has failed, if the status is set
    -- to Failed.
    AutomationExecution -> Maybe Text
failureMessage :: Prelude.Maybe Prelude.Text,
    -- | The subtype of the Automation operation. Currently, the only supported
    -- value is @ChangeRequest@.
    AutomationExecution -> Maybe AutomationSubtype
automationSubtype :: Prelude.Maybe AutomationSubtype,
    -- | The automation execution mode.
    AutomationExecution -> Maybe ExecutionMode
mode :: Prelude.Maybe ExecutionMode,
    -- | The specified key-value mapping of document parameters to target
    -- resources.
    AutomationExecution -> Maybe [HashMap Text [Text]]
targetMaps :: Prelude.Maybe [Prelude.HashMap Prelude.Text [Prelude.Text]],
    -- | A boolean value that indicates if the response contains the full list of
    -- the Automation step executions. If true, use the
    -- DescribeAutomationStepExecutions API operation to get the full list of
    -- step executions.
    AutomationExecution -> Maybe Bool
stepExecutionsTruncated :: Prelude.Maybe Prelude.Bool,
    -- | The execution status of the Automation.
    AutomationExecution -> Maybe AutomationExecutionStatus
automationExecutionStatus :: Prelude.Maybe AutomationExecutionStatus,
    -- | The AutomationExecutionId of the parent automation.
    AutomationExecution -> Maybe Text
parentAutomationExecutionId :: Prelude.Maybe Prelude.Text,
    -- | The list of execution outputs as defined in the Automation runbook.
    AutomationExecution -> Maybe (HashMap Text [Text])
outputs :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | The MaxErrors value specified by the user when the execution started.
    AutomationExecution -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
    -- | The time the execution started.
    AutomationExecution -> Maybe POSIX
executionStartTime :: Prelude.Maybe Core.POSIX,
    -- | The action of the step that is currently running.
    AutomationExecution -> Maybe Text
currentAction :: Prelude.Maybe Prelude.Text,
    -- | The specified targets.
    AutomationExecution -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | A list of resolved targets in the rate control execution.
    AutomationExecution -> Maybe ResolvedTargets
resolvedTargets :: Prelude.Maybe ResolvedTargets,
    -- | The key-value map of execution parameters, which were supplied when
    -- calling StartAutomationExecution.
    AutomationExecution -> Maybe (HashMap Text [Text])
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | The version of the document to use during execution.
    AutomationExecution -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | The execution ID.
    AutomationExecution -> Maybe Text
automationExecutionId :: Prelude.Maybe Prelude.Text,
    -- | The name of the Change Manager change request.
    AutomationExecution -> Maybe Text
changeRequestName :: Prelude.Maybe Prelude.Text,
    -- | A list of details about the current state of all steps that comprise an
    -- execution. An Automation runbook contains a list of steps that are run
    -- in order.
    AutomationExecution -> Maybe [StepExecution]
stepExecutions :: Prelude.Maybe [StepExecution],
    -- | Information about the Automation runbooks that are run as part of a
    -- runbook workflow.
    --
    -- The Automation runbooks specified for the runbook workflow can\'t run
    -- until all required approvals for the change request have been received.
    AutomationExecution -> Maybe (NonEmpty Runbook)
runbooks :: Prelude.Maybe (Prelude.NonEmpty Runbook),
    -- | The @MaxConcurrency@ value specified by the user when the execution
    -- started.
    AutomationExecution -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text,
    -- | The target of the execution.
    AutomationExecution -> Maybe Text
target :: Prelude.Maybe Prelude.Text
  }
  deriving (AutomationExecution -> AutomationExecution -> Bool
(AutomationExecution -> AutomationExecution -> Bool)
-> (AutomationExecution -> AutomationExecution -> Bool)
-> Eq AutomationExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutomationExecution -> AutomationExecution -> Bool
$c/= :: AutomationExecution -> AutomationExecution -> Bool
== :: AutomationExecution -> AutomationExecution -> Bool
$c== :: AutomationExecution -> AutomationExecution -> Bool
Prelude.Eq, ReadPrec [AutomationExecution]
ReadPrec AutomationExecution
Int -> ReadS AutomationExecution
ReadS [AutomationExecution]
(Int -> ReadS AutomationExecution)
-> ReadS [AutomationExecution]
-> ReadPrec AutomationExecution
-> ReadPrec [AutomationExecution]
-> Read AutomationExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutomationExecution]
$creadListPrec :: ReadPrec [AutomationExecution]
readPrec :: ReadPrec AutomationExecution
$creadPrec :: ReadPrec AutomationExecution
readList :: ReadS [AutomationExecution]
$creadList :: ReadS [AutomationExecution]
readsPrec :: Int -> ReadS AutomationExecution
$creadsPrec :: Int -> ReadS AutomationExecution
Prelude.Read, Int -> AutomationExecution -> ShowS
[AutomationExecution] -> ShowS
AutomationExecution -> String
(Int -> AutomationExecution -> ShowS)
-> (AutomationExecution -> String)
-> ([AutomationExecution] -> ShowS)
-> Show AutomationExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutomationExecution] -> ShowS
$cshowList :: [AutomationExecution] -> ShowS
show :: AutomationExecution -> String
$cshow :: AutomationExecution -> String
showsPrec :: Int -> AutomationExecution -> ShowS
$cshowsPrec :: Int -> AutomationExecution -> ShowS
Prelude.Show, (forall x. AutomationExecution -> Rep AutomationExecution x)
-> (forall x. Rep AutomationExecution x -> AutomationExecution)
-> Generic AutomationExecution
forall x. Rep AutomationExecution x -> AutomationExecution
forall x. AutomationExecution -> Rep AutomationExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutomationExecution x -> AutomationExecution
$cfrom :: forall x. AutomationExecution -> Rep AutomationExecution x
Prelude.Generic)

-- |
-- Create a value of 'AutomationExecution' 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:
--
-- 'scheduledTime', 'automationExecution_scheduledTime' - The date and time the Automation operation is scheduled to start.
--
-- 'associationId', 'automationExecution_associationId' - The ID of a State Manager association used in the Automation operation.
--
-- 'opsItemId', 'automationExecution_opsItemId' - The ID of an OpsItem that is created to represent a Change Manager
-- change request.
--
-- 'currentStepName', 'automationExecution_currentStepName' - The name of the step that is currently running.
--
-- 'targetParameterName', 'automationExecution_targetParameterName' - The parameter name.
--
-- 'targetLocations', 'automationExecution_targetLocations' - The combination of Amazon Web Services Regions and\/or Amazon Web
-- Services accounts where you want to run the Automation.
--
-- 'progressCounters', 'automationExecution_progressCounters' - An aggregate of step execution statuses displayed in the Amazon Web
-- Services Systems Manager console for a multi-Region and multi-account
-- Automation execution.
--
-- 'executedBy', 'automationExecution_executedBy' - The Amazon Resource Name (ARN) of the user who ran the automation.
--
-- 'documentName', 'automationExecution_documentName' - The name of the Automation runbook used during the execution.
--
-- 'executionEndTime', 'automationExecution_executionEndTime' - The time the execution finished.
--
-- 'failureMessage', 'automationExecution_failureMessage' - A message describing why an execution has failed, if the status is set
-- to Failed.
--
-- 'automationSubtype', 'automationExecution_automationSubtype' - The subtype of the Automation operation. Currently, the only supported
-- value is @ChangeRequest@.
--
-- 'mode', 'automationExecution_mode' - The automation execution mode.
--
-- 'targetMaps', 'automationExecution_targetMaps' - The specified key-value mapping of document parameters to target
-- resources.
--
-- 'stepExecutionsTruncated', 'automationExecution_stepExecutionsTruncated' - A boolean value that indicates if the response contains the full list of
-- the Automation step executions. If true, use the
-- DescribeAutomationStepExecutions API operation to get the full list of
-- step executions.
--
-- 'automationExecutionStatus', 'automationExecution_automationExecutionStatus' - The execution status of the Automation.
--
-- 'parentAutomationExecutionId', 'automationExecution_parentAutomationExecutionId' - The AutomationExecutionId of the parent automation.
--
-- 'outputs', 'automationExecution_outputs' - The list of execution outputs as defined in the Automation runbook.
--
-- 'maxErrors', 'automationExecution_maxErrors' - The MaxErrors value specified by the user when the execution started.
--
-- 'executionStartTime', 'automationExecution_executionStartTime' - The time the execution started.
--
-- 'currentAction', 'automationExecution_currentAction' - The action of the step that is currently running.
--
-- 'targets', 'automationExecution_targets' - The specified targets.
--
-- 'resolvedTargets', 'automationExecution_resolvedTargets' - A list of resolved targets in the rate control execution.
--
-- 'parameters', 'automationExecution_parameters' - The key-value map of execution parameters, which were supplied when
-- calling StartAutomationExecution.
--
-- 'documentVersion', 'automationExecution_documentVersion' - The version of the document to use during execution.
--
-- 'automationExecutionId', 'automationExecution_automationExecutionId' - The execution ID.
--
-- 'changeRequestName', 'automationExecution_changeRequestName' - The name of the Change Manager change request.
--
-- 'stepExecutions', 'automationExecution_stepExecutions' - A list of details about the current state of all steps that comprise an
-- execution. An Automation runbook contains a list of steps that are run
-- in order.
--
-- 'runbooks', 'automationExecution_runbooks' - Information about the Automation runbooks that are run as part of a
-- runbook workflow.
--
-- The Automation runbooks specified for the runbook workflow can\'t run
-- until all required approvals for the change request have been received.
--
-- 'maxConcurrency', 'automationExecution_maxConcurrency' - The @MaxConcurrency@ value specified by the user when the execution
-- started.
--
-- 'target', 'automationExecution_target' - The target of the execution.
newAutomationExecution ::
  AutomationExecution
newAutomationExecution :: AutomationExecution
newAutomationExecution =
  AutomationExecution' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty TargetLocation)
-> Maybe ProgressCounters
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe AutomationSubtype
-> Maybe ExecutionMode
-> Maybe [HashMap Text [Text]]
-> Maybe Bool
-> Maybe AutomationExecutionStatus
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [Target]
-> Maybe ResolvedTargets
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [StepExecution]
-> Maybe (NonEmpty Runbook)
-> Maybe Text
-> Maybe Text
-> AutomationExecution
AutomationExecution'
    { $sel:scheduledTime:AutomationExecution' :: Maybe POSIX
scheduledTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:associationId:AutomationExecution' :: Maybe Text
associationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:opsItemId:AutomationExecution' :: Maybe Text
opsItemId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:currentStepName:AutomationExecution' :: Maybe Text
currentStepName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetParameterName:AutomationExecution' :: Maybe Text
targetParameterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetLocations:AutomationExecution' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
forall a. Maybe a
Prelude.Nothing,
      $sel:progressCounters:AutomationExecution' :: Maybe ProgressCounters
progressCounters = Maybe ProgressCounters
forall a. Maybe a
Prelude.Nothing,
      $sel:executedBy:AutomationExecution' :: Maybe Text
executedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:documentName:AutomationExecution' :: Maybe Text
documentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:executionEndTime:AutomationExecution' :: Maybe POSIX
executionEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:failureMessage:AutomationExecution' :: Maybe Text
failureMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:automationSubtype:AutomationExecution' :: Maybe AutomationSubtype
automationSubtype = Maybe AutomationSubtype
forall a. Maybe a
Prelude.Nothing,
      $sel:mode:AutomationExecution' :: Maybe ExecutionMode
mode = Maybe ExecutionMode
forall a. Maybe a
Prelude.Nothing,
      $sel:targetMaps:AutomationExecution' :: Maybe [HashMap Text [Text]]
targetMaps = Maybe [HashMap Text [Text]]
forall a. Maybe a
Prelude.Nothing,
      $sel:stepExecutionsTruncated:AutomationExecution' :: Maybe Bool
stepExecutionsTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:automationExecutionStatus:AutomationExecution' :: Maybe AutomationExecutionStatus
automationExecutionStatus = Maybe AutomationExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:parentAutomationExecutionId:AutomationExecution' :: Maybe Text
parentAutomationExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputs:AutomationExecution' :: Maybe (HashMap Text [Text])
outputs = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:maxErrors:AutomationExecution' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:executionStartTime:AutomationExecution' :: Maybe POSIX
executionStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:currentAction:AutomationExecution' :: Maybe Text
currentAction = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:AutomationExecution' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:resolvedTargets:AutomationExecution' :: Maybe ResolvedTargets
resolvedTargets = Maybe ResolvedTargets
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:AutomationExecution' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:documentVersion:AutomationExecution' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:automationExecutionId:AutomationExecution' :: Maybe Text
automationExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:changeRequestName:AutomationExecution' :: Maybe Text
changeRequestName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stepExecutions:AutomationExecution' :: Maybe [StepExecution]
stepExecutions = Maybe [StepExecution]
forall a. Maybe a
Prelude.Nothing,
      $sel:runbooks:AutomationExecution' :: Maybe (NonEmpty Runbook)
runbooks = Maybe (NonEmpty Runbook)
forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrency:AutomationExecution' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:target:AutomationExecution' :: Maybe Text
target = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time the Automation operation is scheduled to start.
automationExecution_scheduledTime :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.UTCTime)
automationExecution_scheduledTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AutomationExecution -> f AutomationExecution
automationExecution_scheduledTime = (AutomationExecution -> Maybe POSIX)
-> (AutomationExecution -> Maybe POSIX -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe POSIX
scheduledTime :: Maybe POSIX
$sel:scheduledTime:AutomationExecution' :: AutomationExecution -> Maybe POSIX
scheduledTime} -> Maybe POSIX
scheduledTime) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe POSIX
a -> AutomationExecution
s {$sel:scheduledTime:AutomationExecution' :: Maybe POSIX
scheduledTime = Maybe POSIX
a} :: AutomationExecution) ((Maybe POSIX -> f (Maybe POSIX))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AutomationExecution
-> f AutomationExecution
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 ID of a State Manager association used in the Automation operation.
automationExecution_associationId :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_associationId :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_associationId = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
associationId :: Maybe Text
$sel:associationId:AutomationExecution' :: AutomationExecution -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:associationId:AutomationExecution' :: Maybe Text
associationId = Maybe Text
a} :: AutomationExecution)

-- | The ID of an OpsItem that is created to represent a Change Manager
-- change request.
automationExecution_opsItemId :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_opsItemId :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_opsItemId = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
opsItemId :: Maybe Text
$sel:opsItemId:AutomationExecution' :: AutomationExecution -> Maybe Text
opsItemId} -> Maybe Text
opsItemId) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:opsItemId:AutomationExecution' :: Maybe Text
opsItemId = Maybe Text
a} :: AutomationExecution)

-- | The name of the step that is currently running.
automationExecution_currentStepName :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_currentStepName :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_currentStepName = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
currentStepName :: Maybe Text
$sel:currentStepName:AutomationExecution' :: AutomationExecution -> Maybe Text
currentStepName} -> Maybe Text
currentStepName) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:currentStepName:AutomationExecution' :: Maybe Text
currentStepName = Maybe Text
a} :: AutomationExecution)

-- | The parameter name.
automationExecution_targetParameterName :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_targetParameterName :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_targetParameterName = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
targetParameterName :: Maybe Text
$sel:targetParameterName:AutomationExecution' :: AutomationExecution -> Maybe Text
targetParameterName} -> Maybe Text
targetParameterName) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:targetParameterName:AutomationExecution' :: Maybe Text
targetParameterName = Maybe Text
a} :: AutomationExecution)

-- | The combination of Amazon Web Services Regions and\/or Amazon Web
-- Services accounts where you want to run the Automation.
automationExecution_targetLocations :: Lens.Lens' AutomationExecution (Prelude.Maybe (Prelude.NonEmpty TargetLocation))
automationExecution_targetLocations :: (Maybe (NonEmpty TargetLocation)
 -> f (Maybe (NonEmpty TargetLocation)))
-> AutomationExecution -> f AutomationExecution
automationExecution_targetLocations = (AutomationExecution -> Maybe (NonEmpty TargetLocation))
-> (AutomationExecution
    -> Maybe (NonEmpty TargetLocation) -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe (NonEmpty TargetLocation)
targetLocations :: Maybe (NonEmpty TargetLocation)
$sel:targetLocations:AutomationExecution' :: AutomationExecution -> Maybe (NonEmpty TargetLocation)
targetLocations} -> Maybe (NonEmpty TargetLocation)
targetLocations) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe (NonEmpty TargetLocation)
a -> AutomationExecution
s {$sel:targetLocations:AutomationExecution' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
a} :: AutomationExecution) ((Maybe (NonEmpty TargetLocation)
  -> f (Maybe (NonEmpty TargetLocation)))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe (NonEmpty TargetLocation)
     -> f (Maybe (NonEmpty TargetLocation)))
    -> Maybe (NonEmpty TargetLocation)
    -> f (Maybe (NonEmpty TargetLocation)))
-> (Maybe (NonEmpty TargetLocation)
    -> f (Maybe (NonEmpty TargetLocation)))
-> AutomationExecution
-> f AutomationExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
-> Iso
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
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
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An aggregate of step execution statuses displayed in the Amazon Web
-- Services Systems Manager console for a multi-Region and multi-account
-- Automation execution.
automationExecution_progressCounters :: Lens.Lens' AutomationExecution (Prelude.Maybe ProgressCounters)
automationExecution_progressCounters :: (Maybe ProgressCounters -> f (Maybe ProgressCounters))
-> AutomationExecution -> f AutomationExecution
automationExecution_progressCounters = (AutomationExecution -> Maybe ProgressCounters)
-> (AutomationExecution
    -> Maybe ProgressCounters -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe ProgressCounters)
     (Maybe ProgressCounters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe ProgressCounters
progressCounters :: Maybe ProgressCounters
$sel:progressCounters:AutomationExecution' :: AutomationExecution -> Maybe ProgressCounters
progressCounters} -> Maybe ProgressCounters
progressCounters) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe ProgressCounters
a -> AutomationExecution
s {$sel:progressCounters:AutomationExecution' :: Maybe ProgressCounters
progressCounters = Maybe ProgressCounters
a} :: AutomationExecution)

-- | The Amazon Resource Name (ARN) of the user who ran the automation.
automationExecution_executedBy :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_executedBy :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_executedBy = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
executedBy :: Maybe Text
$sel:executedBy:AutomationExecution' :: AutomationExecution -> Maybe Text
executedBy} -> Maybe Text
executedBy) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:executedBy:AutomationExecution' :: Maybe Text
executedBy = Maybe Text
a} :: AutomationExecution)

-- | The name of the Automation runbook used during the execution.
automationExecution_documentName :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_documentName :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_documentName = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
documentName :: Maybe Text
$sel:documentName:AutomationExecution' :: AutomationExecution -> Maybe Text
documentName} -> Maybe Text
documentName) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:documentName:AutomationExecution' :: Maybe Text
documentName = Maybe Text
a} :: AutomationExecution)

-- | The time the execution finished.
automationExecution_executionEndTime :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.UTCTime)
automationExecution_executionEndTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AutomationExecution -> f AutomationExecution
automationExecution_executionEndTime = (AutomationExecution -> Maybe POSIX)
-> (AutomationExecution -> Maybe POSIX -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe POSIX
executionEndTime :: Maybe POSIX
$sel:executionEndTime:AutomationExecution' :: AutomationExecution -> Maybe POSIX
executionEndTime} -> Maybe POSIX
executionEndTime) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe POSIX
a -> AutomationExecution
s {$sel:executionEndTime:AutomationExecution' :: Maybe POSIX
executionEndTime = Maybe POSIX
a} :: AutomationExecution) ((Maybe POSIX -> f (Maybe POSIX))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AutomationExecution
-> f AutomationExecution
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

-- | A message describing why an execution has failed, if the status is set
-- to Failed.
automationExecution_failureMessage :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_failureMessage :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_failureMessage = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
failureMessage :: Maybe Text
$sel:failureMessage:AutomationExecution' :: AutomationExecution -> Maybe Text
failureMessage} -> Maybe Text
failureMessage) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:failureMessage:AutomationExecution' :: Maybe Text
failureMessage = Maybe Text
a} :: AutomationExecution)

-- | The subtype of the Automation operation. Currently, the only supported
-- value is @ChangeRequest@.
automationExecution_automationSubtype :: Lens.Lens' AutomationExecution (Prelude.Maybe AutomationSubtype)
automationExecution_automationSubtype :: (Maybe AutomationSubtype -> f (Maybe AutomationSubtype))
-> AutomationExecution -> f AutomationExecution
automationExecution_automationSubtype = (AutomationExecution -> Maybe AutomationSubtype)
-> (AutomationExecution
    -> Maybe AutomationSubtype -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe AutomationSubtype)
     (Maybe AutomationSubtype)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe AutomationSubtype
automationSubtype :: Maybe AutomationSubtype
$sel:automationSubtype:AutomationExecution' :: AutomationExecution -> Maybe AutomationSubtype
automationSubtype} -> Maybe AutomationSubtype
automationSubtype) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe AutomationSubtype
a -> AutomationExecution
s {$sel:automationSubtype:AutomationExecution' :: Maybe AutomationSubtype
automationSubtype = Maybe AutomationSubtype
a} :: AutomationExecution)

-- | The automation execution mode.
automationExecution_mode :: Lens.Lens' AutomationExecution (Prelude.Maybe ExecutionMode)
automationExecution_mode :: (Maybe ExecutionMode -> f (Maybe ExecutionMode))
-> AutomationExecution -> f AutomationExecution
automationExecution_mode = (AutomationExecution -> Maybe ExecutionMode)
-> (AutomationExecution
    -> Maybe ExecutionMode -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe ExecutionMode)
     (Maybe ExecutionMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe ExecutionMode
mode :: Maybe ExecutionMode
$sel:mode:AutomationExecution' :: AutomationExecution -> Maybe ExecutionMode
mode} -> Maybe ExecutionMode
mode) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe ExecutionMode
a -> AutomationExecution
s {$sel:mode:AutomationExecution' :: Maybe ExecutionMode
mode = Maybe ExecutionMode
a} :: AutomationExecution)

-- | The specified key-value mapping of document parameters to target
-- resources.
automationExecution_targetMaps :: Lens.Lens' AutomationExecution (Prelude.Maybe [Prelude.HashMap Prelude.Text [Prelude.Text]])
automationExecution_targetMaps :: (Maybe [HashMap Text [Text]] -> f (Maybe [HashMap Text [Text]]))
-> AutomationExecution -> f AutomationExecution
automationExecution_targetMaps = (AutomationExecution -> Maybe [HashMap Text [Text]])
-> (AutomationExecution
    -> Maybe [HashMap Text [Text]] -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe [HashMap Text [Text]])
     (Maybe [HashMap Text [Text]])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe [HashMap Text [Text]]
targetMaps :: Maybe [HashMap Text [Text]]
$sel:targetMaps:AutomationExecution' :: AutomationExecution -> Maybe [HashMap Text [Text]]
targetMaps} -> Maybe [HashMap Text [Text]]
targetMaps) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe [HashMap Text [Text]]
a -> AutomationExecution
s {$sel:targetMaps:AutomationExecution' :: Maybe [HashMap Text [Text]]
targetMaps = Maybe [HashMap Text [Text]]
a} :: AutomationExecution) ((Maybe [HashMap Text [Text]] -> f (Maybe [HashMap Text [Text]]))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe [HashMap Text [Text]]
     -> f (Maybe [HashMap Text [Text]]))
    -> Maybe [HashMap Text [Text]] -> f (Maybe [HashMap Text [Text]]))
-> (Maybe [HashMap Text [Text]] -> f (Maybe [HashMap Text [Text]]))
-> AutomationExecution
-> f AutomationExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [HashMap Text [Text]]
  [HashMap Text [Text]]
  [HashMap Text [Text]]
  [HashMap Text [Text]]
-> Iso
     (Maybe [HashMap Text [Text]])
     (Maybe [HashMap Text [Text]])
     (Maybe [HashMap Text [Text]])
     (Maybe [HashMap Text [Text]])
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
  [HashMap Text [Text]]
  [HashMap Text [Text]]
  [HashMap Text [Text]]
  [HashMap Text [Text]]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A boolean value that indicates if the response contains the full list of
-- the Automation step executions. If true, use the
-- DescribeAutomationStepExecutions API operation to get the full list of
-- step executions.
automationExecution_stepExecutionsTruncated :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Bool)
automationExecution_stepExecutionsTruncated :: (Maybe Bool -> f (Maybe Bool))
-> AutomationExecution -> f AutomationExecution
automationExecution_stepExecutionsTruncated = (AutomationExecution -> Maybe Bool)
-> (AutomationExecution -> Maybe Bool -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Bool
stepExecutionsTruncated :: Maybe Bool
$sel:stepExecutionsTruncated:AutomationExecution' :: AutomationExecution -> Maybe Bool
stepExecutionsTruncated} -> Maybe Bool
stepExecutionsTruncated) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Bool
a -> AutomationExecution
s {$sel:stepExecutionsTruncated:AutomationExecution' :: Maybe Bool
stepExecutionsTruncated = Maybe Bool
a} :: AutomationExecution)

-- | The execution status of the Automation.
automationExecution_automationExecutionStatus :: Lens.Lens' AutomationExecution (Prelude.Maybe AutomationExecutionStatus)
automationExecution_automationExecutionStatus :: (Maybe AutomationExecutionStatus
 -> f (Maybe AutomationExecutionStatus))
-> AutomationExecution -> f AutomationExecution
automationExecution_automationExecutionStatus = (AutomationExecution -> Maybe AutomationExecutionStatus)
-> (AutomationExecution
    -> Maybe AutomationExecutionStatus -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe AutomationExecutionStatus)
     (Maybe AutomationExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe AutomationExecutionStatus
automationExecutionStatus :: Maybe AutomationExecutionStatus
$sel:automationExecutionStatus:AutomationExecution' :: AutomationExecution -> Maybe AutomationExecutionStatus
automationExecutionStatus} -> Maybe AutomationExecutionStatus
automationExecutionStatus) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe AutomationExecutionStatus
a -> AutomationExecution
s {$sel:automationExecutionStatus:AutomationExecution' :: Maybe AutomationExecutionStatus
automationExecutionStatus = Maybe AutomationExecutionStatus
a} :: AutomationExecution)

-- | The AutomationExecutionId of the parent automation.
automationExecution_parentAutomationExecutionId :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_parentAutomationExecutionId :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_parentAutomationExecutionId = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
parentAutomationExecutionId :: Maybe Text
$sel:parentAutomationExecutionId:AutomationExecution' :: AutomationExecution -> Maybe Text
parentAutomationExecutionId} -> Maybe Text
parentAutomationExecutionId) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:parentAutomationExecutionId:AutomationExecution' :: Maybe Text
parentAutomationExecutionId = Maybe Text
a} :: AutomationExecution)

-- | The list of execution outputs as defined in the Automation runbook.
automationExecution_outputs :: Lens.Lens' AutomationExecution (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
automationExecution_outputs :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> AutomationExecution -> f AutomationExecution
automationExecution_outputs = (AutomationExecution -> Maybe (HashMap Text [Text]))
-> (AutomationExecution
    -> Maybe (HashMap Text [Text]) -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe (HashMap Text [Text])
outputs :: Maybe (HashMap Text [Text])
$sel:outputs:AutomationExecution' :: AutomationExecution -> Maybe (HashMap Text [Text])
outputs} -> Maybe (HashMap Text [Text])
outputs) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe (HashMap Text [Text])
a -> AutomationExecution
s {$sel:outputs:AutomationExecution' :: Maybe (HashMap Text [Text])
outputs = Maybe (HashMap Text [Text])
a} :: AutomationExecution) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe (HashMap Text [Text])
     -> f (Maybe (HashMap Text [Text])))
    -> Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> AutomationExecution
-> f AutomationExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
-> Iso
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
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
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The MaxErrors value specified by the user when the execution started.
automationExecution_maxErrors :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_maxErrors :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_maxErrors = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:AutomationExecution' :: AutomationExecution -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:maxErrors:AutomationExecution' :: Maybe Text
maxErrors = Maybe Text
a} :: AutomationExecution)

-- | The time the execution started.
automationExecution_executionStartTime :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.UTCTime)
automationExecution_executionStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AutomationExecution -> f AutomationExecution
automationExecution_executionStartTime = (AutomationExecution -> Maybe POSIX)
-> (AutomationExecution -> Maybe POSIX -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe POSIX
executionStartTime :: Maybe POSIX
$sel:executionStartTime:AutomationExecution' :: AutomationExecution -> Maybe POSIX
executionStartTime} -> Maybe POSIX
executionStartTime) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe POSIX
a -> AutomationExecution
s {$sel:executionStartTime:AutomationExecution' :: Maybe POSIX
executionStartTime = Maybe POSIX
a} :: AutomationExecution) ((Maybe POSIX -> f (Maybe POSIX))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AutomationExecution
-> f AutomationExecution
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 action of the step that is currently running.
automationExecution_currentAction :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_currentAction :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_currentAction = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
currentAction :: Maybe Text
$sel:currentAction:AutomationExecution' :: AutomationExecution -> Maybe Text
currentAction} -> Maybe Text
currentAction) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:currentAction:AutomationExecution' :: Maybe Text
currentAction = Maybe Text
a} :: AutomationExecution)

-- | The specified targets.
automationExecution_targets :: Lens.Lens' AutomationExecution (Prelude.Maybe [Target])
automationExecution_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> AutomationExecution -> f AutomationExecution
automationExecution_targets = (AutomationExecution -> Maybe [Target])
-> (AutomationExecution -> Maybe [Target] -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe [Target])
     (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:AutomationExecution' :: AutomationExecution -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe [Target]
a -> AutomationExecution
s {$sel:targets:AutomationExecution' :: Maybe [Target]
targets = Maybe [Target]
a} :: AutomationExecution) ((Maybe [Target] -> f (Maybe [Target]))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> AutomationExecution
-> f AutomationExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Target] [Target] [Target] [Target]
-> Iso
     (Maybe [Target]) (Maybe [Target]) (Maybe [Target]) (Maybe [Target])
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 [Target] [Target] [Target] [Target]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of resolved targets in the rate control execution.
automationExecution_resolvedTargets :: Lens.Lens' AutomationExecution (Prelude.Maybe ResolvedTargets)
automationExecution_resolvedTargets :: (Maybe ResolvedTargets -> f (Maybe ResolvedTargets))
-> AutomationExecution -> f AutomationExecution
automationExecution_resolvedTargets = (AutomationExecution -> Maybe ResolvedTargets)
-> (AutomationExecution
    -> Maybe ResolvedTargets -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe ResolvedTargets)
     (Maybe ResolvedTargets)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe ResolvedTargets
resolvedTargets :: Maybe ResolvedTargets
$sel:resolvedTargets:AutomationExecution' :: AutomationExecution -> Maybe ResolvedTargets
resolvedTargets} -> Maybe ResolvedTargets
resolvedTargets) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe ResolvedTargets
a -> AutomationExecution
s {$sel:resolvedTargets:AutomationExecution' :: Maybe ResolvedTargets
resolvedTargets = Maybe ResolvedTargets
a} :: AutomationExecution)

-- | The key-value map of execution parameters, which were supplied when
-- calling StartAutomationExecution.
automationExecution_parameters :: Lens.Lens' AutomationExecution (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
automationExecution_parameters :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> AutomationExecution -> f AutomationExecution
automationExecution_parameters = (AutomationExecution -> Maybe (HashMap Text [Text]))
-> (AutomationExecution
    -> Maybe (HashMap Text [Text]) -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe (HashMap Text [Text])
parameters :: Maybe (HashMap Text [Text])
$sel:parameters:AutomationExecution' :: AutomationExecution -> Maybe (HashMap Text [Text])
parameters} -> Maybe (HashMap Text [Text])
parameters) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe (HashMap Text [Text])
a -> AutomationExecution
s {$sel:parameters:AutomationExecution' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
a} :: AutomationExecution) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe (HashMap Text [Text])
     -> f (Maybe (HashMap Text [Text])))
    -> Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> AutomationExecution
-> f AutomationExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
-> Iso
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
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
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The version of the document to use during execution.
automationExecution_documentVersion :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_documentVersion :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_documentVersion = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:AutomationExecution' :: AutomationExecution -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:documentVersion:AutomationExecution' :: Maybe Text
documentVersion = Maybe Text
a} :: AutomationExecution)

-- | The execution ID.
automationExecution_automationExecutionId :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_automationExecutionId :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_automationExecutionId = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
automationExecutionId :: Maybe Text
$sel:automationExecutionId:AutomationExecution' :: AutomationExecution -> Maybe Text
automationExecutionId} -> Maybe Text
automationExecutionId) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:automationExecutionId:AutomationExecution' :: Maybe Text
automationExecutionId = Maybe Text
a} :: AutomationExecution)

-- | The name of the Change Manager change request.
automationExecution_changeRequestName :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_changeRequestName :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_changeRequestName = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
changeRequestName :: Maybe Text
$sel:changeRequestName:AutomationExecution' :: AutomationExecution -> Maybe Text
changeRequestName} -> Maybe Text
changeRequestName) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:changeRequestName:AutomationExecution' :: Maybe Text
changeRequestName = Maybe Text
a} :: AutomationExecution)

-- | A list of details about the current state of all steps that comprise an
-- execution. An Automation runbook contains a list of steps that are run
-- in order.
automationExecution_stepExecutions :: Lens.Lens' AutomationExecution (Prelude.Maybe [StepExecution])
automationExecution_stepExecutions :: (Maybe [StepExecution] -> f (Maybe [StepExecution]))
-> AutomationExecution -> f AutomationExecution
automationExecution_stepExecutions = (AutomationExecution -> Maybe [StepExecution])
-> (AutomationExecution
    -> Maybe [StepExecution] -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe [StepExecution])
     (Maybe [StepExecution])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe [StepExecution]
stepExecutions :: Maybe [StepExecution]
$sel:stepExecutions:AutomationExecution' :: AutomationExecution -> Maybe [StepExecution]
stepExecutions} -> Maybe [StepExecution]
stepExecutions) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe [StepExecution]
a -> AutomationExecution
s {$sel:stepExecutions:AutomationExecution' :: Maybe [StepExecution]
stepExecutions = Maybe [StepExecution]
a} :: AutomationExecution) ((Maybe [StepExecution] -> f (Maybe [StepExecution]))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe [StepExecution] -> f (Maybe [StepExecution]))
    -> Maybe [StepExecution] -> f (Maybe [StepExecution]))
-> (Maybe [StepExecution] -> f (Maybe [StepExecution]))
-> AutomationExecution
-> f AutomationExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [StepExecution] [StepExecution] [StepExecution] [StepExecution]
-> Iso
     (Maybe [StepExecution])
     (Maybe [StepExecution])
     (Maybe [StepExecution])
     (Maybe [StepExecution])
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
  [StepExecution] [StepExecution] [StepExecution] [StepExecution]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the Automation runbooks that are run as part of a
-- runbook workflow.
--
-- The Automation runbooks specified for the runbook workflow can\'t run
-- until all required approvals for the change request have been received.
automationExecution_runbooks :: Lens.Lens' AutomationExecution (Prelude.Maybe (Prelude.NonEmpty Runbook))
automationExecution_runbooks :: (Maybe (NonEmpty Runbook) -> f (Maybe (NonEmpty Runbook)))
-> AutomationExecution -> f AutomationExecution
automationExecution_runbooks = (AutomationExecution -> Maybe (NonEmpty Runbook))
-> (AutomationExecution
    -> Maybe (NonEmpty Runbook) -> AutomationExecution)
-> Lens
     AutomationExecution
     AutomationExecution
     (Maybe (NonEmpty Runbook))
     (Maybe (NonEmpty Runbook))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe (NonEmpty Runbook)
runbooks :: Maybe (NonEmpty Runbook)
$sel:runbooks:AutomationExecution' :: AutomationExecution -> Maybe (NonEmpty Runbook)
runbooks} -> Maybe (NonEmpty Runbook)
runbooks) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe (NonEmpty Runbook)
a -> AutomationExecution
s {$sel:runbooks:AutomationExecution' :: Maybe (NonEmpty Runbook)
runbooks = Maybe (NonEmpty Runbook)
a} :: AutomationExecution) ((Maybe (NonEmpty Runbook) -> f (Maybe (NonEmpty Runbook)))
 -> AutomationExecution -> f AutomationExecution)
-> ((Maybe (NonEmpty Runbook) -> f (Maybe (NonEmpty Runbook)))
    -> Maybe (NonEmpty Runbook) -> f (Maybe (NonEmpty Runbook)))
-> (Maybe (NonEmpty Runbook) -> f (Maybe (NonEmpty Runbook)))
-> AutomationExecution
-> f AutomationExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Runbook)
  (NonEmpty Runbook)
  (NonEmpty Runbook)
  (NonEmpty Runbook)
-> Iso
     (Maybe (NonEmpty Runbook))
     (Maybe (NonEmpty Runbook))
     (Maybe (NonEmpty Runbook))
     (Maybe (NonEmpty Runbook))
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
  (NonEmpty Runbook)
  (NonEmpty Runbook)
  (NonEmpty Runbook)
  (NonEmpty Runbook)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The @MaxConcurrency@ value specified by the user when the execution
-- started.
automationExecution_maxConcurrency :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_maxConcurrency :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_maxConcurrency = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:AutomationExecution' :: AutomationExecution -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:maxConcurrency:AutomationExecution' :: Maybe Text
maxConcurrency = Maybe Text
a} :: AutomationExecution)

-- | The target of the execution.
automationExecution_target :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_target :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_target = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
     AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
target :: Maybe Text
$sel:target:AutomationExecution' :: AutomationExecution -> Maybe Text
target} -> Maybe Text
target) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:target:AutomationExecution' :: Maybe Text
target = Maybe Text
a} :: AutomationExecution)

instance Core.FromJSON AutomationExecution where
  parseJSON :: Value -> Parser AutomationExecution
parseJSON =
    String
-> (Object -> Parser AutomationExecution)
-> Value
-> Parser AutomationExecution
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AutomationExecution"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty TargetLocation)
-> Maybe ProgressCounters
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe AutomationSubtype
-> Maybe ExecutionMode
-> Maybe [HashMap Text [Text]]
-> Maybe Bool
-> Maybe AutomationExecutionStatus
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [Target]
-> Maybe ResolvedTargets
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [StepExecution]
-> Maybe (NonEmpty Runbook)
-> Maybe Text
-> Maybe Text
-> AutomationExecution
AutomationExecution'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (NonEmpty TargetLocation)
 -> Maybe ProgressCounters
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe AutomationSubtype
 -> Maybe ExecutionMode
 -> Maybe [HashMap Text [Text]]
 -> Maybe Bool
 -> Maybe AutomationExecutionStatus
 -> Maybe Text
 -> Maybe (HashMap Text [Text])
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe [Target]
 -> Maybe ResolvedTargets
 -> Maybe (HashMap Text [Text])
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [StepExecution]
 -> Maybe (NonEmpty Runbook)
 -> Maybe Text
 -> Maybe Text
 -> AutomationExecution)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty TargetLocation)
      -> Maybe ProgressCounters
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"ScheduledTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty TargetLocation)
   -> Maybe ProgressCounters
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty TargetLocation)
      -> Maybe ProgressCounters
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"AssociationId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty TargetLocation)
   -> Maybe ProgressCounters
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty TargetLocation)
      -> Maybe ProgressCounters
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"OpsItemId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty TargetLocation)
   -> Maybe ProgressCounters
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty TargetLocation)
      -> Maybe ProgressCounters
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"CurrentStepName")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty TargetLocation)
   -> Maybe ProgressCounters
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty TargetLocation)
      -> Maybe ProgressCounters
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"TargetParameterName")
            Parser
  (Maybe (NonEmpty TargetLocation)
   -> Maybe ProgressCounters
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe (NonEmpty TargetLocation))
-> Parser
     (Maybe ProgressCounters
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty TargetLocation))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetLocations")
            Parser
  (Maybe ProgressCounters
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe ProgressCounters)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProgressCounters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProgressCounters")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"ExecutedBy")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"DocumentName")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"ExecutionEndTime")
            Parser
  (Maybe Text
   -> Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe AutomationSubtype
      -> Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"FailureMessage")
            Parser
  (Maybe AutomationSubtype
   -> Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe AutomationSubtype)
-> Parser
     (Maybe ExecutionMode
      -> Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AutomationSubtype)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AutomationSubtype")
            Parser
  (Maybe ExecutionMode
   -> Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe ExecutionMode)
-> Parser
     (Maybe [HashMap Text [Text]]
      -> Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExecutionMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Mode")
            Parser
  (Maybe [HashMap Text [Text]]
   -> Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe [HashMap Text [Text]])
-> Parser
     (Maybe Bool
      -> Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [HashMap Text [Text]]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetMaps" Parser (Maybe (Maybe [HashMap Text [Text]]))
-> Maybe [HashMap Text [Text]]
-> Parser (Maybe [HashMap Text [Text]])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [HashMap Text [Text]]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Bool
   -> Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Bool)
-> Parser
     (Maybe AutomationExecutionStatus
      -> Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StepExecutionsTruncated")
            Parser
  (Maybe AutomationExecutionStatus
   -> Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe AutomationExecutionStatus)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AutomationExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AutomationExecutionStatus")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"ParentAutomationExecutionId")
            Parser
  (Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe (HashMap Text [Text]))
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text [Text])))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Outputs" Parser (Maybe (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text])
-> Parser (Maybe (HashMap Text [Text]))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text [Text])
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"MaxErrors")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"ExecutionStartTime")
            Parser
  (Maybe Text
   -> Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Target]
      -> Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"CurrentAction")
            Parser
  (Maybe [Target]
   -> Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe [Target])
-> Parser
     (Maybe ResolvedTargets
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Target]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Targets" Parser (Maybe (Maybe [Target]))
-> Maybe [Target] -> Parser (Maybe [Target])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Target]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe ResolvedTargets
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe ResolvedTargets)
-> Parser
     (Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResolvedTargets)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResolvedTargets")
            Parser
  (Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe (HashMap Text [Text]))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text [Text])))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Parameters" Parser (Maybe (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text])
-> Parser (Maybe (HashMap Text [Text]))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text [Text])
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"DocumentVersion")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"AutomationExecutionId")
            Parser
  (Maybe Text
   -> Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser
     (Maybe [StepExecution]
      -> Maybe (NonEmpty Runbook)
      -> Maybe Text
      -> Maybe Text
      -> AutomationExecution)
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
"ChangeRequestName")
            Parser
  (Maybe [StepExecution]
   -> Maybe (NonEmpty Runbook)
   -> Maybe Text
   -> Maybe Text
   -> AutomationExecution)
-> Parser (Maybe [StepExecution])
-> Parser
     (Maybe (NonEmpty Runbook)
      -> Maybe Text -> Maybe Text -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [StepExecution]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StepExecutions" Parser (Maybe (Maybe [StepExecution]))
-> Maybe [StepExecution] -> Parser (Maybe [StepExecution])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [StepExecution]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe (NonEmpty Runbook)
   -> Maybe Text -> Maybe Text -> AutomationExecution)
-> Parser (Maybe (NonEmpty Runbook))
-> Parser (Maybe Text -> Maybe Text -> AutomationExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Runbook))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Runbooks")
            Parser (Maybe Text -> Maybe Text -> AutomationExecution)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AutomationExecution)
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
"MaxConcurrency")
            Parser (Maybe Text -> AutomationExecution)
-> Parser (Maybe Text) -> Parser AutomationExecution
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
"Target")
      )

instance Prelude.Hashable AutomationExecution

instance Prelude.NFData AutomationExecution