{-# 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.StopTransformJob
(
StopTransformJob (..),
newStopTransformJob,
stopTransformJob_transformJobName,
StopTransformJobResponse (..),
newStopTransformJobResponse,
)
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 StopTransformJob = StopTransformJob'
{
StopTransformJob -> Text
transformJobName :: Prelude.Text
}
deriving (StopTransformJob -> StopTransformJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopTransformJob -> StopTransformJob -> Bool
$c/= :: StopTransformJob -> StopTransformJob -> Bool
== :: StopTransformJob -> StopTransformJob -> Bool
$c== :: StopTransformJob -> StopTransformJob -> Bool
Prelude.Eq, ReadPrec [StopTransformJob]
ReadPrec StopTransformJob
Int -> ReadS StopTransformJob
ReadS [StopTransformJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopTransformJob]
$creadListPrec :: ReadPrec [StopTransformJob]
readPrec :: ReadPrec StopTransformJob
$creadPrec :: ReadPrec StopTransformJob
readList :: ReadS [StopTransformJob]
$creadList :: ReadS [StopTransformJob]
readsPrec :: Int -> ReadS StopTransformJob
$creadsPrec :: Int -> ReadS StopTransformJob
Prelude.Read, Int -> StopTransformJob -> ShowS
[StopTransformJob] -> ShowS
StopTransformJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopTransformJob] -> ShowS
$cshowList :: [StopTransformJob] -> ShowS
show :: StopTransformJob -> String
$cshow :: StopTransformJob -> String
showsPrec :: Int -> StopTransformJob -> ShowS
$cshowsPrec :: Int -> StopTransformJob -> ShowS
Prelude.Show, forall x. Rep StopTransformJob x -> StopTransformJob
forall x. StopTransformJob -> Rep StopTransformJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopTransformJob x -> StopTransformJob
$cfrom :: forall x. StopTransformJob -> Rep StopTransformJob x
Prelude.Generic)
newStopTransformJob ::
Prelude.Text ->
StopTransformJob
newStopTransformJob :: Text -> StopTransformJob
newStopTransformJob Text
pTransformJobName_ =
StopTransformJob'
{ $sel:transformJobName:StopTransformJob' :: Text
transformJobName =
Text
pTransformJobName_
}
stopTransformJob_transformJobName :: Lens.Lens' StopTransformJob Prelude.Text
stopTransformJob_transformJobName :: Lens' StopTransformJob Text
stopTransformJob_transformJobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopTransformJob' {Text
transformJobName :: Text
$sel:transformJobName:StopTransformJob' :: StopTransformJob -> Text
transformJobName} -> Text
transformJobName) (\s :: StopTransformJob
s@StopTransformJob' {} Text
a -> StopTransformJob
s {$sel:transformJobName:StopTransformJob' :: Text
transformJobName = Text
a} :: StopTransformJob)
instance Core.AWSRequest StopTransformJob where
type
AWSResponse StopTransformJob =
StopTransformJobResponse
request :: (Service -> Service)
-> StopTransformJob -> Request StopTransformJob
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 StopTransformJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StopTransformJob)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull StopTransformJobResponse
StopTransformJobResponse'
instance Prelude.Hashable StopTransformJob where
hashWithSalt :: Int -> StopTransformJob -> Int
hashWithSalt Int
_salt StopTransformJob' {Text
transformJobName :: Text
$sel:transformJobName:StopTransformJob' :: StopTransformJob -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
transformJobName
instance Prelude.NFData StopTransformJob where
rnf :: StopTransformJob -> ()
rnf StopTransformJob' {Text
transformJobName :: Text
$sel:transformJobName:StopTransformJob' :: StopTransformJob -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
transformJobName
instance Data.ToHeaders StopTransformJob where
toHeaders :: StopTransformJob -> [Header]
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 -> [Header]
Data.=# (ByteString
"SageMaker.StopTransformJob" :: Prelude.ByteString),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON StopTransformJob where
toJSON :: StopTransformJob -> Value
toJSON StopTransformJob' {Text
transformJobName :: Text
$sel:transformJobName:StopTransformJob' :: StopTransformJob -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"TransformJobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
transformJobName)
]
)
instance Data.ToPath StopTransformJob where
toPath :: StopTransformJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery StopTransformJob where
toQuery :: StopTransformJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StopTransformJobResponse = StopTransformJobResponse'
{
}
deriving (StopTransformJobResponse -> StopTransformJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopTransformJobResponse -> StopTransformJobResponse -> Bool
$c/= :: StopTransformJobResponse -> StopTransformJobResponse -> Bool
== :: StopTransformJobResponse -> StopTransformJobResponse -> Bool
$c== :: StopTransformJobResponse -> StopTransformJobResponse -> Bool
Prelude.Eq, ReadPrec [StopTransformJobResponse]
ReadPrec StopTransformJobResponse
Int -> ReadS StopTransformJobResponse
ReadS [StopTransformJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopTransformJobResponse]
$creadListPrec :: ReadPrec [StopTransformJobResponse]
readPrec :: ReadPrec StopTransformJobResponse
$creadPrec :: ReadPrec StopTransformJobResponse
readList :: ReadS [StopTransformJobResponse]
$creadList :: ReadS [StopTransformJobResponse]
readsPrec :: Int -> ReadS StopTransformJobResponse
$creadsPrec :: Int -> ReadS StopTransformJobResponse
Prelude.Read, Int -> StopTransformJobResponse -> ShowS
[StopTransformJobResponse] -> ShowS
StopTransformJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopTransformJobResponse] -> ShowS
$cshowList :: [StopTransformJobResponse] -> ShowS
show :: StopTransformJobResponse -> String
$cshow :: StopTransformJobResponse -> String
showsPrec :: Int -> StopTransformJobResponse -> ShowS
$cshowsPrec :: Int -> StopTransformJobResponse -> ShowS
Prelude.Show, forall x.
Rep StopTransformJobResponse x -> StopTransformJobResponse
forall x.
StopTransformJobResponse -> Rep StopTransformJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopTransformJobResponse x -> StopTransformJobResponse
$cfrom :: forall x.
StopTransformJobResponse -> Rep StopTransformJobResponse x
Prelude.Generic)
newStopTransformJobResponse ::
StopTransformJobResponse
newStopTransformJobResponse :: StopTransformJobResponse
newStopTransformJobResponse =
StopTransformJobResponse
StopTransformJobResponse'
instance Prelude.NFData StopTransformJobResponse where
rnf :: StopTransformJobResponse -> ()
rnf StopTransformJobResponse
_ = ()