{-# 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 #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.DevOpsGuru.Types.ReactiveInsightSummary -- Copyright : (c) 2013-2021 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.DevOpsGuru.Types.ReactiveInsightSummary 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.ResourceCollection import Amazonka.DevOpsGuru.Types.ServiceCollection import qualified Amazonka.Lens as Lens import qualified Amazonka.Prelude as Prelude -- | Information about a reactive insight. This object is returned by -- @DescribeInsight.@ -- -- /See:/ 'newReactiveInsightSummary' smart constructor. data ReactiveInsightSummary = ReactiveInsightSummary' { -- | The status of a reactive insight. ReactiveInsightSummary -> Maybe InsightStatus status :: Prelude.Maybe InsightStatus, ReactiveInsightSummary -> Maybe ResourceCollection resourceCollection :: Prelude.Maybe ResourceCollection, -- | The severity of a reactive insight. ReactiveInsightSummary -> Maybe InsightSeverity severity :: Prelude.Maybe InsightSeverity, ReactiveInsightSummary -> Maybe InsightTimeRange insightTimeRange :: Prelude.Maybe InsightTimeRange, -- | The name of a reactive insight. ReactiveInsightSummary -> Maybe Text name :: Prelude.Maybe Prelude.Text, -- | The ID of a reactive summary. ReactiveInsightSummary -> Maybe Text id :: Prelude.Maybe Prelude.Text, -- | A collection of the names of AWS services. ReactiveInsightSummary -> Maybe ServiceCollection serviceCollection :: Prelude.Maybe ServiceCollection } deriving (ReactiveInsightSummary -> ReactiveInsightSummary -> Bool (ReactiveInsightSummary -> ReactiveInsightSummary -> Bool) -> (ReactiveInsightSummary -> ReactiveInsightSummary -> Bool) -> Eq ReactiveInsightSummary 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] (Int -> ReadS ReactiveInsightSummary) -> ReadS [ReactiveInsightSummary] -> ReadPrec ReactiveInsightSummary -> ReadPrec [ReactiveInsightSummary] -> Read 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 (Int -> ReactiveInsightSummary -> ShowS) -> (ReactiveInsightSummary -> String) -> ([ReactiveInsightSummary] -> ShowS) -> Show ReactiveInsightSummary 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. ReactiveInsightSummary -> Rep ReactiveInsightSummary x) -> (forall x. Rep ReactiveInsightSummary x -> ReactiveInsightSummary) -> Generic ReactiveInsightSummary 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) -- | -- Create a value of 'ReactiveInsightSummary' with all optional fields omitted. -- -- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'status', 'reactiveInsightSummary_status' - The status of a reactive insight. -- -- 'resourceCollection', 'reactiveInsightSummary_resourceCollection' - Undocumented member. -- -- 'severity', 'reactiveInsightSummary_severity' - The severity of a reactive insight. -- -- 'insightTimeRange', 'reactiveInsightSummary_insightTimeRange' - Undocumented member. -- -- 'name', 'reactiveInsightSummary_name' - The name of a reactive insight. -- -- 'id', 'reactiveInsightSummary_id' - The ID of a reactive summary. -- -- 'serviceCollection', 'reactiveInsightSummary_serviceCollection' - A collection of the names of AWS services. newReactiveInsightSummary :: ReactiveInsightSummary newReactiveInsightSummary :: ReactiveInsightSummary newReactiveInsightSummary = ReactiveInsightSummary' :: Maybe InsightStatus -> Maybe ResourceCollection -> Maybe InsightSeverity -> Maybe InsightTimeRange -> Maybe Text -> Maybe Text -> Maybe ServiceCollection -> ReactiveInsightSummary ReactiveInsightSummary' { $sel:status:ReactiveInsightSummary' :: Maybe InsightStatus status = Maybe InsightStatus forall a. Maybe a Prelude.Nothing, $sel:resourceCollection:ReactiveInsightSummary' :: Maybe ResourceCollection resourceCollection = Maybe ResourceCollection forall a. Maybe a Prelude.Nothing, $sel:severity:ReactiveInsightSummary' :: Maybe InsightSeverity severity = Maybe InsightSeverity forall a. Maybe a Prelude.Nothing, $sel:insightTimeRange:ReactiveInsightSummary' :: Maybe InsightTimeRange insightTimeRange = Maybe InsightTimeRange forall a. Maybe a Prelude.Nothing, $sel:name:ReactiveInsightSummary' :: Maybe Text name = Maybe Text forall a. Maybe a Prelude.Nothing, $sel:id:ReactiveInsightSummary' :: Maybe Text id = Maybe Text forall a. Maybe a Prelude.Nothing, $sel:serviceCollection:ReactiveInsightSummary' :: Maybe ServiceCollection serviceCollection = Maybe ServiceCollection forall a. Maybe a Prelude.Nothing } -- | The status of a reactive insight. reactiveInsightSummary_status :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe InsightStatus) reactiveInsightSummary_status :: (Maybe InsightStatus -> f (Maybe InsightStatus)) -> ReactiveInsightSummary -> f ReactiveInsightSummary reactiveInsightSummary_status = (ReactiveInsightSummary -> Maybe InsightStatus) -> (ReactiveInsightSummary -> Maybe InsightStatus -> ReactiveInsightSummary) -> Lens ReactiveInsightSummary ReactiveInsightSummary (Maybe InsightStatus) (Maybe InsightStatus) 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) -- | Undocumented member. reactiveInsightSummary_resourceCollection :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe ResourceCollection) reactiveInsightSummary_resourceCollection :: (Maybe ResourceCollection -> f (Maybe ResourceCollection)) -> ReactiveInsightSummary -> f ReactiveInsightSummary reactiveInsightSummary_resourceCollection = (ReactiveInsightSummary -> Maybe ResourceCollection) -> (ReactiveInsightSummary -> Maybe ResourceCollection -> ReactiveInsightSummary) -> Lens ReactiveInsightSummary ReactiveInsightSummary (Maybe ResourceCollection) (Maybe 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) -- | The severity of a reactive insight. reactiveInsightSummary_severity :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe InsightSeverity) reactiveInsightSummary_severity :: (Maybe InsightSeverity -> f (Maybe InsightSeverity)) -> ReactiveInsightSummary -> f ReactiveInsightSummary reactiveInsightSummary_severity = (ReactiveInsightSummary -> Maybe InsightSeverity) -> (ReactiveInsightSummary -> Maybe InsightSeverity -> ReactiveInsightSummary) -> Lens ReactiveInsightSummary ReactiveInsightSummary (Maybe InsightSeverity) (Maybe InsightSeverity) 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) -- | Undocumented member. reactiveInsightSummary_insightTimeRange :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe InsightTimeRange) reactiveInsightSummary_insightTimeRange :: (Maybe InsightTimeRange -> f (Maybe InsightTimeRange)) -> ReactiveInsightSummary -> f ReactiveInsightSummary reactiveInsightSummary_insightTimeRange = (ReactiveInsightSummary -> Maybe InsightTimeRange) -> (ReactiveInsightSummary -> Maybe InsightTimeRange -> ReactiveInsightSummary) -> Lens ReactiveInsightSummary ReactiveInsightSummary (Maybe InsightTimeRange) (Maybe 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) -- | The name of a reactive insight. reactiveInsightSummary_name :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe Prelude.Text) reactiveInsightSummary_name :: (Maybe Text -> f (Maybe Text)) -> ReactiveInsightSummary -> f ReactiveInsightSummary reactiveInsightSummary_name = (ReactiveInsightSummary -> Maybe Text) -> (ReactiveInsightSummary -> Maybe Text -> ReactiveInsightSummary) -> Lens ReactiveInsightSummary ReactiveInsightSummary (Maybe Text) (Maybe Text) 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) -- | The ID of a reactive summary. reactiveInsightSummary_id :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe Prelude.Text) reactiveInsightSummary_id :: (Maybe Text -> f (Maybe Text)) -> ReactiveInsightSummary -> f ReactiveInsightSummary reactiveInsightSummary_id = (ReactiveInsightSummary -> Maybe Text) -> (ReactiveInsightSummary -> Maybe Text -> ReactiveInsightSummary) -> Lens ReactiveInsightSummary ReactiveInsightSummary (Maybe Text) (Maybe Text) 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) -- | A collection of the names of AWS services. reactiveInsightSummary_serviceCollection :: Lens.Lens' ReactiveInsightSummary (Prelude.Maybe ServiceCollection) reactiveInsightSummary_serviceCollection :: (Maybe ServiceCollection -> f (Maybe ServiceCollection)) -> ReactiveInsightSummary -> f ReactiveInsightSummary reactiveInsightSummary_serviceCollection = (ReactiveInsightSummary -> Maybe ServiceCollection) -> (ReactiveInsightSummary -> Maybe ServiceCollection -> ReactiveInsightSummary) -> Lens ReactiveInsightSummary ReactiveInsightSummary (Maybe ServiceCollection) (Maybe 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) instance Core.FromJSON ReactiveInsightSummary where parseJSON :: Value -> Parser ReactiveInsightSummary parseJSON = String -> (Object -> Parser ReactiveInsightSummary) -> Value -> Parser ReactiveInsightSummary forall a. String -> (Object -> Parser a) -> Value -> Parser a Core.withObject String "ReactiveInsightSummary" ( \Object x -> Maybe InsightStatus -> Maybe ResourceCollection -> Maybe InsightSeverity -> Maybe InsightTimeRange -> Maybe Text -> Maybe Text -> Maybe ServiceCollection -> ReactiveInsightSummary ReactiveInsightSummary' (Maybe InsightStatus -> Maybe ResourceCollection -> Maybe InsightSeverity -> Maybe InsightTimeRange -> Maybe Text -> Maybe Text -> Maybe ServiceCollection -> ReactiveInsightSummary) -> Parser (Maybe InsightStatus) -> Parser (Maybe ResourceCollection -> Maybe InsightSeverity -> Maybe InsightTimeRange -> Maybe Text -> Maybe Text -> Maybe ServiceCollection -> ReactiveInsightSummary) 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 Text -> Maybe ServiceCollection -> ReactiveInsightSummary) -> Parser (Maybe ResourceCollection) -> Parser (Maybe InsightSeverity -> Maybe InsightTimeRange -> Maybe Text -> Maybe Text -> Maybe ServiceCollection -> ReactiveInsightSummary) 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 Text -> Maybe ServiceCollection -> ReactiveInsightSummary) -> Parser (Maybe InsightSeverity) -> Parser (Maybe InsightTimeRange -> Maybe Text -> Maybe Text -> Maybe ServiceCollection -> ReactiveInsightSummary) 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 Text -> Maybe ServiceCollection -> ReactiveInsightSummary) -> Parser (Maybe InsightTimeRange) -> Parser (Maybe Text -> Maybe Text -> Maybe ServiceCollection -> ReactiveInsightSummary) 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 Text -> Maybe ServiceCollection -> ReactiveInsightSummary) -> Parser (Maybe Text) -> Parser (Maybe Text -> Maybe ServiceCollection -> ReactiveInsightSummary) 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 Text -> Maybe ServiceCollection -> ReactiveInsightSummary) -> Parser (Maybe Text) -> Parser (Maybe ServiceCollection -> ReactiveInsightSummary) 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 -> ReactiveInsightSummary) -> Parser (Maybe ServiceCollection) -> Parser ReactiveInsightSummary 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 ReactiveInsightSummary instance Prelude.NFData ReactiveInsightSummary