{-# 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.Solution
-- 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.Solution where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Personalize.Types.AutoMLResult
import Amazonka.Personalize.Types.SolutionConfig
import Amazonka.Personalize.Types.SolutionVersionSummary
import qualified Amazonka.Prelude as Prelude

-- | An object that provides information about a solution. A solution is a
-- trained model that can be deployed as a campaign.
--
-- /See:/ 'newSolution' smart constructor.
data Solution = Solution'
  { -- | The ARN of the solution.
    Solution -> Maybe Text
solutionArn :: Prelude.Maybe Prelude.Text,
    -- | The status of the solution.
    --
    -- A solution can be in one of the following states:
    --
    -- -   CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
    --
    -- -   DELETE PENDING > DELETE IN_PROGRESS
    Solution -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | When true, Amazon Personalize performs a search for the best
    -- USER_PERSONALIZATION recipe from the list specified in the solution
    -- configuration (@recipeArn@ must not be specified). When false (the
    -- default), Amazon Personalize uses @recipeArn@ for training.
    Solution -> Maybe Bool
performAutoML :: Prelude.Maybe Prelude.Bool,
    -- | The ARN of the recipe used to create the solution.
    Solution -> Maybe Text
recipeArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time (in Unix time) that the solution was last updated.
    Solution -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
    -- | The event type (for example, \'click\' or \'like\') that is used for
    -- training the model. If no @eventType@ is provided, Amazon Personalize
    -- uses all interactions for training with equal weight regardless of type.
    Solution -> Maybe Text
eventType :: Prelude.Maybe Prelude.Text,
    -- | The name of the solution.
    Solution -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | When @performAutoML@ is true, specifies the best recipe found.
    Solution -> Maybe AutoMLResult
autoMLResult :: Prelude.Maybe AutoMLResult,
    -- | The creation date and time (in Unix time) of the solution.
    Solution -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the dataset group that provides the
    -- training data.
    Solution -> Maybe Text
datasetGroupArn :: Prelude.Maybe Prelude.Text,
    -- | Describes the latest version of the solution, including the status and
    -- the ARN.
    Solution -> Maybe SolutionVersionSummary
latestSolutionVersion :: Prelude.Maybe SolutionVersionSummary,
    -- | Describes the configuration properties for the solution.
    Solution -> Maybe SolutionConfig
solutionConfig :: Prelude.Maybe SolutionConfig,
    -- | Whether to perform hyperparameter optimization (HPO) on the chosen
    -- recipe. The default is @false@.
    Solution -> Maybe Bool
performHPO :: Prelude.Maybe Prelude.Bool
  }
  deriving (Solution -> Solution -> Bool
(Solution -> Solution -> Bool)
-> (Solution -> Solution -> Bool) -> Eq Solution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Solution -> Solution -> Bool
$c/= :: Solution -> Solution -> Bool
== :: Solution -> Solution -> Bool
$c== :: Solution -> Solution -> Bool
Prelude.Eq, ReadPrec [Solution]
ReadPrec Solution
Int -> ReadS Solution
ReadS [Solution]
(Int -> ReadS Solution)
-> ReadS [Solution]
-> ReadPrec Solution
-> ReadPrec [Solution]
-> Read Solution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Solution]
$creadListPrec :: ReadPrec [Solution]
readPrec :: ReadPrec Solution
$creadPrec :: ReadPrec Solution
readList :: ReadS [Solution]
$creadList :: ReadS [Solution]
readsPrec :: Int -> ReadS Solution
$creadsPrec :: Int -> ReadS Solution
Prelude.Read, Int -> Solution -> ShowS
[Solution] -> ShowS
Solution -> String
(Int -> Solution -> ShowS)
-> (Solution -> String) -> ([Solution] -> ShowS) -> Show Solution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Solution] -> ShowS
$cshowList :: [Solution] -> ShowS
show :: Solution -> String
$cshow :: Solution -> String
showsPrec :: Int -> Solution -> ShowS
$cshowsPrec :: Int -> Solution -> ShowS
Prelude.Show, (forall x. Solution -> Rep Solution x)
-> (forall x. Rep Solution x -> Solution) -> Generic Solution
forall x. Rep Solution x -> Solution
forall x. Solution -> Rep Solution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Solution x -> Solution
$cfrom :: forall x. Solution -> Rep Solution x
Prelude.Generic)

-- |
-- Create a value of 'Solution' 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:
--
-- 'solutionArn', 'solution_solutionArn' - The ARN of the solution.
--
-- 'status', 'solution_status' - The status of the solution.
--
-- A solution can be in one of the following states:
--
-- -   CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
--
-- -   DELETE PENDING > DELETE IN_PROGRESS
--
-- 'performAutoML', 'solution_performAutoML' - When true, Amazon Personalize performs a search for the best
-- USER_PERSONALIZATION recipe from the list specified in the solution
-- configuration (@recipeArn@ must not be specified). When false (the
-- default), Amazon Personalize uses @recipeArn@ for training.
--
-- 'recipeArn', 'solution_recipeArn' - The ARN of the recipe used to create the solution.
--
-- 'lastUpdatedDateTime', 'solution_lastUpdatedDateTime' - The date and time (in Unix time) that the solution was last updated.
--
-- 'eventType', 'solution_eventType' - The event type (for example, \'click\' or \'like\') that is used for
-- training the model. If no @eventType@ is provided, Amazon Personalize
-- uses all interactions for training with equal weight regardless of type.
--
-- 'name', 'solution_name' - The name of the solution.
--
-- 'autoMLResult', 'solution_autoMLResult' - When @performAutoML@ is true, specifies the best recipe found.
--
-- 'creationDateTime', 'solution_creationDateTime' - The creation date and time (in Unix time) of the solution.
--
-- 'datasetGroupArn', 'solution_datasetGroupArn' - The Amazon Resource Name (ARN) of the dataset group that provides the
-- training data.
--
-- 'latestSolutionVersion', 'solution_latestSolutionVersion' - Describes the latest version of the solution, including the status and
-- the ARN.
--
-- 'solutionConfig', 'solution_solutionConfig' - Describes the configuration properties for the solution.
--
-- 'performHPO', 'solution_performHPO' - Whether to perform hyperparameter optimization (HPO) on the chosen
-- recipe. The default is @false@.
newSolution ::
  Solution
newSolution :: Solution
newSolution =
  Solution' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe AutoMLResult
-> Maybe POSIX
-> Maybe Text
-> Maybe SolutionVersionSummary
-> Maybe SolutionConfig
-> Maybe Bool
-> Solution
Solution'
    { $sel:solutionArn:Solution' :: Maybe Text
solutionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:Solution' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:performAutoML:Solution' :: Maybe Bool
performAutoML = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:recipeArn:Solution' :: Maybe Text
recipeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDateTime:Solution' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:eventType:Solution' :: Maybe Text
eventType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Solution' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoMLResult:Solution' :: Maybe AutoMLResult
autoMLResult = Maybe AutoMLResult
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:Solution' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetGroupArn:Solution' :: Maybe Text
datasetGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latestSolutionVersion:Solution' :: Maybe SolutionVersionSummary
latestSolutionVersion = Maybe SolutionVersionSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:solutionConfig:Solution' :: Maybe SolutionConfig
solutionConfig = Maybe SolutionConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:performHPO:Solution' :: Maybe Bool
performHPO = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the solution.
solution_solutionArn :: Lens.Lens' Solution (Prelude.Maybe Prelude.Text)
solution_solutionArn :: (Maybe Text -> f (Maybe Text)) -> Solution -> f Solution
solution_solutionArn = (Solution -> Maybe Text)
-> (Solution -> Maybe Text -> Solution)
-> Lens Solution Solution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe Text
solutionArn :: Maybe Text
$sel:solutionArn:Solution' :: Solution -> Maybe Text
solutionArn} -> Maybe Text
solutionArn) (\s :: Solution
s@Solution' {} Maybe Text
a -> Solution
s {$sel:solutionArn:Solution' :: Maybe Text
solutionArn = Maybe Text
a} :: Solution)

-- | The status of the solution.
--
-- A solution can be in one of the following states:
--
-- -   CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
--
-- -   DELETE PENDING > DELETE IN_PROGRESS
solution_status :: Lens.Lens' Solution (Prelude.Maybe Prelude.Text)
solution_status :: (Maybe Text -> f (Maybe Text)) -> Solution -> f Solution
solution_status = (Solution -> Maybe Text)
-> (Solution -> Maybe Text -> Solution)
-> Lens Solution Solution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe Text
status :: Maybe Text
$sel:status:Solution' :: Solution -> Maybe Text
status} -> Maybe Text
status) (\s :: Solution
s@Solution' {} Maybe Text
a -> Solution
s {$sel:status:Solution' :: Maybe Text
status = Maybe Text
a} :: Solution)

-- | When true, Amazon Personalize performs a search for the best
-- USER_PERSONALIZATION recipe from the list specified in the solution
-- configuration (@recipeArn@ must not be specified). When false (the
-- default), Amazon Personalize uses @recipeArn@ for training.
solution_performAutoML :: Lens.Lens' Solution (Prelude.Maybe Prelude.Bool)
solution_performAutoML :: (Maybe Bool -> f (Maybe Bool)) -> Solution -> f Solution
solution_performAutoML = (Solution -> Maybe Bool)
-> (Solution -> Maybe Bool -> Solution)
-> Lens Solution Solution (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe Bool
performAutoML :: Maybe Bool
$sel:performAutoML:Solution' :: Solution -> Maybe Bool
performAutoML} -> Maybe Bool
performAutoML) (\s :: Solution
s@Solution' {} Maybe Bool
a -> Solution
s {$sel:performAutoML:Solution' :: Maybe Bool
performAutoML = Maybe Bool
a} :: Solution)

-- | The ARN of the recipe used to create the solution.
solution_recipeArn :: Lens.Lens' Solution (Prelude.Maybe Prelude.Text)
solution_recipeArn :: (Maybe Text -> f (Maybe Text)) -> Solution -> f Solution
solution_recipeArn = (Solution -> Maybe Text)
-> (Solution -> Maybe Text -> Solution)
-> Lens Solution Solution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe Text
recipeArn :: Maybe Text
$sel:recipeArn:Solution' :: Solution -> Maybe Text
recipeArn} -> Maybe Text
recipeArn) (\s :: Solution
s@Solution' {} Maybe Text
a -> Solution
s {$sel:recipeArn:Solution' :: Maybe Text
recipeArn = Maybe Text
a} :: Solution)

-- | The date and time (in Unix time) that the solution was last updated.
solution_lastUpdatedDateTime :: Lens.Lens' Solution (Prelude.Maybe Prelude.UTCTime)
solution_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Solution -> f Solution
solution_lastUpdatedDateTime = (Solution -> Maybe POSIX)
-> (Solution -> Maybe POSIX -> Solution)
-> Lens Solution Solution (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:Solution' :: Solution -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: Solution
s@Solution' {} Maybe POSIX
a -> Solution
s {$sel:lastUpdatedDateTime:Solution' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: Solution) ((Maybe POSIX -> f (Maybe POSIX)) -> Solution -> f Solution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Solution
-> f Solution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The event type (for example, \'click\' or \'like\') that is used for
-- training the model. If no @eventType@ is provided, Amazon Personalize
-- uses all interactions for training with equal weight regardless of type.
solution_eventType :: Lens.Lens' Solution (Prelude.Maybe Prelude.Text)
solution_eventType :: (Maybe Text -> f (Maybe Text)) -> Solution -> f Solution
solution_eventType = (Solution -> Maybe Text)
-> (Solution -> Maybe Text -> Solution)
-> Lens Solution Solution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe Text
eventType :: Maybe Text
$sel:eventType:Solution' :: Solution -> Maybe Text
eventType} -> Maybe Text
eventType) (\s :: Solution
s@Solution' {} Maybe Text
a -> Solution
s {$sel:eventType:Solution' :: Maybe Text
eventType = Maybe Text
a} :: Solution)

-- | The name of the solution.
solution_name :: Lens.Lens' Solution (Prelude.Maybe Prelude.Text)
solution_name :: (Maybe Text -> f (Maybe Text)) -> Solution -> f Solution
solution_name = (Solution -> Maybe Text)
-> (Solution -> Maybe Text -> Solution)
-> Lens Solution Solution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe Text
name :: Maybe Text
$sel:name:Solution' :: Solution -> Maybe Text
name} -> Maybe Text
name) (\s :: Solution
s@Solution' {} Maybe Text
a -> Solution
s {$sel:name:Solution' :: Maybe Text
name = Maybe Text
a} :: Solution)

-- | When @performAutoML@ is true, specifies the best recipe found.
solution_autoMLResult :: Lens.Lens' Solution (Prelude.Maybe AutoMLResult)
solution_autoMLResult :: (Maybe AutoMLResult -> f (Maybe AutoMLResult))
-> Solution -> f Solution
solution_autoMLResult = (Solution -> Maybe AutoMLResult)
-> (Solution -> Maybe AutoMLResult -> Solution)
-> Lens Solution Solution (Maybe AutoMLResult) (Maybe AutoMLResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe AutoMLResult
autoMLResult :: Maybe AutoMLResult
$sel:autoMLResult:Solution' :: Solution -> Maybe AutoMLResult
autoMLResult} -> Maybe AutoMLResult
autoMLResult) (\s :: Solution
s@Solution' {} Maybe AutoMLResult
a -> Solution
s {$sel:autoMLResult:Solution' :: Maybe AutoMLResult
autoMLResult = Maybe AutoMLResult
a} :: Solution)

-- | The creation date and time (in Unix time) of the solution.
solution_creationDateTime :: Lens.Lens' Solution (Prelude.Maybe Prelude.UTCTime)
solution_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Solution -> f Solution
solution_creationDateTime = (Solution -> Maybe POSIX)
-> (Solution -> Maybe POSIX -> Solution)
-> Lens Solution Solution (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:Solution' :: Solution -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: Solution
s@Solution' {} Maybe POSIX
a -> Solution
s {$sel:creationDateTime:Solution' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: Solution) ((Maybe POSIX -> f (Maybe POSIX)) -> Solution -> f Solution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Solution
-> f Solution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Amazon Resource Name (ARN) of the dataset group that provides the
-- training data.
solution_datasetGroupArn :: Lens.Lens' Solution (Prelude.Maybe Prelude.Text)
solution_datasetGroupArn :: (Maybe Text -> f (Maybe Text)) -> Solution -> f Solution
solution_datasetGroupArn = (Solution -> Maybe Text)
-> (Solution -> Maybe Text -> Solution)
-> Lens Solution Solution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe Text
datasetGroupArn :: Maybe Text
$sel:datasetGroupArn:Solution' :: Solution -> Maybe Text
datasetGroupArn} -> Maybe Text
datasetGroupArn) (\s :: Solution
s@Solution' {} Maybe Text
a -> Solution
s {$sel:datasetGroupArn:Solution' :: Maybe Text
datasetGroupArn = Maybe Text
a} :: Solution)

-- | Describes the latest version of the solution, including the status and
-- the ARN.
solution_latestSolutionVersion :: Lens.Lens' Solution (Prelude.Maybe SolutionVersionSummary)
solution_latestSolutionVersion :: (Maybe SolutionVersionSummary -> f (Maybe SolutionVersionSummary))
-> Solution -> f Solution
solution_latestSolutionVersion = (Solution -> Maybe SolutionVersionSummary)
-> (Solution -> Maybe SolutionVersionSummary -> Solution)
-> Lens
     Solution
     Solution
     (Maybe SolutionVersionSummary)
     (Maybe SolutionVersionSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe SolutionVersionSummary
latestSolutionVersion :: Maybe SolutionVersionSummary
$sel:latestSolutionVersion:Solution' :: Solution -> Maybe SolutionVersionSummary
latestSolutionVersion} -> Maybe SolutionVersionSummary
latestSolutionVersion) (\s :: Solution
s@Solution' {} Maybe SolutionVersionSummary
a -> Solution
s {$sel:latestSolutionVersion:Solution' :: Maybe SolutionVersionSummary
latestSolutionVersion = Maybe SolutionVersionSummary
a} :: Solution)

-- | Describes the configuration properties for the solution.
solution_solutionConfig :: Lens.Lens' Solution (Prelude.Maybe SolutionConfig)
solution_solutionConfig :: (Maybe SolutionConfig -> f (Maybe SolutionConfig))
-> Solution -> f Solution
solution_solutionConfig = (Solution -> Maybe SolutionConfig)
-> (Solution -> Maybe SolutionConfig -> Solution)
-> Lens
     Solution Solution (Maybe SolutionConfig) (Maybe SolutionConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe SolutionConfig
solutionConfig :: Maybe SolutionConfig
$sel:solutionConfig:Solution' :: Solution -> Maybe SolutionConfig
solutionConfig} -> Maybe SolutionConfig
solutionConfig) (\s :: Solution
s@Solution' {} Maybe SolutionConfig
a -> Solution
s {$sel:solutionConfig:Solution' :: Maybe SolutionConfig
solutionConfig = Maybe SolutionConfig
a} :: Solution)

-- | Whether to perform hyperparameter optimization (HPO) on the chosen
-- recipe. The default is @false@.
solution_performHPO :: Lens.Lens' Solution (Prelude.Maybe Prelude.Bool)
solution_performHPO :: (Maybe Bool -> f (Maybe Bool)) -> Solution -> f Solution
solution_performHPO = (Solution -> Maybe Bool)
-> (Solution -> Maybe Bool -> Solution)
-> Lens Solution Solution (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Solution' {Maybe Bool
performHPO :: Maybe Bool
$sel:performHPO:Solution' :: Solution -> Maybe Bool
performHPO} -> Maybe Bool
performHPO) (\s :: Solution
s@Solution' {} Maybe Bool
a -> Solution
s {$sel:performHPO:Solution' :: Maybe Bool
performHPO = Maybe Bool
a} :: Solution)

instance Core.FromJSON Solution where
  parseJSON :: Value -> Parser Solution
parseJSON =
    String -> (Object -> Parser Solution) -> Value -> Parser Solution
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Solution"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe AutoMLResult
-> Maybe POSIX
-> Maybe Text
-> Maybe SolutionVersionSummary
-> Maybe SolutionConfig
-> Maybe Bool
-> Solution
Solution'
            (Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe AutoMLResult
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe SolutionVersionSummary
 -> Maybe SolutionConfig
 -> Maybe Bool
 -> Solution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe AutoMLResult
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe SolutionVersionSummary
      -> Maybe SolutionConfig
      -> Maybe Bool
      -> Solution)
forall (f :: * -> *) a b. Functor 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
"solutionArn")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe AutoMLResult
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe SolutionVersionSummary
   -> Maybe SolutionConfig
   -> Maybe Bool
   -> Solution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe AutoMLResult
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe SolutionVersionSummary
      -> Maybe SolutionConfig
      -> Maybe Bool
      -> Solution)
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
"status")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe AutoMLResult
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe SolutionVersionSummary
   -> Maybe SolutionConfig
   -> Maybe Bool
   -> Solution)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe AutoMLResult
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe SolutionVersionSummary
      -> Maybe SolutionConfig
      -> Maybe Bool
      -> Solution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"performAutoML")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe AutoMLResult
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe SolutionVersionSummary
   -> Maybe SolutionConfig
   -> Maybe Bool
   -> Solution)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe AutoMLResult
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe SolutionVersionSummary
      -> Maybe SolutionConfig
      -> Maybe Bool
      -> Solution)
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
"recipeArn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe AutoMLResult
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe SolutionVersionSummary
   -> Maybe SolutionConfig
   -> Maybe Bool
   -> Solution)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe AutoMLResult
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe SolutionVersionSummary
      -> Maybe SolutionConfig
      -> Maybe Bool
      -> Solution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedDateTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe AutoMLResult
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe SolutionVersionSummary
   -> Maybe SolutionConfig
   -> Maybe Bool
   -> Solution)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AutoMLResult
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe SolutionVersionSummary
      -> Maybe SolutionConfig
      -> Maybe Bool
      -> Solution)
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
"eventType")
            Parser
  (Maybe Text
   -> Maybe AutoMLResult
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe SolutionVersionSummary
   -> Maybe SolutionConfig
   -> Maybe Bool
   -> Solution)
-> Parser (Maybe Text)
-> Parser
     (Maybe AutoMLResult
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe SolutionVersionSummary
      -> Maybe SolutionConfig
      -> Maybe Bool
      -> Solution)
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
"name")
            Parser
  (Maybe AutoMLResult
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe SolutionVersionSummary
   -> Maybe SolutionConfig
   -> Maybe Bool
   -> Solution)
-> Parser (Maybe AutoMLResult)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe SolutionVersionSummary
      -> Maybe SolutionConfig
      -> Maybe Bool
      -> Solution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AutoMLResult)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"autoMLResult")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe SolutionVersionSummary
   -> Maybe SolutionConfig
   -> Maybe Bool
   -> Solution)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe SolutionVersionSummary
      -> Maybe SolutionConfig
      -> Maybe Bool
      -> Solution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationDateTime")
            Parser
  (Maybe Text
   -> Maybe SolutionVersionSummary
   -> Maybe SolutionConfig
   -> Maybe Bool
   -> Solution)
-> Parser (Maybe Text)
-> Parser
     (Maybe SolutionVersionSummary
      -> Maybe SolutionConfig -> Maybe Bool -> Solution)
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
"datasetGroupArn")
            Parser
  (Maybe SolutionVersionSummary
   -> Maybe SolutionConfig -> Maybe Bool -> Solution)
-> Parser (Maybe SolutionVersionSummary)
-> Parser (Maybe SolutionConfig -> Maybe Bool -> Solution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SolutionVersionSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"latestSolutionVersion")
            Parser (Maybe SolutionConfig -> Maybe Bool -> Solution)
-> Parser (Maybe SolutionConfig) -> Parser (Maybe Bool -> Solution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SolutionConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"solutionConfig")
            Parser (Maybe Bool -> Solution)
-> Parser (Maybe Bool) -> Parser Solution
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"performHPO")
      )

instance Prelude.Hashable Solution

instance Prelude.NFData Solution