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