{-# 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.Lens as Lens
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
(LogOddsMetric -> LogOddsMetric -> Bool)
-> (LogOddsMetric -> LogOddsMetric -> Bool) -> Eq LogOddsMetric
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]
(Int -> ReadS LogOddsMetric)
-> ReadS [LogOddsMetric]
-> ReadPrec LogOddsMetric
-> ReadPrec [LogOddsMetric]
-> Read 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
(Int -> LogOddsMetric -> ShowS)
-> (LogOddsMetric -> String)
-> ([LogOddsMetric] -> ShowS)
-> Show LogOddsMetric
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. LogOddsMetric -> Rep LogOddsMetric x)
-> (forall x. Rep LogOddsMetric x -> LogOddsMetric)
-> Generic LogOddsMetric
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' :: Text -> Text -> Double -> LogOddsMetric
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 :: (Text -> f Text) -> LogOddsMetric -> f LogOddsMetric
logOddsMetric_variableName = (LogOddsMetric -> Text)
-> (LogOddsMetric -> Text -> LogOddsMetric)
-> Lens LogOddsMetric LogOddsMetric Text Text
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 :: (Text -> f Text) -> LogOddsMetric -> f LogOddsMetric
logOddsMetric_variableType = (LogOddsMetric -> Text)
-> (LogOddsMetric -> Text -> LogOddsMetric)
-> Lens LogOddsMetric LogOddsMetric Text Text
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 :: (Double -> f Double) -> LogOddsMetric -> f LogOddsMetric
logOddsMetric_variableImportance = (LogOddsMetric -> Double)
-> (LogOddsMetric -> Double -> LogOddsMetric)
-> Lens LogOddsMetric LogOddsMetric Double Double
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 Core.FromJSON LogOddsMetric where
parseJSON :: Value -> Parser LogOddsMetric
parseJSON =
String
-> (Object -> Parser LogOddsMetric)
-> Value
-> Parser LogOddsMetric
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LogOddsMetric"
( \Object
x ->
Text -> Text -> Double -> LogOddsMetric
LogOddsMetric'
(Text -> Text -> Double -> LogOddsMetric)
-> Parser Text -> Parser (Text -> Double -> LogOddsMetric)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"variableName")
Parser (Text -> Double -> LogOddsMetric)
-> Parser Text -> Parser (Double -> LogOddsMetric)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"variableType")
Parser (Double -> LogOddsMetric)
-> Parser Double -> Parser LogOddsMetric
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Double
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"variableImportance")
)
instance Prelude.Hashable LogOddsMetric
instance Prelude.NFData LogOddsMetric