{-# 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.TaskStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TaskStatistics = TaskStatistics'
{
TaskStatistics -> Maybe Int
nonCompliantChecks :: Prelude.Maybe Prelude.Int,
TaskStatistics -> Maybe Int
waitingForDataCollectionChecks :: Prelude.Maybe Prelude.Int,
TaskStatistics -> Maybe Int
failedChecks :: Prelude.Maybe Prelude.Int,
TaskStatistics -> Maybe Int
totalChecks :: Prelude.Maybe Prelude.Int,
TaskStatistics -> Maybe Int
inProgressChecks :: Prelude.Maybe Prelude.Int,
TaskStatistics -> Maybe Int
compliantChecks :: Prelude.Maybe Prelude.Int,
TaskStatistics -> Maybe Int
canceledChecks :: Prelude.Maybe Prelude.Int
}
deriving (TaskStatistics -> TaskStatistics -> Bool
(TaskStatistics -> TaskStatistics -> Bool)
-> (TaskStatistics -> TaskStatistics -> Bool) -> Eq TaskStatistics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TaskStatistics -> TaskStatistics -> Bool
$c/= :: TaskStatistics -> TaskStatistics -> Bool
== :: TaskStatistics -> TaskStatistics -> Bool
$c== :: TaskStatistics -> TaskStatistics -> Bool
Prelude.Eq, ReadPrec [TaskStatistics]
ReadPrec TaskStatistics
Int -> ReadS TaskStatistics
ReadS [TaskStatistics]
(Int -> ReadS TaskStatistics)
-> ReadS [TaskStatistics]
-> ReadPrec TaskStatistics
-> ReadPrec [TaskStatistics]
-> Read TaskStatistics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TaskStatistics]
$creadListPrec :: ReadPrec [TaskStatistics]
readPrec :: ReadPrec TaskStatistics
$creadPrec :: ReadPrec TaskStatistics
readList :: ReadS [TaskStatistics]
$creadList :: ReadS [TaskStatistics]
readsPrec :: Int -> ReadS TaskStatistics
$creadsPrec :: Int -> ReadS TaskStatistics
Prelude.Read, Int -> TaskStatistics -> ShowS
[TaskStatistics] -> ShowS
TaskStatistics -> String
(Int -> TaskStatistics -> ShowS)
-> (TaskStatistics -> String)
-> ([TaskStatistics] -> ShowS)
-> Show TaskStatistics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TaskStatistics] -> ShowS
$cshowList :: [TaskStatistics] -> ShowS
show :: TaskStatistics -> String
$cshow :: TaskStatistics -> String
showsPrec :: Int -> TaskStatistics -> ShowS
$cshowsPrec :: Int -> TaskStatistics -> ShowS
Prelude.Show, (forall x. TaskStatistics -> Rep TaskStatistics x)
-> (forall x. Rep TaskStatistics x -> TaskStatistics)
-> Generic TaskStatistics
forall x. Rep TaskStatistics x -> TaskStatistics
forall x. TaskStatistics -> Rep TaskStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TaskStatistics x -> TaskStatistics
$cfrom :: forall x. TaskStatistics -> Rep TaskStatistics x
Prelude.Generic)
newTaskStatistics ::
TaskStatistics
newTaskStatistics :: TaskStatistics
newTaskStatistics =
TaskStatistics' :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> TaskStatistics
TaskStatistics'
{ $sel:nonCompliantChecks:TaskStatistics' :: Maybe Int
nonCompliantChecks =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:waitingForDataCollectionChecks:TaskStatistics' :: Maybe Int
waitingForDataCollectionChecks = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:failedChecks:TaskStatistics' :: Maybe Int
failedChecks = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:totalChecks:TaskStatistics' :: Maybe Int
totalChecks = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:inProgressChecks:TaskStatistics' :: Maybe Int
inProgressChecks = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:compliantChecks:TaskStatistics' :: Maybe Int
compliantChecks = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:canceledChecks:TaskStatistics' :: Maybe Int
canceledChecks = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
taskStatistics_nonCompliantChecks :: Lens.Lens' TaskStatistics (Prelude.Maybe Prelude.Int)
taskStatistics_nonCompliantChecks :: (Maybe Int -> f (Maybe Int)) -> TaskStatistics -> f TaskStatistics
taskStatistics_nonCompliantChecks = (TaskStatistics -> Maybe Int)
-> (TaskStatistics -> Maybe Int -> TaskStatistics)
-> Lens TaskStatistics TaskStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskStatistics' {Maybe Int
nonCompliantChecks :: Maybe Int
$sel:nonCompliantChecks:TaskStatistics' :: TaskStatistics -> Maybe Int
nonCompliantChecks} -> Maybe Int
nonCompliantChecks) (\s :: TaskStatistics
s@TaskStatistics' {} Maybe Int
a -> TaskStatistics
s {$sel:nonCompliantChecks:TaskStatistics' :: Maybe Int
nonCompliantChecks = Maybe Int
a} :: TaskStatistics)
taskStatistics_waitingForDataCollectionChecks :: Lens.Lens' TaskStatistics (Prelude.Maybe Prelude.Int)
taskStatistics_waitingForDataCollectionChecks :: (Maybe Int -> f (Maybe Int)) -> TaskStatistics -> f TaskStatistics
taskStatistics_waitingForDataCollectionChecks = (TaskStatistics -> Maybe Int)
-> (TaskStatistics -> Maybe Int -> TaskStatistics)
-> Lens TaskStatistics TaskStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskStatistics' {Maybe Int
waitingForDataCollectionChecks :: Maybe Int
$sel:waitingForDataCollectionChecks:TaskStatistics' :: TaskStatistics -> Maybe Int
waitingForDataCollectionChecks} -> Maybe Int
waitingForDataCollectionChecks) (\s :: TaskStatistics
s@TaskStatistics' {} Maybe Int
a -> TaskStatistics
s {$sel:waitingForDataCollectionChecks:TaskStatistics' :: Maybe Int
waitingForDataCollectionChecks = Maybe Int
a} :: TaskStatistics)
taskStatistics_failedChecks :: Lens.Lens' TaskStatistics (Prelude.Maybe Prelude.Int)
taskStatistics_failedChecks :: (Maybe Int -> f (Maybe Int)) -> TaskStatistics -> f TaskStatistics
taskStatistics_failedChecks = (TaskStatistics -> Maybe Int)
-> (TaskStatistics -> Maybe Int -> TaskStatistics)
-> Lens TaskStatistics TaskStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskStatistics' {Maybe Int
failedChecks :: Maybe Int
$sel:failedChecks:TaskStatistics' :: TaskStatistics -> Maybe Int
failedChecks} -> Maybe Int
failedChecks) (\s :: TaskStatistics
s@TaskStatistics' {} Maybe Int
a -> TaskStatistics
s {$sel:failedChecks:TaskStatistics' :: Maybe Int
failedChecks = Maybe Int
a} :: TaskStatistics)
taskStatistics_totalChecks :: Lens.Lens' TaskStatistics (Prelude.Maybe Prelude.Int)
taskStatistics_totalChecks :: (Maybe Int -> f (Maybe Int)) -> TaskStatistics -> f TaskStatistics
taskStatistics_totalChecks = (TaskStatistics -> Maybe Int)
-> (TaskStatistics -> Maybe Int -> TaskStatistics)
-> Lens TaskStatistics TaskStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskStatistics' {Maybe Int
totalChecks :: Maybe Int
$sel:totalChecks:TaskStatistics' :: TaskStatistics -> Maybe Int
totalChecks} -> Maybe Int
totalChecks) (\s :: TaskStatistics
s@TaskStatistics' {} Maybe Int
a -> TaskStatistics
s {$sel:totalChecks:TaskStatistics' :: Maybe Int
totalChecks = Maybe Int
a} :: TaskStatistics)
taskStatistics_inProgressChecks :: Lens.Lens' TaskStatistics (Prelude.Maybe Prelude.Int)
taskStatistics_inProgressChecks :: (Maybe Int -> f (Maybe Int)) -> TaskStatistics -> f TaskStatistics
taskStatistics_inProgressChecks = (TaskStatistics -> Maybe Int)
-> (TaskStatistics -> Maybe Int -> TaskStatistics)
-> Lens TaskStatistics TaskStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskStatistics' {Maybe Int
inProgressChecks :: Maybe Int
$sel:inProgressChecks:TaskStatistics' :: TaskStatistics -> Maybe Int
inProgressChecks} -> Maybe Int
inProgressChecks) (\s :: TaskStatistics
s@TaskStatistics' {} Maybe Int
a -> TaskStatistics
s {$sel:inProgressChecks:TaskStatistics' :: Maybe Int
inProgressChecks = Maybe Int
a} :: TaskStatistics)
taskStatistics_compliantChecks :: Lens.Lens' TaskStatistics (Prelude.Maybe Prelude.Int)
taskStatistics_compliantChecks :: (Maybe Int -> f (Maybe Int)) -> TaskStatistics -> f TaskStatistics
taskStatistics_compliantChecks = (TaskStatistics -> Maybe Int)
-> (TaskStatistics -> Maybe Int -> TaskStatistics)
-> Lens TaskStatistics TaskStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskStatistics' {Maybe Int
compliantChecks :: Maybe Int
$sel:compliantChecks:TaskStatistics' :: TaskStatistics -> Maybe Int
compliantChecks} -> Maybe Int
compliantChecks) (\s :: TaskStatistics
s@TaskStatistics' {} Maybe Int
a -> TaskStatistics
s {$sel:compliantChecks:TaskStatistics' :: Maybe Int
compliantChecks = Maybe Int
a} :: TaskStatistics)
taskStatistics_canceledChecks :: Lens.Lens' TaskStatistics (Prelude.Maybe Prelude.Int)
taskStatistics_canceledChecks :: (Maybe Int -> f (Maybe Int)) -> TaskStatistics -> f TaskStatistics
taskStatistics_canceledChecks = (TaskStatistics -> Maybe Int)
-> (TaskStatistics -> Maybe Int -> TaskStatistics)
-> Lens TaskStatistics TaskStatistics (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskStatistics' {Maybe Int
canceledChecks :: Maybe Int
$sel:canceledChecks:TaskStatistics' :: TaskStatistics -> Maybe Int
canceledChecks} -> Maybe Int
canceledChecks) (\s :: TaskStatistics
s@TaskStatistics' {} Maybe Int
a -> TaskStatistics
s {$sel:canceledChecks:TaskStatistics' :: Maybe Int
canceledChecks = Maybe Int
a} :: TaskStatistics)
instance Core.FromJSON TaskStatistics where
parseJSON :: Value -> Parser TaskStatistics
parseJSON =
String
-> (Object -> Parser TaskStatistics)
-> Value
-> Parser TaskStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TaskStatistics"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> TaskStatistics
TaskStatistics'
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> TaskStatistics)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> TaskStatistics)
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
"nonCompliantChecks")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> TaskStatistics)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> TaskStatistics)
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
"waitingForDataCollectionChecks")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> TaskStatistics)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> TaskStatistics)
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
"failedChecks")
Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> TaskStatistics)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Int -> Maybe Int -> TaskStatistics)
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
"totalChecks")
Parser (Maybe Int -> Maybe Int -> Maybe Int -> TaskStatistics)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Int -> TaskStatistics)
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
"inProgressChecks")
Parser (Maybe Int -> Maybe Int -> TaskStatistics)
-> Parser (Maybe Int) -> Parser (Maybe Int -> TaskStatistics)
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
"compliantChecks")
Parser (Maybe Int -> TaskStatistics)
-> Parser (Maybe Int) -> Parser TaskStatistics
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
"canceledChecks")
)
instance Prelude.Hashable TaskStatistics
instance Prelude.NFData TaskStatistics