{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SageMaker.CreateLabelingJob
(
CreateLabelingJob (..),
newCreateLabelingJob,
createLabelingJob_labelCategoryConfigS3Uri,
createLabelingJob_labelingJobAlgorithmsConfig,
createLabelingJob_stoppingConditions,
createLabelingJob_tags,
createLabelingJob_labelingJobName,
createLabelingJob_labelAttributeName,
createLabelingJob_inputConfig,
createLabelingJob_outputConfig,
createLabelingJob_roleArn,
createLabelingJob_humanTaskConfig,
CreateLabelingJobResponse (..),
newCreateLabelingJobResponse,
createLabelingJobResponse_httpStatus,
createLabelingJobResponse_labelingJobArn,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types
data CreateLabelingJob = CreateLabelingJob'
{
CreateLabelingJob -> Maybe Text
labelCategoryConfigS3Uri :: Prelude.Maybe Prelude.Text,
CreateLabelingJob -> Maybe LabelingJobAlgorithmsConfig
labelingJobAlgorithmsConfig :: Prelude.Maybe LabelingJobAlgorithmsConfig,
CreateLabelingJob -> Maybe LabelingJobStoppingConditions
stoppingConditions :: Prelude.Maybe LabelingJobStoppingConditions,
CreateLabelingJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateLabelingJob -> Text
labelingJobName :: Prelude.Text,
CreateLabelingJob -> Text
labelAttributeName :: Prelude.Text,
CreateLabelingJob -> LabelingJobInputConfig
inputConfig :: LabelingJobInputConfig,
CreateLabelingJob -> LabelingJobOutputConfig
outputConfig :: LabelingJobOutputConfig,
CreateLabelingJob -> Text
roleArn :: Prelude.Text,
CreateLabelingJob -> HumanTaskConfig
humanTaskConfig :: HumanTaskConfig
}
deriving (CreateLabelingJob -> CreateLabelingJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLabelingJob -> CreateLabelingJob -> Bool
$c/= :: CreateLabelingJob -> CreateLabelingJob -> Bool
== :: CreateLabelingJob -> CreateLabelingJob -> Bool
$c== :: CreateLabelingJob -> CreateLabelingJob -> Bool
Prelude.Eq, ReadPrec [CreateLabelingJob]
ReadPrec CreateLabelingJob
Int -> ReadS CreateLabelingJob
ReadS [CreateLabelingJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLabelingJob]
$creadListPrec :: ReadPrec [CreateLabelingJob]
readPrec :: ReadPrec CreateLabelingJob
$creadPrec :: ReadPrec CreateLabelingJob
readList :: ReadS [CreateLabelingJob]
$creadList :: ReadS [CreateLabelingJob]
readsPrec :: Int -> ReadS CreateLabelingJob
$creadsPrec :: Int -> ReadS CreateLabelingJob
Prelude.Read, Int -> CreateLabelingJob -> ShowS
[CreateLabelingJob] -> ShowS
CreateLabelingJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLabelingJob] -> ShowS
$cshowList :: [CreateLabelingJob] -> ShowS
show :: CreateLabelingJob -> String
$cshow :: CreateLabelingJob -> String
showsPrec :: Int -> CreateLabelingJob -> ShowS
$cshowsPrec :: Int -> CreateLabelingJob -> ShowS
Prelude.Show, forall x. Rep CreateLabelingJob x -> CreateLabelingJob
forall x. CreateLabelingJob -> Rep CreateLabelingJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateLabelingJob x -> CreateLabelingJob
$cfrom :: forall x. CreateLabelingJob -> Rep CreateLabelingJob x
Prelude.Generic)
newCreateLabelingJob ::
Prelude.Text ->
Prelude.Text ->
LabelingJobInputConfig ->
LabelingJobOutputConfig ->
Prelude.Text ->
HumanTaskConfig ->
CreateLabelingJob
newCreateLabelingJob :: Text
-> Text
-> LabelingJobInputConfig
-> LabelingJobOutputConfig
-> Text
-> HumanTaskConfig
-> CreateLabelingJob
newCreateLabelingJob
Text
pLabelingJobName_
Text
pLabelAttributeName_
LabelingJobInputConfig
pInputConfig_
LabelingJobOutputConfig
pOutputConfig_
Text
pRoleArn_
HumanTaskConfig
pHumanTaskConfig_ =
CreateLabelingJob'
{ $sel:labelCategoryConfigS3Uri:CreateLabelingJob' :: Maybe Text
labelCategoryConfigS3Uri =
forall a. Maybe a
Prelude.Nothing,
$sel:labelingJobAlgorithmsConfig:CreateLabelingJob' :: Maybe LabelingJobAlgorithmsConfig
labelingJobAlgorithmsConfig = forall a. Maybe a
Prelude.Nothing,
$sel:stoppingConditions:CreateLabelingJob' :: Maybe LabelingJobStoppingConditions
stoppingConditions = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateLabelingJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:labelingJobName:CreateLabelingJob' :: Text
labelingJobName = Text
pLabelingJobName_,
$sel:labelAttributeName:CreateLabelingJob' :: Text
labelAttributeName = Text
pLabelAttributeName_,
$sel:inputConfig:CreateLabelingJob' :: LabelingJobInputConfig
inputConfig = LabelingJobInputConfig
pInputConfig_,
$sel:outputConfig:CreateLabelingJob' :: LabelingJobOutputConfig
outputConfig = LabelingJobOutputConfig
pOutputConfig_,
$sel:roleArn:CreateLabelingJob' :: Text
roleArn = Text
pRoleArn_,
$sel:humanTaskConfig:CreateLabelingJob' :: HumanTaskConfig
humanTaskConfig = HumanTaskConfig
pHumanTaskConfig_
}
createLabelingJob_labelCategoryConfigS3Uri :: Lens.Lens' CreateLabelingJob (Prelude.Maybe Prelude.Text)
createLabelingJob_labelCategoryConfigS3Uri :: Lens' CreateLabelingJob (Maybe Text)
createLabelingJob_labelCategoryConfigS3Uri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {Maybe Text
labelCategoryConfigS3Uri :: Maybe Text
$sel:labelCategoryConfigS3Uri:CreateLabelingJob' :: CreateLabelingJob -> Maybe Text
labelCategoryConfigS3Uri} -> Maybe Text
labelCategoryConfigS3Uri) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} Maybe Text
a -> CreateLabelingJob
s {$sel:labelCategoryConfigS3Uri:CreateLabelingJob' :: Maybe Text
labelCategoryConfigS3Uri = Maybe Text
a} :: CreateLabelingJob)
createLabelingJob_labelingJobAlgorithmsConfig :: Lens.Lens' CreateLabelingJob (Prelude.Maybe LabelingJobAlgorithmsConfig)
createLabelingJob_labelingJobAlgorithmsConfig :: Lens' CreateLabelingJob (Maybe LabelingJobAlgorithmsConfig)
createLabelingJob_labelingJobAlgorithmsConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {Maybe LabelingJobAlgorithmsConfig
labelingJobAlgorithmsConfig :: Maybe LabelingJobAlgorithmsConfig
$sel:labelingJobAlgorithmsConfig:CreateLabelingJob' :: CreateLabelingJob -> Maybe LabelingJobAlgorithmsConfig
labelingJobAlgorithmsConfig} -> Maybe LabelingJobAlgorithmsConfig
labelingJobAlgorithmsConfig) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} Maybe LabelingJobAlgorithmsConfig
a -> CreateLabelingJob
s {$sel:labelingJobAlgorithmsConfig:CreateLabelingJob' :: Maybe LabelingJobAlgorithmsConfig
labelingJobAlgorithmsConfig = Maybe LabelingJobAlgorithmsConfig
a} :: CreateLabelingJob)
createLabelingJob_stoppingConditions :: Lens.Lens' CreateLabelingJob (Prelude.Maybe LabelingJobStoppingConditions)
createLabelingJob_stoppingConditions :: Lens' CreateLabelingJob (Maybe LabelingJobStoppingConditions)
createLabelingJob_stoppingConditions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {Maybe LabelingJobStoppingConditions
stoppingConditions :: Maybe LabelingJobStoppingConditions
$sel:stoppingConditions:CreateLabelingJob' :: CreateLabelingJob -> Maybe LabelingJobStoppingConditions
stoppingConditions} -> Maybe LabelingJobStoppingConditions
stoppingConditions) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} Maybe LabelingJobStoppingConditions
a -> CreateLabelingJob
s {$sel:stoppingConditions:CreateLabelingJob' :: Maybe LabelingJobStoppingConditions
stoppingConditions = Maybe LabelingJobStoppingConditions
a} :: CreateLabelingJob)
createLabelingJob_tags :: Lens.Lens' CreateLabelingJob (Prelude.Maybe [Tag])
createLabelingJob_tags :: Lens' CreateLabelingJob (Maybe [Tag])
createLabelingJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateLabelingJob' :: CreateLabelingJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} Maybe [Tag]
a -> CreateLabelingJob
s {$sel:tags:CreateLabelingJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateLabelingJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createLabelingJob_labelingJobName :: Lens.Lens' CreateLabelingJob Prelude.Text
createLabelingJob_labelingJobName :: Lens' CreateLabelingJob Text
createLabelingJob_labelingJobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {Text
labelingJobName :: Text
$sel:labelingJobName:CreateLabelingJob' :: CreateLabelingJob -> Text
labelingJobName} -> Text
labelingJobName) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} Text
a -> CreateLabelingJob
s {$sel:labelingJobName:CreateLabelingJob' :: Text
labelingJobName = Text
a} :: CreateLabelingJob)
createLabelingJob_labelAttributeName :: Lens.Lens' CreateLabelingJob Prelude.Text
createLabelingJob_labelAttributeName :: Lens' CreateLabelingJob Text
createLabelingJob_labelAttributeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {Text
labelAttributeName :: Text
$sel:labelAttributeName:CreateLabelingJob' :: CreateLabelingJob -> Text
labelAttributeName} -> Text
labelAttributeName) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} Text
a -> CreateLabelingJob
s {$sel:labelAttributeName:CreateLabelingJob' :: Text
labelAttributeName = Text
a} :: CreateLabelingJob)
createLabelingJob_inputConfig :: Lens.Lens' CreateLabelingJob LabelingJobInputConfig
createLabelingJob_inputConfig :: Lens' CreateLabelingJob LabelingJobInputConfig
createLabelingJob_inputConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {LabelingJobInputConfig
inputConfig :: LabelingJobInputConfig
$sel:inputConfig:CreateLabelingJob' :: CreateLabelingJob -> LabelingJobInputConfig
inputConfig} -> LabelingJobInputConfig
inputConfig) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} LabelingJobInputConfig
a -> CreateLabelingJob
s {$sel:inputConfig:CreateLabelingJob' :: LabelingJobInputConfig
inputConfig = LabelingJobInputConfig
a} :: CreateLabelingJob)
createLabelingJob_outputConfig :: Lens.Lens' CreateLabelingJob LabelingJobOutputConfig
createLabelingJob_outputConfig :: Lens' CreateLabelingJob LabelingJobOutputConfig
createLabelingJob_outputConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {LabelingJobOutputConfig
outputConfig :: LabelingJobOutputConfig
$sel:outputConfig:CreateLabelingJob' :: CreateLabelingJob -> LabelingJobOutputConfig
outputConfig} -> LabelingJobOutputConfig
outputConfig) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} LabelingJobOutputConfig
a -> CreateLabelingJob
s {$sel:outputConfig:CreateLabelingJob' :: LabelingJobOutputConfig
outputConfig = LabelingJobOutputConfig
a} :: CreateLabelingJob)
createLabelingJob_roleArn :: Lens.Lens' CreateLabelingJob Prelude.Text
createLabelingJob_roleArn :: Lens' CreateLabelingJob Text
createLabelingJob_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {Text
roleArn :: Text
$sel:roleArn:CreateLabelingJob' :: CreateLabelingJob -> Text
roleArn} -> Text
roleArn) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} Text
a -> CreateLabelingJob
s {$sel:roleArn:CreateLabelingJob' :: Text
roleArn = Text
a} :: CreateLabelingJob)
createLabelingJob_humanTaskConfig :: Lens.Lens' CreateLabelingJob HumanTaskConfig
createLabelingJob_humanTaskConfig :: Lens' CreateLabelingJob HumanTaskConfig
createLabelingJob_humanTaskConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJob' {HumanTaskConfig
humanTaskConfig :: HumanTaskConfig
$sel:humanTaskConfig:CreateLabelingJob' :: CreateLabelingJob -> HumanTaskConfig
humanTaskConfig} -> HumanTaskConfig
humanTaskConfig) (\s :: CreateLabelingJob
s@CreateLabelingJob' {} HumanTaskConfig
a -> CreateLabelingJob
s {$sel:humanTaskConfig:CreateLabelingJob' :: HumanTaskConfig
humanTaskConfig = HumanTaskConfig
a} :: CreateLabelingJob)
instance Core.AWSRequest CreateLabelingJob where
type
AWSResponse CreateLabelingJob =
CreateLabelingJobResponse
request :: (Service -> Service)
-> CreateLabelingJob -> Request CreateLabelingJob
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateLabelingJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateLabelingJob)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Text -> CreateLabelingJobResponse
CreateLabelingJobResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"LabelingJobArn")
)
instance Prelude.Hashable CreateLabelingJob where
hashWithSalt :: Int -> CreateLabelingJob -> Int
hashWithSalt Int
_salt CreateLabelingJob' {Maybe [Tag]
Maybe Text
Maybe LabelingJobStoppingConditions
Maybe LabelingJobAlgorithmsConfig
Text
LabelingJobOutputConfig
LabelingJobInputConfig
HumanTaskConfig
humanTaskConfig :: HumanTaskConfig
roleArn :: Text
outputConfig :: LabelingJobOutputConfig
inputConfig :: LabelingJobInputConfig
labelAttributeName :: Text
labelingJobName :: Text
tags :: Maybe [Tag]
stoppingConditions :: Maybe LabelingJobStoppingConditions
labelingJobAlgorithmsConfig :: Maybe LabelingJobAlgorithmsConfig
labelCategoryConfigS3Uri :: Maybe Text
$sel:humanTaskConfig:CreateLabelingJob' :: CreateLabelingJob -> HumanTaskConfig
$sel:roleArn:CreateLabelingJob' :: CreateLabelingJob -> Text
$sel:outputConfig:CreateLabelingJob' :: CreateLabelingJob -> LabelingJobOutputConfig
$sel:inputConfig:CreateLabelingJob' :: CreateLabelingJob -> LabelingJobInputConfig
$sel:labelAttributeName:CreateLabelingJob' :: CreateLabelingJob -> Text
$sel:labelingJobName:CreateLabelingJob' :: CreateLabelingJob -> Text
$sel:tags:CreateLabelingJob' :: CreateLabelingJob -> Maybe [Tag]
$sel:stoppingConditions:CreateLabelingJob' :: CreateLabelingJob -> Maybe LabelingJobStoppingConditions
$sel:labelingJobAlgorithmsConfig:CreateLabelingJob' :: CreateLabelingJob -> Maybe LabelingJobAlgorithmsConfig
$sel:labelCategoryConfigS3Uri:CreateLabelingJob' :: CreateLabelingJob -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
labelCategoryConfigS3Uri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LabelingJobAlgorithmsConfig
labelingJobAlgorithmsConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LabelingJobStoppingConditions
stoppingConditions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
labelingJobName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
labelAttributeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LabelingJobInputConfig
inputConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LabelingJobOutputConfig
outputConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HumanTaskConfig
humanTaskConfig
instance Prelude.NFData CreateLabelingJob where
rnf :: CreateLabelingJob -> ()
rnf CreateLabelingJob' {Maybe [Tag]
Maybe Text
Maybe LabelingJobStoppingConditions
Maybe LabelingJobAlgorithmsConfig
Text
LabelingJobOutputConfig
LabelingJobInputConfig
HumanTaskConfig
humanTaskConfig :: HumanTaskConfig
roleArn :: Text
outputConfig :: LabelingJobOutputConfig
inputConfig :: LabelingJobInputConfig
labelAttributeName :: Text
labelingJobName :: Text
tags :: Maybe [Tag]
stoppingConditions :: Maybe LabelingJobStoppingConditions
labelingJobAlgorithmsConfig :: Maybe LabelingJobAlgorithmsConfig
labelCategoryConfigS3Uri :: Maybe Text
$sel:humanTaskConfig:CreateLabelingJob' :: CreateLabelingJob -> HumanTaskConfig
$sel:roleArn:CreateLabelingJob' :: CreateLabelingJob -> Text
$sel:outputConfig:CreateLabelingJob' :: CreateLabelingJob -> LabelingJobOutputConfig
$sel:inputConfig:CreateLabelingJob' :: CreateLabelingJob -> LabelingJobInputConfig
$sel:labelAttributeName:CreateLabelingJob' :: CreateLabelingJob -> Text
$sel:labelingJobName:CreateLabelingJob' :: CreateLabelingJob -> Text
$sel:tags:CreateLabelingJob' :: CreateLabelingJob -> Maybe [Tag]
$sel:stoppingConditions:CreateLabelingJob' :: CreateLabelingJob -> Maybe LabelingJobStoppingConditions
$sel:labelingJobAlgorithmsConfig:CreateLabelingJob' :: CreateLabelingJob -> Maybe LabelingJobAlgorithmsConfig
$sel:labelCategoryConfigS3Uri:CreateLabelingJob' :: CreateLabelingJob -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
labelCategoryConfigS3Uri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LabelingJobAlgorithmsConfig
labelingJobAlgorithmsConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LabelingJobStoppingConditions
stoppingConditions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
labelingJobName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
labelAttributeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LabelingJobInputConfig
inputConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LabelingJobOutputConfig
outputConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HumanTaskConfig
humanTaskConfig
instance Data.ToHeaders CreateLabelingJob where
toHeaders :: CreateLabelingJob -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"SageMaker.CreateLabelingJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateLabelingJob where
toJSON :: CreateLabelingJob -> Value
toJSON CreateLabelingJob' {Maybe [Tag]
Maybe Text
Maybe LabelingJobStoppingConditions
Maybe LabelingJobAlgorithmsConfig
Text
LabelingJobOutputConfig
LabelingJobInputConfig
HumanTaskConfig
humanTaskConfig :: HumanTaskConfig
roleArn :: Text
outputConfig :: LabelingJobOutputConfig
inputConfig :: LabelingJobInputConfig
labelAttributeName :: Text
labelingJobName :: Text
tags :: Maybe [Tag]
stoppingConditions :: Maybe LabelingJobStoppingConditions
labelingJobAlgorithmsConfig :: Maybe LabelingJobAlgorithmsConfig
labelCategoryConfigS3Uri :: Maybe Text
$sel:humanTaskConfig:CreateLabelingJob' :: CreateLabelingJob -> HumanTaskConfig
$sel:roleArn:CreateLabelingJob' :: CreateLabelingJob -> Text
$sel:outputConfig:CreateLabelingJob' :: CreateLabelingJob -> LabelingJobOutputConfig
$sel:inputConfig:CreateLabelingJob' :: CreateLabelingJob -> LabelingJobInputConfig
$sel:labelAttributeName:CreateLabelingJob' :: CreateLabelingJob -> Text
$sel:labelingJobName:CreateLabelingJob' :: CreateLabelingJob -> Text
$sel:tags:CreateLabelingJob' :: CreateLabelingJob -> Maybe [Tag]
$sel:stoppingConditions:CreateLabelingJob' :: CreateLabelingJob -> Maybe LabelingJobStoppingConditions
$sel:labelingJobAlgorithmsConfig:CreateLabelingJob' :: CreateLabelingJob -> Maybe LabelingJobAlgorithmsConfig
$sel:labelCategoryConfigS3Uri:CreateLabelingJob' :: CreateLabelingJob -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"LabelCategoryConfigS3Uri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
labelCategoryConfigS3Uri,
(Key
"LabelingJobAlgorithmsConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LabelingJobAlgorithmsConfig
labelingJobAlgorithmsConfig,
(Key
"StoppingConditions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LabelingJobStoppingConditions
stoppingConditions,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
forall a. a -> Maybe a
Prelude.Just
(Key
"LabelingJobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
labelingJobName),
forall a. a -> Maybe a
Prelude.Just
(Key
"LabelAttributeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
labelAttributeName),
forall a. a -> Maybe a
Prelude.Just (Key
"InputConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= LabelingJobInputConfig
inputConfig),
forall a. a -> Maybe a
Prelude.Just (Key
"OutputConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= LabelingJobOutputConfig
outputConfig),
forall a. a -> Maybe a
Prelude.Just (Key
"RoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleArn),
forall a. a -> Maybe a
Prelude.Just
(Key
"HumanTaskConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= HumanTaskConfig
humanTaskConfig)
]
)
instance Data.ToPath CreateLabelingJob where
toPath :: CreateLabelingJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateLabelingJob where
toQuery :: CreateLabelingJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateLabelingJobResponse = CreateLabelingJobResponse'
{
CreateLabelingJobResponse -> Int
httpStatus :: Prelude.Int,
CreateLabelingJobResponse -> Text
labelingJobArn :: Prelude.Text
}
deriving (CreateLabelingJobResponse -> CreateLabelingJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLabelingJobResponse -> CreateLabelingJobResponse -> Bool
$c/= :: CreateLabelingJobResponse -> CreateLabelingJobResponse -> Bool
== :: CreateLabelingJobResponse -> CreateLabelingJobResponse -> Bool
$c== :: CreateLabelingJobResponse -> CreateLabelingJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateLabelingJobResponse]
ReadPrec CreateLabelingJobResponse
Int -> ReadS CreateLabelingJobResponse
ReadS [CreateLabelingJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLabelingJobResponse]
$creadListPrec :: ReadPrec [CreateLabelingJobResponse]
readPrec :: ReadPrec CreateLabelingJobResponse
$creadPrec :: ReadPrec CreateLabelingJobResponse
readList :: ReadS [CreateLabelingJobResponse]
$creadList :: ReadS [CreateLabelingJobResponse]
readsPrec :: Int -> ReadS CreateLabelingJobResponse
$creadsPrec :: Int -> ReadS CreateLabelingJobResponse
Prelude.Read, Int -> CreateLabelingJobResponse -> ShowS
[CreateLabelingJobResponse] -> ShowS
CreateLabelingJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLabelingJobResponse] -> ShowS
$cshowList :: [CreateLabelingJobResponse] -> ShowS
show :: CreateLabelingJobResponse -> String
$cshow :: CreateLabelingJobResponse -> String
showsPrec :: Int -> CreateLabelingJobResponse -> ShowS
$cshowsPrec :: Int -> CreateLabelingJobResponse -> ShowS
Prelude.Show, forall x.
Rep CreateLabelingJobResponse x -> CreateLabelingJobResponse
forall x.
CreateLabelingJobResponse -> Rep CreateLabelingJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLabelingJobResponse x -> CreateLabelingJobResponse
$cfrom :: forall x.
CreateLabelingJobResponse -> Rep CreateLabelingJobResponse x
Prelude.Generic)
newCreateLabelingJobResponse ::
Prelude.Int ->
Prelude.Text ->
CreateLabelingJobResponse
newCreateLabelingJobResponse :: Int -> Text -> CreateLabelingJobResponse
newCreateLabelingJobResponse
Int
pHttpStatus_
Text
pLabelingJobArn_ =
CreateLabelingJobResponse'
{ $sel:httpStatus:CreateLabelingJobResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:labelingJobArn:CreateLabelingJobResponse' :: Text
labelingJobArn = Text
pLabelingJobArn_
}
createLabelingJobResponse_httpStatus :: Lens.Lens' CreateLabelingJobResponse Prelude.Int
createLabelingJobResponse_httpStatus :: Lens' CreateLabelingJobResponse Int
createLabelingJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateLabelingJobResponse' :: CreateLabelingJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateLabelingJobResponse
s@CreateLabelingJobResponse' {} Int
a -> CreateLabelingJobResponse
s {$sel:httpStatus:CreateLabelingJobResponse' :: Int
httpStatus = Int
a} :: CreateLabelingJobResponse)
createLabelingJobResponse_labelingJobArn :: Lens.Lens' CreateLabelingJobResponse Prelude.Text
createLabelingJobResponse_labelingJobArn :: Lens' CreateLabelingJobResponse Text
createLabelingJobResponse_labelingJobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLabelingJobResponse' {Text
labelingJobArn :: Text
$sel:labelingJobArn:CreateLabelingJobResponse' :: CreateLabelingJobResponse -> Text
labelingJobArn} -> Text
labelingJobArn) (\s :: CreateLabelingJobResponse
s@CreateLabelingJobResponse' {} Text
a -> CreateLabelingJobResponse
s {$sel:labelingJobArn:CreateLabelingJobResponse' :: Text
labelingJobArn = Text
a} :: CreateLabelingJobResponse)
instance Prelude.NFData CreateLabelingJobResponse where
rnf :: CreateLabelingJobResponse -> ()
rnf CreateLabelingJobResponse' {Int
Text
labelingJobArn :: Text
httpStatus :: Int
$sel:labelingJobArn:CreateLabelingJobResponse' :: CreateLabelingJobResponse -> Text
$sel:httpStatus:CreateLabelingJobResponse' :: CreateLabelingJobResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
labelingJobArn