{-# 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.SageMaker.Types.FinalAutoMLJobObjectiveMetric where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.AutoMLJobObjectiveType
import Amazonka.SageMaker.Types.AutoMLMetricEnum
data FinalAutoMLJobObjectiveMetric = FinalAutoMLJobObjectiveMetric'
{
FinalAutoMLJobObjectiveMetric -> Maybe AutoMLJobObjectiveType
type' :: Prelude.Maybe AutoMLJobObjectiveType,
FinalAutoMLJobObjectiveMetric -> AutoMLMetricEnum
metricName :: AutoMLMetricEnum,
FinalAutoMLJobObjectiveMetric -> Double
value :: Prelude.Double
}
deriving (FinalAutoMLJobObjectiveMetric
-> FinalAutoMLJobObjectiveMetric -> Bool
(FinalAutoMLJobObjectiveMetric
-> FinalAutoMLJobObjectiveMetric -> Bool)
-> (FinalAutoMLJobObjectiveMetric
-> FinalAutoMLJobObjectiveMetric -> Bool)
-> Eq FinalAutoMLJobObjectiveMetric
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FinalAutoMLJobObjectiveMetric
-> FinalAutoMLJobObjectiveMetric -> Bool
$c/= :: FinalAutoMLJobObjectiveMetric
-> FinalAutoMLJobObjectiveMetric -> Bool
== :: FinalAutoMLJobObjectiveMetric
-> FinalAutoMLJobObjectiveMetric -> Bool
$c== :: FinalAutoMLJobObjectiveMetric
-> FinalAutoMLJobObjectiveMetric -> Bool
Prelude.Eq, ReadPrec [FinalAutoMLJobObjectiveMetric]
ReadPrec FinalAutoMLJobObjectiveMetric
Int -> ReadS FinalAutoMLJobObjectiveMetric
ReadS [FinalAutoMLJobObjectiveMetric]
(Int -> ReadS FinalAutoMLJobObjectiveMetric)
-> ReadS [FinalAutoMLJobObjectiveMetric]
-> ReadPrec FinalAutoMLJobObjectiveMetric
-> ReadPrec [FinalAutoMLJobObjectiveMetric]
-> Read FinalAutoMLJobObjectiveMetric
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FinalAutoMLJobObjectiveMetric]
$creadListPrec :: ReadPrec [FinalAutoMLJobObjectiveMetric]
readPrec :: ReadPrec FinalAutoMLJobObjectiveMetric
$creadPrec :: ReadPrec FinalAutoMLJobObjectiveMetric
readList :: ReadS [FinalAutoMLJobObjectiveMetric]
$creadList :: ReadS [FinalAutoMLJobObjectiveMetric]
readsPrec :: Int -> ReadS FinalAutoMLJobObjectiveMetric
$creadsPrec :: Int -> ReadS FinalAutoMLJobObjectiveMetric
Prelude.Read, Int -> FinalAutoMLJobObjectiveMetric -> ShowS
[FinalAutoMLJobObjectiveMetric] -> ShowS
FinalAutoMLJobObjectiveMetric -> String
(Int -> FinalAutoMLJobObjectiveMetric -> ShowS)
-> (FinalAutoMLJobObjectiveMetric -> String)
-> ([FinalAutoMLJobObjectiveMetric] -> ShowS)
-> Show FinalAutoMLJobObjectiveMetric
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FinalAutoMLJobObjectiveMetric] -> ShowS
$cshowList :: [FinalAutoMLJobObjectiveMetric] -> ShowS
show :: FinalAutoMLJobObjectiveMetric -> String
$cshow :: FinalAutoMLJobObjectiveMetric -> String
showsPrec :: Int -> FinalAutoMLJobObjectiveMetric -> ShowS
$cshowsPrec :: Int -> FinalAutoMLJobObjectiveMetric -> ShowS
Prelude.Show, (forall x.
FinalAutoMLJobObjectiveMetric
-> Rep FinalAutoMLJobObjectiveMetric x)
-> (forall x.
Rep FinalAutoMLJobObjectiveMetric x
-> FinalAutoMLJobObjectiveMetric)
-> Generic FinalAutoMLJobObjectiveMetric
forall x.
Rep FinalAutoMLJobObjectiveMetric x
-> FinalAutoMLJobObjectiveMetric
forall x.
FinalAutoMLJobObjectiveMetric
-> Rep FinalAutoMLJobObjectiveMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FinalAutoMLJobObjectiveMetric x
-> FinalAutoMLJobObjectiveMetric
$cfrom :: forall x.
FinalAutoMLJobObjectiveMetric
-> Rep FinalAutoMLJobObjectiveMetric x
Prelude.Generic)
newFinalAutoMLJobObjectiveMetric ::
AutoMLMetricEnum ->
Prelude.Double ->
FinalAutoMLJobObjectiveMetric
newFinalAutoMLJobObjectiveMetric :: AutoMLMetricEnum -> Double -> FinalAutoMLJobObjectiveMetric
newFinalAutoMLJobObjectiveMetric AutoMLMetricEnum
pMetricName_ Double
pValue_ =
FinalAutoMLJobObjectiveMetric' :: Maybe AutoMLJobObjectiveType
-> AutoMLMetricEnum -> Double -> FinalAutoMLJobObjectiveMetric
FinalAutoMLJobObjectiveMetric'
{ $sel:type':FinalAutoMLJobObjectiveMetric' :: Maybe AutoMLJobObjectiveType
type' =
Maybe AutoMLJobObjectiveType
forall a. Maybe a
Prelude.Nothing,
$sel:metricName:FinalAutoMLJobObjectiveMetric' :: AutoMLMetricEnum
metricName = AutoMLMetricEnum
pMetricName_,
$sel:value:FinalAutoMLJobObjectiveMetric' :: Double
value = Double
pValue_
}
finalAutoMLJobObjectiveMetric_type :: Lens.Lens' FinalAutoMLJobObjectiveMetric (Prelude.Maybe AutoMLJobObjectiveType)
finalAutoMLJobObjectiveMetric_type :: (Maybe AutoMLJobObjectiveType -> f (Maybe AutoMLJobObjectiveType))
-> FinalAutoMLJobObjectiveMetric -> f FinalAutoMLJobObjectiveMetric
finalAutoMLJobObjectiveMetric_type = (FinalAutoMLJobObjectiveMetric -> Maybe AutoMLJobObjectiveType)
-> (FinalAutoMLJobObjectiveMetric
-> Maybe AutoMLJobObjectiveType -> FinalAutoMLJobObjectiveMetric)
-> Lens
FinalAutoMLJobObjectiveMetric
FinalAutoMLJobObjectiveMetric
(Maybe AutoMLJobObjectiveType)
(Maybe AutoMLJobObjectiveType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FinalAutoMLJobObjectiveMetric' {Maybe AutoMLJobObjectiveType
type' :: Maybe AutoMLJobObjectiveType
$sel:type':FinalAutoMLJobObjectiveMetric' :: FinalAutoMLJobObjectiveMetric -> Maybe AutoMLJobObjectiveType
type'} -> Maybe AutoMLJobObjectiveType
type') (\s :: FinalAutoMLJobObjectiveMetric
s@FinalAutoMLJobObjectiveMetric' {} Maybe AutoMLJobObjectiveType
a -> FinalAutoMLJobObjectiveMetric
s {$sel:type':FinalAutoMLJobObjectiveMetric' :: Maybe AutoMLJobObjectiveType
type' = Maybe AutoMLJobObjectiveType
a} :: FinalAutoMLJobObjectiveMetric)
finalAutoMLJobObjectiveMetric_metricName :: Lens.Lens' FinalAutoMLJobObjectiveMetric AutoMLMetricEnum
finalAutoMLJobObjectiveMetric_metricName :: (AutoMLMetricEnum -> f AutoMLMetricEnum)
-> FinalAutoMLJobObjectiveMetric -> f FinalAutoMLJobObjectiveMetric
finalAutoMLJobObjectiveMetric_metricName = (FinalAutoMLJobObjectiveMetric -> AutoMLMetricEnum)
-> (FinalAutoMLJobObjectiveMetric
-> AutoMLMetricEnum -> FinalAutoMLJobObjectiveMetric)
-> Lens
FinalAutoMLJobObjectiveMetric
FinalAutoMLJobObjectiveMetric
AutoMLMetricEnum
AutoMLMetricEnum
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FinalAutoMLJobObjectiveMetric' {AutoMLMetricEnum
metricName :: AutoMLMetricEnum
$sel:metricName:FinalAutoMLJobObjectiveMetric' :: FinalAutoMLJobObjectiveMetric -> AutoMLMetricEnum
metricName} -> AutoMLMetricEnum
metricName) (\s :: FinalAutoMLJobObjectiveMetric
s@FinalAutoMLJobObjectiveMetric' {} AutoMLMetricEnum
a -> FinalAutoMLJobObjectiveMetric
s {$sel:metricName:FinalAutoMLJobObjectiveMetric' :: AutoMLMetricEnum
metricName = AutoMLMetricEnum
a} :: FinalAutoMLJobObjectiveMetric)
finalAutoMLJobObjectiveMetric_value :: Lens.Lens' FinalAutoMLJobObjectiveMetric Prelude.Double
finalAutoMLJobObjectiveMetric_value :: (Double -> f Double)
-> FinalAutoMLJobObjectiveMetric -> f FinalAutoMLJobObjectiveMetric
finalAutoMLJobObjectiveMetric_value = (FinalAutoMLJobObjectiveMetric -> Double)
-> (FinalAutoMLJobObjectiveMetric
-> Double -> FinalAutoMLJobObjectiveMetric)
-> Lens
FinalAutoMLJobObjectiveMetric
FinalAutoMLJobObjectiveMetric
Double
Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FinalAutoMLJobObjectiveMetric' {Double
value :: Double
$sel:value:FinalAutoMLJobObjectiveMetric' :: FinalAutoMLJobObjectiveMetric -> Double
value} -> Double
value) (\s :: FinalAutoMLJobObjectiveMetric
s@FinalAutoMLJobObjectiveMetric' {} Double
a -> FinalAutoMLJobObjectiveMetric
s {$sel:value:FinalAutoMLJobObjectiveMetric' :: Double
value = Double
a} :: FinalAutoMLJobObjectiveMetric)
instance Core.FromJSON FinalAutoMLJobObjectiveMetric where
parseJSON :: Value -> Parser FinalAutoMLJobObjectiveMetric
parseJSON =
String
-> (Object -> Parser FinalAutoMLJobObjectiveMetric)
-> Value
-> Parser FinalAutoMLJobObjectiveMetric
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FinalAutoMLJobObjectiveMetric"
( \Object
x ->
Maybe AutoMLJobObjectiveType
-> AutoMLMetricEnum -> Double -> FinalAutoMLJobObjectiveMetric
FinalAutoMLJobObjectiveMetric'
(Maybe AutoMLJobObjectiveType
-> AutoMLMetricEnum -> Double -> FinalAutoMLJobObjectiveMetric)
-> Parser (Maybe AutoMLJobObjectiveType)
-> Parser
(AutoMLMetricEnum -> Double -> FinalAutoMLJobObjectiveMetric)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AutoMLJobObjectiveType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
Parser
(AutoMLMetricEnum -> Double -> FinalAutoMLJobObjectiveMetric)
-> Parser AutoMLMetricEnum
-> Parser (Double -> FinalAutoMLJobObjectiveMetric)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AutoMLMetricEnum
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MetricName")
Parser (Double -> FinalAutoMLJobObjectiveMetric)
-> Parser Double -> Parser FinalAutoMLJobObjectiveMetric
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
"Value")
)
instance
Prelude.Hashable
FinalAutoMLJobObjectiveMetric
instance Prelude.NFData FinalAutoMLJobObjectiveMetric