{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.SageMaker.StopTrainingJob
(
stopTrainingJob
, StopTrainingJob
, stjTrainingJobName
, stopTrainingJobResponse
, StopTrainingJobResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SageMaker.Types
import Network.AWS.SageMaker.Types.Product
newtype StopTrainingJob = StopTrainingJob'
{ _stjTrainingJobName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
stopTrainingJob
:: Text
-> StopTrainingJob
stopTrainingJob pTrainingJobName_ =
StopTrainingJob' {_stjTrainingJobName = pTrainingJobName_}
stjTrainingJobName :: Lens' StopTrainingJob Text
stjTrainingJobName = lens _stjTrainingJobName (\ s a -> s{_stjTrainingJobName = a})
instance AWSRequest StopTrainingJob where
type Rs StopTrainingJob = StopTrainingJobResponse
request = postJSON sageMaker
response = receiveNull StopTrainingJobResponse'
instance Hashable StopTrainingJob where
instance NFData StopTrainingJob where
instance ToHeaders StopTrainingJob where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("SageMaker.StopTrainingJob" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StopTrainingJob where
toJSON StopTrainingJob'{..}
= object
(catMaybes
[Just ("TrainingJobName" .= _stjTrainingJobName)])
instance ToPath StopTrainingJob where
toPath = const "/"
instance ToQuery StopTrainingJob where
toQuery = const mempty
data StopTrainingJobResponse =
StopTrainingJobResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
stopTrainingJobResponse
:: StopTrainingJobResponse
stopTrainingJobResponse = StopTrainingJobResponse'
instance NFData StopTrainingJobResponse where