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