{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $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 :: Lens' AnomalyGroupTimeSeriesFeedback Text
anomalyGroupTimeSeriesFeedback_anomalyGroupId = 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 :: Lens' AnomalyGroupTimeSeriesFeedback Text
anomalyGroupTimeSeriesFeedback_timeSeriesId = 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 :: Lens' AnomalyGroupTimeSeriesFeedback Bool
anomalyGroupTimeSeriesFeedback_isAnomaly = 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
where
hashWithSalt :: Int -> AnomalyGroupTimeSeriesFeedback -> Int
hashWithSalt
Int
_salt
AnomalyGroupTimeSeriesFeedback' {Bool
Text
isAnomaly :: Bool
timeSeriesId :: Text
anomalyGroupId :: Text
$sel:isAnomaly:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Bool
$sel:timeSeriesId:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Text
$sel:anomalyGroupId:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
anomalyGroupId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
timeSeriesId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
isAnomaly
instance
Prelude.NFData
AnomalyGroupTimeSeriesFeedback
where
rnf :: AnomalyGroupTimeSeriesFeedback -> ()
rnf AnomalyGroupTimeSeriesFeedback' {Bool
Text
isAnomaly :: Bool
timeSeriesId :: Text
anomalyGroupId :: Text
$sel:isAnomaly:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Bool
$sel:timeSeriesId:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Text
$sel:anomalyGroupId:AnomalyGroupTimeSeriesFeedback' :: AnomalyGroupTimeSeriesFeedback -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
anomalyGroupId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
timeSeriesId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
isAnomaly
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"AnomalyGroupId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
anomalyGroupId),
forall a. a -> Maybe a
Prelude.Just (Key
"TimeSeriesId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
timeSeriesId),
forall a. a -> Maybe a
Prelude.Just (Key
"IsAnomaly" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
isAnomaly)
]
)