{-# 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.LogOddsMetric 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 LogOddsMetric = LogOddsMetric'
{
LogOddsMetric -> Text
variableName :: Prelude.Text,
LogOddsMetric -> Text
variableType :: Prelude.Text,
LogOddsMetric -> Double
variableImportance :: Prelude.Double
}
deriving (LogOddsMetric -> LogOddsMetric -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogOddsMetric -> LogOddsMetric -> Bool
$c/= :: LogOddsMetric -> LogOddsMetric -> Bool
== :: LogOddsMetric -> LogOddsMetric -> Bool
$c== :: LogOddsMetric -> LogOddsMetric -> Bool
Prelude.Eq, ReadPrec [LogOddsMetric]
ReadPrec LogOddsMetric
Int -> ReadS LogOddsMetric
ReadS [LogOddsMetric]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LogOddsMetric]
$creadListPrec :: ReadPrec [LogOddsMetric]
readPrec :: ReadPrec LogOddsMetric
$creadPrec :: ReadPrec LogOddsMetric
readList :: ReadS [LogOddsMetric]
$creadList :: ReadS [LogOddsMetric]
readsPrec :: Int -> ReadS LogOddsMetric
$creadsPrec :: Int -> ReadS LogOddsMetric
Prelude.Read, Int -> LogOddsMetric -> ShowS
[LogOddsMetric] -> ShowS
LogOddsMetric -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogOddsMetric] -> ShowS
$cshowList :: [LogOddsMetric] -> ShowS
show :: LogOddsMetric -> String
$cshow :: LogOddsMetric -> String
showsPrec :: Int -> LogOddsMetric -> ShowS
$cshowsPrec :: Int -> LogOddsMetric -> ShowS
Prelude.Show, forall x. Rep LogOddsMetric x -> LogOddsMetric
forall x. LogOddsMetric -> Rep LogOddsMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LogOddsMetric x -> LogOddsMetric
$cfrom :: forall x. LogOddsMetric -> Rep LogOddsMetric x
Prelude.Generic)
newLogOddsMetric ::
Prelude.Text ->
Prelude.Text ->
Prelude.Double ->
LogOddsMetric
newLogOddsMetric :: Text -> Text -> Double -> LogOddsMetric
newLogOddsMetric
Text
pVariableName_
Text
pVariableType_
Double
pVariableImportance_ =
LogOddsMetric'
{ $sel:variableName:LogOddsMetric' :: Text
variableName = Text
pVariableName_,
$sel:variableType:LogOddsMetric' :: Text
variableType = Text
pVariableType_,
$sel:variableImportance:LogOddsMetric' :: Double
variableImportance = Double
pVariableImportance_
}
logOddsMetric_variableName :: Lens.Lens' LogOddsMetric Prelude.Text
logOddsMetric_variableName :: Lens' LogOddsMetric Text
logOddsMetric_variableName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogOddsMetric' {Text
variableName :: Text
$sel:variableName:LogOddsMetric' :: LogOddsMetric -> Text
variableName} -> Text
variableName) (\s :: LogOddsMetric
s@LogOddsMetric' {} Text
a -> LogOddsMetric
s {$sel:variableName:LogOddsMetric' :: Text
variableName = Text
a} :: LogOddsMetric)
logOddsMetric_variableType :: Lens.Lens' LogOddsMetric Prelude.Text
logOddsMetric_variableType :: Lens' LogOddsMetric Text
logOddsMetric_variableType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogOddsMetric' {Text
variableType :: Text
$sel:variableType:LogOddsMetric' :: LogOddsMetric -> Text
variableType} -> Text
variableType) (\s :: LogOddsMetric
s@LogOddsMetric' {} Text
a -> LogOddsMetric
s {$sel:variableType:LogOddsMetric' :: Text
variableType = Text
a} :: LogOddsMetric)
logOddsMetric_variableImportance :: Lens.Lens' LogOddsMetric Prelude.Double
logOddsMetric_variableImportance :: Lens' LogOddsMetric Double
logOddsMetric_variableImportance = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogOddsMetric' {Double
variableImportance :: Double
$sel:variableImportance:LogOddsMetric' :: LogOddsMetric -> Double
variableImportance} -> Double
variableImportance) (\s :: LogOddsMetric
s@LogOddsMetric' {} Double
a -> LogOddsMetric
s {$sel:variableImportance:LogOddsMetric' :: Double
variableImportance = Double
a} :: LogOddsMetric)
instance Data.FromJSON LogOddsMetric where
parseJSON :: Value -> Parser LogOddsMetric
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LogOddsMetric"
( \Object
x ->
Text -> Text -> Double -> LogOddsMetric
LogOddsMetric'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"variableName")
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
"variableType")
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
"variableImportance")
)
instance Prelude.Hashable LogOddsMetric where
hashWithSalt :: Int -> LogOddsMetric -> Int
hashWithSalt Int
_salt LogOddsMetric' {Double
Text
variableImportance :: Double
variableType :: Text
variableName :: Text
$sel:variableImportance:LogOddsMetric' :: LogOddsMetric -> Double
$sel:variableType:LogOddsMetric' :: LogOddsMetric -> Text
$sel:variableName:LogOddsMetric' :: LogOddsMetric -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
variableName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
variableType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Double
variableImportance
instance Prelude.NFData LogOddsMetric where
rnf :: LogOddsMetric -> ()
rnf LogOddsMetric' {Double
Text
variableImportance :: Double
variableType :: Text
variableName :: Text
$sel:variableImportance:LogOddsMetric' :: LogOddsMetric -> Double
$sel:variableType:LogOddsMetric' :: LogOddsMetric -> Text
$sel:variableName:LogOddsMetric' :: LogOddsMetric -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
variableName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
variableType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Double
variableImportance