{-# 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.ReactiveAnomaly
-- 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.ReactiveAnomaly 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
-- @ListAnomalies@.
--
-- /See:/ 'newReactiveAnomaly' smart constructor.
data ReactiveAnomaly = ReactiveAnomaly'
  { -- | A @AnomalyReportedTimeRange@ object that specifies the time range
    -- between when the anomaly is opened and the time when it is closed.
    ReactiveAnomaly -> Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange :: Prelude.Maybe AnomalyReportedTimeRange,
    -- | The status of the anomaly.
    ReactiveAnomaly -> Maybe AnomalyStatus
status :: Prelude.Maybe AnomalyStatus,
    ReactiveAnomaly -> Maybe ResourceCollection
resourceCollection :: Prelude.Maybe ResourceCollection,
    -- | The severity of the anomaly.
    ReactiveAnomaly -> 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.
    ReactiveAnomaly -> Maybe AnomalySourceDetails
sourceDetails :: Prelude.Maybe AnomalySourceDetails,
    -- | The ID of the reactive anomaly.
    ReactiveAnomaly -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The ID of the insight that contains this anomaly. An insight is composed
    -- of related anomalies.
    ReactiveAnomaly -> Maybe Text
associatedInsightId :: Prelude.Maybe Prelude.Text,
    ReactiveAnomaly -> Maybe AnomalyTimeRange
anomalyTimeRange :: Prelude.Maybe AnomalyTimeRange
  }
  deriving (ReactiveAnomaly -> ReactiveAnomaly -> Bool
(ReactiveAnomaly -> ReactiveAnomaly -> Bool)
-> (ReactiveAnomaly -> ReactiveAnomaly -> Bool)
-> Eq ReactiveAnomaly
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReactiveAnomaly -> ReactiveAnomaly -> Bool
$c/= :: ReactiveAnomaly -> ReactiveAnomaly -> Bool
== :: ReactiveAnomaly -> ReactiveAnomaly -> Bool
$c== :: ReactiveAnomaly -> ReactiveAnomaly -> Bool
Prelude.Eq, ReadPrec [ReactiveAnomaly]
ReadPrec ReactiveAnomaly
Int -> ReadS ReactiveAnomaly
ReadS [ReactiveAnomaly]
(Int -> ReadS ReactiveAnomaly)
-> ReadS [ReactiveAnomaly]
-> ReadPrec ReactiveAnomaly
-> ReadPrec [ReactiveAnomaly]
-> Read ReactiveAnomaly
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReactiveAnomaly]
$creadListPrec :: ReadPrec [ReactiveAnomaly]
readPrec :: ReadPrec ReactiveAnomaly
$creadPrec :: ReadPrec ReactiveAnomaly
readList :: ReadS [ReactiveAnomaly]
$creadList :: ReadS [ReactiveAnomaly]
readsPrec :: Int -> ReadS ReactiveAnomaly
$creadsPrec :: Int -> ReadS ReactiveAnomaly
Prelude.Read, Int -> ReactiveAnomaly -> ShowS
[ReactiveAnomaly] -> ShowS
ReactiveAnomaly -> String
(Int -> ReactiveAnomaly -> ShowS)
-> (ReactiveAnomaly -> String)
-> ([ReactiveAnomaly] -> ShowS)
-> Show ReactiveAnomaly
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReactiveAnomaly] -> ShowS
$cshowList :: [ReactiveAnomaly] -> ShowS
show :: ReactiveAnomaly -> String
$cshow :: ReactiveAnomaly -> String
showsPrec :: Int -> ReactiveAnomaly -> ShowS
$cshowsPrec :: Int -> ReactiveAnomaly -> ShowS
Prelude.Show, (forall x. ReactiveAnomaly -> Rep ReactiveAnomaly x)
-> (forall x. Rep ReactiveAnomaly x -> ReactiveAnomaly)
-> Generic ReactiveAnomaly
forall x. Rep ReactiveAnomaly x -> ReactiveAnomaly
forall x. ReactiveAnomaly -> Rep ReactiveAnomaly x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReactiveAnomaly x -> ReactiveAnomaly
$cfrom :: forall x. ReactiveAnomaly -> Rep ReactiveAnomaly x
Prelude.Generic)

-- |
-- Create a value of 'ReactiveAnomaly' 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', 'reactiveAnomaly_anomalyReportedTimeRange' - A @AnomalyReportedTimeRange@ object that specifies the time range
-- between when the anomaly is opened and the time when it is closed.
--
-- 'status', 'reactiveAnomaly_status' - The status of the anomaly.
--
-- 'resourceCollection', 'reactiveAnomaly_resourceCollection' - Undocumented member.
--
-- 'severity', 'reactiveAnomaly_severity' - The severity of the anomaly.
--
-- 'sourceDetails', 'reactiveAnomaly_sourceDetails' - Details about the source of the analyzed operational data that triggered
-- the anomaly. The one supported source is Amazon CloudWatch metrics.
--
-- 'id', 'reactiveAnomaly_id' - The ID of the reactive anomaly.
--
-- 'associatedInsightId', 'reactiveAnomaly_associatedInsightId' - The ID of the insight that contains this anomaly. An insight is composed
-- of related anomalies.
--
-- 'anomalyTimeRange', 'reactiveAnomaly_anomalyTimeRange' - Undocumented member.
newReactiveAnomaly ::
  ReactiveAnomaly
newReactiveAnomaly :: ReactiveAnomaly
newReactiveAnomaly =
  ReactiveAnomaly' :: Maybe AnomalyReportedTimeRange
-> Maybe AnomalyStatus
-> Maybe ResourceCollection
-> Maybe AnomalySeverity
-> Maybe AnomalySourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe AnomalyTimeRange
-> ReactiveAnomaly
ReactiveAnomaly'
    { $sel:anomalyReportedTimeRange:ReactiveAnomaly' :: Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange =
        Maybe AnomalyReportedTimeRange
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ReactiveAnomaly' :: Maybe AnomalyStatus
status = Maybe AnomalyStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceCollection:ReactiveAnomaly' :: Maybe ResourceCollection
resourceCollection = Maybe ResourceCollection
forall a. Maybe a
Prelude.Nothing,
      $sel:severity:ReactiveAnomaly' :: Maybe AnomalySeverity
severity = Maybe AnomalySeverity
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceDetails:ReactiveAnomaly' :: Maybe AnomalySourceDetails
sourceDetails = Maybe AnomalySourceDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:id:ReactiveAnomaly' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associatedInsightId:ReactiveAnomaly' :: Maybe Text
associatedInsightId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:anomalyTimeRange:ReactiveAnomaly' :: 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.
reactiveAnomaly_anomalyReportedTimeRange :: Lens.Lens' ReactiveAnomaly (Prelude.Maybe AnomalyReportedTimeRange)
reactiveAnomaly_anomalyReportedTimeRange :: (Maybe AnomalyReportedTimeRange
 -> f (Maybe AnomalyReportedTimeRange))
-> ReactiveAnomaly -> f ReactiveAnomaly
reactiveAnomaly_anomalyReportedTimeRange = (ReactiveAnomaly -> Maybe AnomalyReportedTimeRange)
-> (ReactiveAnomaly
    -> Maybe AnomalyReportedTimeRange -> ReactiveAnomaly)
-> Lens
     ReactiveAnomaly
     ReactiveAnomaly
     (Maybe AnomalyReportedTimeRange)
     (Maybe AnomalyReportedTimeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReactiveAnomaly' {Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange :: Maybe AnomalyReportedTimeRange
$sel:anomalyReportedTimeRange:ReactiveAnomaly' :: ReactiveAnomaly -> Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange} -> Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange) (\s :: ReactiveAnomaly
s@ReactiveAnomaly' {} Maybe AnomalyReportedTimeRange
a -> ReactiveAnomaly
s {$sel:anomalyReportedTimeRange:ReactiveAnomaly' :: Maybe AnomalyReportedTimeRange
anomalyReportedTimeRange = Maybe AnomalyReportedTimeRange
a} :: ReactiveAnomaly)

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

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

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

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

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

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

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

instance Core.FromJSON ReactiveAnomaly where
  parseJSON :: Value -> Parser ReactiveAnomaly
parseJSON =
    String
-> (Object -> Parser ReactiveAnomaly)
-> Value
-> Parser ReactiveAnomaly
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReactiveAnomaly"
      ( \Object
x ->
          Maybe AnomalyReportedTimeRange
-> Maybe AnomalyStatus
-> Maybe ResourceCollection
-> Maybe AnomalySeverity
-> Maybe AnomalySourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe AnomalyTimeRange
-> ReactiveAnomaly
ReactiveAnomaly'
            (Maybe AnomalyReportedTimeRange
 -> Maybe AnomalyStatus
 -> Maybe ResourceCollection
 -> Maybe AnomalySeverity
 -> Maybe AnomalySourceDetails
 -> Maybe Text
 -> Maybe Text
 -> Maybe AnomalyTimeRange
 -> ReactiveAnomaly)
-> Parser (Maybe AnomalyReportedTimeRange)
-> Parser
     (Maybe AnomalyStatus
      -> Maybe ResourceCollection
      -> Maybe AnomalySeverity
      -> Maybe AnomalySourceDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AnomalyTimeRange
      -> ReactiveAnomaly)
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
   -> ReactiveAnomaly)
-> Parser (Maybe AnomalyStatus)
-> Parser
     (Maybe ResourceCollection
      -> Maybe AnomalySeverity
      -> Maybe AnomalySourceDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AnomalyTimeRange
      -> ReactiveAnomaly)
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
   -> ReactiveAnomaly)
-> Parser (Maybe ResourceCollection)
-> Parser
     (Maybe AnomalySeverity
      -> Maybe AnomalySourceDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AnomalyTimeRange
      -> ReactiveAnomaly)
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
   -> ReactiveAnomaly)
-> Parser (Maybe AnomalySeverity)
-> Parser
     (Maybe AnomalySourceDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AnomalyTimeRange
      -> ReactiveAnomaly)
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
   -> ReactiveAnomaly)
-> Parser (Maybe AnomalySourceDetails)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe AnomalyTimeRange -> ReactiveAnomaly)
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 -> ReactiveAnomaly)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe AnomalyTimeRange -> ReactiveAnomaly)
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 -> ReactiveAnomaly)
-> Parser (Maybe Text)
-> Parser (Maybe AnomalyTimeRange -> ReactiveAnomaly)
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 -> ReactiveAnomaly)
-> Parser (Maybe AnomalyTimeRange) -> Parser ReactiveAnomaly
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 ReactiveAnomaly

instance Prelude.NFData ReactiveAnomaly