{-# 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.TagHealth 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 TagHealth = TagHealth'
{
TagHealth -> Maybe Integer
analyzedResourceCount :: Prelude.Maybe Prelude.Integer,
TagHealth -> Maybe Text
appBoundaryKey :: Prelude.Maybe Prelude.Text,
TagHealth -> Maybe InsightHealth
insight :: Prelude.Maybe InsightHealth,
TagHealth -> Maybe Text
tagValue :: Prelude.Maybe Prelude.Text
}
deriving (TagHealth -> TagHealth -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TagHealth -> TagHealth -> Bool
$c/= :: TagHealth -> TagHealth -> Bool
== :: TagHealth -> TagHealth -> Bool
$c== :: TagHealth -> TagHealth -> Bool
Prelude.Eq, ReadPrec [TagHealth]
ReadPrec TagHealth
Int -> ReadS TagHealth
ReadS [TagHealth]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TagHealth]
$creadListPrec :: ReadPrec [TagHealth]
readPrec :: ReadPrec TagHealth
$creadPrec :: ReadPrec TagHealth
readList :: ReadS [TagHealth]
$creadList :: ReadS [TagHealth]
readsPrec :: Int -> ReadS TagHealth
$creadsPrec :: Int -> ReadS TagHealth
Prelude.Read, Int -> TagHealth -> ShowS
[TagHealth] -> ShowS
TagHealth -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TagHealth] -> ShowS
$cshowList :: [TagHealth] -> ShowS
show :: TagHealth -> String
$cshow :: TagHealth -> String
showsPrec :: Int -> TagHealth -> ShowS
$cshowsPrec :: Int -> TagHealth -> ShowS
Prelude.Show, forall x. Rep TagHealth x -> TagHealth
forall x. TagHealth -> Rep TagHealth x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TagHealth x -> TagHealth
$cfrom :: forall x. TagHealth -> Rep TagHealth x
Prelude.Generic)
newTagHealth ::
TagHealth
newTagHealth :: TagHealth
newTagHealth =
TagHealth'
{ $sel:analyzedResourceCount:TagHealth' :: Maybe Integer
analyzedResourceCount = forall a. Maybe a
Prelude.Nothing,
$sel:appBoundaryKey:TagHealth' :: Maybe Text
appBoundaryKey = forall a. Maybe a
Prelude.Nothing,
$sel:insight:TagHealth' :: Maybe InsightHealth
insight = forall a. Maybe a
Prelude.Nothing,
$sel:tagValue:TagHealth' :: Maybe Text
tagValue = forall a. Maybe a
Prelude.Nothing
}
tagHealth_analyzedResourceCount :: Lens.Lens' TagHealth (Prelude.Maybe Prelude.Integer)
tagHealth_analyzedResourceCount :: Lens' TagHealth (Maybe Integer)
tagHealth_analyzedResourceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagHealth' {Maybe Integer
analyzedResourceCount :: Maybe Integer
$sel:analyzedResourceCount:TagHealth' :: TagHealth -> Maybe Integer
analyzedResourceCount} -> Maybe Integer
analyzedResourceCount) (\s :: TagHealth
s@TagHealth' {} Maybe Integer
a -> TagHealth
s {$sel:analyzedResourceCount:TagHealth' :: Maybe Integer
analyzedResourceCount = Maybe Integer
a} :: TagHealth)
tagHealth_appBoundaryKey :: Lens.Lens' TagHealth (Prelude.Maybe Prelude.Text)
tagHealth_appBoundaryKey :: Lens' TagHealth (Maybe Text)
tagHealth_appBoundaryKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagHealth' {Maybe Text
appBoundaryKey :: Maybe Text
$sel:appBoundaryKey:TagHealth' :: TagHealth -> Maybe Text
appBoundaryKey} -> Maybe Text
appBoundaryKey) (\s :: TagHealth
s@TagHealth' {} Maybe Text
a -> TagHealth
s {$sel:appBoundaryKey:TagHealth' :: Maybe Text
appBoundaryKey = Maybe Text
a} :: TagHealth)
tagHealth_insight :: Lens.Lens' TagHealth (Prelude.Maybe InsightHealth)
tagHealth_insight :: Lens' TagHealth (Maybe InsightHealth)
tagHealth_insight = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagHealth' {Maybe InsightHealth
insight :: Maybe InsightHealth
$sel:insight:TagHealth' :: TagHealth -> Maybe InsightHealth
insight} -> Maybe InsightHealth
insight) (\s :: TagHealth
s@TagHealth' {} Maybe InsightHealth
a -> TagHealth
s {$sel:insight:TagHealth' :: Maybe InsightHealth
insight = Maybe InsightHealth
a} :: TagHealth)
tagHealth_tagValue :: Lens.Lens' TagHealth (Prelude.Maybe Prelude.Text)
tagHealth_tagValue :: Lens' TagHealth (Maybe Text)
tagHealth_tagValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagHealth' {Maybe Text
tagValue :: Maybe Text
$sel:tagValue:TagHealth' :: TagHealth -> Maybe Text
tagValue} -> Maybe Text
tagValue) (\s :: TagHealth
s@TagHealth' {} Maybe Text
a -> TagHealth
s {$sel:tagValue:TagHealth' :: Maybe Text
tagValue = Maybe Text
a} :: TagHealth)
instance Data.FromJSON TagHealth where
parseJSON :: Value -> Parser TagHealth
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TagHealth"
( \Object
x ->
Maybe Integer
-> Maybe Text -> Maybe InsightHealth -> Maybe Text -> TagHealth
TagHealth'
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
"AppBoundaryKey")
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
"TagValue")
)
instance Prelude.Hashable TagHealth where
hashWithSalt :: Int -> TagHealth -> Int
hashWithSalt Int
_salt TagHealth' {Maybe Integer
Maybe Text
Maybe InsightHealth
tagValue :: Maybe Text
insight :: Maybe InsightHealth
appBoundaryKey :: Maybe Text
analyzedResourceCount :: Maybe Integer
$sel:tagValue:TagHealth' :: TagHealth -> Maybe Text
$sel:insight:TagHealth' :: TagHealth -> Maybe InsightHealth
$sel:appBoundaryKey:TagHealth' :: TagHealth -> Maybe Text
$sel:analyzedResourceCount:TagHealth' :: TagHealth -> 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 Text
appBoundaryKey
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InsightHealth
insight
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tagValue
instance Prelude.NFData TagHealth where
rnf :: TagHealth -> ()
rnf TagHealth' {Maybe Integer
Maybe Text
Maybe InsightHealth
tagValue :: Maybe Text
insight :: Maybe InsightHealth
appBoundaryKey :: Maybe Text
analyzedResourceCount :: Maybe Integer
$sel:tagValue:TagHealth' :: TagHealth -> Maybe Text
$sel:insight:TagHealth' :: TagHealth -> Maybe InsightHealth
$sel:appBoundaryKey:TagHealth' :: TagHealth -> Maybe Text
$sel:analyzedResourceCount:TagHealth' :: TagHealth -> 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 Text
appBoundaryKey
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
tagValue