{-# 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.ServiceInsightHealth 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 ServiceInsightHealth = ServiceInsightHealth'
{
ServiceInsightHealth -> Maybe Int
openProactiveInsights :: Prelude.Maybe Prelude.Int,
ServiceInsightHealth -> Maybe Int
openReactiveInsights :: Prelude.Maybe Prelude.Int
}
deriving (ServiceInsightHealth -> ServiceInsightHealth -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceInsightHealth -> ServiceInsightHealth -> Bool
$c/= :: ServiceInsightHealth -> ServiceInsightHealth -> Bool
== :: ServiceInsightHealth -> ServiceInsightHealth -> Bool
$c== :: ServiceInsightHealth -> ServiceInsightHealth -> Bool
Prelude.Eq, ReadPrec [ServiceInsightHealth]
ReadPrec ServiceInsightHealth
Int -> ReadS ServiceInsightHealth
ReadS [ServiceInsightHealth]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceInsightHealth]
$creadListPrec :: ReadPrec [ServiceInsightHealth]
readPrec :: ReadPrec ServiceInsightHealth
$creadPrec :: ReadPrec ServiceInsightHealth
readList :: ReadS [ServiceInsightHealth]
$creadList :: ReadS [ServiceInsightHealth]
readsPrec :: Int -> ReadS ServiceInsightHealth
$creadsPrec :: Int -> ReadS ServiceInsightHealth
Prelude.Read, Int -> ServiceInsightHealth -> ShowS
[ServiceInsightHealth] -> ShowS
ServiceInsightHealth -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceInsightHealth] -> ShowS
$cshowList :: [ServiceInsightHealth] -> ShowS
show :: ServiceInsightHealth -> String
$cshow :: ServiceInsightHealth -> String
showsPrec :: Int -> ServiceInsightHealth -> ShowS
$cshowsPrec :: Int -> ServiceInsightHealth -> ShowS
Prelude.Show, forall x. Rep ServiceInsightHealth x -> ServiceInsightHealth
forall x. ServiceInsightHealth -> Rep ServiceInsightHealth x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceInsightHealth x -> ServiceInsightHealth
$cfrom :: forall x. ServiceInsightHealth -> Rep ServiceInsightHealth x
Prelude.Generic)
newServiceInsightHealth ::
ServiceInsightHealth
newServiceInsightHealth :: ServiceInsightHealth
newServiceInsightHealth =
ServiceInsightHealth'
{ $sel:openProactiveInsights:ServiceInsightHealth' :: Maybe Int
openProactiveInsights =
forall a. Maybe a
Prelude.Nothing,
$sel:openReactiveInsights:ServiceInsightHealth' :: Maybe Int
openReactiveInsights = forall a. Maybe a
Prelude.Nothing
}
serviceInsightHealth_openProactiveInsights :: Lens.Lens' ServiceInsightHealth (Prelude.Maybe Prelude.Int)
serviceInsightHealth_openProactiveInsights :: Lens' ServiceInsightHealth (Maybe Int)
serviceInsightHealth_openProactiveInsights = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInsightHealth' {Maybe Int
openProactiveInsights :: Maybe Int
$sel:openProactiveInsights:ServiceInsightHealth' :: ServiceInsightHealth -> Maybe Int
openProactiveInsights} -> Maybe Int
openProactiveInsights) (\s :: ServiceInsightHealth
s@ServiceInsightHealth' {} Maybe Int
a -> ServiceInsightHealth
s {$sel:openProactiveInsights:ServiceInsightHealth' :: Maybe Int
openProactiveInsights = Maybe Int
a} :: ServiceInsightHealth)
serviceInsightHealth_openReactiveInsights :: Lens.Lens' ServiceInsightHealth (Prelude.Maybe Prelude.Int)
serviceInsightHealth_openReactiveInsights :: Lens' ServiceInsightHealth (Maybe Int)
serviceInsightHealth_openReactiveInsights = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInsightHealth' {Maybe Int
openReactiveInsights :: Maybe Int
$sel:openReactiveInsights:ServiceInsightHealth' :: ServiceInsightHealth -> Maybe Int
openReactiveInsights} -> Maybe Int
openReactiveInsights) (\s :: ServiceInsightHealth
s@ServiceInsightHealth' {} Maybe Int
a -> ServiceInsightHealth
s {$sel:openReactiveInsights:ServiceInsightHealth' :: Maybe Int
openReactiveInsights = Maybe Int
a} :: ServiceInsightHealth)
instance Data.FromJSON ServiceInsightHealth where
parseJSON :: Value -> Parser ServiceInsightHealth
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ServiceInsightHealth"
( \Object
x ->
Maybe Int -> Maybe Int -> ServiceInsightHealth
ServiceInsightHealth'
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
"OpenProactiveInsights")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OpenReactiveInsights")
)
instance Prelude.Hashable ServiceInsightHealth where
hashWithSalt :: Int -> ServiceInsightHealth -> Int
hashWithSalt Int
_salt ServiceInsightHealth' {Maybe Int
openReactiveInsights :: Maybe Int
openProactiveInsights :: Maybe Int
$sel:openReactiveInsights:ServiceInsightHealth' :: ServiceInsightHealth -> Maybe Int
$sel:openProactiveInsights:ServiceInsightHealth' :: ServiceInsightHealth -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
openProactiveInsights
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
openReactiveInsights
instance Prelude.NFData ServiceInsightHealth where
rnf :: ServiceInsightHealth -> ()
rnf ServiceInsightHealth' {Maybe Int
openReactiveInsights :: Maybe Int
openProactiveInsights :: Maybe Int
$sel:openReactiveInsights:ServiceInsightHealth' :: ServiceInsightHealth -> Maybe Int
$sel:openProactiveInsights:ServiceInsightHealth' :: ServiceInsightHealth -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
openProactiveInsights
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
openReactiveInsights