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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutMetrics.Types.AnomalyDetectorStatus
import qualified Amazonka.Prelude as Prelude

-- | Contains information about an an anomaly detector.
--
-- /See:/ 'newAnomalyDetectorSummary' smart constructor.
data AnomalyDetectorSummary = AnomalyDetectorSummary'
  { -- | The time at which the detector was created.
    AnomalyDetectorSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The status of detector.
    AnomalyDetectorSummary -> Maybe AnomalyDetectorStatus
status :: Prelude.Maybe AnomalyDetectorStatus,
    -- | The ARN of the detector.
    AnomalyDetectorSummary -> Maybe Text
anomalyDetectorArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the detector.
    AnomalyDetectorSummary -> Maybe Text
anomalyDetectorName :: Prelude.Maybe Prelude.Text,
    -- | A description of the detector.
    AnomalyDetectorSummary -> Maybe Text
anomalyDetectorDescription :: Prelude.Maybe Prelude.Text,
    -- | The detector\'s
    -- <https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html tags>.
    AnomalyDetectorSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The time at which the detector was last modified.
    AnomalyDetectorSummary -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Core.POSIX
  }
  deriving (AnomalyDetectorSummary -> AnomalyDetectorSummary -> Bool
(AnomalyDetectorSummary -> AnomalyDetectorSummary -> Bool)
-> (AnomalyDetectorSummary -> AnomalyDetectorSummary -> Bool)
-> Eq AnomalyDetectorSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnomalyDetectorSummary -> AnomalyDetectorSummary -> Bool
$c/= :: AnomalyDetectorSummary -> AnomalyDetectorSummary -> Bool
== :: AnomalyDetectorSummary -> AnomalyDetectorSummary -> Bool
$c== :: AnomalyDetectorSummary -> AnomalyDetectorSummary -> Bool
Prelude.Eq, ReadPrec [AnomalyDetectorSummary]
ReadPrec AnomalyDetectorSummary
Int -> ReadS AnomalyDetectorSummary
ReadS [AnomalyDetectorSummary]
(Int -> ReadS AnomalyDetectorSummary)
-> ReadS [AnomalyDetectorSummary]
-> ReadPrec AnomalyDetectorSummary
-> ReadPrec [AnomalyDetectorSummary]
-> Read AnomalyDetectorSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnomalyDetectorSummary]
$creadListPrec :: ReadPrec [AnomalyDetectorSummary]
readPrec :: ReadPrec AnomalyDetectorSummary
$creadPrec :: ReadPrec AnomalyDetectorSummary
readList :: ReadS [AnomalyDetectorSummary]
$creadList :: ReadS [AnomalyDetectorSummary]
readsPrec :: Int -> ReadS AnomalyDetectorSummary
$creadsPrec :: Int -> ReadS AnomalyDetectorSummary
Prelude.Read, Int -> AnomalyDetectorSummary -> ShowS
[AnomalyDetectorSummary] -> ShowS
AnomalyDetectorSummary -> String
(Int -> AnomalyDetectorSummary -> ShowS)
-> (AnomalyDetectorSummary -> String)
-> ([AnomalyDetectorSummary] -> ShowS)
-> Show AnomalyDetectorSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnomalyDetectorSummary] -> ShowS
$cshowList :: [AnomalyDetectorSummary] -> ShowS
show :: AnomalyDetectorSummary -> String
$cshow :: AnomalyDetectorSummary -> String
showsPrec :: Int -> AnomalyDetectorSummary -> ShowS
$cshowsPrec :: Int -> AnomalyDetectorSummary -> ShowS
Prelude.Show, (forall x. AnomalyDetectorSummary -> Rep AnomalyDetectorSummary x)
-> (forall x.
    Rep AnomalyDetectorSummary x -> AnomalyDetectorSummary)
-> Generic AnomalyDetectorSummary
forall x. Rep AnomalyDetectorSummary x -> AnomalyDetectorSummary
forall x. AnomalyDetectorSummary -> Rep AnomalyDetectorSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AnomalyDetectorSummary x -> AnomalyDetectorSummary
$cfrom :: forall x. AnomalyDetectorSummary -> Rep AnomalyDetectorSummary x
Prelude.Generic)

-- |
-- Create a value of 'AnomalyDetectorSummary' 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', 'anomalyDetectorSummary_creationTime' - The time at which the detector was created.
--
-- 'status', 'anomalyDetectorSummary_status' - The status of detector.
--
-- 'anomalyDetectorArn', 'anomalyDetectorSummary_anomalyDetectorArn' - The ARN of the detector.
--
-- 'anomalyDetectorName', 'anomalyDetectorSummary_anomalyDetectorName' - The name of the detector.
--
-- 'anomalyDetectorDescription', 'anomalyDetectorSummary_anomalyDetectorDescription' - A description of the detector.
--
-- 'tags', 'anomalyDetectorSummary_tags' - The detector\'s
-- <https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html tags>.
--
-- 'lastModificationTime', 'anomalyDetectorSummary_lastModificationTime' - The time at which the detector was last modified.
newAnomalyDetectorSummary ::
  AnomalyDetectorSummary
newAnomalyDetectorSummary :: AnomalyDetectorSummary
newAnomalyDetectorSummary =
  AnomalyDetectorSummary' :: Maybe POSIX
-> Maybe AnomalyDetectorStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> AnomalyDetectorSummary
AnomalyDetectorSummary'
    { $sel:creationTime:AnomalyDetectorSummary' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:status:AnomalyDetectorSummary' :: Maybe AnomalyDetectorStatus
status = Maybe AnomalyDetectorStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:anomalyDetectorArn:AnomalyDetectorSummary' :: Maybe Text
anomalyDetectorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:anomalyDetectorName:AnomalyDetectorSummary' :: Maybe Text
anomalyDetectorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:anomalyDetectorDescription:AnomalyDetectorSummary' :: Maybe Text
anomalyDetectorDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:AnomalyDetectorSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModificationTime:AnomalyDetectorSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The ARN of the detector.
anomalyDetectorSummary_anomalyDetectorArn :: Lens.Lens' AnomalyDetectorSummary (Prelude.Maybe Prelude.Text)
anomalyDetectorSummary_anomalyDetectorArn :: (Maybe Text -> f (Maybe Text))
-> AnomalyDetectorSummary -> f AnomalyDetectorSummary
anomalyDetectorSummary_anomalyDetectorArn = (AnomalyDetectorSummary -> Maybe Text)
-> (AnomalyDetectorSummary -> Maybe Text -> AnomalyDetectorSummary)
-> Lens
     AnomalyDetectorSummary
     AnomalyDetectorSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnomalyDetectorSummary' {Maybe Text
anomalyDetectorArn :: Maybe Text
$sel:anomalyDetectorArn:AnomalyDetectorSummary' :: AnomalyDetectorSummary -> Maybe Text
anomalyDetectorArn} -> Maybe Text
anomalyDetectorArn) (\s :: AnomalyDetectorSummary
s@AnomalyDetectorSummary' {} Maybe Text
a -> AnomalyDetectorSummary
s {$sel:anomalyDetectorArn:AnomalyDetectorSummary' :: Maybe Text
anomalyDetectorArn = Maybe Text
a} :: AnomalyDetectorSummary)

-- | The name of the detector.
anomalyDetectorSummary_anomalyDetectorName :: Lens.Lens' AnomalyDetectorSummary (Prelude.Maybe Prelude.Text)
anomalyDetectorSummary_anomalyDetectorName :: (Maybe Text -> f (Maybe Text))
-> AnomalyDetectorSummary -> f AnomalyDetectorSummary
anomalyDetectorSummary_anomalyDetectorName = (AnomalyDetectorSummary -> Maybe Text)
-> (AnomalyDetectorSummary -> Maybe Text -> AnomalyDetectorSummary)
-> Lens
     AnomalyDetectorSummary
     AnomalyDetectorSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnomalyDetectorSummary' {Maybe Text
anomalyDetectorName :: Maybe Text
$sel:anomalyDetectorName:AnomalyDetectorSummary' :: AnomalyDetectorSummary -> Maybe Text
anomalyDetectorName} -> Maybe Text
anomalyDetectorName) (\s :: AnomalyDetectorSummary
s@AnomalyDetectorSummary' {} Maybe Text
a -> AnomalyDetectorSummary
s {$sel:anomalyDetectorName:AnomalyDetectorSummary' :: Maybe Text
anomalyDetectorName = Maybe Text
a} :: AnomalyDetectorSummary)

-- | A description of the detector.
anomalyDetectorSummary_anomalyDetectorDescription :: Lens.Lens' AnomalyDetectorSummary (Prelude.Maybe Prelude.Text)
anomalyDetectorSummary_anomalyDetectorDescription :: (Maybe Text -> f (Maybe Text))
-> AnomalyDetectorSummary -> f AnomalyDetectorSummary
anomalyDetectorSummary_anomalyDetectorDescription = (AnomalyDetectorSummary -> Maybe Text)
-> (AnomalyDetectorSummary -> Maybe Text -> AnomalyDetectorSummary)
-> Lens
     AnomalyDetectorSummary
     AnomalyDetectorSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnomalyDetectorSummary' {Maybe Text
anomalyDetectorDescription :: Maybe Text
$sel:anomalyDetectorDescription:AnomalyDetectorSummary' :: AnomalyDetectorSummary -> Maybe Text
anomalyDetectorDescription} -> Maybe Text
anomalyDetectorDescription) (\s :: AnomalyDetectorSummary
s@AnomalyDetectorSummary' {} Maybe Text
a -> AnomalyDetectorSummary
s {$sel:anomalyDetectorDescription:AnomalyDetectorSummary' :: Maybe Text
anomalyDetectorDescription = Maybe Text
a} :: AnomalyDetectorSummary)

-- | The detector\'s
-- <https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html tags>.
anomalyDetectorSummary_tags :: Lens.Lens' AnomalyDetectorSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
anomalyDetectorSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AnomalyDetectorSummary -> f AnomalyDetectorSummary
anomalyDetectorSummary_tags = (AnomalyDetectorSummary -> Maybe (HashMap Text Text))
-> (AnomalyDetectorSummary
    -> Maybe (HashMap Text Text) -> AnomalyDetectorSummary)
-> Lens
     AnomalyDetectorSummary
     AnomalyDetectorSummary
     (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 (\AnomalyDetectorSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:AnomalyDetectorSummary' :: AnomalyDetectorSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: AnomalyDetectorSummary
s@AnomalyDetectorSummary' {} Maybe (HashMap Text Text)
a -> AnomalyDetectorSummary
s {$sel:tags:AnomalyDetectorSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: AnomalyDetectorSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> AnomalyDetectorSummary -> f AnomalyDetectorSummary)
-> ((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)))
-> AnomalyDetectorSummary
-> f AnomalyDetectorSummary
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 detector was last modified.
anomalyDetectorSummary_lastModificationTime :: Lens.Lens' AnomalyDetectorSummary (Prelude.Maybe Prelude.UTCTime)
anomalyDetectorSummary_lastModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AnomalyDetectorSummary -> f AnomalyDetectorSummary
anomalyDetectorSummary_lastModificationTime = (AnomalyDetectorSummary -> Maybe POSIX)
-> (AnomalyDetectorSummary
    -> Maybe POSIX -> AnomalyDetectorSummary)
-> Lens
     AnomalyDetectorSummary
     AnomalyDetectorSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnomalyDetectorSummary' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:AnomalyDetectorSummary' :: AnomalyDetectorSummary -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: AnomalyDetectorSummary
s@AnomalyDetectorSummary' {} Maybe POSIX
a -> AnomalyDetectorSummary
s {$sel:lastModificationTime:AnomalyDetectorSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: AnomalyDetectorSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> AnomalyDetectorSummary -> f AnomalyDetectorSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AnomalyDetectorSummary
-> f AnomalyDetectorSummary
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 AnomalyDetectorSummary where
  parseJSON :: Value -> Parser AnomalyDetectorSummary
parseJSON =
    String
-> (Object -> Parser AnomalyDetectorSummary)
-> Value
-> Parser AnomalyDetectorSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AnomalyDetectorSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe AnomalyDetectorStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> AnomalyDetectorSummary
AnomalyDetectorSummary'
            (Maybe POSIX
 -> Maybe AnomalyDetectorStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe POSIX
 -> AnomalyDetectorSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe AnomalyDetectorStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> AnomalyDetectorSummary)
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 AnomalyDetectorStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> AnomalyDetectorSummary)
-> Parser (Maybe AnomalyDetectorStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> AnomalyDetectorSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AnomalyDetectorStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> AnomalyDetectorSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> AnomalyDetectorSummary)
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 Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> AnomalyDetectorSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> AnomalyDetectorSummary)
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
"AnomalyDetectorName")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> AnomalyDetectorSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe POSIX -> AnomalyDetectorSummary)
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
"AnomalyDetectorDescription")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe POSIX -> AnomalyDetectorSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe POSIX -> AnomalyDetectorSummary)
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 -> AnomalyDetectorSummary)
-> Parser (Maybe POSIX) -> Parser AnomalyDetectorSummary
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 AnomalyDetectorSummary

instance Prelude.NFData AnomalyDetectorSummary