{-# 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 Amazonka.DevOpsGuru.Types.InsightHealth
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CloudFormationHealth = CloudFormationHealth'
{
CloudFormationHealth -> Maybe InsightHealth
insight :: Prelude.Maybe InsightHealth,
CloudFormationHealth -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text
}
deriving (CloudFormationHealth -> CloudFormationHealth -> Bool
(CloudFormationHealth -> CloudFormationHealth -> Bool)
-> (CloudFormationHealth -> CloudFormationHealth -> Bool)
-> Eq CloudFormationHealth
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]
(Int -> ReadS CloudFormationHealth)
-> ReadS [CloudFormationHealth]
-> ReadPrec CloudFormationHealth
-> ReadPrec [CloudFormationHealth]
-> Read 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
(Int -> CloudFormationHealth -> ShowS)
-> (CloudFormationHealth -> String)
-> ([CloudFormationHealth] -> ShowS)
-> Show CloudFormationHealth
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. CloudFormationHealth -> Rep CloudFormationHealth x)
-> (forall x. Rep CloudFormationHealth x -> CloudFormationHealth)
-> Generic CloudFormationHealth
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' :: Maybe InsightHealth -> Maybe Text -> CloudFormationHealth
CloudFormationHealth'
{ $sel:insight:CloudFormationHealth' :: Maybe InsightHealth
insight = Maybe InsightHealth
forall a. Maybe a
Prelude.Nothing,
$sel:stackName:CloudFormationHealth' :: Maybe Text
stackName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
cloudFormationHealth_insight :: Lens.Lens' CloudFormationHealth (Prelude.Maybe InsightHealth)
cloudFormationHealth_insight :: (Maybe InsightHealth -> f (Maybe InsightHealth))
-> CloudFormationHealth -> f CloudFormationHealth
cloudFormationHealth_insight = (CloudFormationHealth -> Maybe InsightHealth)
-> (CloudFormationHealth
-> Maybe InsightHealth -> CloudFormationHealth)
-> Lens
CloudFormationHealth
CloudFormationHealth
(Maybe InsightHealth)
(Maybe InsightHealth)
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 :: (Maybe Text -> f (Maybe Text))
-> CloudFormationHealth -> f CloudFormationHealth
cloudFormationHealth_stackName = (CloudFormationHealth -> Maybe Text)
-> (CloudFormationHealth -> Maybe Text -> CloudFormationHealth)
-> Lens
CloudFormationHealth CloudFormationHealth (Maybe Text) (Maybe Text)
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 Core.FromJSON CloudFormationHealth where
parseJSON :: Value -> Parser CloudFormationHealth
parseJSON =
String
-> (Object -> Parser CloudFormationHealth)
-> Value
-> Parser CloudFormationHealth
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CloudFormationHealth"
( \Object
x ->
Maybe InsightHealth -> Maybe Text -> CloudFormationHealth
CloudFormationHealth'
(Maybe InsightHealth -> Maybe Text -> CloudFormationHealth)
-> Parser (Maybe InsightHealth)
-> Parser (Maybe Text -> CloudFormationHealth)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe InsightHealth)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Insight")
Parser (Maybe Text -> CloudFormationHealth)
-> Parser (Maybe Text) -> Parser CloudFormationHealth
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StackName")
)
instance Prelude.Hashable CloudFormationHealth
instance Prelude.NFData CloudFormationHealth