{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:openLambdaFunctions:WorkflowExecutionOpenCounts' :: Maybe Natural
openLambdaFunctions =
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 :: Lens' WorkflowExecutionOpenCounts (Maybe Natural)
workflowExecutionOpenCounts_openLambdaFunctions = 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 :: Lens' WorkflowExecutionOpenCounts Natural
workflowExecutionOpenCounts_openActivityTasks = 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 :: Lens' WorkflowExecutionOpenCounts Natural
workflowExecutionOpenCounts_openDecisionTasks = 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 :: Lens' WorkflowExecutionOpenCounts Natural
workflowExecutionOpenCounts_openTimers = 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 :: Lens' WorkflowExecutionOpenCounts Natural
workflowExecutionOpenCounts_openChildWorkflowExecutions = 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 Data.FromJSON WorkflowExecutionOpenCounts where
parseJSON :: Value -> Parser WorkflowExecutionOpenCounts
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WorkflowExecutionOpenCounts"
( \Object
x ->
Maybe Natural
-> Natural
-> Natural
-> Natural
-> Natural
-> WorkflowExecutionOpenCounts
WorkflowExecutionOpenCounts'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"openLambdaFunctions")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"openActivityTasks")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"openDecisionTasks")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"openTimers")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"openChildWorkflowExecutions")
)
instance Prelude.Hashable WorkflowExecutionOpenCounts where
hashWithSalt :: Int -> WorkflowExecutionOpenCounts -> Int
hashWithSalt Int
_salt WorkflowExecutionOpenCounts' {Natural
Maybe Natural
openChildWorkflowExecutions :: Natural
openTimers :: Natural
openDecisionTasks :: Natural
openActivityTasks :: Natural
openLambdaFunctions :: Maybe Natural
$sel:openChildWorkflowExecutions:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
$sel:openTimers:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
$sel:openDecisionTasks:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
$sel:openActivityTasks:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
$sel:openLambdaFunctions:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
openLambdaFunctions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
openActivityTasks
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
openDecisionTasks
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
openTimers
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
openChildWorkflowExecutions
instance Prelude.NFData WorkflowExecutionOpenCounts where
rnf :: WorkflowExecutionOpenCounts -> ()
rnf WorkflowExecutionOpenCounts' {Natural
Maybe Natural
openChildWorkflowExecutions :: Natural
openTimers :: Natural
openDecisionTasks :: Natural
openActivityTasks :: Natural
openLambdaFunctions :: Maybe Natural
$sel:openChildWorkflowExecutions:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
$sel:openTimers:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
$sel:openDecisionTasks:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
$sel:openActivityTasks:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Natural
$sel:openLambdaFunctions:WorkflowExecutionOpenCounts' :: WorkflowExecutionOpenCounts -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
openLambdaFunctions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
openActivityTasks
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
openDecisionTasks
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
openTimers
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
openChildWorkflowExecutions