{-# 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.WellArchitected.Types.PillarReviewSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WellArchitected.Types.Risk
data PillarReviewSummary = PillarReviewSummary'
{ PillarReviewSummary -> Maybe Text
pillarId :: Prelude.Maybe Prelude.Text,
PillarReviewSummary -> Maybe Text
pillarName :: Prelude.Maybe Prelude.Text,
PillarReviewSummary -> Maybe (HashMap Risk Natural)
riskCounts :: Prelude.Maybe (Prelude.HashMap Risk Prelude.Natural),
PillarReviewSummary -> Maybe Text
notes :: Prelude.Maybe Prelude.Text
}
deriving (PillarReviewSummary -> PillarReviewSummary -> Bool
(PillarReviewSummary -> PillarReviewSummary -> Bool)
-> (PillarReviewSummary -> PillarReviewSummary -> Bool)
-> Eq PillarReviewSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PillarReviewSummary -> PillarReviewSummary -> Bool
$c/= :: PillarReviewSummary -> PillarReviewSummary -> Bool
== :: PillarReviewSummary -> PillarReviewSummary -> Bool
$c== :: PillarReviewSummary -> PillarReviewSummary -> Bool
Prelude.Eq, ReadPrec [PillarReviewSummary]
ReadPrec PillarReviewSummary
Int -> ReadS PillarReviewSummary
ReadS [PillarReviewSummary]
(Int -> ReadS PillarReviewSummary)
-> ReadS [PillarReviewSummary]
-> ReadPrec PillarReviewSummary
-> ReadPrec [PillarReviewSummary]
-> Read PillarReviewSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PillarReviewSummary]
$creadListPrec :: ReadPrec [PillarReviewSummary]
readPrec :: ReadPrec PillarReviewSummary
$creadPrec :: ReadPrec PillarReviewSummary
readList :: ReadS [PillarReviewSummary]
$creadList :: ReadS [PillarReviewSummary]
readsPrec :: Int -> ReadS PillarReviewSummary
$creadsPrec :: Int -> ReadS PillarReviewSummary
Prelude.Read, Int -> PillarReviewSummary -> ShowS
[PillarReviewSummary] -> ShowS
PillarReviewSummary -> String
(Int -> PillarReviewSummary -> ShowS)
-> (PillarReviewSummary -> String)
-> ([PillarReviewSummary] -> ShowS)
-> Show PillarReviewSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PillarReviewSummary] -> ShowS
$cshowList :: [PillarReviewSummary] -> ShowS
show :: PillarReviewSummary -> String
$cshow :: PillarReviewSummary -> String
showsPrec :: Int -> PillarReviewSummary -> ShowS
$cshowsPrec :: Int -> PillarReviewSummary -> ShowS
Prelude.Show, (forall x. PillarReviewSummary -> Rep PillarReviewSummary x)
-> (forall x. Rep PillarReviewSummary x -> PillarReviewSummary)
-> Generic PillarReviewSummary
forall x. Rep PillarReviewSummary x -> PillarReviewSummary
forall x. PillarReviewSummary -> Rep PillarReviewSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PillarReviewSummary x -> PillarReviewSummary
$cfrom :: forall x. PillarReviewSummary -> Rep PillarReviewSummary x
Prelude.Generic)
newPillarReviewSummary ::
PillarReviewSummary
newPillarReviewSummary :: PillarReviewSummary
newPillarReviewSummary =
PillarReviewSummary' :: Maybe Text
-> Maybe Text
-> Maybe (HashMap Risk Natural)
-> Maybe Text
-> PillarReviewSummary
PillarReviewSummary'
{ $sel:pillarId:PillarReviewSummary' :: Maybe Text
pillarId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pillarName:PillarReviewSummary' :: Maybe Text
pillarName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:riskCounts:PillarReviewSummary' :: Maybe (HashMap Risk Natural)
riskCounts = Maybe (HashMap Risk Natural)
forall a. Maybe a
Prelude.Nothing,
$sel:notes:PillarReviewSummary' :: Maybe Text
notes = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
pillarReviewSummary_pillarId :: Lens.Lens' PillarReviewSummary (Prelude.Maybe Prelude.Text)
pillarReviewSummary_pillarId :: (Maybe Text -> f (Maybe Text))
-> PillarReviewSummary -> f PillarReviewSummary
pillarReviewSummary_pillarId = (PillarReviewSummary -> Maybe Text)
-> (PillarReviewSummary -> Maybe Text -> PillarReviewSummary)
-> Lens
PillarReviewSummary PillarReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PillarReviewSummary' {Maybe Text
pillarId :: Maybe Text
$sel:pillarId:PillarReviewSummary' :: PillarReviewSummary -> Maybe Text
pillarId} -> Maybe Text
pillarId) (\s :: PillarReviewSummary
s@PillarReviewSummary' {} Maybe Text
a -> PillarReviewSummary
s {$sel:pillarId:PillarReviewSummary' :: Maybe Text
pillarId = Maybe Text
a} :: PillarReviewSummary)
pillarReviewSummary_pillarName :: Lens.Lens' PillarReviewSummary (Prelude.Maybe Prelude.Text)
pillarReviewSummary_pillarName :: (Maybe Text -> f (Maybe Text))
-> PillarReviewSummary -> f PillarReviewSummary
pillarReviewSummary_pillarName = (PillarReviewSummary -> Maybe Text)
-> (PillarReviewSummary -> Maybe Text -> PillarReviewSummary)
-> Lens
PillarReviewSummary PillarReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PillarReviewSummary' {Maybe Text
pillarName :: Maybe Text
$sel:pillarName:PillarReviewSummary' :: PillarReviewSummary -> Maybe Text
pillarName} -> Maybe Text
pillarName) (\s :: PillarReviewSummary
s@PillarReviewSummary' {} Maybe Text
a -> PillarReviewSummary
s {$sel:pillarName:PillarReviewSummary' :: Maybe Text
pillarName = Maybe Text
a} :: PillarReviewSummary)
pillarReviewSummary_riskCounts :: Lens.Lens' PillarReviewSummary (Prelude.Maybe (Prelude.HashMap Risk Prelude.Natural))
pillarReviewSummary_riskCounts :: (Maybe (HashMap Risk Natural) -> f (Maybe (HashMap Risk Natural)))
-> PillarReviewSummary -> f PillarReviewSummary
pillarReviewSummary_riskCounts = (PillarReviewSummary -> Maybe (HashMap Risk Natural))
-> (PillarReviewSummary
-> Maybe (HashMap Risk Natural) -> PillarReviewSummary)
-> Lens
PillarReviewSummary
PillarReviewSummary
(Maybe (HashMap Risk Natural))
(Maybe (HashMap Risk Natural))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PillarReviewSummary' {Maybe (HashMap Risk Natural)
riskCounts :: Maybe (HashMap Risk Natural)
$sel:riskCounts:PillarReviewSummary' :: PillarReviewSummary -> Maybe (HashMap Risk Natural)
riskCounts} -> Maybe (HashMap Risk Natural)
riskCounts) (\s :: PillarReviewSummary
s@PillarReviewSummary' {} Maybe (HashMap Risk Natural)
a -> PillarReviewSummary
s {$sel:riskCounts:PillarReviewSummary' :: Maybe (HashMap Risk Natural)
riskCounts = Maybe (HashMap Risk Natural)
a} :: PillarReviewSummary) ((Maybe (HashMap Risk Natural) -> f (Maybe (HashMap Risk Natural)))
-> PillarReviewSummary -> f PillarReviewSummary)
-> ((Maybe (HashMap Risk Natural)
-> f (Maybe (HashMap Risk Natural)))
-> Maybe (HashMap Risk Natural)
-> f (Maybe (HashMap Risk Natural)))
-> (Maybe (HashMap Risk Natural)
-> f (Maybe (HashMap Risk Natural)))
-> PillarReviewSummary
-> f PillarReviewSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Risk Natural)
(HashMap Risk Natural)
(HashMap Risk Natural)
(HashMap Risk Natural)
-> Iso
(Maybe (HashMap Risk Natural))
(Maybe (HashMap Risk Natural))
(Maybe (HashMap Risk Natural))
(Maybe (HashMap Risk Natural))
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
(HashMap Risk Natural)
(HashMap Risk Natural)
(HashMap Risk Natural)
(HashMap Risk Natural)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
pillarReviewSummary_notes :: Lens.Lens' PillarReviewSummary (Prelude.Maybe Prelude.Text)
pillarReviewSummary_notes :: (Maybe Text -> f (Maybe Text))
-> PillarReviewSummary -> f PillarReviewSummary
pillarReviewSummary_notes = (PillarReviewSummary -> Maybe Text)
-> (PillarReviewSummary -> Maybe Text -> PillarReviewSummary)
-> Lens
PillarReviewSummary PillarReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PillarReviewSummary' {Maybe Text
notes :: Maybe Text
$sel:notes:PillarReviewSummary' :: PillarReviewSummary -> Maybe Text
notes} -> Maybe Text
notes) (\s :: PillarReviewSummary
s@PillarReviewSummary' {} Maybe Text
a -> PillarReviewSummary
s {$sel:notes:PillarReviewSummary' :: Maybe Text
notes = Maybe Text
a} :: PillarReviewSummary)
instance Core.FromJSON PillarReviewSummary where
parseJSON :: Value -> Parser PillarReviewSummary
parseJSON =
String
-> (Object -> Parser PillarReviewSummary)
-> Value
-> Parser PillarReviewSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PillarReviewSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe (HashMap Risk Natural)
-> Maybe Text
-> PillarReviewSummary
PillarReviewSummary'
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Risk Natural)
-> Maybe Text
-> PillarReviewSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (HashMap Risk Natural)
-> Maybe Text
-> PillarReviewSummary)
forall (f :: * -> *) a b. Functor 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
"PillarId")
Parser
(Maybe Text
-> Maybe (HashMap Risk Natural)
-> Maybe Text
-> PillarReviewSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Risk Natural) -> Maybe Text -> PillarReviewSummary)
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
"PillarName")
Parser
(Maybe (HashMap Risk Natural) -> Maybe Text -> PillarReviewSummary)
-> Parser (Maybe (HashMap Risk Natural))
-> Parser (Maybe Text -> PillarReviewSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Risk Natural)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RiskCounts" Parser (Maybe (Maybe (HashMap Risk Natural)))
-> Maybe (HashMap Risk Natural)
-> Parser (Maybe (HashMap Risk Natural))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Risk Natural)
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Text -> PillarReviewSummary)
-> Parser (Maybe Text) -> Parser PillarReviewSummary
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
"Notes")
)
instance Prelude.Hashable PillarReviewSummary
instance Prelude.NFData PillarReviewSummary