{-# 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.EKS.Types.AddonHealth where
import qualified Amazonka.Core as Core
import Amazonka.EKS.Types.AddonIssue
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AddonHealth = AddonHealth'
{
AddonHealth -> Maybe [AddonIssue]
issues :: Prelude.Maybe [AddonIssue]
}
deriving (AddonHealth -> AddonHealth -> Bool
(AddonHealth -> AddonHealth -> Bool)
-> (AddonHealth -> AddonHealth -> Bool) -> Eq AddonHealth
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddonHealth -> AddonHealth -> Bool
$c/= :: AddonHealth -> AddonHealth -> Bool
== :: AddonHealth -> AddonHealth -> Bool
$c== :: AddonHealth -> AddonHealth -> Bool
Prelude.Eq, ReadPrec [AddonHealth]
ReadPrec AddonHealth
Int -> ReadS AddonHealth
ReadS [AddonHealth]
(Int -> ReadS AddonHealth)
-> ReadS [AddonHealth]
-> ReadPrec AddonHealth
-> ReadPrec [AddonHealth]
-> Read AddonHealth
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddonHealth]
$creadListPrec :: ReadPrec [AddonHealth]
readPrec :: ReadPrec AddonHealth
$creadPrec :: ReadPrec AddonHealth
readList :: ReadS [AddonHealth]
$creadList :: ReadS [AddonHealth]
readsPrec :: Int -> ReadS AddonHealth
$creadsPrec :: Int -> ReadS AddonHealth
Prelude.Read, Int -> AddonHealth -> ShowS
[AddonHealth] -> ShowS
AddonHealth -> String
(Int -> AddonHealth -> ShowS)
-> (AddonHealth -> String)
-> ([AddonHealth] -> ShowS)
-> Show AddonHealth
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddonHealth] -> ShowS
$cshowList :: [AddonHealth] -> ShowS
show :: AddonHealth -> String
$cshow :: AddonHealth -> String
showsPrec :: Int -> AddonHealth -> ShowS
$cshowsPrec :: Int -> AddonHealth -> ShowS
Prelude.Show, (forall x. AddonHealth -> Rep AddonHealth x)
-> (forall x. Rep AddonHealth x -> AddonHealth)
-> Generic AddonHealth
forall x. Rep AddonHealth x -> AddonHealth
forall x. AddonHealth -> Rep AddonHealth x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddonHealth x -> AddonHealth
$cfrom :: forall x. AddonHealth -> Rep AddonHealth x
Prelude.Generic)
newAddonHealth ::
AddonHealth
newAddonHealth :: AddonHealth
newAddonHealth =
AddonHealth' :: Maybe [AddonIssue] -> AddonHealth
AddonHealth' {$sel:issues:AddonHealth' :: Maybe [AddonIssue]
issues = Maybe [AddonIssue]
forall a. Maybe a
Prelude.Nothing}
addonHealth_issues :: Lens.Lens' AddonHealth (Prelude.Maybe [AddonIssue])
addonHealth_issues :: (Maybe [AddonIssue] -> f (Maybe [AddonIssue]))
-> AddonHealth -> f AddonHealth
addonHealth_issues = (AddonHealth -> Maybe [AddonIssue])
-> (AddonHealth -> Maybe [AddonIssue] -> AddonHealth)
-> Lens
AddonHealth AddonHealth (Maybe [AddonIssue]) (Maybe [AddonIssue])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddonHealth' {Maybe [AddonIssue]
issues :: Maybe [AddonIssue]
$sel:issues:AddonHealth' :: AddonHealth -> Maybe [AddonIssue]
issues} -> Maybe [AddonIssue]
issues) (\s :: AddonHealth
s@AddonHealth' {} Maybe [AddonIssue]
a -> AddonHealth
s {$sel:issues:AddonHealth' :: Maybe [AddonIssue]
issues = Maybe [AddonIssue]
a} :: AddonHealth) ((Maybe [AddonIssue] -> f (Maybe [AddonIssue]))
-> AddonHealth -> f AddonHealth)
-> ((Maybe [AddonIssue] -> f (Maybe [AddonIssue]))
-> Maybe [AddonIssue] -> f (Maybe [AddonIssue]))
-> (Maybe [AddonIssue] -> f (Maybe [AddonIssue]))
-> AddonHealth
-> f AddonHealth
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AddonIssue] [AddonIssue] [AddonIssue] [AddonIssue]
-> Iso
(Maybe [AddonIssue])
(Maybe [AddonIssue])
(Maybe [AddonIssue])
(Maybe [AddonIssue])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [AddonIssue] [AddonIssue] [AddonIssue] [AddonIssue]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON AddonHealth where
parseJSON :: Value -> Parser AddonHealth
parseJSON =
String
-> (Object -> Parser AddonHealth) -> Value -> Parser AddonHealth
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AddonHealth"
( \Object
x ->
Maybe [AddonIssue] -> AddonHealth
AddonHealth'
(Maybe [AddonIssue] -> AddonHealth)
-> Parser (Maybe [AddonIssue]) -> Parser AddonHealth
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [AddonIssue]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"issues" Parser (Maybe (Maybe [AddonIssue]))
-> Maybe [AddonIssue] -> Parser (Maybe [AddonIssue])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AddonIssue]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable AddonHealth
instance Prelude.NFData AddonHealth