{-# 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.Glue.Types.WorkflowRunStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WorkflowRunStatistics = WorkflowRunStatistics'
{
WorkflowRunStatistics -> Maybe Int
runningActions :: Prelude.Maybe Prelude.Int,
WorkflowRunStatistics -> Maybe Int
stoppedActions :: Prelude.Maybe Prelude.Int,
WorkflowRunStatistics -> Maybe Int
totalActions :: Prelude.Maybe Prelude.Int,
WorkflowRunStatistics -> Maybe Int
failedActions :: Prelude.Maybe Prelude.Int,
WorkflowRunStatistics -> Maybe Int
timeoutActions :: Prelude.Maybe Prelude.Int,
WorkflowRunStatistics -> Maybe Int
succeededActions :: Prelude.Maybe Prelude.Int
}
deriving (WorkflowRunStatistics -> WorkflowRunStatistics -> Bool
(WorkflowRunStatistics -> WorkflowRunStatistics -> Bool)
-> (WorkflowRunStatistics -> WorkflowRunStatistics -> Bool)
-> Eq WorkflowRunStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowRunStatistics -> WorkflowRunStatistics -> Bool
$c/= :: WorkflowRunStatistics -> WorkflowRunStatistics -> Bool
== :: WorkflowRunStatistics -> WorkflowRunStatistics -> Bool
$c== :: WorkflowRunStatistics -> WorkflowRunStatistics -> Bool
Prelude.Eq, ReadPrec [WorkflowRunStatistics]
ReadPrec WorkflowRunStatistics
Int -> ReadS WorkflowRunStatistics
ReadS [WorkflowRunStatistics]
(Int -> ReadS WorkflowRunStatistics)
-> ReadS [WorkflowRunStatistics]
-> ReadPrec WorkflowRunStatistics
-> ReadPrec [WorkflowRunStatistics]
-> Read WorkflowRunStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowRunStatistics]
$creadListPrec :: ReadPrec [WorkflowRunStatistics]
readPrec :: ReadPrec WorkflowRunStatistics
$creadPrec :: ReadPrec WorkflowRunStatistics
readList :: ReadS [WorkflowRunStatistics]
$creadList :: ReadS [WorkflowRunStatistics]
readsPrec :: Int -> ReadS WorkflowRunStatistics
$creadsPrec :: Int -> ReadS WorkflowRunStatistics
Prelude.Read, Int -> WorkflowRunStatistics -> ShowS
[WorkflowRunStatistics] -> ShowS
WorkflowRunStatistics -> String
(Int -> WorkflowRunStatistics -> ShowS)
-> (WorkflowRunStatistics -> String)
-> ([WorkflowRunStatistics] -> ShowS)
-> Show WorkflowRunStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowRunStatistics] -> ShowS
$cshowList :: [WorkflowRunStatistics] -> ShowS
show :: WorkflowRunStatistics -> String
$cshow :: WorkflowRunStatistics -> String
showsPrec :: Int -> WorkflowRunStatistics -> ShowS
$cshowsPrec :: Int -> WorkflowRunStatistics -> ShowS
Prelude.Show, (forall x. WorkflowRunStatistics -> Rep WorkflowRunStatistics x)
-> (forall x. Rep WorkflowRunStatistics x -> WorkflowRunStatistics)
-> Generic WorkflowRunStatistics
forall x. Rep WorkflowRunStatistics x -> WorkflowRunStatistics
forall x. WorkflowRunStatistics -> Rep WorkflowRunStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkflowRunStatistics x -> WorkflowRunStatistics
$cfrom :: forall x. WorkflowRunStatistics -> Rep WorkflowRunStatistics x
Prelude.Generic)
newWorkflowRunStatistics ::
WorkflowRunStatistics
newWorkflowRunStatistics :: WorkflowRunStatistics
newWorkflowRunStatistics =
WorkflowRunStatistics' :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> WorkflowRunStatistics
WorkflowRunStatistics'
{ $sel:runningActions:WorkflowRunStatistics' :: Maybe Int
runningActions =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:stoppedActions:WorkflowRunStatistics' :: Maybe Int
stoppedActions = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:totalActions:WorkflowRunStatistics' :: Maybe Int
totalActions = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:failedActions:WorkflowRunStatistics' :: Maybe Int
failedActions = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:timeoutActions:WorkflowRunStatistics' :: Maybe Int
timeoutActions = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:succeededActions:WorkflowRunStatistics' :: Maybe Int
succeededActions = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
workflowRunStatistics_runningActions :: Lens.Lens' WorkflowRunStatistics (Prelude.Maybe Prelude.Int)
workflowRunStatistics_runningActions :: (Maybe Int -> f (Maybe Int))
-> WorkflowRunStatistics -> f WorkflowRunStatistics
workflowRunStatistics_runningActions = (WorkflowRunStatistics -> Maybe Int)
-> (WorkflowRunStatistics -> Maybe Int -> WorkflowRunStatistics)
-> Lens
WorkflowRunStatistics WorkflowRunStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowRunStatistics' {Maybe Int
runningActions :: Maybe Int
$sel:runningActions:WorkflowRunStatistics' :: WorkflowRunStatistics -> Maybe Int
runningActions} -> Maybe Int
runningActions) (\s :: WorkflowRunStatistics
s@WorkflowRunStatistics' {} Maybe Int
a -> WorkflowRunStatistics
s {$sel:runningActions:WorkflowRunStatistics' :: Maybe Int
runningActions = Maybe Int
a} :: WorkflowRunStatistics)
workflowRunStatistics_stoppedActions :: Lens.Lens' WorkflowRunStatistics (Prelude.Maybe Prelude.Int)
workflowRunStatistics_stoppedActions :: (Maybe Int -> f (Maybe Int))
-> WorkflowRunStatistics -> f WorkflowRunStatistics
workflowRunStatistics_stoppedActions = (WorkflowRunStatistics -> Maybe Int)
-> (WorkflowRunStatistics -> Maybe Int -> WorkflowRunStatistics)
-> Lens
WorkflowRunStatistics WorkflowRunStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowRunStatistics' {Maybe Int
stoppedActions :: Maybe Int
$sel:stoppedActions:WorkflowRunStatistics' :: WorkflowRunStatistics -> Maybe Int
stoppedActions} -> Maybe Int
stoppedActions) (\s :: WorkflowRunStatistics
s@WorkflowRunStatistics' {} Maybe Int
a -> WorkflowRunStatistics
s {$sel:stoppedActions:WorkflowRunStatistics' :: Maybe Int
stoppedActions = Maybe Int
a} :: WorkflowRunStatistics)
workflowRunStatistics_totalActions :: Lens.Lens' WorkflowRunStatistics (Prelude.Maybe Prelude.Int)
workflowRunStatistics_totalActions :: (Maybe Int -> f (Maybe Int))
-> WorkflowRunStatistics -> f WorkflowRunStatistics
workflowRunStatistics_totalActions = (WorkflowRunStatistics -> Maybe Int)
-> (WorkflowRunStatistics -> Maybe Int -> WorkflowRunStatistics)
-> Lens
WorkflowRunStatistics WorkflowRunStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowRunStatistics' {Maybe Int
totalActions :: Maybe Int
$sel:totalActions:WorkflowRunStatistics' :: WorkflowRunStatistics -> Maybe Int
totalActions} -> Maybe Int
totalActions) (\s :: WorkflowRunStatistics
s@WorkflowRunStatistics' {} Maybe Int
a -> WorkflowRunStatistics
s {$sel:totalActions:WorkflowRunStatistics' :: Maybe Int
totalActions = Maybe Int
a} :: WorkflowRunStatistics)
workflowRunStatistics_failedActions :: Lens.Lens' WorkflowRunStatistics (Prelude.Maybe Prelude.Int)
workflowRunStatistics_failedActions :: (Maybe Int -> f (Maybe Int))
-> WorkflowRunStatistics -> f WorkflowRunStatistics
workflowRunStatistics_failedActions = (WorkflowRunStatistics -> Maybe Int)
-> (WorkflowRunStatistics -> Maybe Int -> WorkflowRunStatistics)
-> Lens
WorkflowRunStatistics WorkflowRunStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowRunStatistics' {Maybe Int
failedActions :: Maybe Int
$sel:failedActions:WorkflowRunStatistics' :: WorkflowRunStatistics -> Maybe Int
failedActions} -> Maybe Int
failedActions) (\s :: WorkflowRunStatistics
s@WorkflowRunStatistics' {} Maybe Int
a -> WorkflowRunStatistics
s {$sel:failedActions:WorkflowRunStatistics' :: Maybe Int
failedActions = Maybe Int
a} :: WorkflowRunStatistics)
workflowRunStatistics_timeoutActions :: Lens.Lens' WorkflowRunStatistics (Prelude.Maybe Prelude.Int)
workflowRunStatistics_timeoutActions :: (Maybe Int -> f (Maybe Int))
-> WorkflowRunStatistics -> f WorkflowRunStatistics
workflowRunStatistics_timeoutActions = (WorkflowRunStatistics -> Maybe Int)
-> (WorkflowRunStatistics -> Maybe Int -> WorkflowRunStatistics)
-> Lens
WorkflowRunStatistics WorkflowRunStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowRunStatistics' {Maybe Int
timeoutActions :: Maybe Int
$sel:timeoutActions:WorkflowRunStatistics' :: WorkflowRunStatistics -> Maybe Int
timeoutActions} -> Maybe Int
timeoutActions) (\s :: WorkflowRunStatistics
s@WorkflowRunStatistics' {} Maybe Int
a -> WorkflowRunStatistics
s {$sel:timeoutActions:WorkflowRunStatistics' :: Maybe Int
timeoutActions = Maybe Int
a} :: WorkflowRunStatistics)
workflowRunStatistics_succeededActions :: Lens.Lens' WorkflowRunStatistics (Prelude.Maybe Prelude.Int)
workflowRunStatistics_succeededActions :: (Maybe Int -> f (Maybe Int))
-> WorkflowRunStatistics -> f WorkflowRunStatistics
workflowRunStatistics_succeededActions = (WorkflowRunStatistics -> Maybe Int)
-> (WorkflowRunStatistics -> Maybe Int -> WorkflowRunStatistics)
-> Lens
WorkflowRunStatistics WorkflowRunStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowRunStatistics' {Maybe Int
succeededActions :: Maybe Int
$sel:succeededActions:WorkflowRunStatistics' :: WorkflowRunStatistics -> Maybe Int
succeededActions} -> Maybe Int
succeededActions) (\s :: WorkflowRunStatistics
s@WorkflowRunStatistics' {} Maybe Int
a -> WorkflowRunStatistics
s {$sel:succeededActions:WorkflowRunStatistics' :: Maybe Int
succeededActions = Maybe Int
a} :: WorkflowRunStatistics)
instance Core.FromJSON WorkflowRunStatistics where
parseJSON :: Value -> Parser WorkflowRunStatistics
parseJSON =
String
-> (Object -> Parser WorkflowRunStatistics)
-> Value
-> Parser WorkflowRunStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkflowRunStatistics"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> WorkflowRunStatistics
WorkflowRunStatistics'
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> WorkflowRunStatistics)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> WorkflowRunStatistics)
forall (f :: * -> *) a b. Functor 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
"RunningActions")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> WorkflowRunStatistics)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> WorkflowRunStatistics)
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
"StoppedActions")
Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> WorkflowRunStatistics)
-> Parser (Maybe Int)
-> Parser
(Maybe Int -> Maybe Int -> Maybe Int -> WorkflowRunStatistics)
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
"TotalActions")
Parser
(Maybe Int -> Maybe Int -> Maybe Int -> WorkflowRunStatistics)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Int -> WorkflowRunStatistics)
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
"FailedActions")
Parser (Maybe Int -> Maybe Int -> WorkflowRunStatistics)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> WorkflowRunStatistics)
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
"TimeoutActions")
Parser (Maybe Int -> WorkflowRunStatistics)
-> Parser (Maybe Int) -> Parser WorkflowRunStatistics
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
"SucceededActions")
)
instance Prelude.Hashable WorkflowRunStatistics
instance Prelude.NFData WorkflowRunStatistics