{-# 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.DevOpsGuru.Types.InsightHealth where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InsightHealth = InsightHealth'
{
InsightHealth -> Maybe Integer
meanTimeToRecoverInMilliseconds :: Prelude.Maybe Prelude.Integer,
InsightHealth -> Maybe Int
openReactiveInsights :: Prelude.Maybe Prelude.Int,
InsightHealth -> Maybe Int
openProactiveInsights :: Prelude.Maybe Prelude.Int
}
deriving (InsightHealth -> InsightHealth -> Bool
(InsightHealth -> InsightHealth -> Bool)
-> (InsightHealth -> InsightHealth -> Bool) -> Eq InsightHealth
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InsightHealth -> InsightHealth -> Bool
$c/= :: InsightHealth -> InsightHealth -> Bool
== :: InsightHealth -> InsightHealth -> Bool
$c== :: InsightHealth -> InsightHealth -> Bool
Prelude.Eq, ReadPrec [InsightHealth]
ReadPrec InsightHealth
Int -> ReadS InsightHealth
ReadS [InsightHealth]
(Int -> ReadS InsightHealth)
-> ReadS [InsightHealth]
-> ReadPrec InsightHealth
-> ReadPrec [InsightHealth]
-> Read InsightHealth
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InsightHealth]
$creadListPrec :: ReadPrec [InsightHealth]
readPrec :: ReadPrec InsightHealth
$creadPrec :: ReadPrec InsightHealth
readList :: ReadS [InsightHealth]
$creadList :: ReadS [InsightHealth]
readsPrec :: Int -> ReadS InsightHealth
$creadsPrec :: Int -> ReadS InsightHealth
Prelude.Read, Int -> InsightHealth -> ShowS
[InsightHealth] -> ShowS
InsightHealth -> String
(Int -> InsightHealth -> ShowS)
-> (InsightHealth -> String)
-> ([InsightHealth] -> ShowS)
-> Show InsightHealth
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InsightHealth] -> ShowS
$cshowList :: [InsightHealth] -> ShowS
show :: InsightHealth -> String
$cshow :: InsightHealth -> String
showsPrec :: Int -> InsightHealth -> ShowS
$cshowsPrec :: Int -> InsightHealth -> ShowS
Prelude.Show, (forall x. InsightHealth -> Rep InsightHealth x)
-> (forall x. Rep InsightHealth x -> InsightHealth)
-> Generic InsightHealth
forall x. Rep InsightHealth x -> InsightHealth
forall x. InsightHealth -> Rep InsightHealth x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InsightHealth x -> InsightHealth
$cfrom :: forall x. InsightHealth -> Rep InsightHealth x
Prelude.Generic)
newInsightHealth ::
InsightHealth
newInsightHealth :: InsightHealth
newInsightHealth =
InsightHealth' :: Maybe Integer -> Maybe Int -> Maybe Int -> InsightHealth
InsightHealth'
{ $sel:meanTimeToRecoverInMilliseconds:InsightHealth' :: Maybe Integer
meanTimeToRecoverInMilliseconds =
Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:openReactiveInsights:InsightHealth' :: Maybe Int
openReactiveInsights = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:openProactiveInsights:InsightHealth' :: Maybe Int
openProactiveInsights = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
insightHealth_meanTimeToRecoverInMilliseconds :: Lens.Lens' InsightHealth (Prelude.Maybe Prelude.Integer)
insightHealth_meanTimeToRecoverInMilliseconds :: (Maybe Integer -> f (Maybe Integer))
-> InsightHealth -> f InsightHealth
insightHealth_meanTimeToRecoverInMilliseconds = (InsightHealth -> Maybe Integer)
-> (InsightHealth -> Maybe Integer -> InsightHealth)
-> Lens InsightHealth InsightHealth (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightHealth' {Maybe Integer
meanTimeToRecoverInMilliseconds :: Maybe Integer
$sel:meanTimeToRecoverInMilliseconds:InsightHealth' :: InsightHealth -> Maybe Integer
meanTimeToRecoverInMilliseconds} -> Maybe Integer
meanTimeToRecoverInMilliseconds) (\s :: InsightHealth
s@InsightHealth' {} Maybe Integer
a -> InsightHealth
s {$sel:meanTimeToRecoverInMilliseconds:InsightHealth' :: Maybe Integer
meanTimeToRecoverInMilliseconds = Maybe Integer
a} :: InsightHealth)
insightHealth_openReactiveInsights :: Lens.Lens' InsightHealth (Prelude.Maybe Prelude.Int)
insightHealth_openReactiveInsights :: (Maybe Int -> f (Maybe Int)) -> InsightHealth -> f InsightHealth
insightHealth_openReactiveInsights = (InsightHealth -> Maybe Int)
-> (InsightHealth -> Maybe Int -> InsightHealth)
-> Lens InsightHealth InsightHealth (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightHealth' {Maybe Int
openReactiveInsights :: Maybe Int
$sel:openReactiveInsights:InsightHealth' :: InsightHealth -> Maybe Int
openReactiveInsights} -> Maybe Int
openReactiveInsights) (\s :: InsightHealth
s@InsightHealth' {} Maybe Int
a -> InsightHealth
s {$sel:openReactiveInsights:InsightHealth' :: Maybe Int
openReactiveInsights = Maybe Int
a} :: InsightHealth)
insightHealth_openProactiveInsights :: Lens.Lens' InsightHealth (Prelude.Maybe Prelude.Int)
insightHealth_openProactiveInsights :: (Maybe Int -> f (Maybe Int)) -> InsightHealth -> f InsightHealth
insightHealth_openProactiveInsights = (InsightHealth -> Maybe Int)
-> (InsightHealth -> Maybe Int -> InsightHealth)
-> Lens InsightHealth InsightHealth (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightHealth' {Maybe Int
openProactiveInsights :: Maybe Int
$sel:openProactiveInsights:InsightHealth' :: InsightHealth -> Maybe Int
openProactiveInsights} -> Maybe Int
openProactiveInsights) (\s :: InsightHealth
s@InsightHealth' {} Maybe Int
a -> InsightHealth
s {$sel:openProactiveInsights:InsightHealth' :: Maybe Int
openProactiveInsights = Maybe Int
a} :: InsightHealth)
instance Core.FromJSON InsightHealth where
parseJSON :: Value -> Parser InsightHealth
parseJSON =
String
-> (Object -> Parser InsightHealth)
-> Value
-> Parser InsightHealth
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InsightHealth"
( \Object
x ->
Maybe Integer -> Maybe Int -> Maybe Int -> InsightHealth
InsightHealth'
(Maybe Integer -> Maybe Int -> Maybe Int -> InsightHealth)
-> Parser (Maybe Integer)
-> Parser (Maybe Int -> Maybe Int -> InsightHealth)
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
"MeanTimeToRecoverInMilliseconds")
Parser (Maybe Int -> Maybe Int -> InsightHealth)
-> Parser (Maybe Int) -> Parser (Maybe Int -> InsightHealth)
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
"OpenReactiveInsights")
Parser (Maybe Int -> InsightHealth)
-> Parser (Maybe Int) -> Parser InsightHealth
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
"OpenProactiveInsights")
)
instance Prelude.Hashable InsightHealth
instance Prelude.NFData InsightHealth