{-# 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.NotificationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WellArchitected.Types.LensUpgradeSummary
import Amazonka.WellArchitected.Types.NotificationType
data NotificationSummary = NotificationSummary'
{
NotificationSummary -> Maybe LensUpgradeSummary
lensUpgradeSummary :: Prelude.Maybe LensUpgradeSummary,
NotificationSummary -> Maybe NotificationType
type' :: Prelude.Maybe NotificationType
}
deriving (NotificationSummary -> NotificationSummary -> Bool
(NotificationSummary -> NotificationSummary -> Bool)
-> (NotificationSummary -> NotificationSummary -> Bool)
-> Eq NotificationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NotificationSummary -> NotificationSummary -> Bool
$c/= :: NotificationSummary -> NotificationSummary -> Bool
== :: NotificationSummary -> NotificationSummary -> Bool
$c== :: NotificationSummary -> NotificationSummary -> Bool
Prelude.Eq, ReadPrec [NotificationSummary]
ReadPrec NotificationSummary
Int -> ReadS NotificationSummary
ReadS [NotificationSummary]
(Int -> ReadS NotificationSummary)
-> ReadS [NotificationSummary]
-> ReadPrec NotificationSummary
-> ReadPrec [NotificationSummary]
-> Read NotificationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NotificationSummary]
$creadListPrec :: ReadPrec [NotificationSummary]
readPrec :: ReadPrec NotificationSummary
$creadPrec :: ReadPrec NotificationSummary
readList :: ReadS [NotificationSummary]
$creadList :: ReadS [NotificationSummary]
readsPrec :: Int -> ReadS NotificationSummary
$creadsPrec :: Int -> ReadS NotificationSummary
Prelude.Read, Int -> NotificationSummary -> ShowS
[NotificationSummary] -> ShowS
NotificationSummary -> String
(Int -> NotificationSummary -> ShowS)
-> (NotificationSummary -> String)
-> ([NotificationSummary] -> ShowS)
-> Show NotificationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NotificationSummary] -> ShowS
$cshowList :: [NotificationSummary] -> ShowS
show :: NotificationSummary -> String
$cshow :: NotificationSummary -> String
showsPrec :: Int -> NotificationSummary -> ShowS
$cshowsPrec :: Int -> NotificationSummary -> ShowS
Prelude.Show, (forall x. NotificationSummary -> Rep NotificationSummary x)
-> (forall x. Rep NotificationSummary x -> NotificationSummary)
-> Generic NotificationSummary
forall x. Rep NotificationSummary x -> NotificationSummary
forall x. NotificationSummary -> Rep NotificationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NotificationSummary x -> NotificationSummary
$cfrom :: forall x. NotificationSummary -> Rep NotificationSummary x
Prelude.Generic)
newNotificationSummary ::
NotificationSummary
newNotificationSummary :: NotificationSummary
newNotificationSummary =
NotificationSummary' :: Maybe LensUpgradeSummary
-> Maybe NotificationType -> NotificationSummary
NotificationSummary'
{ $sel:lensUpgradeSummary:NotificationSummary' :: Maybe LensUpgradeSummary
lensUpgradeSummary =
Maybe LensUpgradeSummary
forall a. Maybe a
Prelude.Nothing,
$sel:type':NotificationSummary' :: Maybe NotificationType
type' = Maybe NotificationType
forall a. Maybe a
Prelude.Nothing
}
notificationSummary_lensUpgradeSummary :: Lens.Lens' NotificationSummary (Prelude.Maybe LensUpgradeSummary)
notificationSummary_lensUpgradeSummary :: (Maybe LensUpgradeSummary -> f (Maybe LensUpgradeSummary))
-> NotificationSummary -> f NotificationSummary
notificationSummary_lensUpgradeSummary = (NotificationSummary -> Maybe LensUpgradeSummary)
-> (NotificationSummary
-> Maybe LensUpgradeSummary -> NotificationSummary)
-> Lens
NotificationSummary
NotificationSummary
(Maybe LensUpgradeSummary)
(Maybe LensUpgradeSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotificationSummary' {Maybe LensUpgradeSummary
lensUpgradeSummary :: Maybe LensUpgradeSummary
$sel:lensUpgradeSummary:NotificationSummary' :: NotificationSummary -> Maybe LensUpgradeSummary
lensUpgradeSummary} -> Maybe LensUpgradeSummary
lensUpgradeSummary) (\s :: NotificationSummary
s@NotificationSummary' {} Maybe LensUpgradeSummary
a -> NotificationSummary
s {$sel:lensUpgradeSummary:NotificationSummary' :: Maybe LensUpgradeSummary
lensUpgradeSummary = Maybe LensUpgradeSummary
a} :: NotificationSummary)
notificationSummary_type :: Lens.Lens' NotificationSummary (Prelude.Maybe NotificationType)
notificationSummary_type :: (Maybe NotificationType -> f (Maybe NotificationType))
-> NotificationSummary -> f NotificationSummary
notificationSummary_type = (NotificationSummary -> Maybe NotificationType)
-> (NotificationSummary
-> Maybe NotificationType -> NotificationSummary)
-> Lens
NotificationSummary
NotificationSummary
(Maybe NotificationType)
(Maybe NotificationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotificationSummary' {Maybe NotificationType
type' :: Maybe NotificationType
$sel:type':NotificationSummary' :: NotificationSummary -> Maybe NotificationType
type'} -> Maybe NotificationType
type') (\s :: NotificationSummary
s@NotificationSummary' {} Maybe NotificationType
a -> NotificationSummary
s {$sel:type':NotificationSummary' :: Maybe NotificationType
type' = Maybe NotificationType
a} :: NotificationSummary)
instance Core.FromJSON NotificationSummary where
parseJSON :: Value -> Parser NotificationSummary
parseJSON =
String
-> (Object -> Parser NotificationSummary)
-> Value
-> Parser NotificationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NotificationSummary"
( \Object
x ->
Maybe LensUpgradeSummary
-> Maybe NotificationType -> NotificationSummary
NotificationSummary'
(Maybe LensUpgradeSummary
-> Maybe NotificationType -> NotificationSummary)
-> Parser (Maybe LensUpgradeSummary)
-> Parser (Maybe NotificationType -> NotificationSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe LensUpgradeSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LensUpgradeSummary")
Parser (Maybe NotificationType -> NotificationSummary)
-> Parser (Maybe NotificationType) -> Parser NotificationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NotificationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
)
instance Prelude.Hashable NotificationSummary
instance Prelude.NFData NotificationSummary