{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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.Prelude as Prelude
data ProactiveInsightSummary = ProactiveInsightSummary'
{
ProactiveInsightSummary -> Maybe [Text]
associatedResourceArns :: Prelude.Maybe [Prelude.Text],
ProactiveInsightSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ProactiveInsightSummary -> Maybe InsightTimeRange
insightTimeRange :: Prelude.Maybe InsightTimeRange,
ProactiveInsightSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ProactiveInsightSummary -> Maybe PredictionTimeRange
predictionTimeRange :: Prelude.Maybe PredictionTimeRange,
ProactiveInsightSummary -> Maybe ResourceCollection
resourceCollection :: Prelude.Maybe ResourceCollection,
ProactiveInsightSummary -> Maybe ServiceCollection
serviceCollection :: Prelude.Maybe ServiceCollection,
ProactiveInsightSummary -> Maybe InsightSeverity
severity :: Prelude.Maybe InsightSeverity,
ProactiveInsightSummary -> Maybe InsightStatus
status :: Prelude.Maybe InsightStatus
}
deriving (ProactiveInsightSummary -> ProactiveInsightSummary -> Bool
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]
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
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. 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'
{ $sel:associatedResourceArns:ProactiveInsightSummary' :: Maybe [Text]
associatedResourceArns =
forall a. Maybe a
Prelude.Nothing,
$sel:id:ProactiveInsightSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:insightTimeRange:ProactiveInsightSummary' :: Maybe InsightTimeRange
insightTimeRange = forall a. Maybe a
Prelude.Nothing,
$sel:name:ProactiveInsightSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:predictionTimeRange:ProactiveInsightSummary' :: Maybe PredictionTimeRange
predictionTimeRange = forall a. Maybe a
Prelude.Nothing,
$sel:resourceCollection:ProactiveInsightSummary' :: Maybe ResourceCollection
resourceCollection = forall a. Maybe a
Prelude.Nothing,
$sel:serviceCollection:ProactiveInsightSummary' :: Maybe ServiceCollection
serviceCollection = forall a. Maybe a
Prelude.Nothing,
$sel:severity:ProactiveInsightSummary' :: Maybe InsightSeverity
severity = forall a. Maybe a
Prelude.Nothing,
$sel:status:ProactiveInsightSummary' :: Maybe InsightStatus
status = forall a. Maybe a
Prelude.Nothing
}
proactiveInsightSummary_associatedResourceArns :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe [Prelude.Text])
proactiveInsightSummary_associatedResourceArns :: Lens' ProactiveInsightSummary (Maybe [Text])
proactiveInsightSummary_associatedResourceArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProactiveInsightSummary' {Maybe [Text]
associatedResourceArns :: Maybe [Text]
$sel:associatedResourceArns:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe [Text]
associatedResourceArns} -> Maybe [Text]
associatedResourceArns) (\s :: ProactiveInsightSummary
s@ProactiveInsightSummary' {} Maybe [Text]
a -> ProactiveInsightSummary
s {$sel:associatedResourceArns:ProactiveInsightSummary' :: Maybe [Text]
associatedResourceArns = Maybe [Text]
a} :: ProactiveInsightSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
proactiveInsightSummary_id :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe Prelude.Text)
proactiveInsightSummary_id :: Lens' ProactiveInsightSummary (Maybe Text)
proactiveInsightSummary_id = 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_insightTimeRange :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe InsightTimeRange)
proactiveInsightSummary_insightTimeRange :: Lens' ProactiveInsightSummary (Maybe InsightTimeRange)
proactiveInsightSummary_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 :: Lens' ProactiveInsightSummary (Maybe Text)
proactiveInsightSummary_name = 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 :: Lens' ProactiveInsightSummary (Maybe PredictionTimeRange)
proactiveInsightSummary_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_resourceCollection :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe ResourceCollection)
proactiveInsightSummary_resourceCollection :: Lens' ProactiveInsightSummary (Maybe ResourceCollection)
proactiveInsightSummary_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_serviceCollection :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe ServiceCollection)
proactiveInsightSummary_serviceCollection :: Lens' ProactiveInsightSummary (Maybe ServiceCollection)
proactiveInsightSummary_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)
proactiveInsightSummary_severity :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe InsightSeverity)
proactiveInsightSummary_severity :: Lens' ProactiveInsightSummary (Maybe InsightSeverity)
proactiveInsightSummary_severity = 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_status :: Lens.Lens' ProactiveInsightSummary (Prelude.Maybe InsightStatus)
proactiveInsightSummary_status :: Lens' ProactiveInsightSummary (Maybe InsightStatus)
proactiveInsightSummary_status = 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)
instance Data.FromJSON ProactiveInsightSummary where
parseJSON :: Value -> Parser ProactiveInsightSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProactiveInsightSummary"
( \Object
x ->
Maybe [Text]
-> Maybe Text
-> Maybe InsightTimeRange
-> Maybe Text
-> Maybe PredictionTimeRange
-> Maybe ResourceCollection
-> Maybe ServiceCollection
-> Maybe InsightSeverity
-> Maybe InsightStatus
-> ProactiveInsightSummary
ProactiveInsightSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AssociatedResourceArns"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InsightTimeRange")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PredictionTimeRange")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResourceCollection")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ServiceCollection")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Severity")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
)
instance Prelude.Hashable ProactiveInsightSummary where
hashWithSalt :: Int -> ProactiveInsightSummary -> Int
hashWithSalt Int
_salt ProactiveInsightSummary' {Maybe [Text]
Maybe Text
Maybe InsightSeverity
Maybe InsightStatus
Maybe InsightTimeRange
Maybe PredictionTimeRange
Maybe ServiceCollection
Maybe ResourceCollection
status :: Maybe InsightStatus
severity :: Maybe InsightSeverity
serviceCollection :: Maybe ServiceCollection
resourceCollection :: Maybe ResourceCollection
predictionTimeRange :: Maybe PredictionTimeRange
name :: Maybe Text
insightTimeRange :: Maybe InsightTimeRange
id :: Maybe Text
associatedResourceArns :: Maybe [Text]
$sel:status:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe InsightStatus
$sel:severity:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe InsightSeverity
$sel:serviceCollection:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe ServiceCollection
$sel:resourceCollection:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe ResourceCollection
$sel:predictionTimeRange:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe PredictionTimeRange
$sel:name:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe Text
$sel:insightTimeRange:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe InsightTimeRange
$sel:id:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe Text
$sel:associatedResourceArns:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
associatedResourceArns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InsightTimeRange
insightTimeRange
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PredictionTimeRange
predictionTimeRange
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceCollection
resourceCollection
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceCollection
serviceCollection
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InsightSeverity
severity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InsightStatus
status
instance Prelude.NFData ProactiveInsightSummary where
rnf :: ProactiveInsightSummary -> ()
rnf ProactiveInsightSummary' {Maybe [Text]
Maybe Text
Maybe InsightSeverity
Maybe InsightStatus
Maybe InsightTimeRange
Maybe PredictionTimeRange
Maybe ServiceCollection
Maybe ResourceCollection
status :: Maybe InsightStatus
severity :: Maybe InsightSeverity
serviceCollection :: Maybe ServiceCollection
resourceCollection :: Maybe ResourceCollection
predictionTimeRange :: Maybe PredictionTimeRange
name :: Maybe Text
insightTimeRange :: Maybe InsightTimeRange
id :: Maybe Text
associatedResourceArns :: Maybe [Text]
$sel:status:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe InsightStatus
$sel:severity:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe InsightSeverity
$sel:serviceCollection:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe ServiceCollection
$sel:resourceCollection:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe ResourceCollection
$sel:predictionTimeRange:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe PredictionTimeRange
$sel:name:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe Text
$sel:insightTimeRange:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe InsightTimeRange
$sel:id:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe Text
$sel:associatedResourceArns:ProactiveInsightSummary' :: ProactiveInsightSummary -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
associatedResourceArns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InsightTimeRange
insightTimeRange
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PredictionTimeRange
predictionTimeRange
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceCollection
resourceCollection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceCollection
serviceCollection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InsightSeverity
severity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InsightStatus
status