{-# 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 #-}
module Amazonka.SWF.Types.WorkflowExecutionOpenCounts where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WorkflowExecutionOpenCounts = WorkflowExecutionOpenCounts'
{
WorkflowExecutionOpenCounts -> Maybe Natural
openLambdaFunctions :: Prelude.Maybe Prelude.Natural,
WorkflowExecutionOpenCounts -> Natural
openActivityTasks :: Prelude.Natural,
WorkflowExecutionOpenCounts -> Natural
openDecisionTasks :: Prelude.Natural,
WorkflowExecutionOpenCounts -> Natural
openTimers :: Prelude.Natural,
WorkflowExecutionOpenCounts -> Natural
openChildWorkflowExecutions :: Prelude.Natural
}
deriving (WorkflowExecutionOpenCounts -> WorkflowExecutionOpenCounts -> Bool
(WorkflowExecutionOpenCounts
-> WorkflowExecutionOpenCounts -> Bool)
-> (WorkflowExecutionOpenCounts
-> WorkflowExecutionOpenCounts -> Bool)
-> Eq WorkflowExecutionOpenCounts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowExecutionOpenCounts -> WorkflowExecutionOpenCounts -> Bool
$c/= :: WorkflowExecutionOpenCounts -> WorkflowExecutionOpenCounts -> Bool
== :: WorkflowExecutionOpenCounts -> WorkflowExecutionOpenCounts -> Bool
$c== :: WorkflowExecutionOpenCounts -> WorkflowExecutionOpenCounts -> Bool
Prelude.Eq, ReadPrec [WorkflowExecutionOpenCounts]
ReadPrec WorkflowExecutionOpenCounts
Int -> ReadS WorkflowExecutionOpenCounts
ReadS [WorkflowExecutionOpenCounts]
(Int -> ReadS WorkflowExecutionOpenCounts)
-> ReadS [WorkflowExecutionOpenCounts]
-> ReadPrec WorkflowExecutionOpenCounts
-> ReadPrec [WorkflowExecutionOpenCounts]
-> Read WorkflowExecutionOpenCounts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowExecutionOpenCounts]
$creadListPrec :: ReadPrec [WorkflowExecutionOpenCounts]
readPrec :: ReadPrec WorkflowExecutionOpenCounts
$creadPrec :: ReadPrec WorkflowExecutionOpenCounts
readList :: ReadS [WorkflowExecutionOpenCounts]
$creadList :: ReadS [WorkflowExecutionOpenCounts]
readsPrec :: Int -> ReadS WorkflowExecutionOpenCounts
$creadsPrec :: Int -> ReadS WorkflowExecutionOpenCounts
Prelude.Read, Int -> WorkflowExecutionOpenCounts -> ShowS
[WorkflowExecutionOpenCounts] -> ShowS
WorkflowExecutionOpenCounts -> String
(Int -> WorkflowExecutionOpenCounts -> ShowS)
-> (WorkflowExecutionOpenCounts -> String)
-> ([WorkflowExecutionOpenCounts] -> ShowS)
-> Show WorkflowExecutionOpenCounts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowExecutionOpenCounts] -> ShowS
$cshowList :: [WorkflowExecutionOpenCounts] -> ShowS
show :: WorkflowExecutionOpenCounts -> String
$cshow :: WorkflowExecutionOpenCounts -> String
showsPrec :: Int -> WorkflowExecutionOpenCounts -> ShowS
$cshowsPrec :: Int -> WorkflowExecutionOpenCounts -> ShowS
Prelude.Show, (forall x.
WorkflowExecutionOpenCounts -> Rep WorkflowExecutionOpenCounts x)
-> (forall x.
Rep WorkflowExecutionOpenCounts x -> WorkflowExecutionOpenCounts)
-> Generic WorkflowExecutionOpenCounts
forall x.
Rep WorkflowExecutionOpenCounts x -> WorkflowExecutionOpenCounts
forall x.
WorkflowExecutionOpenCounts -> Rep WorkflowExecutionOpenCounts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkflowExecutionOpenCounts x -> WorkflowExecutionOpenCounts
$cfrom :: forall x.
WorkflowExecutionOpenCounts -> Rep WorkflowExecutionOpenCounts x
Prelude.Generic)
newWorkflowExecutionOpenCounts ::
Prelude.Natural ->
Prelude.Natural ->
Prelude.Natural ->
Prelude.Natural ->
WorkflowExecutionOpenCounts
newWorkflowExecutionOpenCounts :: Natural
-> Natural -> Natural -> Natural -> WorkflowExecutionOpenCounts
newWorkflowExecutionOpenCounts
Natural
pOpenActivityTasks_
Natural
pOpenDecisionTasks_
Natural
pOpenTimers_
Natural
pOpenChildWorkflowExecutions_ =
WorkflowExecutionOpenCounts' :: Maybe Natural
-> Natural
-> Natural
-> Natural
-> Natural
-> WorkflowExecutionOpenCounts
WorkflowExecutionOpenCounts'
{ $sel:openLambdaFunctions:WorkflowExecutionOpenCounts' :: Maybe Natural
openLambdaFunctions =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:openActivityTasks:WorkflowExecutionOpenCounts' :: Natural
openActivityTasks = Natural
pOpenActivityTasks_,
$sel:openDecisionTasks:WorkflowExecutionOpenCounts' :: Natural
openDecisionTasks = Natural
pOpenDecisionTasks_,
$sel:openTimers:WorkflowExecutionOpenCounts' :: Natural
openTimers = Natural
pOpenTimers_,
$sel:openChildWorkflowExecutions:WorkflowExecutionOpenCounts' :: Natural
openChildWorkflowExecutions =
Natural
pOpenChildWorkflowExecutions_
}
workflowExecutionOpenCounts_openLambdaFunctions :: Lens.Lens' WorkflowExecutionOpenCounts (Prelude.Maybe Prelude.Natural)
workflowExecutionOpenCounts_openLambdaFunctions :: (Maybe Natural -> f (Maybe Natural))
-> WorkflowExecutionOpenCounts -> f WorkflowExecutionOpenCounts
workflowExecutionOpenCounts_openLambdaFunctions = (WorkflowExecutionOpenCounts -> Maybe Natural)
-> (WorkflowExecutionOpenCounts
-> Maybe Natural -> WorkflowExecutionOpenCounts)
-> Lens
WorkflowExecutionOpenCounts
WorkflowExecutionOpenCounts
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionOpenCounts' {Maybe Natural
openLambdaFunctions :: Maybe Natural
$sel:openLambdaFunctions:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Maybe Natural
openLambdaFunctions} -> Maybe Natural
openLambdaFunctions) (\s :: WorkflowExecutionOpenCounts
s@WorkflowExecutionOpenCounts' {} Maybe Natural
a -> WorkflowExecutionOpenCounts
s {$sel:openLambdaFunctions:WorkflowExecutionOpenCounts' :: Maybe Natural
openLambdaFunctions = Maybe Natural
a} :: WorkflowExecutionOpenCounts)
workflowExecutionOpenCounts_openActivityTasks :: Lens.Lens' WorkflowExecutionOpenCounts Prelude.Natural
workflowExecutionOpenCounts_openActivityTasks :: (Natural -> f Natural)
-> WorkflowExecutionOpenCounts -> f WorkflowExecutionOpenCounts
workflowExecutionOpenCounts_openActivityTasks = (WorkflowExecutionOpenCounts -> Natural)
-> (WorkflowExecutionOpenCounts
-> Natural -> WorkflowExecutionOpenCounts)
-> Lens
WorkflowExecutionOpenCounts
WorkflowExecutionOpenCounts
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionOpenCounts' {Natural
openActivityTasks :: Natural
$sel:openActivityTasks:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
openActivityTasks} -> Natural
openActivityTasks) (\s :: WorkflowExecutionOpenCounts
s@WorkflowExecutionOpenCounts' {} Natural
a -> WorkflowExecutionOpenCounts
s {$sel:openActivityTasks:WorkflowExecutionOpenCounts' :: Natural
openActivityTasks = Natural
a} :: WorkflowExecutionOpenCounts)
workflowExecutionOpenCounts_openDecisionTasks :: Lens.Lens' WorkflowExecutionOpenCounts Prelude.Natural
workflowExecutionOpenCounts_openDecisionTasks :: (Natural -> f Natural)
-> WorkflowExecutionOpenCounts -> f WorkflowExecutionOpenCounts
workflowExecutionOpenCounts_openDecisionTasks = (WorkflowExecutionOpenCounts -> Natural)
-> (WorkflowExecutionOpenCounts
-> Natural -> WorkflowExecutionOpenCounts)
-> Lens
WorkflowExecutionOpenCounts
WorkflowExecutionOpenCounts
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionOpenCounts' {Natural
openDecisionTasks :: Natural
$sel:openDecisionTasks:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
openDecisionTasks} -> Natural
openDecisionTasks) (\s :: WorkflowExecutionOpenCounts
s@WorkflowExecutionOpenCounts' {} Natural
a -> WorkflowExecutionOpenCounts
s {$sel:openDecisionTasks:WorkflowExecutionOpenCounts' :: Natural
openDecisionTasks = Natural
a} :: WorkflowExecutionOpenCounts)
workflowExecutionOpenCounts_openTimers :: Lens.Lens' WorkflowExecutionOpenCounts Prelude.Natural
workflowExecutionOpenCounts_openTimers :: (Natural -> f Natural)
-> WorkflowExecutionOpenCounts -> f WorkflowExecutionOpenCounts
workflowExecutionOpenCounts_openTimers = (WorkflowExecutionOpenCounts -> Natural)
-> (WorkflowExecutionOpenCounts
-> Natural -> WorkflowExecutionOpenCounts)
-> Lens
WorkflowExecutionOpenCounts
WorkflowExecutionOpenCounts
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionOpenCounts' {Natural
openTimers :: Natural
$sel:openTimers:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
openTimers} -> Natural
openTimers) (\s :: WorkflowExecutionOpenCounts
s@WorkflowExecutionOpenCounts' {} Natural
a -> WorkflowExecutionOpenCounts
s {$sel:openTimers:WorkflowExecutionOpenCounts' :: Natural
openTimers = Natural
a} :: WorkflowExecutionOpenCounts)
workflowExecutionOpenCounts_openChildWorkflowExecutions :: Lens.Lens' WorkflowExecutionOpenCounts Prelude.Natural
workflowExecutionOpenCounts_openChildWorkflowExecutions :: (Natural -> f Natural)
-> WorkflowExecutionOpenCounts -> f WorkflowExecutionOpenCounts
workflowExecutionOpenCounts_openChildWorkflowExecutions = (WorkflowExecutionOpenCounts -> Natural)
-> (WorkflowExecutionOpenCounts
-> Natural -> WorkflowExecutionOpenCounts)
-> Lens
WorkflowExecutionOpenCounts
WorkflowExecutionOpenCounts
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionOpenCounts' {Natural
openChildWorkflowExecutions :: Natural
$sel:openChildWorkflowExecutions:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
openChildWorkflowExecutions} -> Natural
openChildWorkflowExecutions) (\s :: WorkflowExecutionOpenCounts
s@WorkflowExecutionOpenCounts' {} Natural
a -> WorkflowExecutionOpenCounts
s {$sel:openChildWorkflowExecutions:WorkflowExecutionOpenCounts' :: Natural
openChildWorkflowExecutions = Natural
a} :: WorkflowExecutionOpenCounts)
instance Core.FromJSON WorkflowExecutionOpenCounts where
parseJSON :: Value -> Parser WorkflowExecutionOpenCounts
parseJSON =
String
-> (Object -> Parser WorkflowExecutionOpenCounts)
-> Value
-> Parser WorkflowExecutionOpenCounts
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkflowExecutionOpenCounts"
( \Object
x ->
Maybe Natural
-> Natural
-> Natural
-> Natural
-> Natural
-> WorkflowExecutionOpenCounts
WorkflowExecutionOpenCounts'
(Maybe Natural
-> Natural
-> Natural
-> Natural
-> Natural
-> WorkflowExecutionOpenCounts)
-> Parser (Maybe Natural)
-> Parser
(Natural
-> Natural -> Natural -> Natural -> WorkflowExecutionOpenCounts)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"openLambdaFunctions")
Parser
(Natural
-> Natural -> Natural -> Natural -> WorkflowExecutionOpenCounts)
-> Parser Natural
-> Parser
(Natural -> Natural -> Natural -> WorkflowExecutionOpenCounts)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"openActivityTasks")
Parser
(Natural -> Natural -> Natural -> WorkflowExecutionOpenCounts)
-> Parser Natural
-> Parser (Natural -> Natural -> WorkflowExecutionOpenCounts)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"openDecisionTasks")
Parser (Natural -> Natural -> WorkflowExecutionOpenCounts)
-> Parser Natural
-> Parser (Natural -> WorkflowExecutionOpenCounts)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"openTimers")
Parser (Natural -> WorkflowExecutionOpenCounts)
-> Parser Natural -> Parser WorkflowExecutionOpenCounts
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"openChildWorkflowExecutions")
)
instance Prelude.Hashable WorkflowExecutionOpenCounts
instance Prelude.NFData WorkflowExecutionOpenCounts