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

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.BlueprintDetails
import Amazonka.Glue.Types.WorkflowGraph
import Amazonka.Glue.Types.WorkflowRun
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A workflow is a collection of multiple dependent Glue jobs and crawlers
-- that are run to complete a complex ETL task. A workflow manages the
-- execution and monitoring of all its jobs and crawlers.
--
-- /See:/ 'newWorkflow' smart constructor.
data Workflow = Workflow'
  { -- | The graph representing all the Glue components that belong to the
    -- workflow as nodes and directed connections between them as edges.
    Workflow -> Maybe WorkflowGraph
graph :: Prelude.Maybe WorkflowGraph,
    -- | The date and time when the workflow was last modified.
    Workflow -> Maybe POSIX
lastModifiedOn :: Prelude.Maybe Core.POSIX,
    -- | This structure indicates the details of the blueprint that this
    -- particular workflow is created from.
    Workflow -> Maybe BlueprintDetails
blueprintDetails :: Prelude.Maybe BlueprintDetails,
    -- | You can use this parameter to prevent unwanted multiple updates to data,
    -- to control costs, or in some cases, to prevent exceeding the maximum
    -- number of concurrent runs of any of the component jobs. If you leave
    -- this parameter blank, there is no limit to the number of concurrent
    -- workflow runs.
    Workflow -> Maybe Int
maxConcurrentRuns :: Prelude.Maybe Prelude.Int,
    -- | A collection of properties to be used as part of each execution of the
    -- workflow. The run properties are made available to each job in the
    -- workflow. A job can modify the properties for the next jobs in the flow.
    Workflow -> Maybe (HashMap Text Text)
defaultRunProperties :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the workflow.
    Workflow -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The information about the last execution of the workflow.
    Workflow -> Maybe WorkflowRun
lastRun :: Prelude.Maybe WorkflowRun,
    -- | A description of the workflow.
    Workflow -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the workflow was created.
    Workflow -> Maybe POSIX
createdOn :: Prelude.Maybe Core.POSIX
  }
  deriving (Workflow -> Workflow -> Bool
(Workflow -> Workflow -> Bool)
-> (Workflow -> Workflow -> Bool) -> Eq Workflow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Workflow -> Workflow -> Bool
$c/= :: Workflow -> Workflow -> Bool
== :: Workflow -> Workflow -> Bool
$c== :: Workflow -> Workflow -> Bool
Prelude.Eq, ReadPrec [Workflow]
ReadPrec Workflow
Int -> ReadS Workflow
ReadS [Workflow]
(Int -> ReadS Workflow)
-> ReadS [Workflow]
-> ReadPrec Workflow
-> ReadPrec [Workflow]
-> Read Workflow
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Workflow]
$creadListPrec :: ReadPrec [Workflow]
readPrec :: ReadPrec Workflow
$creadPrec :: ReadPrec Workflow
readList :: ReadS [Workflow]
$creadList :: ReadS [Workflow]
readsPrec :: Int -> ReadS Workflow
$creadsPrec :: Int -> ReadS Workflow
Prelude.Read, Int -> Workflow -> ShowS
[Workflow] -> ShowS
Workflow -> String
(Int -> Workflow -> ShowS)
-> (Workflow -> String) -> ([Workflow] -> ShowS) -> Show Workflow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Workflow] -> ShowS
$cshowList :: [Workflow] -> ShowS
show :: Workflow -> String
$cshow :: Workflow -> String
showsPrec :: Int -> Workflow -> ShowS
$cshowsPrec :: Int -> Workflow -> ShowS
Prelude.Show, (forall x. Workflow -> Rep Workflow x)
-> (forall x. Rep Workflow x -> Workflow) -> Generic Workflow
forall x. Rep Workflow x -> Workflow
forall x. Workflow -> Rep Workflow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Workflow x -> Workflow
$cfrom :: forall x. Workflow -> Rep Workflow x
Prelude.Generic)

-- |
-- Create a value of 'Workflow' 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:
--
-- 'graph', 'workflow_graph' - The graph representing all the Glue components that belong to the
-- workflow as nodes and directed connections between them as edges.
--
-- 'lastModifiedOn', 'workflow_lastModifiedOn' - The date and time when the workflow was last modified.
--
-- 'blueprintDetails', 'workflow_blueprintDetails' - This structure indicates the details of the blueprint that this
-- particular workflow is created from.
--
-- 'maxConcurrentRuns', 'workflow_maxConcurrentRuns' - You can use this parameter to prevent unwanted multiple updates to data,
-- to control costs, or in some cases, to prevent exceeding the maximum
-- number of concurrent runs of any of the component jobs. If you leave
-- this parameter blank, there is no limit to the number of concurrent
-- workflow runs.
--
-- 'defaultRunProperties', 'workflow_defaultRunProperties' - A collection of properties to be used as part of each execution of the
-- workflow. The run properties are made available to each job in the
-- workflow. A job can modify the properties for the next jobs in the flow.
--
-- 'name', 'workflow_name' - The name of the workflow.
--
-- 'lastRun', 'workflow_lastRun' - The information about the last execution of the workflow.
--
-- 'description', 'workflow_description' - A description of the workflow.
--
-- 'createdOn', 'workflow_createdOn' - The date and time when the workflow was created.
newWorkflow ::
  Workflow
newWorkflow :: Workflow
newWorkflow =
  Workflow' :: Maybe WorkflowGraph
-> Maybe POSIX
-> Maybe BlueprintDetails
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe WorkflowRun
-> Maybe Text
-> Maybe POSIX
-> Workflow
Workflow'
    { $sel:graph:Workflow' :: Maybe WorkflowGraph
graph = Maybe WorkflowGraph
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedOn:Workflow' :: Maybe POSIX
lastModifiedOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:blueprintDetails:Workflow' :: Maybe BlueprintDetails
blueprintDetails = Maybe BlueprintDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrentRuns:Workflow' :: Maybe Int
maxConcurrentRuns = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRunProperties:Workflow' :: Maybe (HashMap Text Text)
defaultRunProperties = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Workflow' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastRun:Workflow' :: Maybe WorkflowRun
lastRun = Maybe WorkflowRun
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Workflow' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdOn:Workflow' :: Maybe POSIX
createdOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The graph representing all the Glue components that belong to the
-- workflow as nodes and directed connections between them as edges.
workflow_graph :: Lens.Lens' Workflow (Prelude.Maybe WorkflowGraph)
workflow_graph :: (Maybe WorkflowGraph -> f (Maybe WorkflowGraph))
-> Workflow -> f Workflow
workflow_graph = (Workflow -> Maybe WorkflowGraph)
-> (Workflow -> Maybe WorkflowGraph -> Workflow)
-> Lens
     Workflow Workflow (Maybe WorkflowGraph) (Maybe WorkflowGraph)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workflow' {Maybe WorkflowGraph
graph :: Maybe WorkflowGraph
$sel:graph:Workflow' :: Workflow -> Maybe WorkflowGraph
graph} -> Maybe WorkflowGraph
graph) (\s :: Workflow
s@Workflow' {} Maybe WorkflowGraph
a -> Workflow
s {$sel:graph:Workflow' :: Maybe WorkflowGraph
graph = Maybe WorkflowGraph
a} :: Workflow)

-- | The date and time when the workflow was last modified.
workflow_lastModifiedOn :: Lens.Lens' Workflow (Prelude.Maybe Prelude.UTCTime)
workflow_lastModifiedOn :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Workflow -> f Workflow
workflow_lastModifiedOn = (Workflow -> Maybe POSIX)
-> (Workflow -> Maybe POSIX -> Workflow)
-> Lens Workflow Workflow (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workflow' {Maybe POSIX
lastModifiedOn :: Maybe POSIX
$sel:lastModifiedOn:Workflow' :: Workflow -> Maybe POSIX
lastModifiedOn} -> Maybe POSIX
lastModifiedOn) (\s :: Workflow
s@Workflow' {} Maybe POSIX
a -> Workflow
s {$sel:lastModifiedOn:Workflow' :: Maybe POSIX
lastModifiedOn = Maybe POSIX
a} :: Workflow) ((Maybe POSIX -> f (Maybe POSIX)) -> Workflow -> f Workflow)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Workflow
-> f Workflow
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

-- | This structure indicates the details of the blueprint that this
-- particular workflow is created from.
workflow_blueprintDetails :: Lens.Lens' Workflow (Prelude.Maybe BlueprintDetails)
workflow_blueprintDetails :: (Maybe BlueprintDetails -> f (Maybe BlueprintDetails))
-> Workflow -> f Workflow
workflow_blueprintDetails = (Workflow -> Maybe BlueprintDetails)
-> (Workflow -> Maybe BlueprintDetails -> Workflow)
-> Lens
     Workflow Workflow (Maybe BlueprintDetails) (Maybe BlueprintDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workflow' {Maybe BlueprintDetails
blueprintDetails :: Maybe BlueprintDetails
$sel:blueprintDetails:Workflow' :: Workflow -> Maybe BlueprintDetails
blueprintDetails} -> Maybe BlueprintDetails
blueprintDetails) (\s :: Workflow
s@Workflow' {} Maybe BlueprintDetails
a -> Workflow
s {$sel:blueprintDetails:Workflow' :: Maybe BlueprintDetails
blueprintDetails = Maybe BlueprintDetails
a} :: Workflow)

-- | You can use this parameter to prevent unwanted multiple updates to data,
-- to control costs, or in some cases, to prevent exceeding the maximum
-- number of concurrent runs of any of the component jobs. If you leave
-- this parameter blank, there is no limit to the number of concurrent
-- workflow runs.
workflow_maxConcurrentRuns :: Lens.Lens' Workflow (Prelude.Maybe Prelude.Int)
workflow_maxConcurrentRuns :: (Maybe Int -> f (Maybe Int)) -> Workflow -> f Workflow
workflow_maxConcurrentRuns = (Workflow -> Maybe Int)
-> (Workflow -> Maybe Int -> Workflow)
-> Lens Workflow Workflow (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workflow' {Maybe Int
maxConcurrentRuns :: Maybe Int
$sel:maxConcurrentRuns:Workflow' :: Workflow -> Maybe Int
maxConcurrentRuns} -> Maybe Int
maxConcurrentRuns) (\s :: Workflow
s@Workflow' {} Maybe Int
a -> Workflow
s {$sel:maxConcurrentRuns:Workflow' :: Maybe Int
maxConcurrentRuns = Maybe Int
a} :: Workflow)

-- | A collection of properties to be used as part of each execution of the
-- workflow. The run properties are made available to each job in the
-- workflow. A job can modify the properties for the next jobs in the flow.
workflow_defaultRunProperties :: Lens.Lens' Workflow (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
workflow_defaultRunProperties :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Workflow -> f Workflow
workflow_defaultRunProperties = (Workflow -> Maybe (HashMap Text Text))
-> (Workflow -> Maybe (HashMap Text Text) -> Workflow)
-> Lens
     Workflow
     Workflow
     (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 (\Workflow' {Maybe (HashMap Text Text)
defaultRunProperties :: Maybe (HashMap Text Text)
$sel:defaultRunProperties:Workflow' :: Workflow -> Maybe (HashMap Text Text)
defaultRunProperties} -> Maybe (HashMap Text Text)
defaultRunProperties) (\s :: Workflow
s@Workflow' {} Maybe (HashMap Text Text)
a -> Workflow
s {$sel:defaultRunProperties:Workflow' :: Maybe (HashMap Text Text)
defaultRunProperties = Maybe (HashMap Text Text)
a} :: Workflow) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Workflow -> f Workflow)
-> ((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)))
-> Workflow
-> f Workflow
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 name of the workflow.
workflow_name :: Lens.Lens' Workflow (Prelude.Maybe Prelude.Text)
workflow_name :: (Maybe Text -> f (Maybe Text)) -> Workflow -> f Workflow
workflow_name = (Workflow -> Maybe Text)
-> (Workflow -> Maybe Text -> Workflow)
-> Lens Workflow Workflow (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workflow' {Maybe Text
name :: Maybe Text
$sel:name:Workflow' :: Workflow -> Maybe Text
name} -> Maybe Text
name) (\s :: Workflow
s@Workflow' {} Maybe Text
a -> Workflow
s {$sel:name:Workflow' :: Maybe Text
name = Maybe Text
a} :: Workflow)

-- | The information about the last execution of the workflow.
workflow_lastRun :: Lens.Lens' Workflow (Prelude.Maybe WorkflowRun)
workflow_lastRun :: (Maybe WorkflowRun -> f (Maybe WorkflowRun))
-> Workflow -> f Workflow
workflow_lastRun = (Workflow -> Maybe WorkflowRun)
-> (Workflow -> Maybe WorkflowRun -> Workflow)
-> Lens Workflow Workflow (Maybe WorkflowRun) (Maybe WorkflowRun)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workflow' {Maybe WorkflowRun
lastRun :: Maybe WorkflowRun
$sel:lastRun:Workflow' :: Workflow -> Maybe WorkflowRun
lastRun} -> Maybe WorkflowRun
lastRun) (\s :: Workflow
s@Workflow' {} Maybe WorkflowRun
a -> Workflow
s {$sel:lastRun:Workflow' :: Maybe WorkflowRun
lastRun = Maybe WorkflowRun
a} :: Workflow)

-- | A description of the workflow.
workflow_description :: Lens.Lens' Workflow (Prelude.Maybe Prelude.Text)
workflow_description :: (Maybe Text -> f (Maybe Text)) -> Workflow -> f Workflow
workflow_description = (Workflow -> Maybe Text)
-> (Workflow -> Maybe Text -> Workflow)
-> Lens Workflow Workflow (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workflow' {Maybe Text
description :: Maybe Text
$sel:description:Workflow' :: Workflow -> Maybe Text
description} -> Maybe Text
description) (\s :: Workflow
s@Workflow' {} Maybe Text
a -> Workflow
s {$sel:description:Workflow' :: Maybe Text
description = Maybe Text
a} :: Workflow)

-- | The date and time when the workflow was created.
workflow_createdOn :: Lens.Lens' Workflow (Prelude.Maybe Prelude.UTCTime)
workflow_createdOn :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Workflow -> f Workflow
workflow_createdOn = (Workflow -> Maybe POSIX)
-> (Workflow -> Maybe POSIX -> Workflow)
-> Lens Workflow Workflow (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workflow' {Maybe POSIX
createdOn :: Maybe POSIX
$sel:createdOn:Workflow' :: Workflow -> Maybe POSIX
createdOn} -> Maybe POSIX
createdOn) (\s :: Workflow
s@Workflow' {} Maybe POSIX
a -> Workflow
s {$sel:createdOn:Workflow' :: Maybe POSIX
createdOn = Maybe POSIX
a} :: Workflow) ((Maybe POSIX -> f (Maybe POSIX)) -> Workflow -> f Workflow)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Workflow
-> f Workflow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON Workflow where
  parseJSON :: Value -> Parser Workflow
parseJSON =
    String -> (Object -> Parser Workflow) -> Value -> Parser Workflow
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Workflow"
      ( \Object
x ->
          Maybe WorkflowGraph
-> Maybe POSIX
-> Maybe BlueprintDetails
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe WorkflowRun
-> Maybe Text
-> Maybe POSIX
-> Workflow
Workflow'
            (Maybe WorkflowGraph
 -> Maybe POSIX
 -> Maybe BlueprintDetails
 -> Maybe Int
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe WorkflowRun
 -> Maybe Text
 -> Maybe POSIX
 -> Workflow)
-> Parser (Maybe WorkflowGraph)
-> Parser
     (Maybe POSIX
      -> Maybe BlueprintDetails
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe WorkflowRun
      -> Maybe Text
      -> Maybe POSIX
      -> Workflow)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe WorkflowGraph)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Graph")
            Parser
  (Maybe POSIX
   -> Maybe BlueprintDetails
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe WorkflowRun
   -> Maybe Text
   -> Maybe POSIX
   -> Workflow)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe BlueprintDetails
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe WorkflowRun
      -> Maybe Text
      -> Maybe POSIX
      -> Workflow)
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
"LastModifiedOn")
            Parser
  (Maybe BlueprintDetails
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe WorkflowRun
   -> Maybe Text
   -> Maybe POSIX
   -> Workflow)
-> Parser (Maybe BlueprintDetails)
-> Parser
     (Maybe Int
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe WorkflowRun
      -> Maybe Text
      -> Maybe POSIX
      -> Workflow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BlueprintDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BlueprintDetails")
            Parser
  (Maybe Int
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe WorkflowRun
   -> Maybe Text
   -> Maybe POSIX
   -> Workflow)
-> Parser (Maybe Int)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe WorkflowRun
      -> Maybe Text
      -> Maybe POSIX
      -> Workflow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxConcurrentRuns")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe WorkflowRun
   -> Maybe Text
   -> Maybe POSIX
   -> Workflow)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Text
      -> Maybe WorkflowRun -> Maybe Text -> Maybe POSIX -> Workflow)
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
"DefaultRunProperties"
                            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 WorkflowRun -> Maybe Text -> Maybe POSIX -> Workflow)
-> Parser (Maybe Text)
-> Parser
     (Maybe WorkflowRun -> Maybe Text -> Maybe POSIX -> Workflow)
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
"Name")
            Parser (Maybe WorkflowRun -> Maybe Text -> Maybe POSIX -> Workflow)
-> Parser (Maybe WorkflowRun)
-> Parser (Maybe Text -> Maybe POSIX -> Workflow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe WorkflowRun)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastRun")
            Parser (Maybe Text -> Maybe POSIX -> Workflow)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> Workflow)
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
"Description")
            Parser (Maybe POSIX -> Workflow)
-> Parser (Maybe POSIX) -> Parser Workflow
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
"CreatedOn")
      )

instance Prelude.Hashable Workflow

instance Prelude.NFData Workflow