{-# 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.ImprovementSummary 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 ImprovementSummary = ImprovementSummary'
{ ImprovementSummary -> Maybe Text
pillarId :: Prelude.Maybe Prelude.Text,
ImprovementSummary -> Maybe Text
improvementPlanUrl :: Prelude.Maybe Prelude.Text,
ImprovementSummary -> Maybe Risk
risk :: Prelude.Maybe Risk,
ImprovementSummary -> Maybe Text
questionTitle :: Prelude.Maybe Prelude.Text,
ImprovementSummary -> Maybe Text
questionId :: Prelude.Maybe Prelude.Text
}
deriving (ImprovementSummary -> ImprovementSummary -> Bool
(ImprovementSummary -> ImprovementSummary -> Bool)
-> (ImprovementSummary -> ImprovementSummary -> Bool)
-> Eq ImprovementSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImprovementSummary -> ImprovementSummary -> Bool
$c/= :: ImprovementSummary -> ImprovementSummary -> Bool
== :: ImprovementSummary -> ImprovementSummary -> Bool
$c== :: ImprovementSummary -> ImprovementSummary -> Bool
Prelude.Eq, ReadPrec [ImprovementSummary]
ReadPrec ImprovementSummary
Int -> ReadS ImprovementSummary
ReadS [ImprovementSummary]
(Int -> ReadS ImprovementSummary)
-> ReadS [ImprovementSummary]
-> ReadPrec ImprovementSummary
-> ReadPrec [ImprovementSummary]
-> Read ImprovementSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImprovementSummary]
$creadListPrec :: ReadPrec [ImprovementSummary]
readPrec :: ReadPrec ImprovementSummary
$creadPrec :: ReadPrec ImprovementSummary
readList :: ReadS [ImprovementSummary]
$creadList :: ReadS [ImprovementSummary]
readsPrec :: Int -> ReadS ImprovementSummary
$creadsPrec :: Int -> ReadS ImprovementSummary
Prelude.Read, Int -> ImprovementSummary -> ShowS
[ImprovementSummary] -> ShowS
ImprovementSummary -> String
(Int -> ImprovementSummary -> ShowS)
-> (ImprovementSummary -> String)
-> ([ImprovementSummary] -> ShowS)
-> Show ImprovementSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImprovementSummary] -> ShowS
$cshowList :: [ImprovementSummary] -> ShowS
show :: ImprovementSummary -> String
$cshow :: ImprovementSummary -> String
showsPrec :: Int -> ImprovementSummary -> ShowS
$cshowsPrec :: Int -> ImprovementSummary -> ShowS
Prelude.Show, (forall x. ImprovementSummary -> Rep ImprovementSummary x)
-> (forall x. Rep ImprovementSummary x -> ImprovementSummary)
-> Generic ImprovementSummary
forall x. Rep ImprovementSummary x -> ImprovementSummary
forall x. ImprovementSummary -> Rep ImprovementSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImprovementSummary x -> ImprovementSummary
$cfrom :: forall x. ImprovementSummary -> Rep ImprovementSummary x
Prelude.Generic)
newImprovementSummary ::
ImprovementSummary
newImprovementSummary :: ImprovementSummary
newImprovementSummary =
ImprovementSummary' :: Maybe Text
-> Maybe Text
-> Maybe Risk
-> Maybe Text
-> Maybe Text
-> ImprovementSummary
ImprovementSummary'
{ $sel:pillarId:ImprovementSummary' :: Maybe Text
pillarId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:improvementPlanUrl:ImprovementSummary' :: Maybe Text
improvementPlanUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:risk:ImprovementSummary' :: Maybe Risk
risk = Maybe Risk
forall a. Maybe a
Prelude.Nothing,
$sel:questionTitle:ImprovementSummary' :: Maybe Text
questionTitle = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:questionId:ImprovementSummary' :: Maybe Text
questionId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
improvementSummary_pillarId :: Lens.Lens' ImprovementSummary (Prelude.Maybe Prelude.Text)
improvementSummary_pillarId :: (Maybe Text -> f (Maybe Text))
-> ImprovementSummary -> f ImprovementSummary
improvementSummary_pillarId = (ImprovementSummary -> Maybe Text)
-> (ImprovementSummary -> Maybe Text -> ImprovementSummary)
-> Lens
ImprovementSummary ImprovementSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImprovementSummary' {Maybe Text
pillarId :: Maybe Text
$sel:pillarId:ImprovementSummary' :: ImprovementSummary -> Maybe Text
pillarId} -> Maybe Text
pillarId) (\s :: ImprovementSummary
s@ImprovementSummary' {} Maybe Text
a -> ImprovementSummary
s {$sel:pillarId:ImprovementSummary' :: Maybe Text
pillarId = Maybe Text
a} :: ImprovementSummary)
improvementSummary_improvementPlanUrl :: Lens.Lens' ImprovementSummary (Prelude.Maybe Prelude.Text)
improvementSummary_improvementPlanUrl :: (Maybe Text -> f (Maybe Text))
-> ImprovementSummary -> f ImprovementSummary
improvementSummary_improvementPlanUrl = (ImprovementSummary -> Maybe Text)
-> (ImprovementSummary -> Maybe Text -> ImprovementSummary)
-> Lens
ImprovementSummary ImprovementSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImprovementSummary' {Maybe Text
improvementPlanUrl :: Maybe Text
$sel:improvementPlanUrl:ImprovementSummary' :: ImprovementSummary -> Maybe Text
improvementPlanUrl} -> Maybe Text
improvementPlanUrl) (\s :: ImprovementSummary
s@ImprovementSummary' {} Maybe Text
a -> ImprovementSummary
s {$sel:improvementPlanUrl:ImprovementSummary' :: Maybe Text
improvementPlanUrl = Maybe Text
a} :: ImprovementSummary)
improvementSummary_risk :: Lens.Lens' ImprovementSummary (Prelude.Maybe Risk)
improvementSummary_risk :: (Maybe Risk -> f (Maybe Risk))
-> ImprovementSummary -> f ImprovementSummary
improvementSummary_risk = (ImprovementSummary -> Maybe Risk)
-> (ImprovementSummary -> Maybe Risk -> ImprovementSummary)
-> Lens
ImprovementSummary ImprovementSummary (Maybe Risk) (Maybe Risk)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImprovementSummary' {Maybe Risk
risk :: Maybe Risk
$sel:risk:ImprovementSummary' :: ImprovementSummary -> Maybe Risk
risk} -> Maybe Risk
risk) (\s :: ImprovementSummary
s@ImprovementSummary' {} Maybe Risk
a -> ImprovementSummary
s {$sel:risk:ImprovementSummary' :: Maybe Risk
risk = Maybe Risk
a} :: ImprovementSummary)
improvementSummary_questionTitle :: Lens.Lens' ImprovementSummary (Prelude.Maybe Prelude.Text)
improvementSummary_questionTitle :: (Maybe Text -> f (Maybe Text))
-> ImprovementSummary -> f ImprovementSummary
improvementSummary_questionTitle = (ImprovementSummary -> Maybe Text)
-> (ImprovementSummary -> Maybe Text -> ImprovementSummary)
-> Lens
ImprovementSummary ImprovementSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImprovementSummary' {Maybe Text
questionTitle :: Maybe Text
$sel:questionTitle:ImprovementSummary' :: ImprovementSummary -> Maybe Text
questionTitle} -> Maybe Text
questionTitle) (\s :: ImprovementSummary
s@ImprovementSummary' {} Maybe Text
a -> ImprovementSummary
s {$sel:questionTitle:ImprovementSummary' :: Maybe Text
questionTitle = Maybe Text
a} :: ImprovementSummary)
improvementSummary_questionId :: Lens.Lens' ImprovementSummary (Prelude.Maybe Prelude.Text)
improvementSummary_questionId :: (Maybe Text -> f (Maybe Text))
-> ImprovementSummary -> f ImprovementSummary
improvementSummary_questionId = (ImprovementSummary -> Maybe Text)
-> (ImprovementSummary -> Maybe Text -> ImprovementSummary)
-> Lens
ImprovementSummary ImprovementSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImprovementSummary' {Maybe Text
questionId :: Maybe Text
$sel:questionId:ImprovementSummary' :: ImprovementSummary -> Maybe Text
questionId} -> Maybe Text
questionId) (\s :: ImprovementSummary
s@ImprovementSummary' {} Maybe Text
a -> ImprovementSummary
s {$sel:questionId:ImprovementSummary' :: Maybe Text
questionId = Maybe Text
a} :: ImprovementSummary)
instance Core.FromJSON ImprovementSummary where
parseJSON :: Value -> Parser ImprovementSummary
parseJSON =
String
-> (Object -> Parser ImprovementSummary)
-> Value
-> Parser ImprovementSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ImprovementSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Risk
-> Maybe Text
-> Maybe Text
-> ImprovementSummary
ImprovementSummary'
(Maybe Text
-> Maybe Text
-> Maybe Risk
-> Maybe Text
-> Maybe Text
-> ImprovementSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Risk -> Maybe Text -> Maybe Text -> ImprovementSummary)
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 Risk -> Maybe Text -> Maybe Text -> ImprovementSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Risk -> Maybe Text -> Maybe Text -> ImprovementSummary)
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
"ImprovementPlanUrl")
Parser
(Maybe Risk -> Maybe Text -> Maybe Text -> ImprovementSummary)
-> Parser (Maybe Risk)
-> Parser (Maybe Text -> Maybe Text -> ImprovementSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Risk)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Risk")
Parser (Maybe Text -> Maybe Text -> ImprovementSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ImprovementSummary)
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
"QuestionTitle")
Parser (Maybe Text -> ImprovementSummary)
-> Parser (Maybe Text) -> Parser ImprovementSummary
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
"QuestionId")
)
instance Prelude.Hashable ImprovementSummary
instance Prelude.NFData ImprovementSummary