{-# 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.IoT.Types.DetectMitigationActionsTaskStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DetectMitigationActionsTaskStatistics = DetectMitigationActionsTaskStatistics'
{
DetectMitigationActionsTaskStatistics -> Maybe Integer
actionsFailed :: Prelude.Maybe Prelude.Integer,
DetectMitigationActionsTaskStatistics -> Maybe Integer
actionsSkipped :: Prelude.Maybe Prelude.Integer,
DetectMitigationActionsTaskStatistics -> Maybe Integer
actionsExecuted :: Prelude.Maybe Prelude.Integer
}
deriving (DetectMitigationActionsTaskStatistics
-> DetectMitigationActionsTaskStatistics -> Bool
(DetectMitigationActionsTaskStatistics
-> DetectMitigationActionsTaskStatistics -> Bool)
-> (DetectMitigationActionsTaskStatistics
-> DetectMitigationActionsTaskStatistics -> Bool)
-> Eq DetectMitigationActionsTaskStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectMitigationActionsTaskStatistics
-> DetectMitigationActionsTaskStatistics -> Bool
$c/= :: DetectMitigationActionsTaskStatistics
-> DetectMitigationActionsTaskStatistics -> Bool
== :: DetectMitigationActionsTaskStatistics
-> DetectMitigationActionsTaskStatistics -> Bool
$c== :: DetectMitigationActionsTaskStatistics
-> DetectMitigationActionsTaskStatistics -> Bool
Prelude.Eq, ReadPrec [DetectMitigationActionsTaskStatistics]
ReadPrec DetectMitigationActionsTaskStatistics
Int -> ReadS DetectMitigationActionsTaskStatistics
ReadS [DetectMitigationActionsTaskStatistics]
(Int -> ReadS DetectMitigationActionsTaskStatistics)
-> ReadS [DetectMitigationActionsTaskStatistics]
-> ReadPrec DetectMitigationActionsTaskStatistics
-> ReadPrec [DetectMitigationActionsTaskStatistics]
-> Read DetectMitigationActionsTaskStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectMitigationActionsTaskStatistics]
$creadListPrec :: ReadPrec [DetectMitigationActionsTaskStatistics]
readPrec :: ReadPrec DetectMitigationActionsTaskStatistics
$creadPrec :: ReadPrec DetectMitigationActionsTaskStatistics
readList :: ReadS [DetectMitigationActionsTaskStatistics]
$creadList :: ReadS [DetectMitigationActionsTaskStatistics]
readsPrec :: Int -> ReadS DetectMitigationActionsTaskStatistics
$creadsPrec :: Int -> ReadS DetectMitigationActionsTaskStatistics
Prelude.Read, Int -> DetectMitigationActionsTaskStatistics -> ShowS
[DetectMitigationActionsTaskStatistics] -> ShowS
DetectMitigationActionsTaskStatistics -> String
(Int -> DetectMitigationActionsTaskStatistics -> ShowS)
-> (DetectMitigationActionsTaskStatistics -> String)
-> ([DetectMitigationActionsTaskStatistics] -> ShowS)
-> Show DetectMitigationActionsTaskStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectMitigationActionsTaskStatistics] -> ShowS
$cshowList :: [DetectMitigationActionsTaskStatistics] -> ShowS
show :: DetectMitigationActionsTaskStatistics -> String
$cshow :: DetectMitigationActionsTaskStatistics -> String
showsPrec :: Int -> DetectMitigationActionsTaskStatistics -> ShowS
$cshowsPrec :: Int -> DetectMitigationActionsTaskStatistics -> ShowS
Prelude.Show, (forall x.
DetectMitigationActionsTaskStatistics
-> Rep DetectMitigationActionsTaskStatistics x)
-> (forall x.
Rep DetectMitigationActionsTaskStatistics x
-> DetectMitigationActionsTaskStatistics)
-> Generic DetectMitigationActionsTaskStatistics
forall x.
Rep DetectMitigationActionsTaskStatistics x
-> DetectMitigationActionsTaskStatistics
forall x.
DetectMitigationActionsTaskStatistics
-> Rep DetectMitigationActionsTaskStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetectMitigationActionsTaskStatistics x
-> DetectMitigationActionsTaskStatistics
$cfrom :: forall x.
DetectMitigationActionsTaskStatistics
-> Rep DetectMitigationActionsTaskStatistics x
Prelude.Generic)
newDetectMitigationActionsTaskStatistics ::
DetectMitigationActionsTaskStatistics
newDetectMitigationActionsTaskStatistics :: DetectMitigationActionsTaskStatistics
newDetectMitigationActionsTaskStatistics =
DetectMitigationActionsTaskStatistics' :: Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DetectMitigationActionsTaskStatistics
DetectMitigationActionsTaskStatistics'
{ $sel:actionsFailed:DetectMitigationActionsTaskStatistics' :: Maybe Integer
actionsFailed =
Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:actionsSkipped:DetectMitigationActionsTaskStatistics' :: Maybe Integer
actionsSkipped = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:actionsExecuted:DetectMitigationActionsTaskStatistics' :: Maybe Integer
actionsExecuted = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
detectMitigationActionsTaskStatistics_actionsFailed :: Lens.Lens' DetectMitigationActionsTaskStatistics (Prelude.Maybe Prelude.Integer)
detectMitigationActionsTaskStatistics_actionsFailed :: (Maybe Integer -> f (Maybe Integer))
-> DetectMitigationActionsTaskStatistics
-> f DetectMitigationActionsTaskStatistics
detectMitigationActionsTaskStatistics_actionsFailed = (DetectMitigationActionsTaskStatistics -> Maybe Integer)
-> (DetectMitigationActionsTaskStatistics
-> Maybe Integer -> DetectMitigationActionsTaskStatistics)
-> Lens
DetectMitigationActionsTaskStatistics
DetectMitigationActionsTaskStatistics
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionsTaskStatistics' {Maybe Integer
actionsFailed :: Maybe Integer
$sel:actionsFailed:DetectMitigationActionsTaskStatistics' :: DetectMitigationActionsTaskStatistics -> Maybe Integer
actionsFailed} -> Maybe Integer
actionsFailed) (\s :: DetectMitigationActionsTaskStatistics
s@DetectMitigationActionsTaskStatistics' {} Maybe Integer
a -> DetectMitigationActionsTaskStatistics
s {$sel:actionsFailed:DetectMitigationActionsTaskStatistics' :: Maybe Integer
actionsFailed = Maybe Integer
a} :: DetectMitigationActionsTaskStatistics)
detectMitigationActionsTaskStatistics_actionsSkipped :: Lens.Lens' DetectMitigationActionsTaskStatistics (Prelude.Maybe Prelude.Integer)
detectMitigationActionsTaskStatistics_actionsSkipped :: (Maybe Integer -> f (Maybe Integer))
-> DetectMitigationActionsTaskStatistics
-> f DetectMitigationActionsTaskStatistics
detectMitigationActionsTaskStatistics_actionsSkipped = (DetectMitigationActionsTaskStatistics -> Maybe Integer)
-> (DetectMitigationActionsTaskStatistics
-> Maybe Integer -> DetectMitigationActionsTaskStatistics)
-> Lens
DetectMitigationActionsTaskStatistics
DetectMitigationActionsTaskStatistics
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionsTaskStatistics' {Maybe Integer
actionsSkipped :: Maybe Integer
$sel:actionsSkipped:DetectMitigationActionsTaskStatistics' :: DetectMitigationActionsTaskStatistics -> Maybe Integer
actionsSkipped} -> Maybe Integer
actionsSkipped) (\s :: DetectMitigationActionsTaskStatistics
s@DetectMitigationActionsTaskStatistics' {} Maybe Integer
a -> DetectMitigationActionsTaskStatistics
s {$sel:actionsSkipped:DetectMitigationActionsTaskStatistics' :: Maybe Integer
actionsSkipped = Maybe Integer
a} :: DetectMitigationActionsTaskStatistics)
detectMitigationActionsTaskStatistics_actionsExecuted :: Lens.Lens' DetectMitigationActionsTaskStatistics (Prelude.Maybe Prelude.Integer)
detectMitigationActionsTaskStatistics_actionsExecuted :: (Maybe Integer -> f (Maybe Integer))
-> DetectMitigationActionsTaskStatistics
-> f DetectMitigationActionsTaskStatistics
detectMitigationActionsTaskStatistics_actionsExecuted = (DetectMitigationActionsTaskStatistics -> Maybe Integer)
-> (DetectMitigationActionsTaskStatistics
-> Maybe Integer -> DetectMitigationActionsTaskStatistics)
-> Lens
DetectMitigationActionsTaskStatistics
DetectMitigationActionsTaskStatistics
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectMitigationActionsTaskStatistics' {Maybe Integer
actionsExecuted :: Maybe Integer
$sel:actionsExecuted:DetectMitigationActionsTaskStatistics' :: DetectMitigationActionsTaskStatistics -> Maybe Integer
actionsExecuted} -> Maybe Integer
actionsExecuted) (\s :: DetectMitigationActionsTaskStatistics
s@DetectMitigationActionsTaskStatistics' {} Maybe Integer
a -> DetectMitigationActionsTaskStatistics
s {$sel:actionsExecuted:DetectMitigationActionsTaskStatistics' :: Maybe Integer
actionsExecuted = Maybe Integer
a} :: DetectMitigationActionsTaskStatistics)
instance
Core.FromJSON
DetectMitigationActionsTaskStatistics
where
parseJSON :: Value -> Parser DetectMitigationActionsTaskStatistics
parseJSON =
String
-> (Object -> Parser DetectMitigationActionsTaskStatistics)
-> Value
-> Parser DetectMitigationActionsTaskStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DetectMitigationActionsTaskStatistics"
( \Object
x ->
Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DetectMitigationActionsTaskStatistics
DetectMitigationActionsTaskStatistics'
(Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> DetectMitigationActionsTaskStatistics)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer
-> Maybe Integer -> DetectMitigationActionsTaskStatistics)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"actionsFailed")
Parser
(Maybe Integer
-> Maybe Integer -> DetectMitigationActionsTaskStatistics)
-> Parser (Maybe Integer)
-> Parser (Maybe Integer -> DetectMitigationActionsTaskStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"actionsSkipped")
Parser (Maybe Integer -> DetectMitigationActionsTaskStatistics)
-> Parser (Maybe Integer)
-> Parser DetectMitigationActionsTaskStatistics
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"actionsExecuted")
)
instance
Prelude.Hashable
DetectMitigationActionsTaskStatistics
instance
Prelude.NFData
DetectMitigationActionsTaskStatistics