{-# 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.ReactiveInsightSummary 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.ResourceCollection
import Amazonka.DevOpsGuru.Types.ServiceCollection
import qualified Amazonka.Prelude as Prelude
data ReactiveInsightSummary = ReactiveInsightSummary'
{
ReactiveInsightSummary -> Maybe [Text]
associatedResourceArns :: Prelude.Maybe [Prelude.Text],
ReactiveInsightSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ReactiveInsightSummary -> Maybe InsightTimeRange
insightTimeRange :: Prelude.Maybe InsightTimeRange,
ReactiveInsightSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ReactiveInsightSummary -> Maybe ResourceCollection
resourceCollection :: Prelude.Maybe ResourceCollection,
ReactiveInsightSummary -> Maybe ServiceCollection
serviceCollection :: Prelude.Maybe ServiceCollection,
ReactiveInsightSummary -> Maybe InsightSeverity
severity :: Prelude.Maybe InsightSeverity,
ReactiveInsightSummary -> Maybe InsightStatus
status :: Prelude.Maybe InsightStatus
}
deriving (ReactiveInsightSummary -> ReactiveInsightSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReactiveInsightSummary -> ReactiveInsightSummary -> Bool
$c/= :: ReactiveInsightSummary -> ReactiveInsightSummary -> Bool
== :: ReactiveInsightSummary -> ReactiveInsightSummary -> Bool
$c== :: ReactiveInsightSummary -> ReactiveInsightSummary -> Bool
Prelude.Eq, ReadPrec [ReactiveInsightSummary]
ReadPrec ReactiveInsightSummary
Int -> ReadS ReactiveInsightSummary
ReadS [ReactiveInsightSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReactiveInsightSummary]
$creadListPrec :: ReadPrec [ReactiveInsightSummary]
readPrec :: ReadPrec ReactiveInsightSummary
$creadPrec :: ReadPrec ReactiveInsightSummary
readList :: ReadS [ReactiveInsightSummary]
$creadList :: ReadS [ReactiveInsightSummary]
readsPrec :: Int -> ReadS ReactiveInsightSummary
$creadsPrec :: Int -> ReadS ReactiveInsightSummary
Prelude.Read, Int -> ReactiveInsightSummary -> ShowS
[ReactiveInsightSummary] -> ShowS
ReactiveInsightSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReactiveInsightSummary] -> ShowS
$cshowList :: [ReactiveInsightSummary] -> ShowS
show :: ReactiveInsightSummary -> String
$cshow :: ReactiveInsightSummary -> String
showsPrec :: Int -> ReactiveInsightSummary -> ShowS
$cshowsPrec :: Int -> ReactiveInsightSummary -> ShowS
Prelude.Show, forall x. Rep ReactiveInsightSummary x -> ReactiveInsightSummary
forall x. ReactiveInsightSummary -> Rep ReactiveInsightSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReactiveInsightSummary x -> ReactiveInsightSummary
$cfrom :: forall x. ReactiveInsightSummary -> Rep ReactiveInsightSummary x
Prelude.Generic)
newReactiveInsightSummary ::
ReactiveInsightSummary
newReactiveInsightSummary :: ReactiveInsightSummary
newReactiveInsightSummary =
ReactiveInsightSummary'
{ $sel:associatedResourceArns:ReactiveInsightSummary' :: Maybe [Text]
associatedResourceArns =
forall a. Maybe a
Prelude.Nothing,
$sel:id:ReactiveInsightSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:insightTimeRange:ReactiveInsightSummary' :: Maybe InsightTimeRange
insightTimeRange = forall a. Maybe a
Prelude.Nothing,
$sel:name:ReactiveInsightSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:resourceCollection:ReactiveInsightSummary' :: Maybe ResourceCollection
resourceCollection = forall a. Maybe a
Prelude.Nothing,
$sel:serviceCollection:ReactiveInsightSummary' :: Maybe ServiceCollection
serviceCollection = forall a. Maybe a
Prelude.Nothing,
$sel:severity:ReactiveInsightSummary' :: Maybe InsightSeverity
severity = forall a. Maybe a
Prelude.Nothing,
$sel:status:ReactiveInsightSummary' :: Maybe InsightStatus
status = forall a. Maybe a
Prelude.Nothing
}
reactiveInsightSummary_associatedResourceArns :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe [Prelude.Text])
reactiveInsightSummary_associatedResourceArns :: Lens' ReactiveInsightSummary (Maybe [Text])
reactiveInsightSummary_associatedResourceArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveInsightSummary' {Maybe [Text]
associatedResourceArns :: Maybe [Text]
$sel:associatedResourceArns:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe [Text]
associatedResourceArns} -> Maybe [Text]
associatedResourceArns) (\s :: ReactiveInsightSummary
s@ReactiveInsightSummary' {} Maybe [Text]
a -> ReactiveInsightSummary
s {$sel:associatedResourceArns:ReactiveInsightSummary' :: Maybe [Text]
associatedResourceArns = Maybe [Text]
a} :: ReactiveInsightSummary) 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
reactiveInsightSummary_id :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe Prelude.Text)
reactiveInsightSummary_id :: Lens' ReactiveInsightSummary (Maybe Text)
reactiveInsightSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveInsightSummary' {Maybe Text
id :: Maybe Text
$sel:id:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: ReactiveInsightSummary
s@ReactiveInsightSummary' {} Maybe Text
a -> ReactiveInsightSummary
s {$sel:id:ReactiveInsightSummary' :: Maybe Text
id = Maybe Text
a} :: ReactiveInsightSummary)
reactiveInsightSummary_insightTimeRange :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe InsightTimeRange)
reactiveInsightSummary_insightTimeRange :: Lens' ReactiveInsightSummary (Maybe InsightTimeRange)
reactiveInsightSummary_insightTimeRange = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveInsightSummary' {Maybe InsightTimeRange
insightTimeRange :: Maybe InsightTimeRange
$sel:insightTimeRange:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe InsightTimeRange
insightTimeRange} -> Maybe InsightTimeRange
insightTimeRange) (\s :: ReactiveInsightSummary
s@ReactiveInsightSummary' {} Maybe InsightTimeRange
a -> ReactiveInsightSummary
s {$sel:insightTimeRange:ReactiveInsightSummary' :: Maybe InsightTimeRange
insightTimeRange = Maybe InsightTimeRange
a} :: ReactiveInsightSummary)
reactiveInsightSummary_name :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe Prelude.Text)
reactiveInsightSummary_name :: Lens' ReactiveInsightSummary (Maybe Text)
reactiveInsightSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveInsightSummary' {Maybe Text
name :: Maybe Text
$sel:name:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ReactiveInsightSummary
s@ReactiveInsightSummary' {} Maybe Text
a -> ReactiveInsightSummary
s {$sel:name:ReactiveInsightSummary' :: Maybe Text
name = Maybe Text
a} :: ReactiveInsightSummary)
reactiveInsightSummary_resourceCollection :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe ResourceCollection)
reactiveInsightSummary_resourceCollection :: Lens' ReactiveInsightSummary (Maybe ResourceCollection)
reactiveInsightSummary_resourceCollection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveInsightSummary' {Maybe ResourceCollection
resourceCollection :: Maybe ResourceCollection
$sel:resourceCollection:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe ResourceCollection
resourceCollection} -> Maybe ResourceCollection
resourceCollection) (\s :: ReactiveInsightSummary
s@ReactiveInsightSummary' {} Maybe ResourceCollection
a -> ReactiveInsightSummary
s {$sel:resourceCollection:ReactiveInsightSummary' :: Maybe ResourceCollection
resourceCollection = Maybe ResourceCollection
a} :: ReactiveInsightSummary)
reactiveInsightSummary_serviceCollection :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe ServiceCollection)
reactiveInsightSummary_serviceCollection :: Lens' ReactiveInsightSummary (Maybe ServiceCollection)
reactiveInsightSummary_serviceCollection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveInsightSummary' {Maybe ServiceCollection
serviceCollection :: Maybe ServiceCollection
$sel:serviceCollection:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe ServiceCollection
serviceCollection} -> Maybe ServiceCollection
serviceCollection) (\s :: ReactiveInsightSummary
s@ReactiveInsightSummary' {} Maybe ServiceCollection
a -> ReactiveInsightSummary
s {$sel:serviceCollection:ReactiveInsightSummary' :: Maybe ServiceCollection
serviceCollection = Maybe ServiceCollection
a} :: ReactiveInsightSummary)
reactiveInsightSummary_severity :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe InsightSeverity)
reactiveInsightSummary_severity :: Lens' ReactiveInsightSummary (Maybe InsightSeverity)
reactiveInsightSummary_severity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveInsightSummary' {Maybe InsightSeverity
severity :: Maybe InsightSeverity
$sel:severity:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe InsightSeverity
severity} -> Maybe InsightSeverity
severity) (\s :: ReactiveInsightSummary
s@ReactiveInsightSummary' {} Maybe InsightSeverity
a -> ReactiveInsightSummary
s {$sel:severity:ReactiveInsightSummary' :: Maybe InsightSeverity
severity = Maybe InsightSeverity
a} :: ReactiveInsightSummary)
reactiveInsightSummary_status :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe InsightStatus)
reactiveInsightSummary_status :: Lens' ReactiveInsightSummary (Maybe InsightStatus)
reactiveInsightSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveInsightSummary' {Maybe InsightStatus
status :: Maybe InsightStatus
$sel:status:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe InsightStatus
status} -> Maybe InsightStatus
status) (\s :: ReactiveInsightSummary
s@ReactiveInsightSummary' {} Maybe InsightStatus
a -> ReactiveInsightSummary
s {$sel:status:ReactiveInsightSummary' :: Maybe InsightStatus
status = Maybe InsightStatus
a} :: ReactiveInsightSummary)
instance Data.FromJSON ReactiveInsightSummary where
parseJSON :: Value -> Parser ReactiveInsightSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReactiveInsightSummary"
( \Object
x ->
Maybe [Text]
-> Maybe Text
-> Maybe InsightTimeRange
-> Maybe Text
-> Maybe ResourceCollection
-> Maybe ServiceCollection
-> Maybe InsightSeverity
-> Maybe InsightStatus
-> ReactiveInsightSummary
ReactiveInsightSummary'
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
"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 ReactiveInsightSummary where
hashWithSalt :: Int -> ReactiveInsightSummary -> Int
hashWithSalt Int
_salt ReactiveInsightSummary' {Maybe [Text]
Maybe Text
Maybe InsightSeverity
Maybe InsightStatus
Maybe InsightTimeRange
Maybe ServiceCollection
Maybe ResourceCollection
status :: Maybe InsightStatus
severity :: Maybe InsightSeverity
serviceCollection :: Maybe ServiceCollection
resourceCollection :: Maybe ResourceCollection
name :: Maybe Text
insightTimeRange :: Maybe InsightTimeRange
id :: Maybe Text
associatedResourceArns :: Maybe [Text]
$sel:status:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe InsightStatus
$sel:severity:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe InsightSeverity
$sel:serviceCollection:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe ServiceCollection
$sel:resourceCollection:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe ResourceCollection
$sel:name:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe Text
$sel:insightTimeRange:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe InsightTimeRange
$sel:id:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe Text
$sel:associatedResourceArns:ReactiveInsightSummary' :: ReactiveInsightSummary -> 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 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 ReactiveInsightSummary where
rnf :: ReactiveInsightSummary -> ()
rnf ReactiveInsightSummary' {Maybe [Text]
Maybe Text
Maybe InsightSeverity
Maybe InsightStatus
Maybe InsightTimeRange
Maybe ServiceCollection
Maybe ResourceCollection
status :: Maybe InsightStatus
severity :: Maybe InsightSeverity
serviceCollection :: Maybe ServiceCollection
resourceCollection :: Maybe ResourceCollection
name :: Maybe Text
insightTimeRange :: Maybe InsightTimeRange
id :: Maybe Text
associatedResourceArns :: Maybe [Text]
$sel:status:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe InsightStatus
$sel:severity:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe InsightSeverity
$sel:serviceCollection:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe ServiceCollection
$sel:resourceCollection:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe ResourceCollection
$sel:name:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe Text
$sel:insightTimeRange:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe InsightTimeRange
$sel:id:ReactiveInsightSummary' :: ReactiveInsightSummary -> Maybe Text
$sel:associatedResourceArns:ReactiveInsightSummary' :: ReactiveInsightSummary -> 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 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