{-# 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.LensReviewSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WellArchitected.Types.LensStatus
import Amazonka.WellArchitected.Types.Risk
data LensReviewSummary = LensReviewSummary'
{ LensReviewSummary -> Maybe Text
lensAlias :: Prelude.Maybe Prelude.Text,
LensReviewSummary -> Maybe (HashMap Risk Natural)
riskCounts :: Prelude.Maybe (Prelude.HashMap Risk Prelude.Natural),
LensReviewSummary -> Maybe Text
lensName :: Prelude.Maybe Prelude.Text,
LensReviewSummary -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
LensReviewSummary -> Maybe LensStatus
lensStatus :: Prelude.Maybe LensStatus,
LensReviewSummary -> Maybe Text
lensVersion :: Prelude.Maybe Prelude.Text
}
deriving (LensReviewSummary -> LensReviewSummary -> Bool
(LensReviewSummary -> LensReviewSummary -> Bool)
-> (LensReviewSummary -> LensReviewSummary -> Bool)
-> Eq LensReviewSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LensReviewSummary -> LensReviewSummary -> Bool
$c/= :: LensReviewSummary -> LensReviewSummary -> Bool
== :: LensReviewSummary -> LensReviewSummary -> Bool
$c== :: LensReviewSummary -> LensReviewSummary -> Bool
Prelude.Eq, ReadPrec [LensReviewSummary]
ReadPrec LensReviewSummary
Int -> ReadS LensReviewSummary
ReadS [LensReviewSummary]
(Int -> ReadS LensReviewSummary)
-> ReadS [LensReviewSummary]
-> ReadPrec LensReviewSummary
-> ReadPrec [LensReviewSummary]
-> Read LensReviewSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LensReviewSummary]
$creadListPrec :: ReadPrec [LensReviewSummary]
readPrec :: ReadPrec LensReviewSummary
$creadPrec :: ReadPrec LensReviewSummary
readList :: ReadS [LensReviewSummary]
$creadList :: ReadS [LensReviewSummary]
readsPrec :: Int -> ReadS LensReviewSummary
$creadsPrec :: Int -> ReadS LensReviewSummary
Prelude.Read, Int -> LensReviewSummary -> ShowS
[LensReviewSummary] -> ShowS
LensReviewSummary -> String
(Int -> LensReviewSummary -> ShowS)
-> (LensReviewSummary -> String)
-> ([LensReviewSummary] -> ShowS)
-> Show LensReviewSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LensReviewSummary] -> ShowS
$cshowList :: [LensReviewSummary] -> ShowS
show :: LensReviewSummary -> String
$cshow :: LensReviewSummary -> String
showsPrec :: Int -> LensReviewSummary -> ShowS
$cshowsPrec :: Int -> LensReviewSummary -> ShowS
Prelude.Show, (forall x. LensReviewSummary -> Rep LensReviewSummary x)
-> (forall x. Rep LensReviewSummary x -> LensReviewSummary)
-> Generic LensReviewSummary
forall x. Rep LensReviewSummary x -> LensReviewSummary
forall x. LensReviewSummary -> Rep LensReviewSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LensReviewSummary x -> LensReviewSummary
$cfrom :: forall x. LensReviewSummary -> Rep LensReviewSummary x
Prelude.Generic)
newLensReviewSummary ::
LensReviewSummary
newLensReviewSummary :: LensReviewSummary
newLensReviewSummary =
LensReviewSummary' :: Maybe Text
-> Maybe (HashMap Risk Natural)
-> Maybe Text
-> Maybe POSIX
-> Maybe LensStatus
-> Maybe Text
-> LensReviewSummary
LensReviewSummary'
{ $sel:lensAlias:LensReviewSummary' :: Maybe Text
lensAlias = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:riskCounts:LensReviewSummary' :: Maybe (HashMap Risk Natural)
riskCounts = Maybe (HashMap Risk Natural)
forall a. Maybe a
Prelude.Nothing,
$sel:lensName:LensReviewSummary' :: Maybe Text
lensName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:LensReviewSummary' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lensStatus:LensReviewSummary' :: Maybe LensStatus
lensStatus = Maybe LensStatus
forall a. Maybe a
Prelude.Nothing,
$sel:lensVersion:LensReviewSummary' :: Maybe Text
lensVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
lensReviewSummary_lensAlias :: Lens.Lens' LensReviewSummary (Prelude.Maybe Prelude.Text)
lensReviewSummary_lensAlias :: (Maybe Text -> f (Maybe Text))
-> LensReviewSummary -> f LensReviewSummary
lensReviewSummary_lensAlias = (LensReviewSummary -> Maybe Text)
-> (LensReviewSummary -> Maybe Text -> LensReviewSummary)
-> Lens
LensReviewSummary LensReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensReviewSummary' {Maybe Text
lensAlias :: Maybe Text
$sel:lensAlias:LensReviewSummary' :: LensReviewSummary -> Maybe Text
lensAlias} -> Maybe Text
lensAlias) (\s :: LensReviewSummary
s@LensReviewSummary' {} Maybe Text
a -> LensReviewSummary
s {$sel:lensAlias:LensReviewSummary' :: Maybe Text
lensAlias = Maybe Text
a} :: LensReviewSummary)
lensReviewSummary_riskCounts :: Lens.Lens' LensReviewSummary (Prelude.Maybe (Prelude.HashMap Risk Prelude.Natural))
lensReviewSummary_riskCounts :: (Maybe (HashMap Risk Natural) -> f (Maybe (HashMap Risk Natural)))
-> LensReviewSummary -> f LensReviewSummary
lensReviewSummary_riskCounts = (LensReviewSummary -> Maybe (HashMap Risk Natural))
-> (LensReviewSummary
-> Maybe (HashMap Risk Natural) -> LensReviewSummary)
-> Lens
LensReviewSummary
LensReviewSummary
(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 (\LensReviewSummary' {Maybe (HashMap Risk Natural)
riskCounts :: Maybe (HashMap Risk Natural)
$sel:riskCounts:LensReviewSummary' :: LensReviewSummary -> Maybe (HashMap Risk Natural)
riskCounts} -> Maybe (HashMap Risk Natural)
riskCounts) (\s :: LensReviewSummary
s@LensReviewSummary' {} Maybe (HashMap Risk Natural)
a -> LensReviewSummary
s {$sel:riskCounts:LensReviewSummary' :: Maybe (HashMap Risk Natural)
riskCounts = Maybe (HashMap Risk Natural)
a} :: LensReviewSummary) ((Maybe (HashMap Risk Natural) -> f (Maybe (HashMap Risk Natural)))
-> LensReviewSummary -> f LensReviewSummary)
-> ((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)))
-> LensReviewSummary
-> f LensReviewSummary
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
lensReviewSummary_lensName :: Lens.Lens' LensReviewSummary (Prelude.Maybe Prelude.Text)
lensReviewSummary_lensName :: (Maybe Text -> f (Maybe Text))
-> LensReviewSummary -> f LensReviewSummary
lensReviewSummary_lensName = (LensReviewSummary -> Maybe Text)
-> (LensReviewSummary -> Maybe Text -> LensReviewSummary)
-> Lens
LensReviewSummary LensReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensReviewSummary' {Maybe Text
lensName :: Maybe Text
$sel:lensName:LensReviewSummary' :: LensReviewSummary -> Maybe Text
lensName} -> Maybe Text
lensName) (\s :: LensReviewSummary
s@LensReviewSummary' {} Maybe Text
a -> LensReviewSummary
s {$sel:lensName:LensReviewSummary' :: Maybe Text
lensName = Maybe Text
a} :: LensReviewSummary)
lensReviewSummary_updatedAt :: Lens.Lens' LensReviewSummary (Prelude.Maybe Prelude.UTCTime)
lensReviewSummary_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> LensReviewSummary -> f LensReviewSummary
lensReviewSummary_updatedAt = (LensReviewSummary -> Maybe POSIX)
-> (LensReviewSummary -> Maybe POSIX -> LensReviewSummary)
-> Lens
LensReviewSummary LensReviewSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensReviewSummary' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:LensReviewSummary' :: LensReviewSummary -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: LensReviewSummary
s@LensReviewSummary' {} Maybe POSIX
a -> LensReviewSummary
s {$sel:updatedAt:LensReviewSummary' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: LensReviewSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> LensReviewSummary -> f LensReviewSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> LensReviewSummary
-> f LensReviewSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
lensReviewSummary_lensStatus :: Lens.Lens' LensReviewSummary (Prelude.Maybe LensStatus)
lensReviewSummary_lensStatus :: (Maybe LensStatus -> f (Maybe LensStatus))
-> LensReviewSummary -> f LensReviewSummary
lensReviewSummary_lensStatus = (LensReviewSummary -> Maybe LensStatus)
-> (LensReviewSummary -> Maybe LensStatus -> LensReviewSummary)
-> Lens
LensReviewSummary
LensReviewSummary
(Maybe LensStatus)
(Maybe LensStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensReviewSummary' {Maybe LensStatus
lensStatus :: Maybe LensStatus
$sel:lensStatus:LensReviewSummary' :: LensReviewSummary -> Maybe LensStatus
lensStatus} -> Maybe LensStatus
lensStatus) (\s :: LensReviewSummary
s@LensReviewSummary' {} Maybe LensStatus
a -> LensReviewSummary
s {$sel:lensStatus:LensReviewSummary' :: Maybe LensStatus
lensStatus = Maybe LensStatus
a} :: LensReviewSummary)
lensReviewSummary_lensVersion :: Lens.Lens' LensReviewSummary (Prelude.Maybe Prelude.Text)
lensReviewSummary_lensVersion :: (Maybe Text -> f (Maybe Text))
-> LensReviewSummary -> f LensReviewSummary
lensReviewSummary_lensVersion = (LensReviewSummary -> Maybe Text)
-> (LensReviewSummary -> Maybe Text -> LensReviewSummary)
-> Lens
LensReviewSummary LensReviewSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensReviewSummary' {Maybe Text
lensVersion :: Maybe Text
$sel:lensVersion:LensReviewSummary' :: LensReviewSummary -> Maybe Text
lensVersion} -> Maybe Text
lensVersion) (\s :: LensReviewSummary
s@LensReviewSummary' {} Maybe Text
a -> LensReviewSummary
s {$sel:lensVersion:LensReviewSummary' :: Maybe Text
lensVersion = Maybe Text
a} :: LensReviewSummary)
instance Core.FromJSON LensReviewSummary where
parseJSON :: Value -> Parser LensReviewSummary
parseJSON =
String
-> (Object -> Parser LensReviewSummary)
-> Value
-> Parser LensReviewSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LensReviewSummary"
( \Object
x ->
Maybe Text
-> Maybe (HashMap Risk Natural)
-> Maybe Text
-> Maybe POSIX
-> Maybe LensStatus
-> Maybe Text
-> LensReviewSummary
LensReviewSummary'
(Maybe Text
-> Maybe (HashMap Risk Natural)
-> Maybe Text
-> Maybe POSIX
-> Maybe LensStatus
-> Maybe Text
-> LensReviewSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Risk Natural)
-> Maybe Text
-> Maybe POSIX
-> Maybe LensStatus
-> Maybe Text
-> LensReviewSummary)
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
"LensAlias")
Parser
(Maybe (HashMap Risk Natural)
-> Maybe Text
-> Maybe POSIX
-> Maybe LensStatus
-> Maybe Text
-> LensReviewSummary)
-> Parser (Maybe (HashMap Risk Natural))
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe LensStatus
-> Maybe Text
-> LensReviewSummary)
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
-> Maybe POSIX
-> Maybe LensStatus
-> Maybe Text
-> LensReviewSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe LensStatus -> Maybe Text -> LensReviewSummary)
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
"LensName")
Parser
(Maybe POSIX
-> Maybe LensStatus -> Maybe Text -> LensReviewSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe LensStatus -> Maybe Text -> LensReviewSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UpdatedAt")
Parser (Maybe LensStatus -> Maybe Text -> LensReviewSummary)
-> Parser (Maybe LensStatus)
-> Parser (Maybe Text -> LensReviewSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LensStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LensStatus")
Parser (Maybe Text -> LensReviewSummary)
-> Parser (Maybe Text) -> Parser LensReviewSummary
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
"LensVersion")
)
instance Prelude.Hashable LensReviewSummary
instance Prelude.NFData LensReviewSummary