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