{-# 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.Insight
-- 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.Insight 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

-- | When fault rates go outside of the expected range, X-Ray creates an
-- insight. Insights tracks emergent issues within your applications.
--
-- /See:/ 'newInsight' smart constructor.
data Insight = Insight'
  { -- | The categories that label and describe the type of insight.
    Insight -> 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.
    Insight -> Maybe RequestImpactStatistics
clientRequestImpactStatistics :: Prelude.Maybe RequestImpactStatistics,
    -- | The time, in Unix seconds, at which the insight ended.
    Insight -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Resource Name (ARN) of the group that the insight belongs to.
    Insight -> Maybe Text
groupARN :: Prelude.Maybe Prelude.Text,
    -- | The name of the group that the insight belongs to.
    Insight -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text,
    -- | The insights unique identifier.
    Insight -> Maybe Text
insightId :: Prelude.Maybe Prelude.Text,
    Insight -> 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.
    Insight -> Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics :: Prelude.Maybe RequestImpactStatistics,
    -- | The time, in Unix seconds, at which the insight began.
    Insight -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
    -- | The current state of the insight.
    Insight -> Maybe InsightState
state :: Prelude.Maybe InsightState,
    -- | A brief description of the insight.
    Insight -> Maybe Text
summary :: Prelude.Maybe Prelude.Text,
    -- | The service within the insight that is most impacted by the incident.
    Insight -> Maybe [AnomalousService]
topAnomalousServices :: Prelude.Maybe [AnomalousService]
  }
  deriving (Insight -> Insight -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Insight -> Insight -> Bool
$c/= :: Insight -> Insight -> Bool
== :: Insight -> Insight -> Bool
$c== :: Insight -> Insight -> Bool
Prelude.Eq, ReadPrec [Insight]
ReadPrec Insight
Int -> ReadS Insight
ReadS [Insight]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Insight]
$creadListPrec :: ReadPrec [Insight]
readPrec :: ReadPrec Insight
$creadPrec :: ReadPrec Insight
readList :: ReadS [Insight]
$creadList :: ReadS [Insight]
readsPrec :: Int -> ReadS Insight
$creadsPrec :: Int -> ReadS Insight
Prelude.Read, Int -> Insight -> ShowS
[Insight] -> ShowS
Insight -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Insight] -> ShowS
$cshowList :: [Insight] -> ShowS
show :: Insight -> String
$cshow :: Insight -> String
showsPrec :: Int -> Insight -> ShowS
$cshowsPrec :: Int -> Insight -> ShowS
Prelude.Show, forall x. Rep Insight x -> Insight
forall x. Insight -> Rep Insight x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Insight x -> Insight
$cfrom :: forall x. Insight -> Rep Insight x
Prelude.Generic)

-- |
-- Create a value of 'Insight' 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', 'insight_categories' - The categories that label and describe the type of insight.
--
-- 'clientRequestImpactStatistics', 'insight_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', 'insight_endTime' - The time, in Unix seconds, at which the insight ended.
--
-- 'groupARN', 'insight_groupARN' - The Amazon Resource Name (ARN) of the group that the insight belongs to.
--
-- 'groupName', 'insight_groupName' - The name of the group that the insight belongs to.
--
-- 'insightId', 'insight_insightId' - The insights unique identifier.
--
-- 'rootCauseServiceId', 'insight_rootCauseServiceId' - Undocumented member.
--
-- 'rootCauseServiceRequestImpactStatistics', 'insight_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', 'insight_startTime' - The time, in Unix seconds, at which the insight began.
--
-- 'state', 'insight_state' - The current state of the insight.
--
-- 'summary', 'insight_summary' - A brief description of the insight.
--
-- 'topAnomalousServices', 'insight_topAnomalousServices' - The service within the insight that is most impacted by the incident.
newInsight ::
  Insight
newInsight :: Insight
newInsight =
  Insight'
    { $sel:categories:Insight' :: Maybe [InsightCategory]
categories = forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestImpactStatistics:Insight' :: Maybe RequestImpactStatistics
clientRequestImpactStatistics = forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:Insight' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
      $sel:groupARN:Insight' :: Maybe Text
groupARN = forall a. Maybe a
Prelude.Nothing,
      $sel:groupName:Insight' :: Maybe Text
groupName = forall a. Maybe a
Prelude.Nothing,
      $sel:insightId:Insight' :: Maybe Text
insightId = forall a. Maybe a
Prelude.Nothing,
      $sel:rootCauseServiceId:Insight' :: Maybe ServiceId
rootCauseServiceId = forall a. Maybe a
Prelude.Nothing,
      $sel:rootCauseServiceRequestImpactStatistics:Insight' :: Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics =
        forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:Insight' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
      $sel:state:Insight' :: Maybe InsightState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:summary:Insight' :: Maybe Text
summary = forall a. Maybe a
Prelude.Nothing,
      $sel:topAnomalousServices:Insight' :: Maybe [AnomalousService]
topAnomalousServices = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The time, in Unix seconds, at which the insight ended.
insight_endTime :: Lens.Lens' Insight (Prelude.Maybe Prelude.UTCTime)
insight_endTime :: Lens' Insight (Maybe UTCTime)
insight_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insight' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:Insight' :: Insight -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: Insight
s@Insight' {} Maybe POSIX
a -> Insight
s {$sel:endTime:Insight' :: Maybe POSIX
endTime = Maybe POSIX
a} :: Insight) 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.
insight_groupARN :: Lens.Lens' Insight (Prelude.Maybe Prelude.Text)
insight_groupARN :: Lens' Insight (Maybe Text)
insight_groupARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insight' {Maybe Text
groupARN :: Maybe Text
$sel:groupARN:Insight' :: Insight -> Maybe Text
groupARN} -> Maybe Text
groupARN) (\s :: Insight
s@Insight' {} Maybe Text
a -> Insight
s {$sel:groupARN:Insight' :: Maybe Text
groupARN = Maybe Text
a} :: Insight)

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

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

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

-- | 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.
insight_rootCauseServiceRequestImpactStatistics :: Lens.Lens' Insight (Prelude.Maybe RequestImpactStatistics)
insight_rootCauseServiceRequestImpactStatistics :: Lens' Insight (Maybe RequestImpactStatistics)
insight_rootCauseServiceRequestImpactStatistics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insight' {Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics :: Maybe RequestImpactStatistics
$sel:rootCauseServiceRequestImpactStatistics:Insight' :: Insight -> Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics} -> Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics) (\s :: Insight
s@Insight' {} Maybe RequestImpactStatistics
a -> Insight
s {$sel:rootCauseServiceRequestImpactStatistics:Insight' :: Maybe RequestImpactStatistics
rootCauseServiceRequestImpactStatistics = Maybe RequestImpactStatistics
a} :: Insight)

-- | The time, in Unix seconds, at which the insight began.
insight_startTime :: Lens.Lens' Insight (Prelude.Maybe Prelude.UTCTime)
insight_startTime :: Lens' Insight (Maybe UTCTime)
insight_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insight' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:Insight' :: Insight -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: Insight
s@Insight' {} Maybe POSIX
a -> Insight
s {$sel:startTime:Insight' :: Maybe POSIX
startTime = Maybe POSIX
a} :: Insight) 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.
insight_state :: Lens.Lens' Insight (Prelude.Maybe InsightState)
insight_state :: Lens' Insight (Maybe InsightState)
insight_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insight' {Maybe InsightState
state :: Maybe InsightState
$sel:state:Insight' :: Insight -> Maybe InsightState
state} -> Maybe InsightState
state) (\s :: Insight
s@Insight' {} Maybe InsightState
a -> Insight
s {$sel:state:Insight' :: Maybe InsightState
state = Maybe InsightState
a} :: Insight)

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

-- | The service within the insight that is most impacted by the incident.
insight_topAnomalousServices :: Lens.Lens' Insight (Prelude.Maybe [AnomalousService])
insight_topAnomalousServices :: Lens' Insight (Maybe [AnomalousService])
insight_topAnomalousServices = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Insight' {Maybe [AnomalousService]
topAnomalousServices :: Maybe [AnomalousService]
$sel:topAnomalousServices:Insight' :: Insight -> Maybe [AnomalousService]
topAnomalousServices} -> Maybe [AnomalousService]
topAnomalousServices) (\s :: Insight
s@Insight' {} Maybe [AnomalousService]
a -> Insight
s {$sel:topAnomalousServices:Insight' :: Maybe [AnomalousService]
topAnomalousServices = Maybe [AnomalousService]
a} :: Insight) 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 Insight where
  parseJSON :: Value -> Parser Insight
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Insight"
      ( \Object
x ->
          Maybe [InsightCategory]
-> Maybe RequestImpactStatistics
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ServiceId
-> Maybe RequestImpactStatistics
-> Maybe POSIX
-> Maybe InsightState
-> Maybe Text
-> Maybe [AnomalousService]
-> Insight
Insight'
            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
"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 Insight where
  hashWithSalt :: Int -> Insight -> Int
hashWithSalt Int
_salt Insight' {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
insightId :: Maybe Text
groupName :: Maybe Text
groupARN :: Maybe Text
endTime :: Maybe POSIX
clientRequestImpactStatistics :: Maybe RequestImpactStatistics
categories :: Maybe [InsightCategory]
$sel:topAnomalousServices:Insight' :: Insight -> Maybe [AnomalousService]
$sel:summary:Insight' :: Insight -> Maybe Text
$sel:state:Insight' :: Insight -> Maybe InsightState
$sel:startTime:Insight' :: Insight -> Maybe POSIX
$sel:rootCauseServiceRequestImpactStatistics:Insight' :: Insight -> Maybe RequestImpactStatistics
$sel:rootCauseServiceId:Insight' :: Insight -> Maybe ServiceId
$sel:insightId:Insight' :: Insight -> Maybe Text
$sel:groupName:Insight' :: Insight -> Maybe Text
$sel:groupARN:Insight' :: Insight -> Maybe Text
$sel:endTime:Insight' :: Insight -> Maybe POSIX
$sel:clientRequestImpactStatistics:Insight' :: Insight -> Maybe RequestImpactStatistics
$sel:categories:Insight' :: Insight -> 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 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 Insight where
  rnf :: Insight -> ()
rnf Insight' {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
insightId :: Maybe Text
groupName :: Maybe Text
groupARN :: Maybe Text
endTime :: Maybe POSIX
clientRequestImpactStatistics :: Maybe RequestImpactStatistics
categories :: Maybe [InsightCategory]
$sel:topAnomalousServices:Insight' :: Insight -> Maybe [AnomalousService]
$sel:summary:Insight' :: Insight -> Maybe Text
$sel:state:Insight' :: Insight -> Maybe InsightState
$sel:startTime:Insight' :: Insight -> Maybe POSIX
$sel:rootCauseServiceRequestImpactStatistics:Insight' :: Insight -> Maybe RequestImpactStatistics
$sel:rootCauseServiceId:Insight' :: Insight -> Maybe ServiceId
$sel:insightId:Insight' :: Insight -> Maybe Text
$sel:groupName:Insight' :: Insight -> Maybe Text
$sel:groupARN:Insight' :: Insight -> Maybe Text
$sel:endTime:Insight' :: Insight -> Maybe POSIX
$sel:clientRequestImpactStatistics:Insight' :: Insight -> Maybe RequestImpactStatistics
$sel:categories:Insight' :: Insight -> 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 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