{-# 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.XRay.Types.InsightSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.XRay.Types.InsightSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.XRay.Types.AnomalousService
import Amazonka.XRay.Types.InsightCategory
import Amazonka.XRay.Types.InsightState
import Amazonka.XRay.Types.RequestImpactStatistics
import Amazonka.XRay.Types.ServiceId

-- | Information that describes an insight.
--
-- /See:/ 'newInsightSummary' smart constructor.
data InsightSummary = InsightSummary'
  { -- | Categories The categories that label and describe the type of insight.
    InsightSummary -> Maybe [InsightCategory]
categories :: Prelude.Maybe [InsightCategory],
    -- | The impact statistics of the client side service. This includes the
    -- number of requests to the client service and whether the requests were
    -- faults or okay.
    InsightSummary -> Maybe RequestImpactStatistics
clientRequestImpactStatistics :: Prelude.Maybe RequestImpactStatistics,
    -- | The time, in Unix seconds, at which the insight ended.
    InsightSummary -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Resource Name (ARN) of the group that the insight belongs to.
    InsightSummary -> Maybe Text
groupARN :: Prelude.Maybe Prelude.Text,
    -- | The name of the group that the insight belongs to.
    InsightSummary -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text,
    -- | The insights unique identifier.
    InsightSummary -> Maybe Text
insightId :: Prelude.Maybe Prelude.Text,
    -- | The time, in Unix seconds, that the insight was last updated.
    InsightSummary -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Data.POSIX,
    InsightSummary -> Maybe ServiceId
rootCauseServiceId :: Prelude.Maybe ServiceId,
    -- | The impact statistics of the root cause service. This includes the
    -- number of requests to the client service and whether the requests were
    -- faults or okay.
    InsightSummary -> Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics :: Prelude.Maybe RequestImpactStatistics,
    -- | The time, in Unix seconds, at which the insight began.
    InsightSummary -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
    -- | The current state of the insight.
    InsightSummary -> Maybe InsightState
state :: Prelude.Maybe InsightState,
    -- | A brief description of the insight.
    InsightSummary -> Maybe Text
summary :: Prelude.Maybe Prelude.Text,
    -- | The service within the insight that is most impacted by the incident.
    InsightSummary -> Maybe [AnomalousService]
topAnomalousServices :: Prelude.Maybe [AnomalousService]
  }
  deriving (InsightSummary -> InsightSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InsightSummary -> InsightSummary -> Bool
$c/= :: InsightSummary -> InsightSummary -> Bool
== :: InsightSummary -> InsightSummary -> Bool
$c== :: InsightSummary -> InsightSummary -> Bool
Prelude.Eq, ReadPrec [InsightSummary]
ReadPrec InsightSummary
Int -> ReadS InsightSummary
ReadS [InsightSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InsightSummary]
$creadListPrec :: ReadPrec [InsightSummary]
readPrec :: ReadPrec InsightSummary
$creadPrec :: ReadPrec InsightSummary
readList :: ReadS [InsightSummary]
$creadList :: ReadS [InsightSummary]
readsPrec :: Int -> ReadS InsightSummary
$creadsPrec :: Int -> ReadS InsightSummary
Prelude.Read, Int -> InsightSummary -> ShowS
[InsightSummary] -> ShowS
InsightSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InsightSummary] -> ShowS
$cshowList :: [InsightSummary] -> ShowS
show :: InsightSummary -> String
$cshow :: InsightSummary -> String
showsPrec :: Int -> InsightSummary -> ShowS
$cshowsPrec :: Int -> InsightSummary -> ShowS
Prelude.Show, forall x. Rep InsightSummary x -> InsightSummary
forall x. InsightSummary -> Rep InsightSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InsightSummary x -> InsightSummary
$cfrom :: forall x. InsightSummary -> Rep InsightSummary x
Prelude.Generic)

-- |
-- Create a value of 'InsightSummary' 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:
--
-- 'categories', 'insightSummary_categories' - Categories The categories that label and describe the type of insight.
--
-- 'clientRequestImpactStatistics', 'insightSummary_clientRequestImpactStatistics' - The impact statistics of the client side service. This includes the
-- number of requests to the client service and whether the requests were
-- faults or okay.
--
-- 'endTime', 'insightSummary_endTime' - The time, in Unix seconds, at which the insight ended.
--
-- 'groupARN', 'insightSummary_groupARN' - The Amazon Resource Name (ARN) of the group that the insight belongs to.
--
-- 'groupName', 'insightSummary_groupName' - The name of the group that the insight belongs to.
--
-- 'insightId', 'insightSummary_insightId' - The insights unique identifier.
--
-- 'lastUpdateTime', 'insightSummary_lastUpdateTime' - The time, in Unix seconds, that the insight was last updated.
--
-- 'rootCauseServiceId', 'insightSummary_rootCauseServiceId' - Undocumented member.
--
-- 'rootCauseServiceRequestImpactStatistics', 'insightSummary_rootCauseServiceRequestImpactStatistics' - The impact statistics of the root cause service. This includes the
-- number of requests to the client service and whether the requests were
-- faults or okay.
--
-- 'startTime', 'insightSummary_startTime' - The time, in Unix seconds, at which the insight began.
--
-- 'state', 'insightSummary_state' - The current state of the insight.
--
-- 'summary', 'insightSummary_summary' - A brief description of the insight.
--
-- 'topAnomalousServices', 'insightSummary_topAnomalousServices' - The service within the insight that is most impacted by the incident.
newInsightSummary ::
  InsightSummary
newInsightSummary :: InsightSummary
newInsightSummary =
  InsightSummary'
    { $sel:categories:InsightSummary' :: Maybe [InsightCategory]
categories = forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestImpactStatistics:InsightSummary' :: Maybe RequestImpactStatistics
clientRequestImpactStatistics = forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:InsightSummary' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
      $sel:groupARN:InsightSummary' :: Maybe Text
groupARN = forall a. Maybe a
Prelude.Nothing,
      $sel:groupName:InsightSummary' :: Maybe Text
groupName = forall a. Maybe a
Prelude.Nothing,
      $sel:insightId:InsightSummary' :: Maybe Text
insightId = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdateTime:InsightSummary' :: Maybe POSIX
lastUpdateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:rootCauseServiceId:InsightSummary' :: Maybe ServiceId
rootCauseServiceId = forall a. Maybe a
Prelude.Nothing,
      $sel:rootCauseServiceRequestImpactStatistics:InsightSummary' :: Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics =
        forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:InsightSummary' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
      $sel:state:InsightSummary' :: Maybe InsightState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:summary:InsightSummary' :: Maybe Text
summary = forall a. Maybe a
Prelude.Nothing,
      $sel:topAnomalousServices:InsightSummary' :: Maybe [AnomalousService]
topAnomalousServices = forall a. Maybe a
Prelude.Nothing
    }

-- | Categories The categories that label and describe the type of insight.
insightSummary_categories :: Lens.Lens' InsightSummary (Prelude.Maybe [InsightCategory])
insightSummary_categories :: Lens' InsightSummary (Maybe [InsightCategory])
insightSummary_categories = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe [InsightCategory]
categories :: Maybe [InsightCategory]
$sel:categories:InsightSummary' :: InsightSummary -> Maybe [InsightCategory]
categories} -> Maybe [InsightCategory]
categories) (\s :: InsightSummary
s@InsightSummary' {} Maybe [InsightCategory]
a -> InsightSummary
s {$sel:categories:InsightSummary' :: Maybe [InsightCategory]
categories = Maybe [InsightCategory]
a} :: InsightSummary) 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

-- | The impact statistics of the client side service. This includes the
-- number of requests to the client service and whether the requests were
-- faults or okay.
insightSummary_clientRequestImpactStatistics :: Lens.Lens' InsightSummary (Prelude.Maybe RequestImpactStatistics)
insightSummary_clientRequestImpactStatistics :: Lens' InsightSummary (Maybe RequestImpactStatistics)
insightSummary_clientRequestImpactStatistics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe RequestImpactStatistics
clientRequestImpactStatistics :: Maybe RequestImpactStatistics
$sel:clientRequestImpactStatistics:InsightSummary' :: InsightSummary -> Maybe RequestImpactStatistics
clientRequestImpactStatistics} -> Maybe RequestImpactStatistics
clientRequestImpactStatistics) (\s :: InsightSummary
s@InsightSummary' {} Maybe RequestImpactStatistics
a -> InsightSummary
s {$sel:clientRequestImpactStatistics:InsightSummary' :: Maybe RequestImpactStatistics
clientRequestImpactStatistics = Maybe RequestImpactStatistics
a} :: InsightSummary)

-- | The time, in Unix seconds, at which the insight ended.
insightSummary_endTime :: Lens.Lens' InsightSummary (Prelude.Maybe Prelude.UTCTime)
insightSummary_endTime :: Lens' InsightSummary (Maybe UTCTime)
insightSummary_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:InsightSummary' :: InsightSummary -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: InsightSummary
s@InsightSummary' {} Maybe POSIX
a -> InsightSummary
s {$sel:endTime:InsightSummary' :: Maybe POSIX
endTime = Maybe POSIX
a} :: InsightSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The Amazon Resource Name (ARN) of the group that the insight belongs to.
insightSummary_groupARN :: Lens.Lens' InsightSummary (Prelude.Maybe Prelude.Text)
insightSummary_groupARN :: Lens' InsightSummary (Maybe Text)
insightSummary_groupARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe Text
groupARN :: Maybe Text
$sel:groupARN:InsightSummary' :: InsightSummary -> Maybe Text
groupARN} -> Maybe Text
groupARN) (\s :: InsightSummary
s@InsightSummary' {} Maybe Text
a -> InsightSummary
s {$sel:groupARN:InsightSummary' :: Maybe Text
groupARN = Maybe Text
a} :: InsightSummary)

-- | The name of the group that the insight belongs to.
insightSummary_groupName :: Lens.Lens' InsightSummary (Prelude.Maybe Prelude.Text)
insightSummary_groupName :: Lens' InsightSummary (Maybe Text)
insightSummary_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe Text
groupName :: Maybe Text
$sel:groupName:InsightSummary' :: InsightSummary -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: InsightSummary
s@InsightSummary' {} Maybe Text
a -> InsightSummary
s {$sel:groupName:InsightSummary' :: Maybe Text
groupName = Maybe Text
a} :: InsightSummary)

-- | The insights unique identifier.
insightSummary_insightId :: Lens.Lens' InsightSummary (Prelude.Maybe Prelude.Text)
insightSummary_insightId :: Lens' InsightSummary (Maybe Text)
insightSummary_insightId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe Text
insightId :: Maybe Text
$sel:insightId:InsightSummary' :: InsightSummary -> Maybe Text
insightId} -> Maybe Text
insightId) (\s :: InsightSummary
s@InsightSummary' {} Maybe Text
a -> InsightSummary
s {$sel:insightId:InsightSummary' :: Maybe Text
insightId = Maybe Text
a} :: InsightSummary)

-- | The time, in Unix seconds, that the insight was last updated.
insightSummary_lastUpdateTime :: Lens.Lens' InsightSummary (Prelude.Maybe Prelude.UTCTime)
insightSummary_lastUpdateTime :: Lens' InsightSummary (Maybe UTCTime)
insightSummary_lastUpdateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:InsightSummary' :: InsightSummary -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: InsightSummary
s@InsightSummary' {} Maybe POSIX
a -> InsightSummary
s {$sel:lastUpdateTime:InsightSummary' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: InsightSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Undocumented member.
insightSummary_rootCauseServiceId :: Lens.Lens' InsightSummary (Prelude.Maybe ServiceId)
insightSummary_rootCauseServiceId :: Lens' InsightSummary (Maybe ServiceId)
insightSummary_rootCauseServiceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe ServiceId
rootCauseServiceId :: Maybe ServiceId
$sel:rootCauseServiceId:InsightSummary' :: InsightSummary -> Maybe ServiceId
rootCauseServiceId} -> Maybe ServiceId
rootCauseServiceId) (\s :: InsightSummary
s@InsightSummary' {} Maybe ServiceId
a -> InsightSummary
s {$sel:rootCauseServiceId:InsightSummary' :: Maybe ServiceId
rootCauseServiceId = Maybe ServiceId
a} :: InsightSummary)

-- | The impact statistics of the root cause service. This includes the
-- number of requests to the client service and whether the requests were
-- faults or okay.
insightSummary_rootCauseServiceRequestImpactStatistics :: Lens.Lens' InsightSummary (Prelude.Maybe RequestImpactStatistics)
insightSummary_rootCauseServiceRequestImpactStatistics :: Lens' InsightSummary (Maybe RequestImpactStatistics)
insightSummary_rootCauseServiceRequestImpactStatistics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics :: Maybe RequestImpactStatistics
$sel:rootCauseServiceRequestImpactStatistics:InsightSummary' :: InsightSummary -> Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics} -> Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics) (\s :: InsightSummary
s@InsightSummary' {} Maybe RequestImpactStatistics
a -> InsightSummary
s {$sel:rootCauseServiceRequestImpactStatistics:InsightSummary' :: Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics = Maybe RequestImpactStatistics
a} :: InsightSummary)

-- | The time, in Unix seconds, at which the insight began.
insightSummary_startTime :: Lens.Lens' InsightSummary (Prelude.Maybe Prelude.UTCTime)
insightSummary_startTime :: Lens' InsightSummary (Maybe UTCTime)
insightSummary_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:InsightSummary' :: InsightSummary -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: InsightSummary
s@InsightSummary' {} Maybe POSIX
a -> InsightSummary
s {$sel:startTime:InsightSummary' :: Maybe POSIX
startTime = Maybe POSIX
a} :: InsightSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The current state of the insight.
insightSummary_state :: Lens.Lens' InsightSummary (Prelude.Maybe InsightState)
insightSummary_state :: Lens' InsightSummary (Maybe InsightState)
insightSummary_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe InsightState
state :: Maybe InsightState
$sel:state:InsightSummary' :: InsightSummary -> Maybe InsightState
state} -> Maybe InsightState
state) (\s :: InsightSummary
s@InsightSummary' {} Maybe InsightState
a -> InsightSummary
s {$sel:state:InsightSummary' :: Maybe InsightState
state = Maybe InsightState
a} :: InsightSummary)

-- | A brief description of the insight.
insightSummary_summary :: Lens.Lens' InsightSummary (Prelude.Maybe Prelude.Text)
insightSummary_summary :: Lens' InsightSummary (Maybe Text)
insightSummary_summary = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe Text
summary :: Maybe Text
$sel:summary:InsightSummary' :: InsightSummary -> Maybe Text
summary} -> Maybe Text
summary) (\s :: InsightSummary
s@InsightSummary' {} Maybe Text
a -> InsightSummary
s {$sel:summary:InsightSummary' :: Maybe Text
summary = Maybe Text
a} :: InsightSummary)

-- | The service within the insight that is most impacted by the incident.
insightSummary_topAnomalousServices :: Lens.Lens' InsightSummary (Prelude.Maybe [AnomalousService])
insightSummary_topAnomalousServices :: Lens' InsightSummary (Maybe [AnomalousService])
insightSummary_topAnomalousServices = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InsightSummary' {Maybe [AnomalousService]
topAnomalousServices :: Maybe [AnomalousService]
$sel:topAnomalousServices:InsightSummary' :: InsightSummary -> Maybe [AnomalousService]
topAnomalousServices} -> Maybe [AnomalousService]
topAnomalousServices) (\s :: InsightSummary
s@InsightSummary' {} Maybe [AnomalousService]
a -> InsightSummary
s {$sel:topAnomalousServices:InsightSummary' :: Maybe [AnomalousService]
topAnomalousServices = Maybe [AnomalousService]
a} :: InsightSummary) 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

instance Data.FromJSON InsightSummary where
  parseJSON :: Value -> Parser InsightSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"InsightSummary"
      ( \Object
x ->
          Maybe [InsightCategory]
-> Maybe RequestImpactStatistics
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ServiceId
-> Maybe RequestImpactStatistics
-> Maybe POSIX
-> Maybe InsightState
-> Maybe Text
-> Maybe [AnomalousService]
-> InsightSummary
InsightSummary'
            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
"Categories" 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
"ClientRequestImpactStatistics")
            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
"EndTime")
            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
"GroupARN")
            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
"GroupName")
            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
"InsightId")
            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
"LastUpdateTime")
            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
"RootCauseServiceId")
            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
"RootCauseServiceRequestImpactStatistics"
                        )
            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
"StartTime")
            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
"State")
            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
"Summary")
            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
"TopAnomalousServices"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable InsightSummary where
  hashWithSalt :: Int -> InsightSummary -> Int
hashWithSalt Int
_salt InsightSummary' {Maybe [InsightCategory]
Maybe [AnomalousService]
Maybe Text
Maybe POSIX
Maybe InsightState
Maybe RequestImpactStatistics
Maybe ServiceId
topAnomalousServices :: Maybe [AnomalousService]
summary :: Maybe Text
state :: Maybe InsightState
startTime :: Maybe POSIX
rootCauseServiceRequestImpactStatistics :: Maybe RequestImpactStatistics
rootCauseServiceId :: Maybe ServiceId
lastUpdateTime :: Maybe POSIX
insightId :: Maybe Text
groupName :: Maybe Text
groupARN :: Maybe Text
endTime :: Maybe POSIX
clientRequestImpactStatistics :: Maybe RequestImpactStatistics
categories :: Maybe [InsightCategory]
$sel:topAnomalousServices:InsightSummary' :: InsightSummary -> Maybe [AnomalousService]
$sel:summary:InsightSummary' :: InsightSummary -> Maybe Text
$sel:state:InsightSummary' :: InsightSummary -> Maybe InsightState
$sel:startTime:InsightSummary' :: InsightSummary -> Maybe POSIX
$sel:rootCauseServiceRequestImpactStatistics:InsightSummary' :: InsightSummary -> Maybe RequestImpactStatistics
$sel:rootCauseServiceId:InsightSummary' :: InsightSummary -> Maybe ServiceId
$sel:lastUpdateTime:InsightSummary' :: InsightSummary -> Maybe POSIX
$sel:insightId:InsightSummary' :: InsightSummary -> Maybe Text
$sel:groupName:InsightSummary' :: InsightSummary -> Maybe Text
$sel:groupARN:InsightSummary' :: InsightSummary -> Maybe Text
$sel:endTime:InsightSummary' :: InsightSummary -> Maybe POSIX
$sel:clientRequestImpactStatistics:InsightSummary' :: InsightSummary -> Maybe RequestImpactStatistics
$sel:categories:InsightSummary' :: InsightSummary -> Maybe [InsightCategory]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InsightCategory]
categories
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RequestImpactStatistics
clientRequestImpactStatistics
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
endTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
insightId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdateTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceId
rootCauseServiceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InsightState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
summary
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AnomalousService]
topAnomalousServices

instance Prelude.NFData InsightSummary where
  rnf :: InsightSummary -> ()
rnf InsightSummary' {Maybe [InsightCategory]
Maybe [AnomalousService]
Maybe Text
Maybe POSIX
Maybe InsightState
Maybe RequestImpactStatistics
Maybe ServiceId
topAnomalousServices :: Maybe [AnomalousService]
summary :: Maybe Text
state :: Maybe InsightState
startTime :: Maybe POSIX
rootCauseServiceRequestImpactStatistics :: Maybe RequestImpactStatistics
rootCauseServiceId :: Maybe ServiceId
lastUpdateTime :: Maybe POSIX
insightId :: Maybe Text
groupName :: Maybe Text
groupARN :: Maybe Text
endTime :: Maybe POSIX
clientRequestImpactStatistics :: Maybe RequestImpactStatistics
categories :: Maybe [InsightCategory]
$sel:topAnomalousServices:InsightSummary' :: InsightSummary -> Maybe [AnomalousService]
$sel:summary:InsightSummary' :: InsightSummary -> Maybe Text
$sel:state:InsightSummary' :: InsightSummary -> Maybe InsightState
$sel:startTime:InsightSummary' :: InsightSummary -> Maybe POSIX
$sel:rootCauseServiceRequestImpactStatistics:InsightSummary' :: InsightSummary -> Maybe RequestImpactStatistics
$sel:rootCauseServiceId:InsightSummary' :: InsightSummary -> Maybe ServiceId
$sel:lastUpdateTime:InsightSummary' :: InsightSummary -> Maybe POSIX
$sel:insightId:InsightSummary' :: InsightSummary -> Maybe Text
$sel:groupName:InsightSummary' :: InsightSummary -> Maybe Text
$sel:groupARN:InsightSummary' :: InsightSummary -> Maybe Text
$sel:endTime:InsightSummary' :: InsightSummary -> Maybe POSIX
$sel:clientRequestImpactStatistics:InsightSummary' :: InsightSummary -> Maybe RequestImpactStatistics
$sel:categories:InsightSummary' :: InsightSummary -> Maybe [InsightCategory]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [InsightCategory]
categories
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RequestImpactStatistics
clientRequestImpactStatistics
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
endTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
insightId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceId
rootCauseServiceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InsightState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
summary
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [AnomalousService]
topAnomalousServices