{-# 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.Glue.Types.BlueprintRun
-- 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.Glue.Types.BlueprintRun where

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.BlueprintRunState
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The details of a blueprint run.
--
-- /See:/ 'newBlueprintRun' smart constructor.
data BlueprintRun = BlueprintRun'
  { -- | The name of a workflow that is created as a result of a successful
    -- blueprint run. If a blueprint run has an error, there will not be a
    -- workflow created.
    BlueprintRun -> Maybe Text
workflowName :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the blueprint run completed.
    BlueprintRun -> Maybe POSIX
completedOn :: Prelude.Maybe Core.POSIX,
    -- | The state of the blueprint run. Possible values are:
    --
    -- -   Running — The blueprint run is in progress.
    --
    -- -   Succeeded — The blueprint run completed successfully.
    --
    -- -   Failed — The blueprint run failed and rollback is complete.
    --
    -- -   Rolling Back — The blueprint run failed and rollback is in progress.
    BlueprintRun -> Maybe BlueprintRunState
state :: Prelude.Maybe BlueprintRunState,
    -- | If there are any errors while creating the entities of a workflow, we
    -- try to roll back the created entities until that point and delete them.
    -- This attribute indicates the errors seen while trying to delete the
    -- entities that are created.
    BlueprintRun -> Maybe Text
rollbackErrorMessage :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the blueprint run started.
    BlueprintRun -> Maybe POSIX
startedOn :: Prelude.Maybe Core.POSIX,
    -- | The run ID for this blueprint run.
    BlueprintRun -> Maybe Text
runId :: Prelude.Maybe Prelude.Text,
    -- | The blueprint parameters as a string. You will have to provide a value
    -- for each key that is required from the parameter spec that is defined in
    -- the @Blueprint$ParameterSpec@.
    BlueprintRun -> Maybe Text
parameters :: Prelude.Maybe Prelude.Text,
    -- | The name of the blueprint.
    BlueprintRun -> Maybe Text
blueprintName :: Prelude.Maybe Prelude.Text,
    -- | Indicates any errors that are seen while running the blueprint.
    BlueprintRun -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | The role ARN. This role will be assumed by the Glue service and will be
    -- used to create the workflow and other entities of a workflow.
    BlueprintRun -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
  }
  deriving (BlueprintRun -> BlueprintRun -> Bool
(BlueprintRun -> BlueprintRun -> Bool)
-> (BlueprintRun -> BlueprintRun -> Bool) -> Eq BlueprintRun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlueprintRun -> BlueprintRun -> Bool
$c/= :: BlueprintRun -> BlueprintRun -> Bool
== :: BlueprintRun -> BlueprintRun -> Bool
$c== :: BlueprintRun -> BlueprintRun -> Bool
Prelude.Eq, ReadPrec [BlueprintRun]
ReadPrec BlueprintRun
Int -> ReadS BlueprintRun
ReadS [BlueprintRun]
(Int -> ReadS BlueprintRun)
-> ReadS [BlueprintRun]
-> ReadPrec BlueprintRun
-> ReadPrec [BlueprintRun]
-> Read BlueprintRun
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BlueprintRun]
$creadListPrec :: ReadPrec [BlueprintRun]
readPrec :: ReadPrec BlueprintRun
$creadPrec :: ReadPrec BlueprintRun
readList :: ReadS [BlueprintRun]
$creadList :: ReadS [BlueprintRun]
readsPrec :: Int -> ReadS BlueprintRun
$creadsPrec :: Int -> ReadS BlueprintRun
Prelude.Read, Int -> BlueprintRun -> ShowS
[BlueprintRun] -> ShowS
BlueprintRun -> String
(Int -> BlueprintRun -> ShowS)
-> (BlueprintRun -> String)
-> ([BlueprintRun] -> ShowS)
-> Show BlueprintRun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BlueprintRun] -> ShowS
$cshowList :: [BlueprintRun] -> ShowS
show :: BlueprintRun -> String
$cshow :: BlueprintRun -> String
showsPrec :: Int -> BlueprintRun -> ShowS
$cshowsPrec :: Int -> BlueprintRun -> ShowS
Prelude.Show, (forall x. BlueprintRun -> Rep BlueprintRun x)
-> (forall x. Rep BlueprintRun x -> BlueprintRun)
-> Generic BlueprintRun
forall x. Rep BlueprintRun x -> BlueprintRun
forall x. BlueprintRun -> Rep BlueprintRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BlueprintRun x -> BlueprintRun
$cfrom :: forall x. BlueprintRun -> Rep BlueprintRun x
Prelude.Generic)

-- |
-- Create a value of 'BlueprintRun' 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:
--
-- 'workflowName', 'blueprintRun_workflowName' - The name of a workflow that is created as a result of a successful
-- blueprint run. If a blueprint run has an error, there will not be a
-- workflow created.
--
-- 'completedOn', 'blueprintRun_completedOn' - The date and time that the blueprint run completed.
--
-- 'state', 'blueprintRun_state' - The state of the blueprint run. Possible values are:
--
-- -   Running — The blueprint run is in progress.
--
-- -   Succeeded — The blueprint run completed successfully.
--
-- -   Failed — The blueprint run failed and rollback is complete.
--
-- -   Rolling Back — The blueprint run failed and rollback is in progress.
--
-- 'rollbackErrorMessage', 'blueprintRun_rollbackErrorMessage' - If there are any errors while creating the entities of a workflow, we
-- try to roll back the created entities until that point and delete them.
-- This attribute indicates the errors seen while trying to delete the
-- entities that are created.
--
-- 'startedOn', 'blueprintRun_startedOn' - The date and time that the blueprint run started.
--
-- 'runId', 'blueprintRun_runId' - The run ID for this blueprint run.
--
-- 'parameters', 'blueprintRun_parameters' - The blueprint parameters as a string. You will have to provide a value
-- for each key that is required from the parameter spec that is defined in
-- the @Blueprint$ParameterSpec@.
--
-- 'blueprintName', 'blueprintRun_blueprintName' - The name of the blueprint.
--
-- 'errorMessage', 'blueprintRun_errorMessage' - Indicates any errors that are seen while running the blueprint.
--
-- 'roleArn', 'blueprintRun_roleArn' - The role ARN. This role will be assumed by the Glue service and will be
-- used to create the workflow and other entities of a workflow.
newBlueprintRun ::
  BlueprintRun
newBlueprintRun :: BlueprintRun
newBlueprintRun =
  BlueprintRun' :: Maybe Text
-> Maybe POSIX
-> Maybe BlueprintRunState
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BlueprintRun
BlueprintRun'
    { $sel:workflowName:BlueprintRun' :: Maybe Text
workflowName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:completedOn:BlueprintRun' :: Maybe POSIX
completedOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:state:BlueprintRun' :: Maybe BlueprintRunState
state = Maybe BlueprintRunState
forall a. Maybe a
Prelude.Nothing,
      $sel:rollbackErrorMessage:BlueprintRun' :: Maybe Text
rollbackErrorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startedOn:BlueprintRun' :: Maybe POSIX
startedOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:runId:BlueprintRun' :: Maybe Text
runId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:BlueprintRun' :: Maybe Text
parameters = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:blueprintName:BlueprintRun' :: Maybe Text
blueprintName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:BlueprintRun' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:BlueprintRun' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of a workflow that is created as a result of a successful
-- blueprint run. If a blueprint run has an error, there will not be a
-- workflow created.
blueprintRun_workflowName :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_workflowName :: (Maybe Text -> f (Maybe Text)) -> BlueprintRun -> f BlueprintRun
blueprintRun_workflowName = (BlueprintRun -> Maybe Text)
-> (BlueprintRun -> Maybe Text -> BlueprintRun)
-> Lens BlueprintRun BlueprintRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
workflowName :: Maybe Text
$sel:workflowName:BlueprintRun' :: BlueprintRun -> Maybe Text
workflowName} -> Maybe Text
workflowName) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:workflowName:BlueprintRun' :: Maybe Text
workflowName = Maybe Text
a} :: BlueprintRun)

-- | The date and time that the blueprint run completed.
blueprintRun_completedOn :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.UTCTime)
blueprintRun_completedOn :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BlueprintRun -> f BlueprintRun
blueprintRun_completedOn = (BlueprintRun -> Maybe POSIX)
-> (BlueprintRun -> Maybe POSIX -> BlueprintRun)
-> Lens BlueprintRun BlueprintRun (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe POSIX
completedOn :: Maybe POSIX
$sel:completedOn:BlueprintRun' :: BlueprintRun -> Maybe POSIX
completedOn} -> Maybe POSIX
completedOn) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe POSIX
a -> BlueprintRun
s {$sel:completedOn:BlueprintRun' :: Maybe POSIX
completedOn = Maybe POSIX
a} :: BlueprintRun) ((Maybe POSIX -> f (Maybe POSIX))
 -> BlueprintRun -> f BlueprintRun)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BlueprintRun
-> f BlueprintRun
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 state of the blueprint run. Possible values are:
--
-- -   Running — The blueprint run is in progress.
--
-- -   Succeeded — The blueprint run completed successfully.
--
-- -   Failed — The blueprint run failed and rollback is complete.
--
-- -   Rolling Back — The blueprint run failed and rollback is in progress.
blueprintRun_state :: Lens.Lens' BlueprintRun (Prelude.Maybe BlueprintRunState)
blueprintRun_state :: (Maybe BlueprintRunState -> f (Maybe BlueprintRunState))
-> BlueprintRun -> f BlueprintRun
blueprintRun_state = (BlueprintRun -> Maybe BlueprintRunState)
-> (BlueprintRun -> Maybe BlueprintRunState -> BlueprintRun)
-> Lens
     BlueprintRun
     BlueprintRun
     (Maybe BlueprintRunState)
     (Maybe BlueprintRunState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe BlueprintRunState
state :: Maybe BlueprintRunState
$sel:state:BlueprintRun' :: BlueprintRun -> Maybe BlueprintRunState
state} -> Maybe BlueprintRunState
state) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe BlueprintRunState
a -> BlueprintRun
s {$sel:state:BlueprintRun' :: Maybe BlueprintRunState
state = Maybe BlueprintRunState
a} :: BlueprintRun)

-- | If there are any errors while creating the entities of a workflow, we
-- try to roll back the created entities until that point and delete them.
-- This attribute indicates the errors seen while trying to delete the
-- entities that are created.
blueprintRun_rollbackErrorMessage :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_rollbackErrorMessage :: (Maybe Text -> f (Maybe Text)) -> BlueprintRun -> f BlueprintRun
blueprintRun_rollbackErrorMessage = (BlueprintRun -> Maybe Text)
-> (BlueprintRun -> Maybe Text -> BlueprintRun)
-> Lens BlueprintRun BlueprintRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
rollbackErrorMessage :: Maybe Text
$sel:rollbackErrorMessage:BlueprintRun' :: BlueprintRun -> Maybe Text
rollbackErrorMessage} -> Maybe Text
rollbackErrorMessage) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:rollbackErrorMessage:BlueprintRun' :: Maybe Text
rollbackErrorMessage = Maybe Text
a} :: BlueprintRun)

-- | The date and time that the blueprint run started.
blueprintRun_startedOn :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.UTCTime)
blueprintRun_startedOn :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BlueprintRun -> f BlueprintRun
blueprintRun_startedOn = (BlueprintRun -> Maybe POSIX)
-> (BlueprintRun -> Maybe POSIX -> BlueprintRun)
-> Lens BlueprintRun BlueprintRun (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe POSIX
startedOn :: Maybe POSIX
$sel:startedOn:BlueprintRun' :: BlueprintRun -> Maybe POSIX
startedOn} -> Maybe POSIX
startedOn) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe POSIX
a -> BlueprintRun
s {$sel:startedOn:BlueprintRun' :: Maybe POSIX
startedOn = Maybe POSIX
a} :: BlueprintRun) ((Maybe POSIX -> f (Maybe POSIX))
 -> BlueprintRun -> f BlueprintRun)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BlueprintRun
-> f BlueprintRun
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 run ID for this blueprint run.
blueprintRun_runId :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_runId :: (Maybe Text -> f (Maybe Text)) -> BlueprintRun -> f BlueprintRun
blueprintRun_runId = (BlueprintRun -> Maybe Text)
-> (BlueprintRun -> Maybe Text -> BlueprintRun)
-> Lens BlueprintRun BlueprintRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
runId :: Maybe Text
$sel:runId:BlueprintRun' :: BlueprintRun -> Maybe Text
runId} -> Maybe Text
runId) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:runId:BlueprintRun' :: Maybe Text
runId = Maybe Text
a} :: BlueprintRun)

-- | The blueprint parameters as a string. You will have to provide a value
-- for each key that is required from the parameter spec that is defined in
-- the @Blueprint$ParameterSpec@.
blueprintRun_parameters :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_parameters :: (Maybe Text -> f (Maybe Text)) -> BlueprintRun -> f BlueprintRun
blueprintRun_parameters = (BlueprintRun -> Maybe Text)
-> (BlueprintRun -> Maybe Text -> BlueprintRun)
-> Lens BlueprintRun BlueprintRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
parameters :: Maybe Text
$sel:parameters:BlueprintRun' :: BlueprintRun -> Maybe Text
parameters} -> Maybe Text
parameters) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:parameters:BlueprintRun' :: Maybe Text
parameters = Maybe Text
a} :: BlueprintRun)

-- | The name of the blueprint.
blueprintRun_blueprintName :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_blueprintName :: (Maybe Text -> f (Maybe Text)) -> BlueprintRun -> f BlueprintRun
blueprintRun_blueprintName = (BlueprintRun -> Maybe Text)
-> (BlueprintRun -> Maybe Text -> BlueprintRun)
-> Lens BlueprintRun BlueprintRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
blueprintName :: Maybe Text
$sel:blueprintName:BlueprintRun' :: BlueprintRun -> Maybe Text
blueprintName} -> Maybe Text
blueprintName) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:blueprintName:BlueprintRun' :: Maybe Text
blueprintName = Maybe Text
a} :: BlueprintRun)

-- | Indicates any errors that are seen while running the blueprint.
blueprintRun_errorMessage :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_errorMessage :: (Maybe Text -> f (Maybe Text)) -> BlueprintRun -> f BlueprintRun
blueprintRun_errorMessage = (BlueprintRun -> Maybe Text)
-> (BlueprintRun -> Maybe Text -> BlueprintRun)
-> Lens BlueprintRun BlueprintRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:BlueprintRun' :: BlueprintRun -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:errorMessage:BlueprintRun' :: Maybe Text
errorMessage = Maybe Text
a} :: BlueprintRun)

-- | The role ARN. This role will be assumed by the Glue service and will be
-- used to create the workflow and other entities of a workflow.
blueprintRun_roleArn :: Lens.Lens' BlueprintRun (Prelude.Maybe Prelude.Text)
blueprintRun_roleArn :: (Maybe Text -> f (Maybe Text)) -> BlueprintRun -> f BlueprintRun
blueprintRun_roleArn = (BlueprintRun -> Maybe Text)
-> (BlueprintRun -> Maybe Text -> BlueprintRun)
-> Lens BlueprintRun BlueprintRun (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlueprintRun' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:BlueprintRun' :: BlueprintRun -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: BlueprintRun
s@BlueprintRun' {} Maybe Text
a -> BlueprintRun
s {$sel:roleArn:BlueprintRun' :: Maybe Text
roleArn = Maybe Text
a} :: BlueprintRun)

instance Core.FromJSON BlueprintRun where
  parseJSON :: Value -> Parser BlueprintRun
parseJSON =
    String
-> (Object -> Parser BlueprintRun) -> Value -> Parser BlueprintRun
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BlueprintRun"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe BlueprintRunState
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BlueprintRun
BlueprintRun'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe BlueprintRunState
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> BlueprintRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe BlueprintRunState
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BlueprintRun)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WorkflowName")
            Parser
  (Maybe POSIX
   -> Maybe BlueprintRunState
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BlueprintRun)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe BlueprintRunState
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BlueprintRun)
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
"CompletedOn")
            Parser
  (Maybe BlueprintRunState
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BlueprintRun)
-> Parser (Maybe BlueprintRunState)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BlueprintRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BlueprintRunState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BlueprintRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BlueprintRun)
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
"RollbackErrorMessage")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BlueprintRun)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BlueprintRun)
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
"StartedOn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> BlueprintRun)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> BlueprintRun)
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
"RunId")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> BlueprintRun)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> BlueprintRun)
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
"Parameters")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> BlueprintRun)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> BlueprintRun)
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
"BlueprintName")
            Parser (Maybe Text -> Maybe Text -> BlueprintRun)
-> Parser (Maybe Text) -> Parser (Maybe Text -> BlueprintRun)
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
"ErrorMessage")
            Parser (Maybe Text -> BlueprintRun)
-> Parser (Maybe Text) -> Parser BlueprintRun
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
"RoleArn")
      )

instance Prelude.Hashable BlueprintRun

instance Prelude.NFData BlueprintRun