{-# 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.AnomalyGroupTimeSeriesFeedback where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AnomalyGroupTimeSeriesFeedback = AnomalyGroupTimeSeriesFeedback'
{
AnomalyGroupTimeSeriesFeedback -> Text
anomalyGroupId :: Prelude.Text,
AnomalyGroupTimeSeriesFeedback -> Text
timeSeriesId :: Prelude.Text,
AnomalyGroupTimeSeriesFeedback -> Bool
isAnomaly :: Prelude.Bool
}
deriving (AnomalyGroupTimeSeriesFeedback
-> AnomalyGroupTimeSeriesFeedback -> Bool
(AnomalyGroupTimeSeriesFeedback
-> AnomalyGroupTimeSeriesFeedback -> Bool)
-> (AnomalyGroupTimeSeriesFeedback
-> AnomalyGroupTimeSeriesFeedback -> Bool)
-> Eq AnomalyGroupTimeSeriesFeedback
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnomalyGroupTimeSeriesFeedback
-> AnomalyGroupTimeSeriesFeedback -> Bool
$c/= :: AnomalyGroupTimeSeriesFeedback
-> AnomalyGroupTimeSeriesFeedback -> Bool
== :: AnomalyGroupTimeSeriesFeedback
-> AnomalyGroupTimeSeriesFeedback -> Bool
$c== :: AnomalyGroupTimeSeriesFeedback
-> AnomalyGroupTimeSeriesFeedback -> Bool
Prelude.Eq, ReadPrec [AnomalyGroupTimeSeriesFeedback]
ReadPrec AnomalyGroupTimeSeriesFeedback
Int -> ReadS AnomalyGroupTimeSeriesFeedback
ReadS [AnomalyGroupTimeSeriesFeedback]
(Int -> ReadS AnomalyGroupTimeSeriesFeedback)
-> ReadS [AnomalyGroupTimeSeriesFeedback]
-> ReadPrec AnomalyGroupTimeSeriesFeedback
-> ReadPrec [AnomalyGroupTimeSeriesFeedback]
-> Read AnomalyGroupTimeSeriesFeedback
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnomalyGroupTimeSeriesFeedback]
$creadListPrec :: ReadPrec [AnomalyGroupTimeSeriesFeedback]
readPrec :: ReadPrec AnomalyGroupTimeSeriesFeedback
$creadPrec :: ReadPrec AnomalyGroupTimeSeriesFeedback
readList :: ReadS [AnomalyGroupTimeSeriesFeedback]
$creadList :: ReadS [AnomalyGroupTimeSeriesFeedback]
readsPrec :: Int -> ReadS AnomalyGroupTimeSeriesFeedback
$creadsPrec :: Int -> ReadS AnomalyGroupTimeSeriesFeedback
Prelude.Read, Int -> AnomalyGroupTimeSeriesFeedback -> ShowS
[AnomalyGroupTimeSeriesFeedback] -> ShowS
AnomalyGroupTimeSeriesFeedback -> String
(Int -> AnomalyGroupTimeSeriesFeedback -> ShowS)
-> (AnomalyGroupTimeSeriesFeedback -> String)
-> ([AnomalyGroupTimeSeriesFeedback] -> ShowS)
-> Show AnomalyGroupTimeSeriesFeedback
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnomalyGroupTimeSeriesFeedback] -> ShowS
$cshowList :: [AnomalyGroupTimeSeriesFeedback] -> ShowS
show :: AnomalyGroupTimeSeriesFeedback -> String
$cshow :: AnomalyGroupTimeSeriesFeedback -> String
showsPrec :: Int -> AnomalyGroupTimeSeriesFeedback -> ShowS
$cshowsPrec :: Int -> AnomalyGroupTimeSeriesFeedback -> ShowS
Prelude.Show, (forall x.
AnomalyGroupTimeSeriesFeedback
-> Rep AnomalyGroupTimeSeriesFeedback x)
-> (forall x.
Rep AnomalyGroupTimeSeriesFeedback x
-> AnomalyGroupTimeSeriesFeedback)
-> Generic AnomalyGroupTimeSeriesFeedback
forall x.
Rep AnomalyGroupTimeSeriesFeedback x
-> AnomalyGroupTimeSeriesFeedback
forall x.
AnomalyGroupTimeSeriesFeedback
-> Rep AnomalyGroupTimeSeriesFeedback x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AnomalyGroupTimeSeriesFeedback x
-> AnomalyGroupTimeSeriesFeedback
$cfrom :: forall x.
AnomalyGroupTimeSeriesFeedback
-> Rep AnomalyGroupTimeSeriesFeedback x
Prelude.Generic)
newAnomalyGroupTimeSeriesFeedback ::
Prelude.Text ->
Prelude.Text ->
Prelude.Bool ->
AnomalyGroupTimeSeriesFeedback
newAnomalyGroupTimeSeriesFeedback :: Text -> Text -> Bool -> AnomalyGroupTimeSeriesFeedback
newAnomalyGroupTimeSeriesFeedback
Text
pAnomalyGroupId_
Text
pTimeSeriesId_
Bool
pIsAnomaly_ =
AnomalyGroupTimeSeriesFeedback' :: Text -> Text -> Bool -> AnomalyGroupTimeSeriesFeedback
AnomalyGroupTimeSeriesFeedback'
{ $sel:anomalyGroupId:AnomalyGroupTimeSeriesFeedback' :: Text
anomalyGroupId =
Text
pAnomalyGroupId_,
$sel:timeSeriesId:AnomalyGroupTimeSeriesFeedback' :: Text
timeSeriesId = Text
pTimeSeriesId_,
$sel:isAnomaly:AnomalyGroupTimeSeriesFeedback' :: Bool
isAnomaly = Bool
pIsAnomaly_
}
anomalyGroupTimeSeriesFeedback_anomalyGroupId :: Lens.Lens' AnomalyGroupTimeSeriesFeedback Prelude.Text
anomalyGroupTimeSeriesFeedback_anomalyGroupId :: (Text -> f Text)
-> AnomalyGroupTimeSeriesFeedback
-> f AnomalyGroupTimeSeriesFeedback
anomalyGroupTimeSeriesFeedback_anomalyGroupId = (AnomalyGroupTimeSeriesFeedback -> Text)
-> (AnomalyGroupTimeSeriesFeedback
-> Text -> AnomalyGroupTimeSeriesFeedback)
-> Lens
AnomalyGroupTimeSeriesFeedback
AnomalyGroupTimeSeriesFeedback
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnomalyGroupTimeSeriesFeedback' {Text
anomalyGroupId :: Text
$sel:anomalyGroupId:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Text
anomalyGroupId} -> Text
anomalyGroupId) (\s :: AnomalyGroupTimeSeriesFeedback
s@AnomalyGroupTimeSeriesFeedback' {} Text
a -> AnomalyGroupTimeSeriesFeedback
s {$sel:anomalyGroupId:AnomalyGroupTimeSeriesFeedback' :: Text
anomalyGroupId = Text
a} :: AnomalyGroupTimeSeriesFeedback)
anomalyGroupTimeSeriesFeedback_timeSeriesId :: Lens.Lens' AnomalyGroupTimeSeriesFeedback Prelude.Text
anomalyGroupTimeSeriesFeedback_timeSeriesId :: (Text -> f Text)
-> AnomalyGroupTimeSeriesFeedback
-> f AnomalyGroupTimeSeriesFeedback
anomalyGroupTimeSeriesFeedback_timeSeriesId = (AnomalyGroupTimeSeriesFeedback -> Text)
-> (AnomalyGroupTimeSeriesFeedback
-> Text -> AnomalyGroupTimeSeriesFeedback)
-> Lens
AnomalyGroupTimeSeriesFeedback
AnomalyGroupTimeSeriesFeedback
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnomalyGroupTimeSeriesFeedback' {Text
timeSeriesId :: Text
$sel:timeSeriesId:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Text
timeSeriesId} -> Text
timeSeriesId) (\s :: AnomalyGroupTimeSeriesFeedback
s@AnomalyGroupTimeSeriesFeedback' {} Text
a -> AnomalyGroupTimeSeriesFeedback
s {$sel:timeSeriesId:AnomalyGroupTimeSeriesFeedback' :: Text
timeSeriesId = Text
a} :: AnomalyGroupTimeSeriesFeedback)
anomalyGroupTimeSeriesFeedback_isAnomaly :: Lens.Lens' AnomalyGroupTimeSeriesFeedback Prelude.Bool
anomalyGroupTimeSeriesFeedback_isAnomaly :: (Bool -> f Bool)
-> AnomalyGroupTimeSeriesFeedback
-> f AnomalyGroupTimeSeriesFeedback
anomalyGroupTimeSeriesFeedback_isAnomaly = (AnomalyGroupTimeSeriesFeedback -> Bool)
-> (AnomalyGroupTimeSeriesFeedback
-> Bool -> AnomalyGroupTimeSeriesFeedback)
-> Lens
AnomalyGroupTimeSeriesFeedback
AnomalyGroupTimeSeriesFeedback
Bool
Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnomalyGroupTimeSeriesFeedback' {Bool
isAnomaly :: Bool
$sel:isAnomaly:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Bool
isAnomaly} -> Bool
isAnomaly) (\s :: AnomalyGroupTimeSeriesFeedback
s@AnomalyGroupTimeSeriesFeedback' {} Bool
a -> AnomalyGroupTimeSeriesFeedback
s {$sel:isAnomaly:AnomalyGroupTimeSeriesFeedback' :: Bool
isAnomaly = Bool
a} :: AnomalyGroupTimeSeriesFeedback)
instance
Prelude.Hashable
AnomalyGroupTimeSeriesFeedback
instance
Prelude.NFData
AnomalyGroupTimeSeriesFeedback
instance Core.ToJSON AnomalyGroupTimeSeriesFeedback where
toJSON :: AnomalyGroupTimeSeriesFeedback -> Value
toJSON AnomalyGroupTimeSeriesFeedback' {Bool
Text
isAnomaly :: Bool
timeSeriesId :: Text
anomalyGroupId :: Text
$sel:isAnomaly:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Bool
$sel:timeSeriesId:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Text
$sel:anomalyGroupId:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AnomalyGroupId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
anomalyGroupId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TimeSeriesId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
timeSeriesId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IsAnomaly" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
isAnomaly)
]
)