{-# 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.AggregatedLogOddsMetric 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 AggregatedLogOddsMetric = AggregatedLogOddsMetric'
{
AggregatedLogOddsMetric -> [Text]
variableNames :: [Prelude.Text],
AggregatedLogOddsMetric -> Double
aggregatedVariablesImportance :: Prelude.Double
}
deriving (AggregatedLogOddsMetric -> AggregatedLogOddsMetric -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AggregatedLogOddsMetric -> AggregatedLogOddsMetric -> Bool
$c/= :: AggregatedLogOddsMetric -> AggregatedLogOddsMetric -> Bool
== :: AggregatedLogOddsMetric -> AggregatedLogOddsMetric -> Bool
$c== :: AggregatedLogOddsMetric -> AggregatedLogOddsMetric -> Bool
Prelude.Eq, ReadPrec [AggregatedLogOddsMetric]
ReadPrec AggregatedLogOddsMetric
Int -> ReadS AggregatedLogOddsMetric
ReadS [AggregatedLogOddsMetric]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AggregatedLogOddsMetric]
$creadListPrec :: ReadPrec [AggregatedLogOddsMetric]
readPrec :: ReadPrec AggregatedLogOddsMetric
$creadPrec :: ReadPrec AggregatedLogOddsMetric
readList :: ReadS [AggregatedLogOddsMetric]
$creadList :: ReadS [AggregatedLogOddsMetric]
readsPrec :: Int -> ReadS AggregatedLogOddsMetric
$creadsPrec :: Int -> ReadS AggregatedLogOddsMetric
Prelude.Read, Int -> AggregatedLogOddsMetric -> ShowS
[AggregatedLogOddsMetric] -> ShowS
AggregatedLogOddsMetric -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AggregatedLogOddsMetric] -> ShowS
$cshowList :: [AggregatedLogOddsMetric] -> ShowS
show :: AggregatedLogOddsMetric -> String
$cshow :: AggregatedLogOddsMetric -> String
showsPrec :: Int -> AggregatedLogOddsMetric -> ShowS
$cshowsPrec :: Int -> AggregatedLogOddsMetric -> ShowS
Prelude.Show, forall x. Rep AggregatedLogOddsMetric x -> AggregatedLogOddsMetric
forall x. AggregatedLogOddsMetric -> Rep AggregatedLogOddsMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AggregatedLogOddsMetric x -> AggregatedLogOddsMetric
$cfrom :: forall x. AggregatedLogOddsMetric -> Rep AggregatedLogOddsMetric x
Prelude.Generic)
newAggregatedLogOddsMetric ::
Prelude.Double ->
AggregatedLogOddsMetric
newAggregatedLogOddsMetric :: Double -> AggregatedLogOddsMetric
newAggregatedLogOddsMetric
Double
pAggregatedVariablesImportance_ =
AggregatedLogOddsMetric'
{ $sel:variableNames:AggregatedLogOddsMetric' :: [Text]
variableNames =
forall a. Monoid a => a
Prelude.mempty,
$sel:aggregatedVariablesImportance:AggregatedLogOddsMetric' :: Double
aggregatedVariablesImportance =
Double
pAggregatedVariablesImportance_
}
aggregatedLogOddsMetric_variableNames :: Lens.Lens' AggregatedLogOddsMetric [Prelude.Text]
aggregatedLogOddsMetric_variableNames :: Lens' AggregatedLogOddsMetric [Text]
aggregatedLogOddsMetric_variableNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregatedLogOddsMetric' {[Text]
variableNames :: [Text]
$sel:variableNames:AggregatedLogOddsMetric' :: AggregatedLogOddsMetric -> [Text]
variableNames} -> [Text]
variableNames) (\s :: AggregatedLogOddsMetric
s@AggregatedLogOddsMetric' {} [Text]
a -> AggregatedLogOddsMetric
s {$sel:variableNames:AggregatedLogOddsMetric' :: [Text]
variableNames = [Text]
a} :: AggregatedLogOddsMetric) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
aggregatedLogOddsMetric_aggregatedVariablesImportance :: Lens.Lens' AggregatedLogOddsMetric Prelude.Double
aggregatedLogOddsMetric_aggregatedVariablesImportance :: Lens' AggregatedLogOddsMetric Double
aggregatedLogOddsMetric_aggregatedVariablesImportance = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregatedLogOddsMetric' {Double
aggregatedVariablesImportance :: Double
$sel:aggregatedVariablesImportance:AggregatedLogOddsMetric' :: AggregatedLogOddsMetric -> Double
aggregatedVariablesImportance} -> Double
aggregatedVariablesImportance) (\s :: AggregatedLogOddsMetric
s@AggregatedLogOddsMetric' {} Double
a -> AggregatedLogOddsMetric
s {$sel:aggregatedVariablesImportance:AggregatedLogOddsMetric' :: Double
aggregatedVariablesImportance = Double
a} :: AggregatedLogOddsMetric)
instance Data.FromJSON AggregatedLogOddsMetric where
parseJSON :: Value -> Parser AggregatedLogOddsMetric
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AggregatedLogOddsMetric"
( \Object
x ->
[Text] -> Double -> AggregatedLogOddsMetric
AggregatedLogOddsMetric'
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
"variableNames" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"aggregatedVariablesImportance")
)
instance Prelude.Hashable AggregatedLogOddsMetric where
hashWithSalt :: Int -> AggregatedLogOddsMetric -> Int
hashWithSalt Int
_salt AggregatedLogOddsMetric' {Double
[Text]
aggregatedVariablesImportance :: Double
variableNames :: [Text]
$sel:aggregatedVariablesImportance:AggregatedLogOddsMetric' :: AggregatedLogOddsMetric -> Double
$sel:variableNames:AggregatedLogOddsMetric' :: AggregatedLogOddsMetric -> [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
variableNames
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Double
aggregatedVariablesImportance
instance Prelude.NFData AggregatedLogOddsMetric where
rnf :: AggregatedLogOddsMetric -> ()
rnf AggregatedLogOddsMetric' {Double
[Text]
aggregatedVariablesImportance :: Double
variableNames :: [Text]
$sel:aggregatedVariablesImportance:AggregatedLogOddsMetric' :: AggregatedLogOddsMetric -> Double
$sel:variableNames:AggregatedLogOddsMetric' :: AggregatedLogOddsMetric -> [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf [Text]
variableNames
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Double
aggregatedVariablesImportance