{-# 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.ReactiveAnomalySummary
-- 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.ReactiveAnomalySummary where

import qualified Amazonka.Core as Core
import Amazonka.DevOpsGuru.Types.AnomalyReportedTimeRange
import Amazonka.DevOpsGuru.Types.AnomalySeverity
import Amazonka.DevOpsGuru.Types.AnomalySourceDetails
import Amazonka.DevOpsGuru.Types.AnomalyStatus
import Amazonka.DevOpsGuru.Types.AnomalyTimeRange
import Amazonka.DevOpsGuru.Types.ResourceCollection
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details about a reactive anomaly. This object is returned by
-- @DescribeAnomaly.@
--
-- /See:/ 'newReactiveAnomalySummary' smart constructor.
data ReactiveAnomalySummary = ReactiveAnomalySummary'
  { -- | A @AnomalyReportedTimeRange@ object that specifies the time range
    -- between when the anomaly is opened and the time when it is closed.
    ReactiveAnomalySummary -> Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange :: Prelude.Maybe AnomalyReportedTimeRange,
    -- | The status of the reactive anomaly.
    ReactiveAnomalySummary -> Maybe AnomalyStatus
status :: Prelude.Maybe AnomalyStatus,
    ReactiveAnomalySummary -> Maybe ResourceCollection
resourceCollection :: Prelude.Maybe ResourceCollection,
    -- | The severity of the reactive anomaly.
    ReactiveAnomalySummary -> Maybe AnomalySeverity
severity :: Prelude.Maybe AnomalySeverity,
    -- | Details about the source of the analyzed operational data that triggered
    -- the anomaly. The one supported source is Amazon CloudWatch metrics.
    ReactiveAnomalySummary -> Maybe AnomalySourceDetails
sourceDetails :: Prelude.Maybe AnomalySourceDetails,
    -- | The ID of the reactive anomaly.
    ReactiveAnomalySummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The ID of the insight that contains this anomaly. An insight is composed
    -- of related anomalies.
    ReactiveAnomalySummary -> Maybe Text
associatedInsightId :: Prelude.Maybe Prelude.Text,
    ReactiveAnomalySummary -> Maybe AnomalyTimeRange
anomalyTimeRange :: Prelude.Maybe AnomalyTimeRange
  }
  deriving (ReactiveAnomalySummary -> ReactiveAnomalySummary -> Bool
(ReactiveAnomalySummary -> ReactiveAnomalySummary -> Bool)
-> (ReactiveAnomalySummary -> ReactiveAnomalySummary -> Bool)
-> Eq ReactiveAnomalySummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReactiveAnomalySummary -> ReactiveAnomalySummary -> Bool
$c/= :: ReactiveAnomalySummary -> ReactiveAnomalySummary -> Bool
== :: ReactiveAnomalySummary -> ReactiveAnomalySummary -> Bool
$c== :: ReactiveAnomalySummary -> ReactiveAnomalySummary -> Bool
Prelude.Eq, ReadPrec [ReactiveAnomalySummary]
ReadPrec ReactiveAnomalySummary
Int -> ReadS ReactiveAnomalySummary
ReadS [ReactiveAnomalySummary]
(Int -> ReadS ReactiveAnomalySummary)
-> ReadS [ReactiveAnomalySummary]
-> ReadPrec ReactiveAnomalySummary
-> ReadPrec [ReactiveAnomalySummary]
-> Read ReactiveAnomalySummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReactiveAnomalySummary]
$creadListPrec :: ReadPrec [ReactiveAnomalySummary]
readPrec :: ReadPrec ReactiveAnomalySummary
$creadPrec :: ReadPrec ReactiveAnomalySummary
readList :: ReadS [ReactiveAnomalySummary]
$creadList :: ReadS [ReactiveAnomalySummary]
readsPrec :: Int -> ReadS ReactiveAnomalySummary
$creadsPrec :: Int -> ReadS ReactiveAnomalySummary
Prelude.Read, Int -> ReactiveAnomalySummary -> ShowS
[ReactiveAnomalySummary] -> ShowS
ReactiveAnomalySummary -> String
(Int -> ReactiveAnomalySummary -> ShowS)
-> (ReactiveAnomalySummary -> String)
-> ([ReactiveAnomalySummary] -> ShowS)
-> Show ReactiveAnomalySummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReactiveAnomalySummary] -> ShowS
$cshowList :: [ReactiveAnomalySummary] -> ShowS
show :: ReactiveAnomalySummary -> String
$cshow :: ReactiveAnomalySummary -> String
showsPrec :: Int -> ReactiveAnomalySummary -> ShowS
$cshowsPrec :: Int -> ReactiveAnomalySummary -> ShowS
Prelude.Show, (forall x. ReactiveAnomalySummary -> Rep ReactiveAnomalySummary x)
-> (forall x.
    Rep ReactiveAnomalySummary x -> ReactiveAnomalySummary)
-> Generic ReactiveAnomalySummary
forall x. Rep ReactiveAnomalySummary x -> ReactiveAnomalySummary
forall x. ReactiveAnomalySummary -> Rep ReactiveAnomalySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReactiveAnomalySummary x -> ReactiveAnomalySummary
$cfrom :: forall x. ReactiveAnomalySummary -> Rep ReactiveAnomalySummary x
Prelude.Generic)

-- |
-- Create a value of 'ReactiveAnomalySummary' 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:
--
-- 'anomalyReportedTimeRange', 'reactiveAnomalySummary_anomalyReportedTimeRange' - A @AnomalyReportedTimeRange@ object that specifies the time range
-- between when the anomaly is opened and the time when it is closed.
--
-- 'status', 'reactiveAnomalySummary_status' - The status of the reactive anomaly.
--
-- 'resourceCollection', 'reactiveAnomalySummary_resourceCollection' - Undocumented member.
--
-- 'severity', 'reactiveAnomalySummary_severity' - The severity of the reactive anomaly.
--
-- 'sourceDetails', 'reactiveAnomalySummary_sourceDetails' - Details about the source of the analyzed operational data that triggered
-- the anomaly. The one supported source is Amazon CloudWatch metrics.
--
-- 'id', 'reactiveAnomalySummary_id' - The ID of the reactive anomaly.
--
-- 'associatedInsightId', 'reactiveAnomalySummary_associatedInsightId' - The ID of the insight that contains this anomaly. An insight is composed
-- of related anomalies.
--
-- 'anomalyTimeRange', 'reactiveAnomalySummary_anomalyTimeRange' - Undocumented member.
newReactiveAnomalySummary ::
  ReactiveAnomalySummary
newReactiveAnomalySummary :: ReactiveAnomalySummary
newReactiveAnomalySummary =
  ReactiveAnomalySummary' :: Maybe AnomalyReportedTimeRange
-> Maybe AnomalyStatus
-> Maybe ResourceCollection
-> Maybe AnomalySeverity
-> Maybe AnomalySourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe AnomalyTimeRange
-> ReactiveAnomalySummary
ReactiveAnomalySummary'
    { $sel:anomalyReportedTimeRange:ReactiveAnomalySummary' :: Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange =
        Maybe AnomalyReportedTimeRange
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ReactiveAnomalySummary' :: Maybe AnomalyStatus
status = Maybe AnomalyStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceCollection:ReactiveAnomalySummary' :: Maybe ResourceCollection
resourceCollection = Maybe ResourceCollection
forall a. Maybe a
Prelude.Nothing,
      $sel:severity:ReactiveAnomalySummary' :: Maybe AnomalySeverity
severity = Maybe AnomalySeverity
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceDetails:ReactiveAnomalySummary' :: Maybe AnomalySourceDetails
sourceDetails = Maybe AnomalySourceDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:id:ReactiveAnomalySummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associatedInsightId:ReactiveAnomalySummary' :: Maybe Text
associatedInsightId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:anomalyTimeRange:ReactiveAnomalySummary' :: Maybe AnomalyTimeRange
anomalyTimeRange = Maybe AnomalyTimeRange
forall a. Maybe a
Prelude.Nothing
    }

-- | A @AnomalyReportedTimeRange@ object that specifies the time range
-- between when the anomaly is opened and the time when it is closed.
reactiveAnomalySummary_anomalyReportedTimeRange :: Lens.Lens' ReactiveAnomalySummary (Prelude.Maybe AnomalyReportedTimeRange)
reactiveAnomalySummary_anomalyReportedTimeRange :: (Maybe AnomalyReportedTimeRange
 -> f (Maybe AnomalyReportedTimeRange))
-> ReactiveAnomalySummary -> f ReactiveAnomalySummary
reactiveAnomalySummary_anomalyReportedTimeRange = (ReactiveAnomalySummary -> Maybe AnomalyReportedTimeRange)
-> (ReactiveAnomalySummary
    -> Maybe AnomalyReportedTimeRange -> ReactiveAnomalySummary)
-> Lens
     ReactiveAnomalySummary
     ReactiveAnomalySummary
     (Maybe AnomalyReportedTimeRange)
     (Maybe AnomalyReportedTimeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveAnomalySummary' {Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange :: Maybe AnomalyReportedTimeRange
$sel:anomalyReportedTimeRange:ReactiveAnomalySummary' :: ReactiveAnomalySummary -> Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange} -> Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange) (\s :: ReactiveAnomalySummary
s@ReactiveAnomalySummary' {} Maybe AnomalyReportedTimeRange
a -> ReactiveAnomalySummary
s {$sel:anomalyReportedTimeRange:ReactiveAnomalySummary' :: Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange = Maybe AnomalyReportedTimeRange
a} :: ReactiveAnomalySummary)

-- | The status of the reactive anomaly.
reactiveAnomalySummary_status :: Lens.Lens' ReactiveAnomalySummary (Prelude.Maybe AnomalyStatus)
reactiveAnomalySummary_status :: (Maybe AnomalyStatus -> f (Maybe AnomalyStatus))
-> ReactiveAnomalySummary -> f ReactiveAnomalySummary
reactiveAnomalySummary_status = (ReactiveAnomalySummary -> Maybe AnomalyStatus)
-> (ReactiveAnomalySummary
    -> Maybe AnomalyStatus -> ReactiveAnomalySummary)
-> Lens
     ReactiveAnomalySummary
     ReactiveAnomalySummary
     (Maybe AnomalyStatus)
     (Maybe AnomalyStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveAnomalySummary' {Maybe AnomalyStatus
status :: Maybe AnomalyStatus
$sel:status:ReactiveAnomalySummary' :: ReactiveAnomalySummary -> Maybe AnomalyStatus
status} -> Maybe AnomalyStatus
status) (\s :: ReactiveAnomalySummary
s@ReactiveAnomalySummary' {} Maybe AnomalyStatus
a -> ReactiveAnomalySummary
s {$sel:status:ReactiveAnomalySummary' :: Maybe AnomalyStatus
status = Maybe AnomalyStatus
a} :: ReactiveAnomalySummary)

-- | Undocumented member.
reactiveAnomalySummary_resourceCollection :: Lens.Lens' ReactiveAnomalySummary (Prelude.Maybe ResourceCollection)
reactiveAnomalySummary_resourceCollection :: (Maybe ResourceCollection -> f (Maybe ResourceCollection))
-> ReactiveAnomalySummary -> f ReactiveAnomalySummary
reactiveAnomalySummary_resourceCollection = (ReactiveAnomalySummary -> Maybe ResourceCollection)
-> (ReactiveAnomalySummary
    -> Maybe ResourceCollection -> ReactiveAnomalySummary)
-> Lens
     ReactiveAnomalySummary
     ReactiveAnomalySummary
     (Maybe ResourceCollection)
     (Maybe ResourceCollection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveAnomalySummary' {Maybe ResourceCollection
resourceCollection :: Maybe ResourceCollection
$sel:resourceCollection:ReactiveAnomalySummary' :: ReactiveAnomalySummary -> Maybe ResourceCollection
resourceCollection} -> Maybe ResourceCollection
resourceCollection) (\s :: ReactiveAnomalySummary
s@ReactiveAnomalySummary' {} Maybe ResourceCollection
a -> ReactiveAnomalySummary
s {$sel:resourceCollection:ReactiveAnomalySummary' :: Maybe ResourceCollection
resourceCollection = Maybe ResourceCollection
a} :: ReactiveAnomalySummary)

-- | The severity of the reactive anomaly.
reactiveAnomalySummary_severity :: Lens.Lens' ReactiveAnomalySummary (Prelude.Maybe AnomalySeverity)
reactiveAnomalySummary_severity :: (Maybe AnomalySeverity -> f (Maybe AnomalySeverity))
-> ReactiveAnomalySummary -> f ReactiveAnomalySummary
reactiveAnomalySummary_severity = (ReactiveAnomalySummary -> Maybe AnomalySeverity)
-> (ReactiveAnomalySummary
    -> Maybe AnomalySeverity -> ReactiveAnomalySummary)
-> Lens
     ReactiveAnomalySummary
     ReactiveAnomalySummary
     (Maybe AnomalySeverity)
     (Maybe AnomalySeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveAnomalySummary' {Maybe AnomalySeverity
severity :: Maybe AnomalySeverity
$sel:severity:ReactiveAnomalySummary' :: ReactiveAnomalySummary -> Maybe AnomalySeverity
severity} -> Maybe AnomalySeverity
severity) (\s :: ReactiveAnomalySummary
s@ReactiveAnomalySummary' {} Maybe AnomalySeverity
a -> ReactiveAnomalySummary
s {$sel:severity:ReactiveAnomalySummary' :: Maybe AnomalySeverity
severity = Maybe AnomalySeverity
a} :: ReactiveAnomalySummary)

-- | Details about the source of the analyzed operational data that triggered
-- the anomaly. The one supported source is Amazon CloudWatch metrics.
reactiveAnomalySummary_sourceDetails :: Lens.Lens' ReactiveAnomalySummary (Prelude.Maybe AnomalySourceDetails)
reactiveAnomalySummary_sourceDetails :: (Maybe AnomalySourceDetails -> f (Maybe AnomalySourceDetails))
-> ReactiveAnomalySummary -> f ReactiveAnomalySummary
reactiveAnomalySummary_sourceDetails = (ReactiveAnomalySummary -> Maybe AnomalySourceDetails)
-> (ReactiveAnomalySummary
    -> Maybe AnomalySourceDetails -> ReactiveAnomalySummary)
-> Lens
     ReactiveAnomalySummary
     ReactiveAnomalySummary
     (Maybe AnomalySourceDetails)
     (Maybe AnomalySourceDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveAnomalySummary' {Maybe AnomalySourceDetails
sourceDetails :: Maybe AnomalySourceDetails
$sel:sourceDetails:ReactiveAnomalySummary' :: ReactiveAnomalySummary -> Maybe AnomalySourceDetails
sourceDetails} -> Maybe AnomalySourceDetails
sourceDetails) (\s :: ReactiveAnomalySummary
s@ReactiveAnomalySummary' {} Maybe AnomalySourceDetails
a -> ReactiveAnomalySummary
s {$sel:sourceDetails:ReactiveAnomalySummary' :: Maybe AnomalySourceDetails
sourceDetails = Maybe AnomalySourceDetails
a} :: ReactiveAnomalySummary)

-- | The ID of the reactive anomaly.
reactiveAnomalySummary_id :: Lens.Lens' ReactiveAnomalySummary (Prelude.Maybe Prelude.Text)
reactiveAnomalySummary_id :: (Maybe Text -> f (Maybe Text))
-> ReactiveAnomalySummary -> f ReactiveAnomalySummary
reactiveAnomalySummary_id = (ReactiveAnomalySummary -> Maybe Text)
-> (ReactiveAnomalySummary -> Maybe Text -> ReactiveAnomalySummary)
-> Lens
     ReactiveAnomalySummary
     ReactiveAnomalySummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveAnomalySummary' {Maybe Text
id :: Maybe Text
$sel:id:ReactiveAnomalySummary' :: ReactiveAnomalySummary -> Maybe Text
id} -> Maybe Text
id) (\s :: ReactiveAnomalySummary
s@ReactiveAnomalySummary' {} Maybe Text
a -> ReactiveAnomalySummary
s {$sel:id:ReactiveAnomalySummary' :: Maybe Text
id = Maybe Text
a} :: ReactiveAnomalySummary)

-- | The ID of the insight that contains this anomaly. An insight is composed
-- of related anomalies.
reactiveAnomalySummary_associatedInsightId :: Lens.Lens' ReactiveAnomalySummary (Prelude.Maybe Prelude.Text)
reactiveAnomalySummary_associatedInsightId :: (Maybe Text -> f (Maybe Text))
-> ReactiveAnomalySummary -> f ReactiveAnomalySummary
reactiveAnomalySummary_associatedInsightId = (ReactiveAnomalySummary -> Maybe Text)
-> (ReactiveAnomalySummary -> Maybe Text -> ReactiveAnomalySummary)
-> Lens
     ReactiveAnomalySummary
     ReactiveAnomalySummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveAnomalySummary' {Maybe Text
associatedInsightId :: Maybe Text
$sel:associatedInsightId:ReactiveAnomalySummary' :: ReactiveAnomalySummary -> Maybe Text
associatedInsightId} -> Maybe Text
associatedInsightId) (\s :: ReactiveAnomalySummary
s@ReactiveAnomalySummary' {} Maybe Text
a -> ReactiveAnomalySummary
s {$sel:associatedInsightId:ReactiveAnomalySummary' :: Maybe Text
associatedInsightId = Maybe Text
a} :: ReactiveAnomalySummary)

-- | Undocumented member.
reactiveAnomalySummary_anomalyTimeRange :: Lens.Lens' ReactiveAnomalySummary (Prelude.Maybe AnomalyTimeRange)
reactiveAnomalySummary_anomalyTimeRange :: (Maybe AnomalyTimeRange -> f (Maybe AnomalyTimeRange))
-> ReactiveAnomalySummary -> f ReactiveAnomalySummary
reactiveAnomalySummary_anomalyTimeRange = (ReactiveAnomalySummary -> Maybe AnomalyTimeRange)
-> (ReactiveAnomalySummary
    -> Maybe AnomalyTimeRange -> ReactiveAnomalySummary)
-> Lens
     ReactiveAnomalySummary
     ReactiveAnomalySummary
     (Maybe AnomalyTimeRange)
     (Maybe AnomalyTimeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveAnomalySummary' {Maybe AnomalyTimeRange
anomalyTimeRange :: Maybe AnomalyTimeRange
$sel:anomalyTimeRange:ReactiveAnomalySummary' :: ReactiveAnomalySummary -> Maybe AnomalyTimeRange
anomalyTimeRange} -> Maybe AnomalyTimeRange
anomalyTimeRange) (\s :: ReactiveAnomalySummary
s@ReactiveAnomalySummary' {} Maybe AnomalyTimeRange
a -> ReactiveAnomalySummary
s {$sel:anomalyTimeRange:ReactiveAnomalySummary' :: Maybe AnomalyTimeRange
anomalyTimeRange = Maybe AnomalyTimeRange
a} :: ReactiveAnomalySummary)

instance Core.FromJSON ReactiveAnomalySummary where
  parseJSON :: Value -> Parser ReactiveAnomalySummary
parseJSON =
    String
-> (Object -> Parser ReactiveAnomalySummary)
-> Value
-> Parser ReactiveAnomalySummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReactiveAnomalySummary"
      ( \Object
x ->
          Maybe AnomalyReportedTimeRange
-> Maybe AnomalyStatus
-> Maybe ResourceCollection
-> Maybe AnomalySeverity
-> Maybe AnomalySourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe AnomalyTimeRange
-> ReactiveAnomalySummary
ReactiveAnomalySummary'
            (Maybe AnomalyReportedTimeRange
 -> Maybe AnomalyStatus
 -> Maybe ResourceCollection
 -> Maybe AnomalySeverity
 -> Maybe AnomalySourceDetails
 -> Maybe Text
 -> Maybe Text
 -> Maybe AnomalyTimeRange
 -> ReactiveAnomalySummary)
-> Parser (Maybe AnomalyReportedTimeRange)
-> Parser
     (Maybe AnomalyStatus
      -> Maybe ResourceCollection
      -> Maybe AnomalySeverity
      -> Maybe AnomalySourceDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AnomalyTimeRange
      -> ReactiveAnomalySummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AnomalyReportedTimeRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AnomalyReportedTimeRange")
            Parser
  (Maybe AnomalyStatus
   -> Maybe ResourceCollection
   -> Maybe AnomalySeverity
   -> Maybe AnomalySourceDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AnomalyTimeRange
   -> ReactiveAnomalySummary)
-> Parser (Maybe AnomalyStatus)
-> Parser
     (Maybe ResourceCollection
      -> Maybe AnomalySeverity
      -> Maybe AnomalySourceDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AnomalyTimeRange
      -> ReactiveAnomalySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AnomalyStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe ResourceCollection
   -> Maybe AnomalySeverity
   -> Maybe AnomalySourceDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AnomalyTimeRange
   -> ReactiveAnomalySummary)
-> Parser (Maybe ResourceCollection)
-> Parser
     (Maybe AnomalySeverity
      -> Maybe AnomalySourceDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AnomalyTimeRange
      -> ReactiveAnomalySummary)
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 AnomalySeverity
   -> Maybe AnomalySourceDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AnomalyTimeRange
   -> ReactiveAnomalySummary)
-> Parser (Maybe AnomalySeverity)
-> Parser
     (Maybe AnomalySourceDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AnomalyTimeRange
      -> ReactiveAnomalySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AnomalySeverity)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Severity")
            Parser
  (Maybe AnomalySourceDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AnomalyTimeRange
   -> ReactiveAnomalySummary)
-> Parser (Maybe AnomalySourceDetails)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe AnomalyTimeRange -> ReactiveAnomalySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AnomalySourceDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceDetails")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe AnomalyTimeRange -> ReactiveAnomalySummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe AnomalyTimeRange -> ReactiveAnomalySummary)
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 Text -> Maybe AnomalyTimeRange -> ReactiveAnomalySummary)
-> Parser (Maybe Text)
-> Parser (Maybe AnomalyTimeRange -> ReactiveAnomalySummary)
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
"AssociatedInsightId")
            Parser (Maybe AnomalyTimeRange -> ReactiveAnomalySummary)
-> Parser (Maybe AnomalyTimeRange) -> Parser ReactiveAnomalySummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AnomalyTimeRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AnomalyTimeRange")
      )

instance Prelude.Hashable ReactiveAnomalySummary

instance Prelude.NFData ReactiveAnomalySummary