module Network.AWS.MachineLearning.DeleteBatchPrediction
(
deleteBatchPrediction
, DeleteBatchPrediction
, dbpBatchPredictionId
, deleteBatchPredictionResponse
, DeleteBatchPredictionResponse
, dbprsBatchPredictionId
, dbprsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.MachineLearning.Types
import Network.AWS.MachineLearning.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteBatchPrediction = DeleteBatchPrediction'
{ _dbpBatchPredictionId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteBatchPrediction
:: Text
-> DeleteBatchPrediction
deleteBatchPrediction pBatchPredictionId_ =
DeleteBatchPrediction'
{ _dbpBatchPredictionId = pBatchPredictionId_
}
dbpBatchPredictionId :: Lens' DeleteBatchPrediction Text
dbpBatchPredictionId = lens _dbpBatchPredictionId (\ s a -> s{_dbpBatchPredictionId = a});
instance AWSRequest DeleteBatchPrediction where
type Rs DeleteBatchPrediction =
DeleteBatchPredictionResponse
request = postJSON machineLearning
response
= receiveJSON
(\ s h x ->
DeleteBatchPredictionResponse' <$>
(x .?> "BatchPredictionId") <*> (pure (fromEnum s)))
instance Hashable DeleteBatchPrediction
instance NFData DeleteBatchPrediction
instance ToHeaders DeleteBatchPrediction where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AmazonML_20141212.DeleteBatchPrediction" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteBatchPrediction where
toJSON DeleteBatchPrediction'{..}
= object
(catMaybes
[Just
("BatchPredictionId" .= _dbpBatchPredictionId)])
instance ToPath DeleteBatchPrediction where
toPath = const "/"
instance ToQuery DeleteBatchPrediction where
toQuery = const mempty
data DeleteBatchPredictionResponse = DeleteBatchPredictionResponse'
{ _dbprsBatchPredictionId :: !(Maybe Text)
, _dbprsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteBatchPredictionResponse
:: Int
-> DeleteBatchPredictionResponse
deleteBatchPredictionResponse pResponseStatus_ =
DeleteBatchPredictionResponse'
{ _dbprsBatchPredictionId = Nothing
, _dbprsResponseStatus = pResponseStatus_
}
dbprsBatchPredictionId :: Lens' DeleteBatchPredictionResponse (Maybe Text)
dbprsBatchPredictionId = lens _dbprsBatchPredictionId (\ s a -> s{_dbprsBatchPredictionId = a});
dbprsResponseStatus :: Lens' DeleteBatchPredictionResponse Int
dbprsResponseStatus = lens _dbprsResponseStatus (\ s a -> s{_dbprsResponseStatus = a});
instance NFData DeleteBatchPredictionResponse