{-# 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.DevOpsGuru.Types.ProactiveInsightSummary where
import qualified Amazonka.Core as Core
import Amazonka.DevOpsGuru.Types.InsightSeverity
import Amazonka.DevOpsGuru.Types.InsightStatus
import Amazonka.DevOpsGuru.Types.InsightTimeRange
import Amazonka.DevOpsGuru.Types.PredictionTimeRange
import Amazonka.DevOpsGuru.Types.ResourceCollection
import Amazonka.DevOpsGuru.Types.ServiceCollection
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProactiveInsightSummary = ProactiveInsightSummary'
{
ProactiveInsightSummary -> Maybe InsightStatus
status :: Prelude.Maybe InsightStatus,
ProactiveInsightSummary -> Maybe ResourceCollection
resourceCollection :: Prelude.Maybe ResourceCollection,
ProactiveInsightSummary -> Maybe InsightSeverity
severity :: Prelude.Maybe InsightSeverity,
ProactiveInsightSummary -> Maybe InsightTimeRange
insightTimeRange :: Prelude.Maybe InsightTimeRange,
ProactiveInsightSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ProactiveInsightSummary -> Maybe PredictionTimeRange
predictionTimeRange :: Prelude.Maybe PredictionTimeRange,
ProactiveInsightSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ProactiveInsightSummary -> Maybe ServiceCollection
serviceCollection :: Prelude.Maybe ServiceCollection
}
deriving (ProactiveInsightSummary -> ProactiveInsightSummary -> Bool
(ProactiveInsightSummary -> ProactiveInsightSummary -> Bool)
-> (ProactiveInsightSummary -> ProactiveInsightSummary -> Bool)
-> Eq ProactiveInsightSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProactiveInsightSummary -> ProactiveInsightSummary -> Bool
$c/= :: ProactiveInsightSummary -> ProactiveInsightSummary -> Bool
== :: ProactiveInsightSummary -> ProactiveInsightSummary -> Bool
$c== :: ProactiveInsightSummary -> ProactiveInsightSummary -> Bool
Prelude.Eq, ReadPrec [ProactiveInsightSummary]
ReadPrec ProactiveInsightSummary
Int -> ReadS ProactiveInsightSummary
ReadS [ProactiveInsightSummary]
(Int -> ReadS ProactiveInsightSummary)
-> ReadS [ProactiveInsightSummary]
-> ReadPrec ProactiveInsightSummary
-> ReadPrec [ProactiveInsightSummary]
-> Read ProactiveInsightSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProactiveInsightSummary]
$creadListPrec :: ReadPrec [ProactiveInsightSummary]
readPrec :: ReadPrec ProactiveInsightSummary
$creadPrec :: ReadPrec ProactiveInsightSummary
readList :: ReadS [ProactiveInsightSummary]
$creadList :: ReadS [ProactiveInsightSummary]
readsPrec :: Int -> ReadS ProactiveInsightSummary
$creadsPrec :: Int -> ReadS ProactiveInsightSummary
Prelude.Read, Int -> ProactiveInsightSummary -> ShowS
[ProactiveInsightSummary] -> ShowS
ProactiveInsightSummary -> String
(Int -> ProactiveInsightSummary -> ShowS)
-> (ProactiveInsightSummary -> String)
-> ([ProactiveInsightSummary] -> ShowS)
-> Show ProactiveInsightSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProactiveInsightSummary] -> ShowS
$cshowList :: [ProactiveInsightSummary] -> ShowS
show :: ProactiveInsightSummary -> String
$cshow :: ProactiveInsightSummary -> String
showsPrec :: Int -> ProactiveInsightSummary -> ShowS
$cshowsPrec :: Int -> ProactiveInsightSummary -> ShowS
Prelude.Show, (forall x.
ProactiveInsightSummary -> Rep ProactiveInsightSummary x)
-> (forall x.
Rep ProactiveInsightSummary x -> ProactiveInsightSummary)
-> Generic ProactiveInsightSummary
forall x. Rep ProactiveInsightSummary x -> ProactiveInsightSummary
forall x. ProactiveInsightSummary -> Rep ProactiveInsightSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProactiveInsightSummary x -> ProactiveInsightSummary
$cfrom :: forall x. ProactiveInsightSummary -> Rep ProactiveInsightSummary x
Prelude.Generic)
newProactiveInsightSummary ::
ProactiveInsightSummary
newProactiveInsightSummary :: ProactiveInsightSummary
newProactiveInsightSummary =
ProactiveInsightSummary' :: Maybe InsightStatus
-> Maybe ResourceCollection
-> Maybe InsightSeverity
-> Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary
ProactiveInsightSummary'
{ $sel:status:ProactiveInsightSummary' :: Maybe InsightStatus
status = Maybe InsightStatus
forall a. Maybe a
Prelude.Nothing,
$sel:resourceCollection:ProactiveInsightSummary' :: Maybe ResourceCollection
resourceCollection = Maybe ResourceCollection
forall a. Maybe a
Prelude.Nothing,
$sel:severity:ProactiveInsightSummary' :: Maybe InsightSeverity
severity = Maybe InsightSeverity
forall a. Maybe a
Prelude.Nothing,
$sel:insightTimeRange:ProactiveInsightSummary' :: Maybe InsightTimeRange
insightTimeRange = Maybe InsightTimeRange
forall a. Maybe a
Prelude.Nothing,
$sel:name:ProactiveInsightSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:predictionTimeRange:ProactiveInsightSummary' :: Maybe PredictionTimeRange
predictionTimeRange = Maybe PredictionTimeRange
forall a. Maybe a
Prelude.Nothing,
$sel:id:ProactiveInsightSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceCollection:ProactiveInsightSummary' :: Maybe ServiceCollection
serviceCollection = Maybe ServiceCollection
forall a. Maybe a
Prelude.Nothing
}
proactiveInsightSummary_status :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe InsightStatus)
proactiveInsightSummary_status :: (Maybe InsightStatus -> f (Maybe InsightStatus))
-> ProactiveInsightSummary -> f ProactiveInsightSummary
proactiveInsightSummary_status = (ProactiveInsightSummary -> Maybe InsightStatus)
-> (ProactiveInsightSummary
-> Maybe InsightStatus -> ProactiveInsightSummary)
-> Lens
ProactiveInsightSummary
ProactiveInsightSummary
(Maybe InsightStatus)
(Maybe InsightStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProactiveInsightSummary' {Maybe InsightStatus
status :: Maybe InsightStatus
$sel:status:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe InsightStatus
status} -> Maybe InsightStatus
status) (\s :: ProactiveInsightSummary
s@ProactiveInsightSummary' {} Maybe InsightStatus
a -> ProactiveInsightSummary
s {$sel:status:ProactiveInsightSummary' :: Maybe InsightStatus
status = Maybe InsightStatus
a} :: ProactiveInsightSummary)
proactiveInsightSummary_resourceCollection :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe ResourceCollection)
proactiveInsightSummary_resourceCollection :: (Maybe ResourceCollection -> f (Maybe ResourceCollection))
-> ProactiveInsightSummary -> f ProactiveInsightSummary
proactiveInsightSummary_resourceCollection = (ProactiveInsightSummary -> Maybe ResourceCollection)
-> (ProactiveInsightSummary
-> Maybe ResourceCollection -> ProactiveInsightSummary)
-> Lens
ProactiveInsightSummary
ProactiveInsightSummary
(Maybe ResourceCollection)
(Maybe ResourceCollection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProactiveInsightSummary' {Maybe ResourceCollection
resourceCollection :: Maybe ResourceCollection
$sel:resourceCollection:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe ResourceCollection
resourceCollection} -> Maybe ResourceCollection
resourceCollection) (\s :: ProactiveInsightSummary
s@ProactiveInsightSummary' {} Maybe ResourceCollection
a -> ProactiveInsightSummary
s {$sel:resourceCollection:ProactiveInsightSummary' :: Maybe ResourceCollection
resourceCollection = Maybe ResourceCollection
a} :: ProactiveInsightSummary)
proactiveInsightSummary_severity :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe InsightSeverity)
proactiveInsightSummary_severity :: (Maybe InsightSeverity -> f (Maybe InsightSeverity))
-> ProactiveInsightSummary -> f ProactiveInsightSummary
proactiveInsightSummary_severity = (ProactiveInsightSummary -> Maybe InsightSeverity)
-> (ProactiveInsightSummary
-> Maybe InsightSeverity -> ProactiveInsightSummary)
-> Lens
ProactiveInsightSummary
ProactiveInsightSummary
(Maybe InsightSeverity)
(Maybe InsightSeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProactiveInsightSummary' {Maybe InsightSeverity
severity :: Maybe InsightSeverity
$sel:severity:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe InsightSeverity
severity} -> Maybe InsightSeverity
severity) (\s :: ProactiveInsightSummary
s@ProactiveInsightSummary' {} Maybe InsightSeverity
a -> ProactiveInsightSummary
s {$sel:severity:ProactiveInsightSummary' :: Maybe InsightSeverity
severity = Maybe InsightSeverity
a} :: ProactiveInsightSummary)
proactiveInsightSummary_insightTimeRange :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe InsightTimeRange)
proactiveInsightSummary_insightTimeRange :: (Maybe InsightTimeRange -> f (Maybe InsightTimeRange))
-> ProactiveInsightSummary -> f ProactiveInsightSummary
proactiveInsightSummary_insightTimeRange = (ProactiveInsightSummary -> Maybe InsightTimeRange)
-> (ProactiveInsightSummary
-> Maybe InsightTimeRange -> ProactiveInsightSummary)
-> Lens
ProactiveInsightSummary
ProactiveInsightSummary
(Maybe InsightTimeRange)
(Maybe InsightTimeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProactiveInsightSummary' {Maybe InsightTimeRange
insightTimeRange :: Maybe InsightTimeRange
$sel:insightTimeRange:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe InsightTimeRange
insightTimeRange} -> Maybe InsightTimeRange
insightTimeRange) (\s :: ProactiveInsightSummary
s@ProactiveInsightSummary' {} Maybe InsightTimeRange
a -> ProactiveInsightSummary
s {$sel:insightTimeRange:ProactiveInsightSummary' :: Maybe InsightTimeRange
insightTimeRange = Maybe InsightTimeRange
a} :: ProactiveInsightSummary)
proactiveInsightSummary_name :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe Prelude.Text)
proactiveInsightSummary_name :: (Maybe Text -> f (Maybe Text))
-> ProactiveInsightSummary -> f ProactiveInsightSummary
proactiveInsightSummary_name = (ProactiveInsightSummary -> Maybe Text)
-> (ProactiveInsightSummary
-> Maybe Text -> ProactiveInsightSummary)
-> Lens
ProactiveInsightSummary
ProactiveInsightSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProactiveInsightSummary' {Maybe Text
name :: Maybe Text
$sel:name:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ProactiveInsightSummary
s@ProactiveInsightSummary' {} Maybe Text
a -> ProactiveInsightSummary
s {$sel:name:ProactiveInsightSummary' :: Maybe Text
name = Maybe Text
a} :: ProactiveInsightSummary)
proactiveInsightSummary_predictionTimeRange :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe PredictionTimeRange)
proactiveInsightSummary_predictionTimeRange :: (Maybe PredictionTimeRange -> f (Maybe PredictionTimeRange))
-> ProactiveInsightSummary -> f ProactiveInsightSummary
proactiveInsightSummary_predictionTimeRange = (ProactiveInsightSummary -> Maybe PredictionTimeRange)
-> (ProactiveInsightSummary
-> Maybe PredictionTimeRange -> ProactiveInsightSummary)
-> Lens
ProactiveInsightSummary
ProactiveInsightSummary
(Maybe PredictionTimeRange)
(Maybe PredictionTimeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProactiveInsightSummary' {Maybe PredictionTimeRange
predictionTimeRange :: Maybe PredictionTimeRange
$sel:predictionTimeRange:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe PredictionTimeRange
predictionTimeRange} -> Maybe PredictionTimeRange
predictionTimeRange) (\s :: ProactiveInsightSummary
s@ProactiveInsightSummary' {} Maybe PredictionTimeRange
a -> ProactiveInsightSummary
s {$sel:predictionTimeRange:ProactiveInsightSummary' :: Maybe PredictionTimeRange
predictionTimeRange = Maybe PredictionTimeRange
a} :: ProactiveInsightSummary)
proactiveInsightSummary_id :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe Prelude.Text)
proactiveInsightSummary_id :: (Maybe Text -> f (Maybe Text))
-> ProactiveInsightSummary -> f ProactiveInsightSummary
proactiveInsightSummary_id = (ProactiveInsightSummary -> Maybe Text)
-> (ProactiveInsightSummary
-> Maybe Text -> ProactiveInsightSummary)
-> Lens
ProactiveInsightSummary
ProactiveInsightSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProactiveInsightSummary' {Maybe Text
id :: Maybe Text
$sel:id:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: ProactiveInsightSummary
s@ProactiveInsightSummary' {} Maybe Text
a -> ProactiveInsightSummary
s {$sel:id:ProactiveInsightSummary' :: Maybe Text
id = Maybe Text
a} :: ProactiveInsightSummary)
proactiveInsightSummary_serviceCollection :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe ServiceCollection)
proactiveInsightSummary_serviceCollection :: (Maybe ServiceCollection -> f (Maybe ServiceCollection))
-> ProactiveInsightSummary -> f ProactiveInsightSummary
proactiveInsightSummary_serviceCollection = (ProactiveInsightSummary -> Maybe ServiceCollection)
-> (ProactiveInsightSummary
-> Maybe ServiceCollection -> ProactiveInsightSummary)
-> Lens
ProactiveInsightSummary
ProactiveInsightSummary
(Maybe ServiceCollection)
(Maybe ServiceCollection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProactiveInsightSummary' {Maybe ServiceCollection
serviceCollection :: Maybe ServiceCollection
$sel:serviceCollection:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe ServiceCollection
serviceCollection} -> Maybe ServiceCollection
serviceCollection) (\s :: ProactiveInsightSummary
s@ProactiveInsightSummary' {} Maybe ServiceCollection
a -> ProactiveInsightSummary
s {$sel:serviceCollection:ProactiveInsightSummary' :: Maybe ServiceCollection
serviceCollection = Maybe ServiceCollection
a} :: ProactiveInsightSummary)
instance Core.FromJSON ProactiveInsightSummary where
parseJSON :: Value -> Parser ProactiveInsightSummary
parseJSON =
String
-> (Object -> Parser ProactiveInsightSummary)
-> Value
-> Parser ProactiveInsightSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProactiveInsightSummary"
( \Object
x ->
Maybe InsightStatus
-> Maybe ResourceCollection
-> Maybe InsightSeverity
-> Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary
ProactiveInsightSummary'
(Maybe InsightStatus
-> Maybe ResourceCollection
-> Maybe InsightSeverity
-> Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
-> Parser (Maybe InsightStatus)
-> Parser
(Maybe ResourceCollection
-> Maybe InsightSeverity
-> Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe InsightStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe ResourceCollection
-> Maybe InsightSeverity
-> Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
-> Parser (Maybe ResourceCollection)
-> Parser
(Maybe InsightSeverity
-> Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceCollection)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceCollection")
Parser
(Maybe InsightSeverity
-> Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
-> Parser (Maybe InsightSeverity)
-> Parser
(Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InsightSeverity)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Severity")
Parser
(Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
-> Parser (Maybe InsightTimeRange)
-> Parser
(Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InsightTimeRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InsightTimeRange")
Parser
(Maybe Text
-> Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
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
"Name")
Parser
(Maybe PredictionTimeRange
-> Maybe Text
-> Maybe ServiceCollection
-> ProactiveInsightSummary)
-> Parser (Maybe PredictionTimeRange)
-> Parser
(Maybe Text -> Maybe ServiceCollection -> ProactiveInsightSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PredictionTimeRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PredictionTimeRange")
Parser
(Maybe Text -> Maybe ServiceCollection -> ProactiveInsightSummary)
-> Parser (Maybe Text)
-> Parser (Maybe ServiceCollection -> ProactiveInsightSummary)
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
"Id")
Parser (Maybe ServiceCollection -> ProactiveInsightSummary)
-> Parser (Maybe ServiceCollection)
-> Parser ProactiveInsightSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServiceCollection)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceCollection")
)
instance Prelude.Hashable ProactiveInsightSummary
instance Prelude.NFData ProactiveInsightSummary