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