{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Personalize.Types.SolutionConfig
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Personalize.Types.SolutionConfig where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Personalize.Types.AutoMLConfig
import Amazonka.Personalize.Types.HPOConfig
import Amazonka.Personalize.Types.OptimizationObjective
import qualified Amazonka.Prelude as Prelude

-- | Describes the configuration properties for the solution.
--
-- /See:/ 'newSolutionConfig' smart constructor.
data SolutionConfig = SolutionConfig'
  { -- | Lists the feature transformation parameters.
    SolutionConfig -> Maybe (HashMap Text Text)
featureTransformationParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Describes the properties for hyperparameter optimization (HPO).
    SolutionConfig -> Maybe HPOConfig
hpoConfig :: Prelude.Maybe HPOConfig,
    -- | Only events with a value greater than or equal to this threshold are
    -- used for training a model.
    SolutionConfig -> Maybe Text
eventValueThreshold :: Prelude.Maybe Prelude.Text,
    -- | The AutoMLConfig object containing a list of recipes to search when
    -- AutoML is performed.
    SolutionConfig -> Maybe AutoMLConfig
autoMLConfig :: Prelude.Maybe AutoMLConfig,
    -- | Lists the hyperparameter names and ranges.
    SolutionConfig -> Maybe (HashMap Text Text)
algorithmHyperParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Describes the additional objective for the solution, such as maximizing
    -- streaming minutes or increasing revenue. For more information see
    -- <https://docs.aws.amazon.com/personalize/latest/dg/optimizing-solution-for-objective.html Optimizing a solution>.
    SolutionConfig -> Maybe OptimizationObjective
optimizationObjective :: Prelude.Maybe OptimizationObjective
  }
  deriving (SolutionConfig -> SolutionConfig -> Bool
(SolutionConfig -> SolutionConfig -> Bool)
-> (SolutionConfig -> SolutionConfig -> Bool) -> Eq SolutionConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SolutionConfig -> SolutionConfig -> Bool
$c/= :: SolutionConfig -> SolutionConfig -> Bool
== :: SolutionConfig -> SolutionConfig -> Bool
$c== :: SolutionConfig -> SolutionConfig -> Bool
Prelude.Eq, ReadPrec [SolutionConfig]
ReadPrec SolutionConfig
Int -> ReadS SolutionConfig
ReadS [SolutionConfig]
(Int -> ReadS SolutionConfig)
-> ReadS [SolutionConfig]
-> ReadPrec SolutionConfig
-> ReadPrec [SolutionConfig]
-> Read SolutionConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SolutionConfig]
$creadListPrec :: ReadPrec [SolutionConfig]
readPrec :: ReadPrec SolutionConfig
$creadPrec :: ReadPrec SolutionConfig
readList :: ReadS [SolutionConfig]
$creadList :: ReadS [SolutionConfig]
readsPrec :: Int -> ReadS SolutionConfig
$creadsPrec :: Int -> ReadS SolutionConfig
Prelude.Read, Int -> SolutionConfig -> ShowS
[SolutionConfig] -> ShowS
SolutionConfig -> String
(Int -> SolutionConfig -> ShowS)
-> (SolutionConfig -> String)
-> ([SolutionConfig] -> ShowS)
-> Show SolutionConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SolutionConfig] -> ShowS
$cshowList :: [SolutionConfig] -> ShowS
show :: SolutionConfig -> String
$cshow :: SolutionConfig -> String
showsPrec :: Int -> SolutionConfig -> ShowS
$cshowsPrec :: Int -> SolutionConfig -> ShowS
Prelude.Show, (forall x. SolutionConfig -> Rep SolutionConfig x)
-> (forall x. Rep SolutionConfig x -> SolutionConfig)
-> Generic SolutionConfig
forall x. Rep SolutionConfig x -> SolutionConfig
forall x. SolutionConfig -> Rep SolutionConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SolutionConfig x -> SolutionConfig
$cfrom :: forall x. SolutionConfig -> Rep SolutionConfig x
Prelude.Generic)

-- |
-- Create a value of 'SolutionConfig' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'featureTransformationParameters', 'solutionConfig_featureTransformationParameters' - Lists the feature transformation parameters.
--
-- 'hpoConfig', 'solutionConfig_hpoConfig' - Describes the properties for hyperparameter optimization (HPO).
--
-- 'eventValueThreshold', 'solutionConfig_eventValueThreshold' - Only events with a value greater than or equal to this threshold are
-- used for training a model.
--
-- 'autoMLConfig', 'solutionConfig_autoMLConfig' - The AutoMLConfig object containing a list of recipes to search when
-- AutoML is performed.
--
-- 'algorithmHyperParameters', 'solutionConfig_algorithmHyperParameters' - Lists the hyperparameter names and ranges.
--
-- 'optimizationObjective', 'solutionConfig_optimizationObjective' - Describes the additional objective for the solution, such as maximizing
-- streaming minutes or increasing revenue. For more information see
-- <https://docs.aws.amazon.com/personalize/latest/dg/optimizing-solution-for-objective.html Optimizing a solution>.
newSolutionConfig ::
  SolutionConfig
newSolutionConfig :: SolutionConfig
newSolutionConfig =
  SolutionConfig' :: Maybe (HashMap Text Text)
-> Maybe HPOConfig
-> Maybe Text
-> Maybe AutoMLConfig
-> Maybe (HashMap Text Text)
-> Maybe OptimizationObjective
-> SolutionConfig
SolutionConfig'
    { $sel:featureTransformationParameters:SolutionConfig' :: Maybe (HashMap Text Text)
featureTransformationParameters =
        Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:hpoConfig:SolutionConfig' :: Maybe HPOConfig
hpoConfig = Maybe HPOConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:eventValueThreshold:SolutionConfig' :: Maybe Text
eventValueThreshold = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoMLConfig:SolutionConfig' :: Maybe AutoMLConfig
autoMLConfig = Maybe AutoMLConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:algorithmHyperParameters:SolutionConfig' :: Maybe (HashMap Text Text)
algorithmHyperParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:optimizationObjective:SolutionConfig' :: Maybe OptimizationObjective
optimizationObjective = Maybe OptimizationObjective
forall a. Maybe a
Prelude.Nothing
    }

-- | Lists the feature transformation parameters.
solutionConfig_featureTransformationParameters :: Lens.Lens' SolutionConfig (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
solutionConfig_featureTransformationParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SolutionConfig -> f SolutionConfig
solutionConfig_featureTransformationParameters = (SolutionConfig -> Maybe (HashMap Text Text))
-> (SolutionConfig -> Maybe (HashMap Text Text) -> SolutionConfig)
-> Lens
     SolutionConfig
     SolutionConfig
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionConfig' {Maybe (HashMap Text Text)
featureTransformationParameters :: Maybe (HashMap Text Text)
$sel:featureTransformationParameters:SolutionConfig' :: SolutionConfig -> Maybe (HashMap Text Text)
featureTransformationParameters} -> Maybe (HashMap Text Text)
featureTransformationParameters) (\s :: SolutionConfig
s@SolutionConfig' {} Maybe (HashMap Text Text)
a -> SolutionConfig
s {$sel:featureTransformationParameters:SolutionConfig' :: Maybe (HashMap Text Text)
featureTransformationParameters = Maybe (HashMap Text Text)
a} :: SolutionConfig) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> SolutionConfig -> f SolutionConfig)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SolutionConfig
-> f SolutionConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Describes the properties for hyperparameter optimization (HPO).
solutionConfig_hpoConfig :: Lens.Lens' SolutionConfig (Prelude.Maybe HPOConfig)
solutionConfig_hpoConfig :: (Maybe HPOConfig -> f (Maybe HPOConfig))
-> SolutionConfig -> f SolutionConfig
solutionConfig_hpoConfig = (SolutionConfig -> Maybe HPOConfig)
-> (SolutionConfig -> Maybe HPOConfig -> SolutionConfig)
-> Lens
     SolutionConfig SolutionConfig (Maybe HPOConfig) (Maybe HPOConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionConfig' {Maybe HPOConfig
hpoConfig :: Maybe HPOConfig
$sel:hpoConfig:SolutionConfig' :: SolutionConfig -> Maybe HPOConfig
hpoConfig} -> Maybe HPOConfig
hpoConfig) (\s :: SolutionConfig
s@SolutionConfig' {} Maybe HPOConfig
a -> SolutionConfig
s {$sel:hpoConfig:SolutionConfig' :: Maybe HPOConfig
hpoConfig = Maybe HPOConfig
a} :: SolutionConfig)

-- | Only events with a value greater than or equal to this threshold are
-- used for training a model.
solutionConfig_eventValueThreshold :: Lens.Lens' SolutionConfig (Prelude.Maybe Prelude.Text)
solutionConfig_eventValueThreshold :: (Maybe Text -> f (Maybe Text))
-> SolutionConfig -> f SolutionConfig
solutionConfig_eventValueThreshold = (SolutionConfig -> Maybe Text)
-> (SolutionConfig -> Maybe Text -> SolutionConfig)
-> Lens SolutionConfig SolutionConfig (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionConfig' {Maybe Text
eventValueThreshold :: Maybe Text
$sel:eventValueThreshold:SolutionConfig' :: SolutionConfig -> Maybe Text
eventValueThreshold} -> Maybe Text
eventValueThreshold) (\s :: SolutionConfig
s@SolutionConfig' {} Maybe Text
a -> SolutionConfig
s {$sel:eventValueThreshold:SolutionConfig' :: Maybe Text
eventValueThreshold = Maybe Text
a} :: SolutionConfig)

-- | The AutoMLConfig object containing a list of recipes to search when
-- AutoML is performed.
solutionConfig_autoMLConfig :: Lens.Lens' SolutionConfig (Prelude.Maybe AutoMLConfig)
solutionConfig_autoMLConfig :: (Maybe AutoMLConfig -> f (Maybe AutoMLConfig))
-> SolutionConfig -> f SolutionConfig
solutionConfig_autoMLConfig = (SolutionConfig -> Maybe AutoMLConfig)
-> (SolutionConfig -> Maybe AutoMLConfig -> SolutionConfig)
-> Lens
     SolutionConfig
     SolutionConfig
     (Maybe AutoMLConfig)
     (Maybe AutoMLConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionConfig' {Maybe AutoMLConfig
autoMLConfig :: Maybe AutoMLConfig
$sel:autoMLConfig:SolutionConfig' :: SolutionConfig -> Maybe AutoMLConfig
autoMLConfig} -> Maybe AutoMLConfig
autoMLConfig) (\s :: SolutionConfig
s@SolutionConfig' {} Maybe AutoMLConfig
a -> SolutionConfig
s {$sel:autoMLConfig:SolutionConfig' :: Maybe AutoMLConfig
autoMLConfig = Maybe AutoMLConfig
a} :: SolutionConfig)

-- | Lists the hyperparameter names and ranges.
solutionConfig_algorithmHyperParameters :: Lens.Lens' SolutionConfig (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
solutionConfig_algorithmHyperParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SolutionConfig -> f SolutionConfig
solutionConfig_algorithmHyperParameters = (SolutionConfig -> Maybe (HashMap Text Text))
-> (SolutionConfig -> Maybe (HashMap Text Text) -> SolutionConfig)
-> Lens
     SolutionConfig
     SolutionConfig
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionConfig' {Maybe (HashMap Text Text)
algorithmHyperParameters :: Maybe (HashMap Text Text)
$sel:algorithmHyperParameters:SolutionConfig' :: SolutionConfig -> Maybe (HashMap Text Text)
algorithmHyperParameters} -> Maybe (HashMap Text Text)
algorithmHyperParameters) (\s :: SolutionConfig
s@SolutionConfig' {} Maybe (HashMap Text Text)
a -> SolutionConfig
s {$sel:algorithmHyperParameters:SolutionConfig' :: Maybe (HashMap Text Text)
algorithmHyperParameters = Maybe (HashMap Text Text)
a} :: SolutionConfig) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> SolutionConfig -> f SolutionConfig)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SolutionConfig
-> f SolutionConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Describes the additional objective for the solution, such as maximizing
-- streaming minutes or increasing revenue. For more information see
-- <https://docs.aws.amazon.com/personalize/latest/dg/optimizing-solution-for-objective.html Optimizing a solution>.
solutionConfig_optimizationObjective :: Lens.Lens' SolutionConfig (Prelude.Maybe OptimizationObjective)
solutionConfig_optimizationObjective :: (Maybe OptimizationObjective -> f (Maybe OptimizationObjective))
-> SolutionConfig -> f SolutionConfig
solutionConfig_optimizationObjective = (SolutionConfig -> Maybe OptimizationObjective)
-> (SolutionConfig
    -> Maybe OptimizationObjective -> SolutionConfig)
-> Lens
     SolutionConfig
     SolutionConfig
     (Maybe OptimizationObjective)
     (Maybe OptimizationObjective)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionConfig' {Maybe OptimizationObjective
optimizationObjective :: Maybe OptimizationObjective
$sel:optimizationObjective:SolutionConfig' :: SolutionConfig -> Maybe OptimizationObjective
optimizationObjective} -> Maybe OptimizationObjective
optimizationObjective) (\s :: SolutionConfig
s@SolutionConfig' {} Maybe OptimizationObjective
a -> SolutionConfig
s {$sel:optimizationObjective:SolutionConfig' :: Maybe OptimizationObjective
optimizationObjective = Maybe OptimizationObjective
a} :: SolutionConfig)

instance Core.FromJSON SolutionConfig where
  parseJSON :: Value -> Parser SolutionConfig
parseJSON =
    String
-> (Object -> Parser SolutionConfig)
-> Value
-> Parser SolutionConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SolutionConfig"
      ( \Object
x ->
          Maybe (HashMap Text Text)
-> Maybe HPOConfig
-> Maybe Text
-> Maybe AutoMLConfig
-> Maybe (HashMap Text Text)
-> Maybe OptimizationObjective
-> SolutionConfig
SolutionConfig'
            (Maybe (HashMap Text Text)
 -> Maybe HPOConfig
 -> Maybe Text
 -> Maybe AutoMLConfig
 -> Maybe (HashMap Text Text)
 -> Maybe OptimizationObjective
 -> SolutionConfig)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe HPOConfig
      -> Maybe Text
      -> Maybe AutoMLConfig
      -> Maybe (HashMap Text Text)
      -> Maybe OptimizationObjective
      -> SolutionConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"featureTransformationParameters"
                            Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe HPOConfig
   -> Maybe Text
   -> Maybe AutoMLConfig
   -> Maybe (HashMap Text Text)
   -> Maybe OptimizationObjective
   -> SolutionConfig)
-> Parser (Maybe HPOConfig)
-> Parser
     (Maybe Text
      -> Maybe AutoMLConfig
      -> Maybe (HashMap Text Text)
      -> Maybe OptimizationObjective
      -> SolutionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HPOConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hpoConfig")
            Parser
  (Maybe Text
   -> Maybe AutoMLConfig
   -> Maybe (HashMap Text Text)
   -> Maybe OptimizationObjective
   -> SolutionConfig)
-> Parser (Maybe Text)
-> Parser
     (Maybe AutoMLConfig
      -> Maybe (HashMap Text Text)
      -> Maybe OptimizationObjective
      -> SolutionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"eventValueThreshold")
            Parser
  (Maybe AutoMLConfig
   -> Maybe (HashMap Text Text)
   -> Maybe OptimizationObjective
   -> SolutionConfig)
-> Parser (Maybe AutoMLConfig)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe OptimizationObjective -> SolutionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AutoMLConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"autoMLConfig")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe OptimizationObjective -> SolutionConfig)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe OptimizationObjective -> SolutionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"algorithmHyperParameters"
                            Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe OptimizationObjective -> SolutionConfig)
-> Parser (Maybe OptimizationObjective) -> Parser SolutionConfig
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OptimizationObjective)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"optimizationObjective")
      )

instance Prelude.Hashable SolutionConfig

instance Prelude.NFData SolutionConfig

instance Core.ToJSON SolutionConfig where
  toJSON :: SolutionConfig -> Value
toJSON SolutionConfig' {Maybe Text
Maybe (HashMap Text Text)
Maybe AutoMLConfig
Maybe HPOConfig
Maybe OptimizationObjective
optimizationObjective :: Maybe OptimizationObjective
algorithmHyperParameters :: Maybe (HashMap Text Text)
autoMLConfig :: Maybe AutoMLConfig
eventValueThreshold :: Maybe Text
hpoConfig :: Maybe HPOConfig
featureTransformationParameters :: Maybe (HashMap Text Text)
$sel:optimizationObjective:SolutionConfig' :: SolutionConfig -> Maybe OptimizationObjective
$sel:algorithmHyperParameters:SolutionConfig' :: SolutionConfig -> Maybe (HashMap Text Text)
$sel:autoMLConfig:SolutionConfig' :: SolutionConfig -> Maybe AutoMLConfig
$sel:eventValueThreshold:SolutionConfig' :: SolutionConfig -> Maybe Text
$sel:hpoConfig:SolutionConfig' :: SolutionConfig -> Maybe HPOConfig
$sel:featureTransformationParameters:SolutionConfig' :: SolutionConfig -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"featureTransformationParameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
featureTransformationParameters,
            (Text
"hpoConfig" Text -> HPOConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HPOConfig -> Pair) -> Maybe HPOConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HPOConfig
hpoConfig,
            (Text
"eventValueThreshold" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
eventValueThreshold,
            (Text
"autoMLConfig" Text -> AutoMLConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AutoMLConfig -> Pair) -> Maybe AutoMLConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoMLConfig
autoMLConfig,
            (Text
"algorithmHyperParameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
algorithmHyperParameters,
            (Text
"optimizationObjective" Text -> OptimizationObjective -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (OptimizationObjective -> Pair)
-> Maybe OptimizationObjective -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OptimizationObjective
optimizationObjective
          ]
      )