{-# 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.CloudFormationHealth where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DevOpsGuru.Types.InsightHealth
import qualified Amazonka.Prelude as Prelude
data CloudFormationHealth = CloudFormationHealth'
{
CloudFormationHealth -> Maybe Integer
analyzedResourceCount :: Prelude.Maybe Prelude.Integer,
CloudFormationHealth -> Maybe InsightHealth
insight :: Prelude.Maybe InsightHealth,
CloudFormationHealth -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text
}
deriving (CloudFormationHealth -> CloudFormationHealth -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudFormationHealth -> CloudFormationHealth -> Bool
$c/= :: CloudFormationHealth -> CloudFormationHealth -> Bool
== :: CloudFormationHealth -> CloudFormationHealth -> Bool
$c== :: CloudFormationHealth -> CloudFormationHealth -> Bool
Prelude.Eq, ReadPrec [CloudFormationHealth]
ReadPrec CloudFormationHealth
Int -> ReadS CloudFormationHealth
ReadS [CloudFormationHealth]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudFormationHealth]
$creadListPrec :: ReadPrec [CloudFormationHealth]
readPrec :: ReadPrec CloudFormationHealth
$creadPrec :: ReadPrec CloudFormationHealth
readList :: ReadS [CloudFormationHealth]
$creadList :: ReadS [CloudFormationHealth]
readsPrec :: Int -> ReadS CloudFormationHealth
$creadsPrec :: Int -> ReadS CloudFormationHealth
Prelude.Read, Int -> CloudFormationHealth -> ShowS
[CloudFormationHealth] -> ShowS
CloudFormationHealth -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudFormationHealth] -> ShowS
$cshowList :: [CloudFormationHealth] -> ShowS
show :: CloudFormationHealth -> String
$cshow :: CloudFormationHealth -> String
showsPrec :: Int -> CloudFormationHealth -> ShowS
$cshowsPrec :: Int -> CloudFormationHealth -> ShowS
Prelude.Show, forall x. Rep CloudFormationHealth x -> CloudFormationHealth
forall x. CloudFormationHealth -> Rep CloudFormationHealth x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CloudFormationHealth x -> CloudFormationHealth
$cfrom :: forall x. CloudFormationHealth -> Rep CloudFormationHealth x
Prelude.Generic)
newCloudFormationHealth ::
CloudFormationHealth
newCloudFormationHealth :: CloudFormationHealth
newCloudFormationHealth =
CloudFormationHealth'
{ $sel:analyzedResourceCount:CloudFormationHealth' :: Maybe Integer
analyzedResourceCount =
forall a. Maybe a
Prelude.Nothing,
$sel:insight:CloudFormationHealth' :: Maybe InsightHealth
insight = forall a. Maybe a
Prelude.Nothing,
$sel:stackName:CloudFormationHealth' :: Maybe Text
stackName = forall a. Maybe a
Prelude.Nothing
}
cloudFormationHealth_analyzedResourceCount :: Lens.Lens' CloudFormationHealth (Prelude.Maybe Prelude.Integer)
cloudFormationHealth_analyzedResourceCount :: Lens' CloudFormationHealth (Maybe Integer)
cloudFormationHealth_analyzedResourceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationHealth' {Maybe Integer
analyzedResourceCount :: Maybe Integer
$sel:analyzedResourceCount:CloudFormationHealth' :: CloudFormationHealth -> Maybe Integer
analyzedResourceCount} -> Maybe Integer
analyzedResourceCount) (\s :: CloudFormationHealth
s@CloudFormationHealth' {} Maybe Integer
a -> CloudFormationHealth
s {$sel:analyzedResourceCount:CloudFormationHealth' :: Maybe Integer
analyzedResourceCount = Maybe Integer
a} :: CloudFormationHealth)
cloudFormationHealth_insight :: Lens.Lens' CloudFormationHealth (Prelude.Maybe InsightHealth)
cloudFormationHealth_insight :: Lens' CloudFormationHealth (Maybe InsightHealth)
cloudFormationHealth_insight = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationHealth' {Maybe InsightHealth
insight :: Maybe InsightHealth
$sel:insight:CloudFormationHealth' :: CloudFormationHealth -> Maybe InsightHealth
insight} -> Maybe InsightHealth
insight) (\s :: CloudFormationHealth
s@CloudFormationHealth' {} Maybe InsightHealth
a -> CloudFormationHealth
s {$sel:insight:CloudFormationHealth' :: Maybe InsightHealth
insight = Maybe InsightHealth
a} :: CloudFormationHealth)
cloudFormationHealth_stackName :: Lens.Lens' CloudFormationHealth (Prelude.Maybe Prelude.Text)
cloudFormationHealth_stackName :: Lens' CloudFormationHealth (Maybe Text)
cloudFormationHealth_stackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationHealth' {Maybe Text
stackName :: Maybe Text
$sel:stackName:CloudFormationHealth' :: CloudFormationHealth -> Maybe Text
stackName} -> Maybe Text
stackName) (\s :: CloudFormationHealth
s@CloudFormationHealth' {} Maybe Text
a -> CloudFormationHealth
s {$sel:stackName:CloudFormationHealth' :: Maybe Text
stackName = Maybe Text
a} :: CloudFormationHealth)
instance Data.FromJSON CloudFormationHealth where
parseJSON :: Value -> Parser CloudFormationHealth
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CloudFormationHealth"
( \Object
x ->
Maybe Integer
-> Maybe InsightHealth -> Maybe Text -> CloudFormationHealth
CloudFormationHealth'
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
"AnalyzedResourceCount")
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
"Insight")
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
"StackName")
)
instance Prelude.Hashable CloudFormationHealth where
hashWithSalt :: Int -> CloudFormationHealth -> Int
hashWithSalt Int
_salt CloudFormationHealth' {Maybe Integer
Maybe Text
Maybe InsightHealth
stackName :: Maybe Text
insight :: Maybe InsightHealth
analyzedResourceCount :: Maybe Integer
$sel:stackName:CloudFormationHealth' :: CloudFormationHealth -> Maybe Text
$sel:insight:CloudFormationHealth' :: CloudFormationHealth -> Maybe InsightHealth
$sel:analyzedResourceCount:CloudFormationHealth' :: CloudFormationHealth -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
analyzedResourceCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InsightHealth
insight
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackName
instance Prelude.NFData CloudFormationHealth where
rnf :: CloudFormationHealth -> ()
rnf CloudFormationHealth' {Maybe Integer
Maybe Text
Maybe InsightHealth
stackName :: Maybe Text
insight :: Maybe InsightHealth
analyzedResourceCount :: Maybe Integer
$sel:stackName:CloudFormationHealth' :: CloudFormationHealth -> Maybe Text
$sel:insight:CloudFormationHealth' :: CloudFormationHealth -> Maybe InsightHealth
$sel:analyzedResourceCount:CloudFormationHealth' :: CloudFormationHealth -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
analyzedResourceCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InsightHealth
insight
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackName