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