{-# 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.FraudDetector.Types.MetricDataPoint 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 MetricDataPoint = MetricDataPoint'
{
MetricDataPoint -> Maybe Double
fpr :: Prelude.Maybe Prelude.Double,
MetricDataPoint -> Maybe Double
precision :: Prelude.Maybe Prelude.Double,
MetricDataPoint -> Maybe Double
threshold :: Prelude.Maybe Prelude.Double,
MetricDataPoint -> Maybe Double
tpr :: Prelude.Maybe Prelude.Double
}
deriving (MetricDataPoint -> MetricDataPoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MetricDataPoint -> MetricDataPoint -> Bool
$c/= :: MetricDataPoint -> MetricDataPoint -> Bool
== :: MetricDataPoint -> MetricDataPoint -> Bool
$c== :: MetricDataPoint -> MetricDataPoint -> Bool
Prelude.Eq, ReadPrec [MetricDataPoint]
ReadPrec MetricDataPoint
Int -> ReadS MetricDataPoint
ReadS [MetricDataPoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MetricDataPoint]
$creadListPrec :: ReadPrec [MetricDataPoint]
readPrec :: ReadPrec MetricDataPoint
$creadPrec :: ReadPrec MetricDataPoint
readList :: ReadS [MetricDataPoint]
$creadList :: ReadS [MetricDataPoint]
readsPrec :: Int -> ReadS MetricDataPoint
$creadsPrec :: Int -> ReadS MetricDataPoint
Prelude.Read, Int -> MetricDataPoint -> ShowS
[MetricDataPoint] -> ShowS
MetricDataPoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MetricDataPoint] -> ShowS
$cshowList :: [MetricDataPoint] -> ShowS
show :: MetricDataPoint -> String
$cshow :: MetricDataPoint -> String
showsPrec :: Int -> MetricDataPoint -> ShowS
$cshowsPrec :: Int -> MetricDataPoint -> ShowS
Prelude.Show, forall x. Rep MetricDataPoint x -> MetricDataPoint
forall x. MetricDataPoint -> Rep MetricDataPoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MetricDataPoint x -> MetricDataPoint
$cfrom :: forall x. MetricDataPoint -> Rep MetricDataPoint x
Prelude.Generic)
newMetricDataPoint ::
MetricDataPoint
newMetricDataPoint :: MetricDataPoint
newMetricDataPoint =
MetricDataPoint'
{ $sel:fpr:MetricDataPoint' :: Maybe Double
fpr = forall a. Maybe a
Prelude.Nothing,
$sel:precision:MetricDataPoint' :: Maybe Double
precision = forall a. Maybe a
Prelude.Nothing,
$sel:threshold:MetricDataPoint' :: Maybe Double
threshold = forall a. Maybe a
Prelude.Nothing,
$sel:tpr:MetricDataPoint' :: Maybe Double
tpr = forall a. Maybe a
Prelude.Nothing
}
metricDataPoint_fpr :: Lens.Lens' MetricDataPoint (Prelude.Maybe Prelude.Double)
metricDataPoint_fpr :: Lens' MetricDataPoint (Maybe Double)
metricDataPoint_fpr = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataPoint' {Maybe Double
fpr :: Maybe Double
$sel:fpr:MetricDataPoint' :: MetricDataPoint -> Maybe Double
fpr} -> Maybe Double
fpr) (\s :: MetricDataPoint
s@MetricDataPoint' {} Maybe Double
a -> MetricDataPoint
s {$sel:fpr:MetricDataPoint' :: Maybe Double
fpr = Maybe Double
a} :: MetricDataPoint)
metricDataPoint_precision :: Lens.Lens' MetricDataPoint (Prelude.Maybe Prelude.Double)
metricDataPoint_precision :: Lens' MetricDataPoint (Maybe Double)
metricDataPoint_precision = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataPoint' {Maybe Double
precision :: Maybe Double
$sel:precision:MetricDataPoint' :: MetricDataPoint -> Maybe Double
precision} -> Maybe Double
precision) (\s :: MetricDataPoint
s@MetricDataPoint' {} Maybe Double
a -> MetricDataPoint
s {$sel:precision:MetricDataPoint' :: Maybe Double
precision = Maybe Double
a} :: MetricDataPoint)
metricDataPoint_threshold :: Lens.Lens' MetricDataPoint (Prelude.Maybe Prelude.Double)
metricDataPoint_threshold :: Lens' MetricDataPoint (Maybe Double)
metricDataPoint_threshold = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataPoint' {Maybe Double
threshold :: Maybe Double
$sel:threshold:MetricDataPoint' :: MetricDataPoint -> Maybe Double
threshold} -> Maybe Double
threshold) (\s :: MetricDataPoint
s@MetricDataPoint' {} Maybe Double
a -> MetricDataPoint
s {$sel:threshold:MetricDataPoint' :: Maybe Double
threshold = Maybe Double
a} :: MetricDataPoint)
metricDataPoint_tpr :: Lens.Lens' MetricDataPoint (Prelude.Maybe Prelude.Double)
metricDataPoint_tpr :: Lens' MetricDataPoint (Maybe Double)
metricDataPoint_tpr = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataPoint' {Maybe Double
tpr :: Maybe Double
$sel:tpr:MetricDataPoint' :: MetricDataPoint -> Maybe Double
tpr} -> Maybe Double
tpr) (\s :: MetricDataPoint
s@MetricDataPoint' {} Maybe Double
a -> MetricDataPoint
s {$sel:tpr:MetricDataPoint' :: Maybe Double
tpr = Maybe Double
a} :: MetricDataPoint)
instance Data.FromJSON MetricDataPoint where
parseJSON :: Value -> Parser MetricDataPoint
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MetricDataPoint"
( \Object
x ->
Maybe Double
-> Maybe Double -> Maybe Double -> Maybe Double -> MetricDataPoint
MetricDataPoint'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fpr")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"precision")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"threshold")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tpr")
)
instance Prelude.Hashable MetricDataPoint where
hashWithSalt :: Int -> MetricDataPoint -> Int
hashWithSalt Int
_salt MetricDataPoint' {Maybe Double
tpr :: Maybe Double
threshold :: Maybe Double
precision :: Maybe Double
fpr :: Maybe Double
$sel:tpr:MetricDataPoint' :: MetricDataPoint -> Maybe Double
$sel:threshold:MetricDataPoint' :: MetricDataPoint -> Maybe Double
$sel:precision:MetricDataPoint' :: MetricDataPoint -> Maybe Double
$sel:fpr:MetricDataPoint' :: MetricDataPoint -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
fpr
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
precision
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
threshold
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
tpr
instance Prelude.NFData MetricDataPoint where
rnf :: MetricDataPoint -> ()
rnf MetricDataPoint' {Maybe Double
tpr :: Maybe Double
threshold :: Maybe Double
precision :: Maybe Double
fpr :: Maybe Double
$sel:tpr:MetricDataPoint' :: MetricDataPoint -> Maybe Double
$sel:threshold:MetricDataPoint' :: MetricDataPoint -> Maybe Double
$sel:precision:MetricDataPoint' :: MetricDataPoint -> Maybe Double
$sel:fpr:MetricDataPoint' :: MetricDataPoint -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
fpr
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
precision
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
threshold
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
tpr