{-# 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.SSM.Types.SeveritySummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SeveritySummary = SeveritySummary'
{
SeveritySummary -> Maybe Int
lowCount :: Prelude.Maybe Prelude.Int,
SeveritySummary -> Maybe Int
unspecifiedCount :: Prelude.Maybe Prelude.Int,
SeveritySummary -> Maybe Int
highCount :: Prelude.Maybe Prelude.Int,
SeveritySummary -> Maybe Int
mediumCount :: Prelude.Maybe Prelude.Int,
SeveritySummary -> Maybe Int
informationalCount :: Prelude.Maybe Prelude.Int,
SeveritySummary -> Maybe Int
criticalCount :: Prelude.Maybe Prelude.Int
}
deriving (SeveritySummary -> SeveritySummary -> Bool
(SeveritySummary -> SeveritySummary -> Bool)
-> (SeveritySummary -> SeveritySummary -> Bool)
-> Eq SeveritySummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SeveritySummary -> SeveritySummary -> Bool
$c/= :: SeveritySummary -> SeveritySummary -> Bool
== :: SeveritySummary -> SeveritySummary -> Bool
$c== :: SeveritySummary -> SeveritySummary -> Bool
Prelude.Eq, ReadPrec [SeveritySummary]
ReadPrec SeveritySummary
Int -> ReadS SeveritySummary
ReadS [SeveritySummary]
(Int -> ReadS SeveritySummary)
-> ReadS [SeveritySummary]
-> ReadPrec SeveritySummary
-> ReadPrec [SeveritySummary]
-> Read SeveritySummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SeveritySummary]
$creadListPrec :: ReadPrec [SeveritySummary]
readPrec :: ReadPrec SeveritySummary
$creadPrec :: ReadPrec SeveritySummary
readList :: ReadS [SeveritySummary]
$creadList :: ReadS [SeveritySummary]
readsPrec :: Int -> ReadS SeveritySummary
$creadsPrec :: Int -> ReadS SeveritySummary
Prelude.Read, Int -> SeveritySummary -> ShowS
[SeveritySummary] -> ShowS
SeveritySummary -> String
(Int -> SeveritySummary -> ShowS)
-> (SeveritySummary -> String)
-> ([SeveritySummary] -> ShowS)
-> Show SeveritySummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SeveritySummary] -> ShowS
$cshowList :: [SeveritySummary] -> ShowS
show :: SeveritySummary -> String
$cshow :: SeveritySummary -> String
showsPrec :: Int -> SeveritySummary -> ShowS
$cshowsPrec :: Int -> SeveritySummary -> ShowS
Prelude.Show, (forall x. SeveritySummary -> Rep SeveritySummary x)
-> (forall x. Rep SeveritySummary x -> SeveritySummary)
-> Generic SeveritySummary
forall x. Rep SeveritySummary x -> SeveritySummary
forall x. SeveritySummary -> Rep SeveritySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SeveritySummary x -> SeveritySummary
$cfrom :: forall x. SeveritySummary -> Rep SeveritySummary x
Prelude.Generic)
newSeveritySummary ::
SeveritySummary
newSeveritySummary :: SeveritySummary
newSeveritySummary =
SeveritySummary' :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> SeveritySummary
SeveritySummary'
{ $sel:lowCount:SeveritySummary' :: Maybe Int
lowCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:unspecifiedCount:SeveritySummary' :: Maybe Int
unspecifiedCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:highCount:SeveritySummary' :: Maybe Int
highCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:mediumCount:SeveritySummary' :: Maybe Int
mediumCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:informationalCount:SeveritySummary' :: Maybe Int
informationalCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:criticalCount:SeveritySummary' :: Maybe Int
criticalCount = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
severitySummary_lowCount :: Lens.Lens' SeveritySummary (Prelude.Maybe Prelude.Int)
severitySummary_lowCount :: (Maybe Int -> f (Maybe Int))
-> SeveritySummary -> f SeveritySummary
severitySummary_lowCount = (SeveritySummary -> Maybe Int)
-> (SeveritySummary -> Maybe Int -> SeveritySummary)
-> Lens SeveritySummary SeveritySummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SeveritySummary' {Maybe Int
lowCount :: Maybe Int
$sel:lowCount:SeveritySummary' :: SeveritySummary -> Maybe Int
lowCount} -> Maybe Int
lowCount) (\s :: SeveritySummary
s@SeveritySummary' {} Maybe Int
a -> SeveritySummary
s {$sel:lowCount:SeveritySummary' :: Maybe Int
lowCount = Maybe Int
a} :: SeveritySummary)
severitySummary_unspecifiedCount :: Lens.Lens' SeveritySummary (Prelude.Maybe Prelude.Int)
severitySummary_unspecifiedCount :: (Maybe Int -> f (Maybe Int))
-> SeveritySummary -> f SeveritySummary
severitySummary_unspecifiedCount = (SeveritySummary -> Maybe Int)
-> (SeveritySummary -> Maybe Int -> SeveritySummary)
-> Lens SeveritySummary SeveritySummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SeveritySummary' {Maybe Int
unspecifiedCount :: Maybe Int
$sel:unspecifiedCount:SeveritySummary' :: SeveritySummary -> Maybe Int
unspecifiedCount} -> Maybe Int
unspecifiedCount) (\s :: SeveritySummary
s@SeveritySummary' {} Maybe Int
a -> SeveritySummary
s {$sel:unspecifiedCount:SeveritySummary' :: Maybe Int
unspecifiedCount = Maybe Int
a} :: SeveritySummary)
severitySummary_highCount :: Lens.Lens' SeveritySummary (Prelude.Maybe Prelude.Int)
severitySummary_highCount :: (Maybe Int -> f (Maybe Int))
-> SeveritySummary -> f SeveritySummary
severitySummary_highCount = (SeveritySummary -> Maybe Int)
-> (SeveritySummary -> Maybe Int -> SeveritySummary)
-> Lens SeveritySummary SeveritySummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SeveritySummary' {Maybe Int
highCount :: Maybe Int
$sel:highCount:SeveritySummary' :: SeveritySummary -> Maybe Int
highCount} -> Maybe Int
highCount) (\s :: SeveritySummary
s@SeveritySummary' {} Maybe Int
a -> SeveritySummary
s {$sel:highCount:SeveritySummary' :: Maybe Int
highCount = Maybe Int
a} :: SeveritySummary)
severitySummary_mediumCount :: Lens.Lens' SeveritySummary (Prelude.Maybe Prelude.Int)
severitySummary_mediumCount :: (Maybe Int -> f (Maybe Int))
-> SeveritySummary -> f SeveritySummary
severitySummary_mediumCount = (SeveritySummary -> Maybe Int)
-> (SeveritySummary -> Maybe Int -> SeveritySummary)
-> Lens SeveritySummary SeveritySummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SeveritySummary' {Maybe Int
mediumCount :: Maybe Int
$sel:mediumCount:SeveritySummary' :: SeveritySummary -> Maybe Int
mediumCount} -> Maybe Int
mediumCount) (\s :: SeveritySummary
s@SeveritySummary' {} Maybe Int
a -> SeveritySummary
s {$sel:mediumCount:SeveritySummary' :: Maybe Int
mediumCount = Maybe Int
a} :: SeveritySummary)
severitySummary_informationalCount :: Lens.Lens' SeveritySummary (Prelude.Maybe Prelude.Int)
severitySummary_informationalCount :: (Maybe Int -> f (Maybe Int))
-> SeveritySummary -> f SeveritySummary
severitySummary_informationalCount = (SeveritySummary -> Maybe Int)
-> (SeveritySummary -> Maybe Int -> SeveritySummary)
-> Lens SeveritySummary SeveritySummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SeveritySummary' {Maybe Int
informationalCount :: Maybe Int
$sel:informationalCount:SeveritySummary' :: SeveritySummary -> Maybe Int
informationalCount} -> Maybe Int
informationalCount) (\s :: SeveritySummary
s@SeveritySummary' {} Maybe Int
a -> SeveritySummary
s {$sel:informationalCount:SeveritySummary' :: Maybe Int
informationalCount = Maybe Int
a} :: SeveritySummary)
severitySummary_criticalCount :: Lens.Lens' SeveritySummary (Prelude.Maybe Prelude.Int)
severitySummary_criticalCount :: (Maybe Int -> f (Maybe Int))
-> SeveritySummary -> f SeveritySummary
severitySummary_criticalCount = (SeveritySummary -> Maybe Int)
-> (SeveritySummary -> Maybe Int -> SeveritySummary)
-> Lens SeveritySummary SeveritySummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SeveritySummary' {Maybe Int
criticalCount :: Maybe Int
$sel:criticalCount:SeveritySummary' :: SeveritySummary -> Maybe Int
criticalCount} -> Maybe Int
criticalCount) (\s :: SeveritySummary
s@SeveritySummary' {} Maybe Int
a -> SeveritySummary
s {$sel:criticalCount:SeveritySummary' :: Maybe Int
criticalCount = Maybe Int
a} :: SeveritySummary)
instance Core.FromJSON SeveritySummary where
parseJSON :: Value -> Parser SeveritySummary
parseJSON =
String
-> (Object -> Parser SeveritySummary)
-> Value
-> Parser SeveritySummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SeveritySummary"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> SeveritySummary
SeveritySummary'
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> SeveritySummary)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> SeveritySummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LowCount")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> SeveritySummary)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> SeveritySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UnspecifiedCount")
Parser
(Maybe Int
-> Maybe Int -> Maybe Int -> Maybe Int -> SeveritySummary)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Int -> Maybe Int -> SeveritySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HighCount")
Parser (Maybe Int -> Maybe Int -> Maybe Int -> SeveritySummary)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Int -> SeveritySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MediumCount")
Parser (Maybe Int -> Maybe Int -> SeveritySummary)
-> Parser (Maybe Int) -> Parser (Maybe Int -> SeveritySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InformationalCount")
Parser (Maybe Int -> SeveritySummary)
-> Parser (Maybe Int) -> Parser SeveritySummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CriticalCount")
)
instance Prelude.Hashable SeveritySummary
instance Prelude.NFData SeveritySummary