{-# 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 #-}
module Amazonka.LookoutMetrics.Types.AnomalyDetectorConfigSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutMetrics.Types.Frequency
import qualified Amazonka.Prelude as Prelude
data AnomalyDetectorConfigSummary = AnomalyDetectorConfigSummary'
{
AnomalyDetectorConfigSummary -> Maybe Frequency
anomalyDetectorFrequency :: Prelude.Maybe Frequency
}
deriving (AnomalyDetectorConfigSummary
-> AnomalyDetectorConfigSummary -> Bool
(AnomalyDetectorConfigSummary
-> AnomalyDetectorConfigSummary -> Bool)
-> (AnomalyDetectorConfigSummary
-> AnomalyDetectorConfigSummary -> Bool)
-> Eq AnomalyDetectorConfigSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnomalyDetectorConfigSummary
-> AnomalyDetectorConfigSummary -> Bool
$c/= :: AnomalyDetectorConfigSummary
-> AnomalyDetectorConfigSummary -> Bool
== :: AnomalyDetectorConfigSummary
-> AnomalyDetectorConfigSummary -> Bool
$c== :: AnomalyDetectorConfigSummary
-> AnomalyDetectorConfigSummary -> Bool
Prelude.Eq, ReadPrec [AnomalyDetectorConfigSummary]
ReadPrec AnomalyDetectorConfigSummary
Int -> ReadS AnomalyDetectorConfigSummary
ReadS [AnomalyDetectorConfigSummary]
(Int -> ReadS AnomalyDetectorConfigSummary)
-> ReadS [AnomalyDetectorConfigSummary]
-> ReadPrec AnomalyDetectorConfigSummary
-> ReadPrec [AnomalyDetectorConfigSummary]
-> Read AnomalyDetectorConfigSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnomalyDetectorConfigSummary]
$creadListPrec :: ReadPrec [AnomalyDetectorConfigSummary]
readPrec :: ReadPrec AnomalyDetectorConfigSummary
$creadPrec :: ReadPrec AnomalyDetectorConfigSummary
readList :: ReadS [AnomalyDetectorConfigSummary]
$creadList :: ReadS [AnomalyDetectorConfigSummary]
readsPrec :: Int -> ReadS AnomalyDetectorConfigSummary
$creadsPrec :: Int -> ReadS AnomalyDetectorConfigSummary
Prelude.Read, Int -> AnomalyDetectorConfigSummary -> ShowS
[AnomalyDetectorConfigSummary] -> ShowS
AnomalyDetectorConfigSummary -> String
(Int -> AnomalyDetectorConfigSummary -> ShowS)
-> (AnomalyDetectorConfigSummary -> String)
-> ([AnomalyDetectorConfigSummary] -> ShowS)
-> Show AnomalyDetectorConfigSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnomalyDetectorConfigSummary] -> ShowS
$cshowList :: [AnomalyDetectorConfigSummary] -> ShowS
show :: AnomalyDetectorConfigSummary -> String
$cshow :: AnomalyDetectorConfigSummary -> String
showsPrec :: Int -> AnomalyDetectorConfigSummary -> ShowS
$cshowsPrec :: Int -> AnomalyDetectorConfigSummary -> ShowS
Prelude.Show, (forall x.
AnomalyDetectorConfigSummary -> Rep AnomalyDetectorConfigSummary x)
-> (forall x.
Rep AnomalyDetectorConfigSummary x -> AnomalyDetectorConfigSummary)
-> Generic AnomalyDetectorConfigSummary
forall x.
Rep AnomalyDetectorConfigSummary x -> AnomalyDetectorConfigSummary
forall x.
AnomalyDetectorConfigSummary -> Rep AnomalyDetectorConfigSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AnomalyDetectorConfigSummary x -> AnomalyDetectorConfigSummary
$cfrom :: forall x.
AnomalyDetectorConfigSummary -> Rep AnomalyDetectorConfigSummary x
Prelude.Generic)
newAnomalyDetectorConfigSummary ::
AnomalyDetectorConfigSummary
newAnomalyDetectorConfigSummary :: AnomalyDetectorConfigSummary
newAnomalyDetectorConfigSummary =
AnomalyDetectorConfigSummary' :: Maybe Frequency -> AnomalyDetectorConfigSummary
AnomalyDetectorConfigSummary'
{ $sel:anomalyDetectorFrequency:AnomalyDetectorConfigSummary' :: Maybe Frequency
anomalyDetectorFrequency =
Maybe Frequency
forall a. Maybe a
Prelude.Nothing
}
anomalyDetectorConfigSummary_anomalyDetectorFrequency :: Lens.Lens' AnomalyDetectorConfigSummary (Prelude.Maybe Frequency)
anomalyDetectorConfigSummary_anomalyDetectorFrequency :: (Maybe Frequency -> f (Maybe Frequency))
-> AnomalyDetectorConfigSummary -> f AnomalyDetectorConfigSummary
anomalyDetectorConfigSummary_anomalyDetectorFrequency = (AnomalyDetectorConfigSummary -> Maybe Frequency)
-> (AnomalyDetectorConfigSummary
-> Maybe Frequency -> AnomalyDetectorConfigSummary)
-> Lens
AnomalyDetectorConfigSummary
AnomalyDetectorConfigSummary
(Maybe Frequency)
(Maybe Frequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnomalyDetectorConfigSummary' {Maybe Frequency
anomalyDetectorFrequency :: Maybe Frequency
$sel:anomalyDetectorFrequency:AnomalyDetectorConfigSummary' :: AnomalyDetectorConfigSummary -> Maybe Frequency
anomalyDetectorFrequency} -> Maybe Frequency
anomalyDetectorFrequency) (\s :: AnomalyDetectorConfigSummary
s@AnomalyDetectorConfigSummary' {} Maybe Frequency
a -> AnomalyDetectorConfigSummary
s {$sel:anomalyDetectorFrequency:AnomalyDetectorConfigSummary' :: Maybe Frequency
anomalyDetectorFrequency = Maybe Frequency
a} :: AnomalyDetectorConfigSummary)
instance Core.FromJSON AnomalyDetectorConfigSummary where
parseJSON :: Value -> Parser AnomalyDetectorConfigSummary
parseJSON =
String
-> (Object -> Parser AnomalyDetectorConfigSummary)
-> Value
-> Parser AnomalyDetectorConfigSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AnomalyDetectorConfigSummary"
( \Object
x ->
Maybe Frequency -> AnomalyDetectorConfigSummary
AnomalyDetectorConfigSummary'
(Maybe Frequency -> AnomalyDetectorConfigSummary)
-> Parser (Maybe Frequency) -> Parser AnomalyDetectorConfigSummary
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Frequency)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AnomalyDetectorFrequency")
)
instance
Prelude.Hashable
AnomalyDetectorConfigSummary
instance Prelude.NFData AnomalyDetectorConfigSummary