{-# 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.Forecast.Types.HyperParameterTuningJobConfig where
import qualified Amazonka.Core as Core
import Amazonka.Forecast.Types.ParameterRanges
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data HyperParameterTuningJobConfig = HyperParameterTuningJobConfig'
{
HyperParameterTuningJobConfig -> Maybe ParameterRanges
parameterRanges :: Prelude.Maybe ParameterRanges
}
deriving (HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
(HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool)
-> (HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool)
-> Eq HyperParameterTuningJobConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
$c/= :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
== :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
$c== :: HyperParameterTuningJobConfig
-> HyperParameterTuningJobConfig -> Bool
Prelude.Eq, ReadPrec [HyperParameterTuningJobConfig]
ReadPrec HyperParameterTuningJobConfig
Int -> ReadS HyperParameterTuningJobConfig
ReadS [HyperParameterTuningJobConfig]
(Int -> ReadS HyperParameterTuningJobConfig)
-> ReadS [HyperParameterTuningJobConfig]
-> ReadPrec HyperParameterTuningJobConfig
-> ReadPrec [HyperParameterTuningJobConfig]
-> Read HyperParameterTuningJobConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HyperParameterTuningJobConfig]
$creadListPrec :: ReadPrec [HyperParameterTuningJobConfig]
readPrec :: ReadPrec HyperParameterTuningJobConfig
$creadPrec :: ReadPrec HyperParameterTuningJobConfig
readList :: ReadS [HyperParameterTuningJobConfig]
$creadList :: ReadS [HyperParameterTuningJobConfig]
readsPrec :: Int -> ReadS HyperParameterTuningJobConfig
$creadsPrec :: Int -> ReadS HyperParameterTuningJobConfig
Prelude.Read, Int -> HyperParameterTuningJobConfig -> ShowS
[HyperParameterTuningJobConfig] -> ShowS
HyperParameterTuningJobConfig -> String
(Int -> HyperParameterTuningJobConfig -> ShowS)
-> (HyperParameterTuningJobConfig -> String)
-> ([HyperParameterTuningJobConfig] -> ShowS)
-> Show HyperParameterTuningJobConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HyperParameterTuningJobConfig] -> ShowS
$cshowList :: [HyperParameterTuningJobConfig] -> ShowS
show :: HyperParameterTuningJobConfig -> String
$cshow :: HyperParameterTuningJobConfig -> String
showsPrec :: Int -> HyperParameterTuningJobConfig -> ShowS
$cshowsPrec :: Int -> HyperParameterTuningJobConfig -> ShowS
Prelude.Show, (forall x.
HyperParameterTuningJobConfig
-> Rep HyperParameterTuningJobConfig x)
-> (forall x.
Rep HyperParameterTuningJobConfig x
-> HyperParameterTuningJobConfig)
-> Generic HyperParameterTuningJobConfig
forall x.
Rep HyperParameterTuningJobConfig x
-> HyperParameterTuningJobConfig
forall x.
HyperParameterTuningJobConfig
-> Rep HyperParameterTuningJobConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HyperParameterTuningJobConfig x
-> HyperParameterTuningJobConfig
$cfrom :: forall x.
HyperParameterTuningJobConfig
-> Rep HyperParameterTuningJobConfig x
Prelude.Generic)
newHyperParameterTuningJobConfig ::
HyperParameterTuningJobConfig
newHyperParameterTuningJobConfig :: HyperParameterTuningJobConfig
newHyperParameterTuningJobConfig =
HyperParameterTuningJobConfig' :: Maybe ParameterRanges -> HyperParameterTuningJobConfig
HyperParameterTuningJobConfig'
{ $sel:parameterRanges:HyperParameterTuningJobConfig' :: Maybe ParameterRanges
parameterRanges =
Maybe ParameterRanges
forall a. Maybe a
Prelude.Nothing
}
hyperParameterTuningJobConfig_parameterRanges :: Lens.Lens' HyperParameterTuningJobConfig (Prelude.Maybe ParameterRanges)
hyperParameterTuningJobConfig_parameterRanges :: (Maybe ParameterRanges -> f (Maybe ParameterRanges))
-> HyperParameterTuningJobConfig -> f HyperParameterTuningJobConfig
hyperParameterTuningJobConfig_parameterRanges = (HyperParameterTuningJobConfig -> Maybe ParameterRanges)
-> (HyperParameterTuningJobConfig
-> Maybe ParameterRanges -> HyperParameterTuningJobConfig)
-> Lens
HyperParameterTuningJobConfig
HyperParameterTuningJobConfig
(Maybe ParameterRanges)
(Maybe ParameterRanges)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HyperParameterTuningJobConfig' {Maybe ParameterRanges
parameterRanges :: Maybe ParameterRanges
$sel:parameterRanges:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe ParameterRanges
parameterRanges} -> Maybe ParameterRanges
parameterRanges) (\s :: HyperParameterTuningJobConfig
s@HyperParameterTuningJobConfig' {} Maybe ParameterRanges
a -> HyperParameterTuningJobConfig
s {$sel:parameterRanges:HyperParameterTuningJobConfig' :: Maybe ParameterRanges
parameterRanges = Maybe ParameterRanges
a} :: HyperParameterTuningJobConfig)
instance Core.FromJSON HyperParameterTuningJobConfig where
parseJSON :: Value -> Parser HyperParameterTuningJobConfig
parseJSON =
String
-> (Object -> Parser HyperParameterTuningJobConfig)
-> Value
-> Parser HyperParameterTuningJobConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HyperParameterTuningJobConfig"
( \Object
x ->
Maybe ParameterRanges -> HyperParameterTuningJobConfig
HyperParameterTuningJobConfig'
(Maybe ParameterRanges -> HyperParameterTuningJobConfig)
-> Parser (Maybe ParameterRanges)
-> Parser HyperParameterTuningJobConfig
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ParameterRanges)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ParameterRanges")
)
instance
Prelude.Hashable
HyperParameterTuningJobConfig
instance Prelude.NFData HyperParameterTuningJobConfig
instance Core.ToJSON HyperParameterTuningJobConfig where
toJSON :: HyperParameterTuningJobConfig -> Value
toJSON HyperParameterTuningJobConfig' {Maybe ParameterRanges
parameterRanges :: Maybe ParameterRanges
$sel:parameterRanges:HyperParameterTuningJobConfig' :: HyperParameterTuningJobConfig -> Maybe ParameterRanges
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ParameterRanges" Text -> ParameterRanges -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ParameterRanges -> Pair) -> Maybe ParameterRanges -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ParameterRanges
parameterRanges
]
)