{-# 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.StopLabelingJob
(
StopLabelingJob (..),
newStopLabelingJob,
stopLabelingJob_labelingJobName,
StopLabelingJobResponse (..),
newStopLabelingJobResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types
data StopLabelingJob = StopLabelingJob'
{
StopLabelingJob -> Text
labelingJobName :: Prelude.Text
}
deriving (StopLabelingJob -> StopLabelingJob -> Bool
(StopLabelingJob -> StopLabelingJob -> Bool)
-> (StopLabelingJob -> StopLabelingJob -> Bool)
-> Eq StopLabelingJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopLabelingJob -> StopLabelingJob -> Bool
$c/= :: StopLabelingJob -> StopLabelingJob -> Bool
== :: StopLabelingJob -> StopLabelingJob -> Bool
$c== :: StopLabelingJob -> StopLabelingJob -> Bool
Prelude.Eq, ReadPrec [StopLabelingJob]
ReadPrec StopLabelingJob
Int -> ReadS StopLabelingJob
ReadS [StopLabelingJob]
(Int -> ReadS StopLabelingJob)
-> ReadS [StopLabelingJob]
-> ReadPrec StopLabelingJob
-> ReadPrec [StopLabelingJob]
-> Read StopLabelingJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopLabelingJob]
$creadListPrec :: ReadPrec [StopLabelingJob]
readPrec :: ReadPrec StopLabelingJob
$creadPrec :: ReadPrec StopLabelingJob
readList :: ReadS [StopLabelingJob]
$creadList :: ReadS [StopLabelingJob]
readsPrec :: Int -> ReadS StopLabelingJob
$creadsPrec :: Int -> ReadS StopLabelingJob
Prelude.Read, Int -> StopLabelingJob -> ShowS
[StopLabelingJob] -> ShowS
StopLabelingJob -> String
(Int -> StopLabelingJob -> ShowS)
-> (StopLabelingJob -> String)
-> ([StopLabelingJob] -> ShowS)
-> Show StopLabelingJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopLabelingJob] -> ShowS
$cshowList :: [StopLabelingJob] -> ShowS
show :: StopLabelingJob -> String
$cshow :: StopLabelingJob -> String
showsPrec :: Int -> StopLabelingJob -> ShowS
$cshowsPrec :: Int -> StopLabelingJob -> ShowS
Prelude.Show, (forall x. StopLabelingJob -> Rep StopLabelingJob x)
-> (forall x. Rep StopLabelingJob x -> StopLabelingJob)
-> Generic StopLabelingJob
forall x. Rep StopLabelingJob x -> StopLabelingJob
forall x. StopLabelingJob -> Rep StopLabelingJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopLabelingJob x -> StopLabelingJob
$cfrom :: forall x. StopLabelingJob -> Rep StopLabelingJob x
Prelude.Generic)
newStopLabelingJob ::
Prelude.Text ->
StopLabelingJob
newStopLabelingJob :: Text -> StopLabelingJob
newStopLabelingJob Text
pLabelingJobName_ =
StopLabelingJob' :: Text -> StopLabelingJob
StopLabelingJob'
{ $sel:labelingJobName:StopLabelingJob' :: Text
labelingJobName =
Text
pLabelingJobName_
}
stopLabelingJob_labelingJobName :: Lens.Lens' StopLabelingJob Prelude.Text
stopLabelingJob_labelingJobName :: (Text -> f Text) -> StopLabelingJob -> f StopLabelingJob
stopLabelingJob_labelingJobName = (StopLabelingJob -> Text)
-> (StopLabelingJob -> Text -> StopLabelingJob)
-> Lens StopLabelingJob StopLabelingJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopLabelingJob' {Text
labelingJobName :: Text
$sel:labelingJobName:StopLabelingJob' :: StopLabelingJob -> Text
labelingJobName} -> Text
labelingJobName) (\s :: StopLabelingJob
s@StopLabelingJob' {} Text
a -> StopLabelingJob
s {$sel:labelingJobName:StopLabelingJob' :: Text
labelingJobName = Text
a} :: StopLabelingJob)
instance Core.AWSRequest StopLabelingJob where
type
AWSResponse StopLabelingJob =
StopLabelingJobResponse
request :: StopLabelingJob -> Request StopLabelingJob
request = Service -> StopLabelingJob -> Request StopLabelingJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StopLabelingJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StopLabelingJob)))
response =
AWSResponse StopLabelingJob
-> Logger
-> Service
-> Proxy StopLabelingJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StopLabelingJob)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse StopLabelingJob
StopLabelingJobResponse
StopLabelingJobResponse'
instance Prelude.Hashable StopLabelingJob
instance Prelude.NFData StopLabelingJob
instance Core.ToHeaders StopLabelingJob where
toHeaders :: StopLabelingJob -> [Header]
toHeaders =
[Header] -> StopLabelingJob -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# (ByteString
"SageMaker.StopLabelingJob" :: Prelude.ByteString),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON StopLabelingJob where
toJSON :: StopLabelingJob -> Value
toJSON StopLabelingJob' {Text
labelingJobName :: Text
$sel:labelingJobName:StopLabelingJob' :: StopLabelingJob -> Text
..} =
[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
"LabelingJobName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
labelingJobName)
]
)
instance Core.ToPath StopLabelingJob where
toPath :: StopLabelingJob -> ByteString
toPath = ByteString -> StopLabelingJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StopLabelingJob where
toQuery :: StopLabelingJob -> QueryString
toQuery = QueryString -> StopLabelingJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StopLabelingJobResponse = StopLabelingJobResponse'
{
}
deriving (StopLabelingJobResponse -> StopLabelingJobResponse -> Bool
(StopLabelingJobResponse -> StopLabelingJobResponse -> Bool)
-> (StopLabelingJobResponse -> StopLabelingJobResponse -> Bool)
-> Eq StopLabelingJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopLabelingJobResponse -> StopLabelingJobResponse -> Bool
$c/= :: StopLabelingJobResponse -> StopLabelingJobResponse -> Bool
== :: StopLabelingJobResponse -> StopLabelingJobResponse -> Bool
$c== :: StopLabelingJobResponse -> StopLabelingJobResponse -> Bool
Prelude.Eq, ReadPrec [StopLabelingJobResponse]
ReadPrec StopLabelingJobResponse
Int -> ReadS StopLabelingJobResponse
ReadS [StopLabelingJobResponse]
(Int -> ReadS StopLabelingJobResponse)
-> ReadS [StopLabelingJobResponse]
-> ReadPrec StopLabelingJobResponse
-> ReadPrec [StopLabelingJobResponse]
-> Read StopLabelingJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopLabelingJobResponse]
$creadListPrec :: ReadPrec [StopLabelingJobResponse]
readPrec :: ReadPrec StopLabelingJobResponse
$creadPrec :: ReadPrec StopLabelingJobResponse
readList :: ReadS [StopLabelingJobResponse]
$creadList :: ReadS [StopLabelingJobResponse]
readsPrec :: Int -> ReadS StopLabelingJobResponse
$creadsPrec :: Int -> ReadS StopLabelingJobResponse
Prelude.Read, Int -> StopLabelingJobResponse -> ShowS
[StopLabelingJobResponse] -> ShowS
StopLabelingJobResponse -> String
(Int -> StopLabelingJobResponse -> ShowS)
-> (StopLabelingJobResponse -> String)
-> ([StopLabelingJobResponse] -> ShowS)
-> Show StopLabelingJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopLabelingJobResponse] -> ShowS
$cshowList :: [StopLabelingJobResponse] -> ShowS
show :: StopLabelingJobResponse -> String
$cshow :: StopLabelingJobResponse -> String
showsPrec :: Int -> StopLabelingJobResponse -> ShowS
$cshowsPrec :: Int -> StopLabelingJobResponse -> ShowS
Prelude.Show, (forall x.
StopLabelingJobResponse -> Rep StopLabelingJobResponse x)
-> (forall x.
Rep StopLabelingJobResponse x -> StopLabelingJobResponse)
-> Generic StopLabelingJobResponse
forall x. Rep StopLabelingJobResponse x -> StopLabelingJobResponse
forall x. StopLabelingJobResponse -> Rep StopLabelingJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopLabelingJobResponse x -> StopLabelingJobResponse
$cfrom :: forall x. StopLabelingJobResponse -> Rep StopLabelingJobResponse x
Prelude.Generic)
newStopLabelingJobResponse ::
StopLabelingJobResponse
newStopLabelingJobResponse :: StopLabelingJobResponse
newStopLabelingJobResponse = StopLabelingJobResponse
StopLabelingJobResponse'
instance Prelude.NFData StopLabelingJobResponse