{-# 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.ElasticBeanstalk.Types.InstanceHealthSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InstanceHealthSummary = InstanceHealthSummary'
{
InstanceHealthSummary -> Maybe Int
ok :: Prelude.Maybe Prelude.Int,
InstanceHealthSummary -> Maybe Int
pending :: Prelude.Maybe Prelude.Int,
InstanceHealthSummary -> Maybe Int
severe :: Prelude.Maybe Prelude.Int,
InstanceHealthSummary -> Maybe Int
unknown :: Prelude.Maybe Prelude.Int,
InstanceHealthSummary -> Maybe Int
noData :: Prelude.Maybe Prelude.Int,
InstanceHealthSummary -> Maybe Int
warning :: Prelude.Maybe Prelude.Int,
InstanceHealthSummary -> Maybe Int
degraded :: Prelude.Maybe Prelude.Int,
InstanceHealthSummary -> Maybe Int
info :: Prelude.Maybe Prelude.Int
}
deriving (InstanceHealthSummary -> InstanceHealthSummary -> Bool
(InstanceHealthSummary -> InstanceHealthSummary -> Bool)
-> (InstanceHealthSummary -> InstanceHealthSummary -> Bool)
-> Eq InstanceHealthSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceHealthSummary -> InstanceHealthSummary -> Bool
$c/= :: InstanceHealthSummary -> InstanceHealthSummary -> Bool
== :: InstanceHealthSummary -> InstanceHealthSummary -> Bool
$c== :: InstanceHealthSummary -> InstanceHealthSummary -> Bool
Prelude.Eq, ReadPrec [InstanceHealthSummary]
ReadPrec InstanceHealthSummary
Int -> ReadS InstanceHealthSummary
ReadS [InstanceHealthSummary]
(Int -> ReadS InstanceHealthSummary)
-> ReadS [InstanceHealthSummary]
-> ReadPrec InstanceHealthSummary
-> ReadPrec [InstanceHealthSummary]
-> Read InstanceHealthSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceHealthSummary]
$creadListPrec :: ReadPrec [InstanceHealthSummary]
readPrec :: ReadPrec InstanceHealthSummary
$creadPrec :: ReadPrec InstanceHealthSummary
readList :: ReadS [InstanceHealthSummary]
$creadList :: ReadS [InstanceHealthSummary]
readsPrec :: Int -> ReadS InstanceHealthSummary
$creadsPrec :: Int -> ReadS InstanceHealthSummary
Prelude.Read, Int -> InstanceHealthSummary -> ShowS
[InstanceHealthSummary] -> ShowS
InstanceHealthSummary -> String
(Int -> InstanceHealthSummary -> ShowS)
-> (InstanceHealthSummary -> String)
-> ([InstanceHealthSummary] -> ShowS)
-> Show InstanceHealthSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceHealthSummary] -> ShowS
$cshowList :: [InstanceHealthSummary] -> ShowS
show :: InstanceHealthSummary -> String
$cshow :: InstanceHealthSummary -> String
showsPrec :: Int -> InstanceHealthSummary -> ShowS
$cshowsPrec :: Int -> InstanceHealthSummary -> ShowS
Prelude.Show, (forall x. InstanceHealthSummary -> Rep InstanceHealthSummary x)
-> (forall x. Rep InstanceHealthSummary x -> InstanceHealthSummary)
-> Generic InstanceHealthSummary
forall x. Rep InstanceHealthSummary x -> InstanceHealthSummary
forall x. InstanceHealthSummary -> Rep InstanceHealthSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceHealthSummary x -> InstanceHealthSummary
$cfrom :: forall x. InstanceHealthSummary -> Rep InstanceHealthSummary x
Prelude.Generic)
newInstanceHealthSummary ::
InstanceHealthSummary
newInstanceHealthSummary :: InstanceHealthSummary
newInstanceHealthSummary =
InstanceHealthSummary' :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstanceHealthSummary
InstanceHealthSummary'
{ $sel:ok:InstanceHealthSummary' :: Maybe Int
ok = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:pending:InstanceHealthSummary' :: Maybe Int
pending = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:severe:InstanceHealthSummary' :: Maybe Int
severe = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:unknown:InstanceHealthSummary' :: Maybe Int
unknown = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:noData:InstanceHealthSummary' :: Maybe Int
noData = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:warning:InstanceHealthSummary' :: Maybe Int
warning = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:degraded:InstanceHealthSummary' :: Maybe Int
degraded = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:info:InstanceHealthSummary' :: Maybe Int
info = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
instanceHealthSummary_ok :: Lens.Lens' InstanceHealthSummary (Prelude.Maybe Prelude.Int)
instanceHealthSummary_ok :: (Maybe Int -> f (Maybe Int))
-> InstanceHealthSummary -> f InstanceHealthSummary
instanceHealthSummary_ok = (InstanceHealthSummary -> Maybe Int)
-> (InstanceHealthSummary -> Maybe Int -> InstanceHealthSummary)
-> Lens
InstanceHealthSummary InstanceHealthSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceHealthSummary' {Maybe Int
ok :: Maybe Int
$sel:ok:InstanceHealthSummary' :: InstanceHealthSummary -> Maybe Int
ok} -> Maybe Int
ok) (\s :: InstanceHealthSummary
s@InstanceHealthSummary' {} Maybe Int
a -> InstanceHealthSummary
s {$sel:ok:InstanceHealthSummary' :: Maybe Int
ok = Maybe Int
a} :: InstanceHealthSummary)
instanceHealthSummary_pending :: Lens.Lens' InstanceHealthSummary (Prelude.Maybe Prelude.Int)
instanceHealthSummary_pending :: (Maybe Int -> f (Maybe Int))
-> InstanceHealthSummary -> f InstanceHealthSummary
instanceHealthSummary_pending = (InstanceHealthSummary -> Maybe Int)
-> (InstanceHealthSummary -> Maybe Int -> InstanceHealthSummary)
-> Lens
InstanceHealthSummary InstanceHealthSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceHealthSummary' {Maybe Int
pending :: Maybe Int
$sel:pending:InstanceHealthSummary' :: InstanceHealthSummary -> Maybe Int
pending} -> Maybe Int
pending) (\s :: InstanceHealthSummary
s@InstanceHealthSummary' {} Maybe Int
a -> InstanceHealthSummary
s {$sel:pending:InstanceHealthSummary' :: Maybe Int
pending = Maybe Int
a} :: InstanceHealthSummary)
instanceHealthSummary_severe :: Lens.Lens' InstanceHealthSummary (Prelude.Maybe Prelude.Int)
instanceHealthSummary_severe :: (Maybe Int -> f (Maybe Int))
-> InstanceHealthSummary -> f InstanceHealthSummary
instanceHealthSummary_severe = (InstanceHealthSummary -> Maybe Int)
-> (InstanceHealthSummary -> Maybe Int -> InstanceHealthSummary)
-> Lens
InstanceHealthSummary InstanceHealthSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceHealthSummary' {Maybe Int
severe :: Maybe Int
$sel:severe:InstanceHealthSummary' :: InstanceHealthSummary -> Maybe Int
severe} -> Maybe Int
severe) (\s :: InstanceHealthSummary
s@InstanceHealthSummary' {} Maybe Int
a -> InstanceHealthSummary
s {$sel:severe:InstanceHealthSummary' :: Maybe Int
severe = Maybe Int
a} :: InstanceHealthSummary)
instanceHealthSummary_unknown :: Lens.Lens' InstanceHealthSummary (Prelude.Maybe Prelude.Int)
instanceHealthSummary_unknown :: (Maybe Int -> f (Maybe Int))
-> InstanceHealthSummary -> f InstanceHealthSummary
instanceHealthSummary_unknown = (InstanceHealthSummary -> Maybe Int)
-> (InstanceHealthSummary -> Maybe Int -> InstanceHealthSummary)
-> Lens
InstanceHealthSummary InstanceHealthSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceHealthSummary' {Maybe Int
unknown :: Maybe Int
$sel:unknown:InstanceHealthSummary' :: InstanceHealthSummary -> Maybe Int
unknown} -> Maybe Int
unknown) (\s :: InstanceHealthSummary
s@InstanceHealthSummary' {} Maybe Int
a -> InstanceHealthSummary
s {$sel:unknown:InstanceHealthSummary' :: Maybe Int
unknown = Maybe Int
a} :: InstanceHealthSummary)
instanceHealthSummary_noData :: Lens.Lens' InstanceHealthSummary (Prelude.Maybe Prelude.Int)
instanceHealthSummary_noData :: (Maybe Int -> f (Maybe Int))
-> InstanceHealthSummary -> f InstanceHealthSummary
instanceHealthSummary_noData = (InstanceHealthSummary -> Maybe Int)
-> (InstanceHealthSummary -> Maybe Int -> InstanceHealthSummary)
-> Lens
InstanceHealthSummary InstanceHealthSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceHealthSummary' {Maybe Int
noData :: Maybe Int
$sel:noData:InstanceHealthSummary' :: InstanceHealthSummary -> Maybe Int
noData} -> Maybe Int
noData) (\s :: InstanceHealthSummary
s@InstanceHealthSummary' {} Maybe Int
a -> InstanceHealthSummary
s {$sel:noData:InstanceHealthSummary' :: Maybe Int
noData = Maybe Int
a} :: InstanceHealthSummary)
instanceHealthSummary_warning :: Lens.Lens' InstanceHealthSummary (Prelude.Maybe Prelude.Int)
instanceHealthSummary_warning :: (Maybe Int -> f (Maybe Int))
-> InstanceHealthSummary -> f InstanceHealthSummary
instanceHealthSummary_warning = (InstanceHealthSummary -> Maybe Int)
-> (InstanceHealthSummary -> Maybe Int -> InstanceHealthSummary)
-> Lens
InstanceHealthSummary InstanceHealthSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceHealthSummary' {Maybe Int
warning :: Maybe Int
$sel:warning:InstanceHealthSummary' :: InstanceHealthSummary -> Maybe Int
warning} -> Maybe Int
warning) (\s :: InstanceHealthSummary
s@InstanceHealthSummary' {} Maybe Int
a -> InstanceHealthSummary
s {$sel:warning:InstanceHealthSummary' :: Maybe Int
warning = Maybe Int
a} :: InstanceHealthSummary)
instanceHealthSummary_degraded :: Lens.Lens' InstanceHealthSummary (Prelude.Maybe Prelude.Int)
instanceHealthSummary_degraded :: (Maybe Int -> f (Maybe Int))
-> InstanceHealthSummary -> f InstanceHealthSummary
instanceHealthSummary_degraded = (InstanceHealthSummary -> Maybe Int)
-> (InstanceHealthSummary -> Maybe Int -> InstanceHealthSummary)
-> Lens
InstanceHealthSummary InstanceHealthSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceHealthSummary' {Maybe Int
degraded :: Maybe Int
$sel:degraded:InstanceHealthSummary' :: InstanceHealthSummary -> Maybe Int
degraded} -> Maybe Int
degraded) (\s :: InstanceHealthSummary
s@InstanceHealthSummary' {} Maybe Int
a -> InstanceHealthSummary
s {$sel:degraded:InstanceHealthSummary' :: Maybe Int
degraded = Maybe Int
a} :: InstanceHealthSummary)
instanceHealthSummary_info :: Lens.Lens' InstanceHealthSummary (Prelude.Maybe Prelude.Int)
instanceHealthSummary_info :: (Maybe Int -> f (Maybe Int))
-> InstanceHealthSummary -> f InstanceHealthSummary
instanceHealthSummary_info = (InstanceHealthSummary -> Maybe Int)
-> (InstanceHealthSummary -> Maybe Int -> InstanceHealthSummary)
-> Lens
InstanceHealthSummary InstanceHealthSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceHealthSummary' {Maybe Int
info :: Maybe Int
$sel:info:InstanceHealthSummary' :: InstanceHealthSummary -> Maybe Int
info} -> Maybe Int
info) (\s :: InstanceHealthSummary
s@InstanceHealthSummary' {} Maybe Int
a -> InstanceHealthSummary
s {$sel:info:InstanceHealthSummary' :: Maybe Int
info = Maybe Int
a} :: InstanceHealthSummary)
instance Core.FromXML InstanceHealthSummary where
parseXML :: [Node] -> Either String InstanceHealthSummary
parseXML [Node]
x =
Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstanceHealthSummary
InstanceHealthSummary'
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstanceHealthSummary)
-> Either String (Maybe Int)
-> Either
String
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstanceHealthSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Ok")
Either
String
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstanceHealthSummary)
-> Either String (Maybe Int)
-> Either
String
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstanceHealthSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Pending")
Either
String
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstanceHealthSummary)
-> Either String (Maybe Int)
-> Either
String
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstanceHealthSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Severe")
Either
String
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> InstanceHealthSummary)
-> Either String (Maybe Int)
-> Either
String
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> InstanceHealthSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Unknown")
Either
String
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> InstanceHealthSummary)
-> Either String (Maybe Int)
-> Either
String
(Maybe Int -> Maybe Int -> Maybe Int -> InstanceHealthSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NoData")
Either
String
(Maybe Int -> Maybe Int -> Maybe Int -> InstanceHealthSummary)
-> Either String (Maybe Int)
-> Either String (Maybe Int -> Maybe Int -> InstanceHealthSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Warning")
Either String (Maybe Int -> Maybe Int -> InstanceHealthSummary)
-> Either String (Maybe Int)
-> Either String (Maybe Int -> InstanceHealthSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Degraded")
Either String (Maybe Int -> InstanceHealthSummary)
-> Either String (Maybe Int) -> Either String InstanceHealthSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Info")
instance Prelude.Hashable InstanceHealthSummary
instance Prelude.NFData InstanceHealthSummary