{-# 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.Personalize.Types.AutoMLResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AutoMLResult = AutoMLResult'
{
AutoMLResult -> Maybe Text
bestRecipeArn :: Prelude.Maybe Prelude.Text
}
deriving (AutoMLResult -> AutoMLResult -> Bool
(AutoMLResult -> AutoMLResult -> Bool)
-> (AutoMLResult -> AutoMLResult -> Bool) -> Eq AutoMLResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoMLResult -> AutoMLResult -> Bool
$c/= :: AutoMLResult -> AutoMLResult -> Bool
== :: AutoMLResult -> AutoMLResult -> Bool
$c== :: AutoMLResult -> AutoMLResult -> Bool
Prelude.Eq, ReadPrec [AutoMLResult]
ReadPrec AutoMLResult
Int -> ReadS AutoMLResult
ReadS [AutoMLResult]
(Int -> ReadS AutoMLResult)
-> ReadS [AutoMLResult]
-> ReadPrec AutoMLResult
-> ReadPrec [AutoMLResult]
-> Read AutoMLResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoMLResult]
$creadListPrec :: ReadPrec [AutoMLResult]
readPrec :: ReadPrec AutoMLResult
$creadPrec :: ReadPrec AutoMLResult
readList :: ReadS [AutoMLResult]
$creadList :: ReadS [AutoMLResult]
readsPrec :: Int -> ReadS AutoMLResult
$creadsPrec :: Int -> ReadS AutoMLResult
Prelude.Read, Int -> AutoMLResult -> ShowS
[AutoMLResult] -> ShowS
AutoMLResult -> String
(Int -> AutoMLResult -> ShowS)
-> (AutoMLResult -> String)
-> ([AutoMLResult] -> ShowS)
-> Show AutoMLResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoMLResult] -> ShowS
$cshowList :: [AutoMLResult] -> ShowS
show :: AutoMLResult -> String
$cshow :: AutoMLResult -> String
showsPrec :: Int -> AutoMLResult -> ShowS
$cshowsPrec :: Int -> AutoMLResult -> ShowS
Prelude.Show, (forall x. AutoMLResult -> Rep AutoMLResult x)
-> (forall x. Rep AutoMLResult x -> AutoMLResult)
-> Generic AutoMLResult
forall x. Rep AutoMLResult x -> AutoMLResult
forall x. AutoMLResult -> Rep AutoMLResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutoMLResult x -> AutoMLResult
$cfrom :: forall x. AutoMLResult -> Rep AutoMLResult x
Prelude.Generic)
newAutoMLResult ::
AutoMLResult
newAutoMLResult :: AutoMLResult
newAutoMLResult =
AutoMLResult' :: Maybe Text -> AutoMLResult
AutoMLResult' {$sel:bestRecipeArn:AutoMLResult' :: Maybe Text
bestRecipeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing}
autoMLResult_bestRecipeArn :: Lens.Lens' AutoMLResult (Prelude.Maybe Prelude.Text)
autoMLResult_bestRecipeArn :: (Maybe Text -> f (Maybe Text)) -> AutoMLResult -> f AutoMLResult
autoMLResult_bestRecipeArn = (AutoMLResult -> Maybe Text)
-> (AutoMLResult -> Maybe Text -> AutoMLResult)
-> Lens AutoMLResult AutoMLResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLResult' {Maybe Text
bestRecipeArn :: Maybe Text
$sel:bestRecipeArn:AutoMLResult' :: AutoMLResult -> Maybe Text
bestRecipeArn} -> Maybe Text
bestRecipeArn) (\s :: AutoMLResult
s@AutoMLResult' {} Maybe Text
a -> AutoMLResult
s {$sel:bestRecipeArn:AutoMLResult' :: Maybe Text
bestRecipeArn = Maybe Text
a} :: AutoMLResult)
instance Core.FromJSON AutoMLResult where
parseJSON :: Value -> Parser AutoMLResult
parseJSON =
String
-> (Object -> Parser AutoMLResult) -> Value -> Parser AutoMLResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AutoMLResult"
( \Object
x ->
Maybe Text -> AutoMLResult
AutoMLResult'
(Maybe Text -> AutoMLResult)
-> Parser (Maybe Text) -> Parser AutoMLResult
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
"bestRecipeArn")
)
instance Prelude.Hashable AutoMLResult
instance Prelude.NFData AutoMLResult