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

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

-- | A configuration for Amazon SNS-integrated notifications.
--
-- /See:/ 'newAlert' smart constructor.
data Alert = Alert'
  { -- | The time at which the alert was created.
    Alert -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | Action that will be triggered when there is an alert.
    Alert -> Maybe Action
action :: Prelude.Maybe Action,
    -- | The ARN of the detector to which the alert is attached.
    Alert -> Maybe Text
anomalyDetectorArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the alert.
    Alert -> Maybe Text
alertName :: Prelude.Maybe Prelude.Text,
    -- | The minimum severity for an anomaly to trigger the alert.
    Alert -> Maybe Natural
alertSensitivityThreshold :: Prelude.Maybe Prelude.Natural,
    -- | The status of the alert.
    Alert -> Maybe AlertStatus
alertStatus :: Prelude.Maybe AlertStatus,
    -- | A description of the alert.
    Alert -> Maybe Text
alertDescription :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the alert.
    Alert -> Maybe Text
alertArn :: Prelude.Maybe Prelude.Text,
    -- | The type of the alert.
    Alert -> Maybe AlertType
alertType :: Prelude.Maybe AlertType,
    -- | The time at which the alert was last modified.
    Alert -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Core.POSIX
  }
  deriving (Alert -> Alert -> Bool
(Alert -> Alert -> Bool) -> (Alert -> Alert -> Bool) -> Eq Alert
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Alert -> Alert -> Bool
$c/= :: Alert -> Alert -> Bool
== :: Alert -> Alert -> Bool
$c== :: Alert -> Alert -> Bool
Prelude.Eq, ReadPrec [Alert]
ReadPrec Alert
Int -> ReadS Alert
ReadS [Alert]
(Int -> ReadS Alert)
-> ReadS [Alert]
-> ReadPrec Alert
-> ReadPrec [Alert]
-> Read Alert
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Alert]
$creadListPrec :: ReadPrec [Alert]
readPrec :: ReadPrec Alert
$creadPrec :: ReadPrec Alert
readList :: ReadS [Alert]
$creadList :: ReadS [Alert]
readsPrec :: Int -> ReadS Alert
$creadsPrec :: Int -> ReadS Alert
Prelude.Read, Int -> Alert -> ShowS
[Alert] -> ShowS
Alert -> String
(Int -> Alert -> ShowS)
-> (Alert -> String) -> ([Alert] -> ShowS) -> Show Alert
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Alert] -> ShowS
$cshowList :: [Alert] -> ShowS
show :: Alert -> String
$cshow :: Alert -> String
showsPrec :: Int -> Alert -> ShowS
$cshowsPrec :: Int -> Alert -> ShowS
Prelude.Show, (forall x. Alert -> Rep Alert x)
-> (forall x. Rep Alert x -> Alert) -> Generic Alert
forall x. Rep Alert x -> Alert
forall x. Alert -> Rep Alert x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Alert x -> Alert
$cfrom :: forall x. Alert -> Rep Alert x
Prelude.Generic)

-- |
-- Create a value of 'Alert' 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', 'alert_creationTime' - The time at which the alert was created.
--
-- 'action', 'alert_action' - Action that will be triggered when there is an alert.
--
-- 'anomalyDetectorArn', 'alert_anomalyDetectorArn' - The ARN of the detector to which the alert is attached.
--
-- 'alertName', 'alert_alertName' - The name of the alert.
--
-- 'alertSensitivityThreshold', 'alert_alertSensitivityThreshold' - The minimum severity for an anomaly to trigger the alert.
--
-- 'alertStatus', 'alert_alertStatus' - The status of the alert.
--
-- 'alertDescription', 'alert_alertDescription' - A description of the alert.
--
-- 'alertArn', 'alert_alertArn' - The ARN of the alert.
--
-- 'alertType', 'alert_alertType' - The type of the alert.
--
-- 'lastModificationTime', 'alert_lastModificationTime' - The time at which the alert was last modified.
newAlert ::
  Alert
newAlert :: Alert
newAlert =
  Alert' :: Maybe POSIX
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe AlertStatus
-> Maybe Text
-> Maybe Text
-> Maybe AlertType
-> Maybe POSIX
-> Alert
Alert'
    { $sel:creationTime:Alert' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:action:Alert' :: Maybe Action
action = Maybe Action
forall a. Maybe a
Prelude.Nothing,
      $sel:anomalyDetectorArn:Alert' :: Maybe Text
anomalyDetectorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:alertName:Alert' :: Maybe Text
alertName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:alertSensitivityThreshold:Alert' :: Maybe Natural
alertSensitivityThreshold = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:alertStatus:Alert' :: Maybe AlertStatus
alertStatus = Maybe AlertStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:alertDescription:Alert' :: Maybe Text
alertDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:alertArn:Alert' :: Maybe Text
alertArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:alertType:Alert' :: Maybe AlertType
alertType = Maybe AlertType
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModificationTime:Alert' :: Maybe POSIX
lastModificationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The time at which the alert was created.
alert_creationTime :: Lens.Lens' Alert (Prelude.Maybe Prelude.UTCTime)
alert_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Alert -> f Alert
alert_creationTime = (Alert -> Maybe POSIX)
-> (Alert -> Maybe POSIX -> Alert)
-> Lens Alert Alert (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alert' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Alert' :: Alert -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Alert
s@Alert' {} Maybe POSIX
a -> Alert
s {$sel:creationTime:Alert' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Alert) ((Maybe POSIX -> f (Maybe POSIX)) -> Alert -> f Alert)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Alert
-> f Alert
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

-- | Action that will be triggered when there is an alert.
alert_action :: Lens.Lens' Alert (Prelude.Maybe Action)
alert_action :: (Maybe Action -> f (Maybe Action)) -> Alert -> f Alert
alert_action = (Alert -> Maybe Action)
-> (Alert -> Maybe Action -> Alert)
-> Lens Alert Alert (Maybe Action) (Maybe Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alert' {Maybe Action
action :: Maybe Action
$sel:action:Alert' :: Alert -> Maybe Action
action} -> Maybe Action
action) (\s :: Alert
s@Alert' {} Maybe Action
a -> Alert
s {$sel:action:Alert' :: Maybe Action
action = Maybe Action
a} :: Alert)

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

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

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

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

-- | A description of the alert.
alert_alertDescription :: Lens.Lens' Alert (Prelude.Maybe Prelude.Text)
alert_alertDescription :: (Maybe Text -> f (Maybe Text)) -> Alert -> f Alert
alert_alertDescription = (Alert -> Maybe Text)
-> (Alert -> Maybe Text -> Alert)
-> Lens Alert Alert (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alert' {Maybe Text
alertDescription :: Maybe Text
$sel:alertDescription:Alert' :: Alert -> Maybe Text
alertDescription} -> Maybe Text
alertDescription) (\s :: Alert
s@Alert' {} Maybe Text
a -> Alert
s {$sel:alertDescription:Alert' :: Maybe Text
alertDescription = Maybe Text
a} :: Alert)

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

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

-- | The time at which the alert was last modified.
alert_lastModificationTime :: Lens.Lens' Alert (Prelude.Maybe Prelude.UTCTime)
alert_lastModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Alert -> f Alert
alert_lastModificationTime = (Alert -> Maybe POSIX)
-> (Alert -> Maybe POSIX -> Alert)
-> Lens Alert Alert (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Alert' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:Alert' :: Alert -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: Alert
s@Alert' {} Maybe POSIX
a -> Alert
s {$sel:lastModificationTime:Alert' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: Alert) ((Maybe POSIX -> f (Maybe POSIX)) -> Alert -> f Alert)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Alert
-> f Alert
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 Alert where
  parseJSON :: Value -> Parser Alert
parseJSON =
    String -> (Object -> Parser Alert) -> Value -> Parser Alert
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Alert"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe AlertStatus
-> Maybe Text
-> Maybe Text
-> Maybe AlertType
-> Maybe POSIX
-> Alert
Alert'
            (Maybe POSIX
 -> Maybe Action
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe AlertStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe AlertType
 -> Maybe POSIX
 -> Alert)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Action
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe AlertStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe AlertType
      -> Maybe POSIX
      -> Alert)
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 Action
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe AlertStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe AlertType
   -> Maybe POSIX
   -> Alert)
-> Parser (Maybe Action)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe AlertStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe AlertType
      -> Maybe POSIX
      -> Alert)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Action)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Action")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe AlertStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe AlertType
   -> Maybe POSIX
   -> Alert)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe AlertStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe AlertType
      -> Maybe POSIX
      -> Alert)
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 Text
   -> Maybe AlertType
   -> Maybe POSIX
   -> Alert)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe AlertStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe AlertType
      -> Maybe POSIX
      -> Alert)
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 Text
   -> Maybe AlertType
   -> Maybe POSIX
   -> Alert)
-> Parser (Maybe Natural)
-> Parser
     (Maybe AlertStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe AlertType
      -> Maybe POSIX
      -> Alert)
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 Text
   -> Maybe AlertType
   -> Maybe POSIX
   -> Alert)
-> Parser (Maybe AlertStatus)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe AlertType -> Maybe POSIX -> Alert)
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 Text -> Maybe AlertType -> Maybe POSIX -> Alert)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe AlertType -> Maybe POSIX -> Alert)
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
"AlertDescription")
            Parser (Maybe Text -> Maybe AlertType -> Maybe POSIX -> Alert)
-> Parser (Maybe Text)
-> Parser (Maybe AlertType -> Maybe POSIX -> Alert)
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 POSIX -> Alert)
-> Parser (Maybe AlertType) -> Parser (Maybe POSIX -> Alert)
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 POSIX -> Alert)
-> Parser (Maybe POSIX) -> Parser Alert
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 Alert

instance Prelude.NFData Alert