{-# 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.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 StopAutoMLJob = StopAutoMLJob'
{
StopAutoMLJob -> Text
autoMLJobName :: Prelude.Text
}
deriving (StopAutoMLJob -> StopAutoMLJob -> Bool
(StopAutoMLJob -> StopAutoMLJob -> Bool)
-> (StopAutoMLJob -> StopAutoMLJob -> Bool) -> Eq StopAutoMLJob
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]
(Int -> ReadS StopAutoMLJob)
-> ReadS [StopAutoMLJob]
-> ReadPrec StopAutoMLJob
-> ReadPrec [StopAutoMLJob]
-> Read 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
(Int -> StopAutoMLJob -> ShowS)
-> (StopAutoMLJob -> String)
-> ([StopAutoMLJob] -> ShowS)
-> Show StopAutoMLJob
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. StopAutoMLJob -> Rep StopAutoMLJob x)
-> (forall x. Rep StopAutoMLJob x -> StopAutoMLJob)
-> Generic StopAutoMLJob
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' :: Text -> StopAutoMLJob
StopAutoMLJob' {$sel:autoMLJobName:StopAutoMLJob' :: Text
autoMLJobName = Text
pAutoMLJobName_}
stopAutoMLJob_autoMLJobName :: Lens.Lens' StopAutoMLJob Prelude.Text
stopAutoMLJob_autoMLJobName :: (Text -> f Text) -> StopAutoMLJob -> f StopAutoMLJob
stopAutoMLJob_autoMLJobName = (StopAutoMLJob -> Text)
-> (StopAutoMLJob -> Text -> StopAutoMLJob)
-> Lens StopAutoMLJob StopAutoMLJob Text Text
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 :: StopAutoMLJob -> Request StopAutoMLJob
request = Service -> StopAutoMLJob -> Request StopAutoMLJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StopAutoMLJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StopAutoMLJob)))
response =
AWSResponse StopAutoMLJob
-> Logger
-> Service
-> Proxy StopAutoMLJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StopAutoMLJob)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse StopAutoMLJob
StopAutoMLJobResponse
StopAutoMLJobResponse'
instance Prelude.Hashable StopAutoMLJob
instance Prelude.NFData StopAutoMLJob
instance Core.ToHeaders StopAutoMLJob where
toHeaders :: StopAutoMLJob -> [Header]
toHeaders =
[Header] -> StopAutoMLJob -> [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.StopAutoMLJob" :: 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 StopAutoMLJob where
toJSON :: StopAutoMLJob -> Value
toJSON StopAutoMLJob' {Text
autoMLJobName :: Text
$sel:autoMLJobName:StopAutoMLJob' :: StopAutoMLJob -> 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
"AutoMLJobName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
autoMLJobName)
]
)
instance Core.ToPath StopAutoMLJob where
toPath :: StopAutoMLJob -> ByteString
toPath = ByteString -> StopAutoMLJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StopAutoMLJob where
toQuery :: StopAutoMLJob -> QueryString
toQuery = QueryString -> StopAutoMLJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StopAutoMLJobResponse = StopAutoMLJobResponse'
{
}
deriving (StopAutoMLJobResponse -> StopAutoMLJobResponse -> Bool
(StopAutoMLJobResponse -> StopAutoMLJobResponse -> Bool)
-> (StopAutoMLJobResponse -> StopAutoMLJobResponse -> Bool)
-> Eq StopAutoMLJobResponse
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]
(Int -> ReadS StopAutoMLJobResponse)
-> ReadS [StopAutoMLJobResponse]
-> ReadPrec StopAutoMLJobResponse
-> ReadPrec [StopAutoMLJobResponse]
-> Read 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
(Int -> StopAutoMLJobResponse -> ShowS)
-> (StopAutoMLJobResponse -> String)
-> ([StopAutoMLJobResponse] -> ShowS)
-> Show StopAutoMLJobResponse
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. StopAutoMLJobResponse -> Rep StopAutoMLJobResponse x)
-> (forall x. Rep StopAutoMLJobResponse x -> StopAutoMLJobResponse)
-> Generic StopAutoMLJobResponse
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