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