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