{-# 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.LookoutMetrics.Types.AlertSummary
-- 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.LookoutMetrics.Types.AlertSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutMetrics.Types.AlertStatus
import Amazonka.LookoutMetrics.Types.AlertType
import qualified Amazonka.Prelude as Prelude

-- | Provides a summary of an alert\'s configuration.
--
-- /See:/ 'newAlertSummary' smart constructor.
data AlertSummary = AlertSummary'
  { -- | The time at which the alert was created.
    AlertSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The ARN of the detector to which the alert is attached.
    AlertSummary -> Maybe Text
anomalyDetectorArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the alert.
    AlertSummary -> Maybe Text
alertName :: Prelude.Maybe Prelude.Text,
    -- | The minimum severity for an anomaly to trigger the alert.
    AlertSummary -> Maybe Natural
alertSensitivityThreshold :: Prelude.Maybe Prelude.Natural,
    -- | The status of the alert.
    AlertSummary -> Maybe AlertStatus
alertStatus :: Prelude.Maybe AlertStatus,
    -- | The ARN of the alert.
    AlertSummary -> Maybe Text
alertArn :: Prelude.Maybe Prelude.Text,
    -- | The type of the alert.
    AlertSummary -> Maybe AlertType
alertType :: Prelude.Maybe AlertType,
    -- | The alert\'s
    -- <https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html tags>.
    AlertSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The time at which the alert was last modified.
    AlertSummary -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Core.POSIX
  }
  deriving (AlertSummary -> AlertSummary -> Bool
(AlertSummary -> AlertSummary -> Bool)
-> (AlertSummary -> AlertSummary -> Bool) -> Eq AlertSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AlertSummary -> AlertSummary -> Bool
$c/= :: AlertSummary -> AlertSummary -> Bool
== :: AlertSummary -> AlertSummary -> Bool
$c== :: AlertSummary -> AlertSummary -> Bool
Prelude.Eq, ReadPrec [AlertSummary]
ReadPrec AlertSummary
Int -> ReadS AlertSummary
ReadS [AlertSummary]
(Int -> ReadS AlertSummary)
-> ReadS [AlertSummary]
-> ReadPrec AlertSummary
-> ReadPrec [AlertSummary]
-> Read AlertSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AlertSummary]
$creadListPrec :: ReadPrec [AlertSummary]
readPrec :: ReadPrec AlertSummary
$creadPrec :: ReadPrec AlertSummary
readList :: ReadS [AlertSummary]
$creadList :: ReadS [AlertSummary]
readsPrec :: Int -> ReadS AlertSummary
$creadsPrec :: Int -> ReadS AlertSummary
Prelude.Read, Int -> AlertSummary -> ShowS
[AlertSummary] -> ShowS
AlertSummary -> String
(Int -> AlertSummary -> ShowS)
-> (AlertSummary -> String)
-> ([AlertSummary] -> ShowS)
-> Show AlertSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AlertSummary] -> ShowS
$cshowList :: [AlertSummary] -> ShowS
show :: AlertSummary -> String
$cshow :: AlertSummary -> String
showsPrec :: Int -> AlertSummary -> ShowS
$cshowsPrec :: Int -> AlertSummary -> ShowS
Prelude.Show, (forall x. AlertSummary -> Rep AlertSummary x)
-> (forall x. Rep AlertSummary x -> AlertSummary)
-> Generic AlertSummary
forall x. Rep AlertSummary x -> AlertSummary
forall x. AlertSummary -> Rep AlertSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AlertSummary x -> AlertSummary
$cfrom :: forall x. AlertSummary -> Rep AlertSummary x
Prelude.Generic)

-- |
-- Create a value of 'AlertSummary' 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:
--
-- 'creationTime', 'alertSummary_creationTime' - The time at which the alert was created.
--
-- 'anomalyDetectorArn', 'alertSummary_anomalyDetectorArn' - The ARN of the detector to which the alert is attached.
--
-- 'alertName', 'alertSummary_alertName' - The name of the alert.
--
-- 'alertSensitivityThreshold', 'alertSummary_alertSensitivityThreshold' - The minimum severity for an anomaly to trigger the alert.
--
-- 'alertStatus', 'alertSummary_alertStatus' - The status of the alert.
--
-- 'alertArn', 'alertSummary_alertArn' - The ARN of the alert.
--
-- 'alertType', 'alertSummary_alertType' - The type of the alert.
--
-- 'tags', 'alertSummary_tags' - The alert\'s
-- <https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html tags>.
--
-- 'lastModificationTime', 'alertSummary_lastModificationTime' - The time at which the alert was last modified.
newAlertSummary ::
  AlertSummary
newAlertSummary :: AlertSummary
newAlertSummary =
  AlertSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe AlertStatus
-> Maybe Text
-> Maybe AlertType
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> AlertSummary
AlertSummary'
    { $sel:creationTime:AlertSummary' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:anomalyDetectorArn:AlertSummary' :: Maybe Text
anomalyDetectorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:alertName:AlertSummary' :: Maybe Text
alertName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:alertSensitivityThreshold:AlertSummary' :: Maybe Natural
alertSensitivityThreshold = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:alertStatus:AlertSummary' :: Maybe AlertStatus
alertStatus = Maybe AlertStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:alertArn:AlertSummary' :: Maybe Text
alertArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:alertType:AlertSummary' :: Maybe AlertType
alertType = Maybe AlertType
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:AlertSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModificationTime:AlertSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The time at which the alert was created.
alertSummary_creationTime :: Lens.Lens' AlertSummary (Prelude.Maybe Prelude.UTCTime)
alertSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AlertSummary -> f AlertSummary
alertSummary_creationTime = (AlertSummary -> Maybe POSIX)
-> (AlertSummary -> Maybe POSIX -> AlertSummary)
-> Lens AlertSummary AlertSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlertSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:AlertSummary' :: AlertSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: AlertSummary
s@AlertSummary' {} Maybe POSIX
a -> AlertSummary
s {$sel:creationTime:AlertSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: AlertSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> AlertSummary -> f AlertSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AlertSummary
-> f AlertSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ARN of the detector to which the alert is attached.
alertSummary_anomalyDetectorArn :: Lens.Lens' AlertSummary (Prelude.Maybe Prelude.Text)
alertSummary_anomalyDetectorArn :: (Maybe Text -> f (Maybe Text)) -> AlertSummary -> f AlertSummary
alertSummary_anomalyDetectorArn = (AlertSummary -> Maybe Text)
-> (AlertSummary -> Maybe Text -> AlertSummary)
-> Lens AlertSummary AlertSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlertSummary' {Maybe Text
anomalyDetectorArn :: Maybe Text
$sel:anomalyDetectorArn:AlertSummary' :: AlertSummary -> Maybe Text
anomalyDetectorArn} -> Maybe Text
anomalyDetectorArn) (\s :: AlertSummary
s@AlertSummary' {} Maybe Text
a -> AlertSummary
s {$sel:anomalyDetectorArn:AlertSummary' :: Maybe Text
anomalyDetectorArn = Maybe Text
a} :: AlertSummary)

-- | The name of the alert.
alertSummary_alertName :: Lens.Lens' AlertSummary (Prelude.Maybe Prelude.Text)
alertSummary_alertName :: (Maybe Text -> f (Maybe Text)) -> AlertSummary -> f AlertSummary
alertSummary_alertName = (AlertSummary -> Maybe Text)
-> (AlertSummary -> Maybe Text -> AlertSummary)
-> Lens AlertSummary AlertSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlertSummary' {Maybe Text
alertName :: Maybe Text
$sel:alertName:AlertSummary' :: AlertSummary -> Maybe Text
alertName} -> Maybe Text
alertName) (\s :: AlertSummary
s@AlertSummary' {} Maybe Text
a -> AlertSummary
s {$sel:alertName:AlertSummary' :: Maybe Text
alertName = Maybe Text
a} :: AlertSummary)

-- | The minimum severity for an anomaly to trigger the alert.
alertSummary_alertSensitivityThreshold :: Lens.Lens' AlertSummary (Prelude.Maybe Prelude.Natural)
alertSummary_alertSensitivityThreshold :: (Maybe Natural -> f (Maybe Natural))
-> AlertSummary -> f AlertSummary
alertSummary_alertSensitivityThreshold = (AlertSummary -> Maybe Natural)
-> (AlertSummary -> Maybe Natural -> AlertSummary)
-> Lens AlertSummary AlertSummary (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlertSummary' {Maybe Natural
alertSensitivityThreshold :: Maybe Natural
$sel:alertSensitivityThreshold:AlertSummary' :: AlertSummary -> Maybe Natural
alertSensitivityThreshold} -> Maybe Natural
alertSensitivityThreshold) (\s :: AlertSummary
s@AlertSummary' {} Maybe Natural
a -> AlertSummary
s {$sel:alertSensitivityThreshold:AlertSummary' :: Maybe Natural
alertSensitivityThreshold = Maybe Natural
a} :: AlertSummary)

-- | The status of the alert.
alertSummary_alertStatus :: Lens.Lens' AlertSummary (Prelude.Maybe AlertStatus)
alertSummary_alertStatus :: (Maybe AlertStatus -> f (Maybe AlertStatus))
-> AlertSummary -> f AlertSummary
alertSummary_alertStatus = (AlertSummary -> Maybe AlertStatus)
-> (AlertSummary -> Maybe AlertStatus -> AlertSummary)
-> Lens
     AlertSummary AlertSummary (Maybe AlertStatus) (Maybe AlertStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlertSummary' {Maybe AlertStatus
alertStatus :: Maybe AlertStatus
$sel:alertStatus:AlertSummary' :: AlertSummary -> Maybe AlertStatus
alertStatus} -> Maybe AlertStatus
alertStatus) (\s :: AlertSummary
s@AlertSummary' {} Maybe AlertStatus
a -> AlertSummary
s {$sel:alertStatus:AlertSummary' :: Maybe AlertStatus
alertStatus = Maybe AlertStatus
a} :: AlertSummary)

-- | The ARN of the alert.
alertSummary_alertArn :: Lens.Lens' AlertSummary (Prelude.Maybe Prelude.Text)
alertSummary_alertArn :: (Maybe Text -> f (Maybe Text)) -> AlertSummary -> f AlertSummary
alertSummary_alertArn = (AlertSummary -> Maybe Text)
-> (AlertSummary -> Maybe Text -> AlertSummary)
-> Lens AlertSummary AlertSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlertSummary' {Maybe Text
alertArn :: Maybe Text
$sel:alertArn:AlertSummary' :: AlertSummary -> Maybe Text
alertArn} -> Maybe Text
alertArn) (\s :: AlertSummary
s@AlertSummary' {} Maybe Text
a -> AlertSummary
s {$sel:alertArn:AlertSummary' :: Maybe Text
alertArn = Maybe Text
a} :: AlertSummary)

-- | The type of the alert.
alertSummary_alertType :: Lens.Lens' AlertSummary (Prelude.Maybe AlertType)
alertSummary_alertType :: (Maybe AlertType -> f (Maybe AlertType))
-> AlertSummary -> f AlertSummary
alertSummary_alertType = (AlertSummary -> Maybe AlertType)
-> (AlertSummary -> Maybe AlertType -> AlertSummary)
-> Lens
     AlertSummary AlertSummary (Maybe AlertType) (Maybe AlertType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlertSummary' {Maybe AlertType
alertType :: Maybe AlertType
$sel:alertType:AlertSummary' :: AlertSummary -> Maybe AlertType
alertType} -> Maybe AlertType
alertType) (\s :: AlertSummary
s@AlertSummary' {} Maybe AlertType
a -> AlertSummary
s {$sel:alertType:AlertSummary' :: Maybe AlertType
alertType = Maybe AlertType
a} :: AlertSummary)

-- | The alert\'s
-- <https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html tags>.
alertSummary_tags :: Lens.Lens' AlertSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
alertSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AlertSummary -> f AlertSummary
alertSummary_tags = (AlertSummary -> Maybe (HashMap Text Text))
-> (AlertSummary -> Maybe (HashMap Text Text) -> AlertSummary)
-> Lens
     AlertSummary
     AlertSummary
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlertSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:AlertSummary' :: AlertSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: AlertSummary
s@AlertSummary' {} Maybe (HashMap Text Text)
a -> AlertSummary
s {$sel:tags:AlertSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: AlertSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> AlertSummary -> f AlertSummary)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AlertSummary
-> f AlertSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time at which the alert was last modified.
alertSummary_lastModificationTime :: Lens.Lens' AlertSummary (Prelude.Maybe Prelude.UTCTime)
alertSummary_lastModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AlertSummary -> f AlertSummary
alertSummary_lastModificationTime = (AlertSummary -> Maybe POSIX)
-> (AlertSummary -> Maybe POSIX -> AlertSummary)
-> Lens AlertSummary AlertSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AlertSummary' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:AlertSummary' :: AlertSummary -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: AlertSummary
s@AlertSummary' {} Maybe POSIX
a -> AlertSummary
s {$sel:lastModificationTime:AlertSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: AlertSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> AlertSummary -> f AlertSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AlertSummary
-> f AlertSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON AlertSummary where
  parseJSON :: Value -> Parser AlertSummary
parseJSON =
    String
-> (Object -> Parser AlertSummary) -> Value -> Parser AlertSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AlertSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe AlertStatus
-> Maybe Text
-> Maybe AlertType
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> AlertSummary
AlertSummary'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe AlertStatus
 -> Maybe Text
 -> Maybe AlertType
 -> Maybe (HashMap Text Text)
 -> Maybe POSIX
 -> AlertSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe AlertStatus
      -> Maybe Text
      -> Maybe AlertType
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> AlertSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe AlertStatus
   -> Maybe Text
   -> Maybe AlertType
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> AlertSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe AlertStatus
      -> Maybe Text
      -> Maybe AlertType
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> AlertSummary)
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
"AnomalyDetectorArn")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe AlertStatus
   -> Maybe Text
   -> Maybe AlertType
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> AlertSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe AlertStatus
      -> Maybe Text
      -> Maybe AlertType
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> AlertSummary)
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
"AlertName")
            Parser
  (Maybe Natural
   -> Maybe AlertStatus
   -> Maybe Text
   -> Maybe AlertType
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> AlertSummary)
-> Parser (Maybe Natural)
-> Parser
     (Maybe AlertStatus
      -> Maybe Text
      -> Maybe AlertType
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> AlertSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AlertSensitivityThreshold")
            Parser
  (Maybe AlertStatus
   -> Maybe Text
   -> Maybe AlertType
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> AlertSummary)
-> Parser (Maybe AlertStatus)
-> Parser
     (Maybe Text
      -> Maybe AlertType
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> AlertSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AlertStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AlertStatus")
            Parser
  (Maybe Text
   -> Maybe AlertType
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> AlertSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe AlertType
      -> Maybe (HashMap Text Text) -> Maybe POSIX -> AlertSummary)
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
"AlertArn")
            Parser
  (Maybe AlertType
   -> Maybe (HashMap Text Text) -> Maybe POSIX -> AlertSummary)
-> Parser (Maybe AlertType)
-> Parser
     (Maybe (HashMap Text Text) -> Maybe POSIX -> AlertSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AlertType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AlertType")
            Parser (Maybe (HashMap Text Text) -> Maybe POSIX -> AlertSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe POSIX -> AlertSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe POSIX -> AlertSummary)
-> Parser (Maybe POSIX) -> Parser AlertSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModificationTime")
      )

instance Prelude.Hashable AlertSummary

instance Prelude.NFData AlertSummary