module Network.AWS.MachineLearning.UpdateBatchPrediction
(
updateBatchPrediction
, UpdateBatchPrediction
, ubpBatchPredictionId
, ubpBatchPredictionName
, updateBatchPredictionResponse
, UpdateBatchPredictionResponse
, ubprsBatchPredictionId
, ubprsResponseStatus
) where
import Network.AWS.MachineLearning.Types
import Network.AWS.MachineLearning.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateBatchPrediction = UpdateBatchPrediction'
{ _ubpBatchPredictionId :: !Text
, _ubpBatchPredictionName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateBatchPrediction
:: Text
-> Text
-> UpdateBatchPrediction
updateBatchPrediction pBatchPredictionId_ pBatchPredictionName_ =
UpdateBatchPrediction'
{ _ubpBatchPredictionId = pBatchPredictionId_
, _ubpBatchPredictionName = pBatchPredictionName_
}
ubpBatchPredictionId :: Lens' UpdateBatchPrediction Text
ubpBatchPredictionId = lens _ubpBatchPredictionId (\ s a -> s{_ubpBatchPredictionId = a});
ubpBatchPredictionName :: Lens' UpdateBatchPrediction Text
ubpBatchPredictionName = lens _ubpBatchPredictionName (\ s a -> s{_ubpBatchPredictionName = a});
instance AWSRequest UpdateBatchPrediction where
type Rs UpdateBatchPrediction =
UpdateBatchPredictionResponse
request = postJSON machineLearning
response
= receiveJSON
(\ s h x ->
UpdateBatchPredictionResponse' <$>
(x .?> "BatchPredictionId") <*> (pure (fromEnum s)))
instance ToHeaders UpdateBatchPrediction where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AmazonML_20141212.UpdateBatchPrediction" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateBatchPrediction where
toJSON UpdateBatchPrediction'{..}
= object
(catMaybes
[Just ("BatchPredictionId" .= _ubpBatchPredictionId),
Just
("BatchPredictionName" .= _ubpBatchPredictionName)])
instance ToPath UpdateBatchPrediction where
toPath = const "/"
instance ToQuery UpdateBatchPrediction where
toQuery = const mempty
data UpdateBatchPredictionResponse = UpdateBatchPredictionResponse'
{ _ubprsBatchPredictionId :: !(Maybe Text)
, _ubprsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateBatchPredictionResponse
:: Int
-> UpdateBatchPredictionResponse
updateBatchPredictionResponse pResponseStatus_ =
UpdateBatchPredictionResponse'
{ _ubprsBatchPredictionId = Nothing
, _ubprsResponseStatus = pResponseStatus_
}
ubprsBatchPredictionId :: Lens' UpdateBatchPredictionResponse (Maybe Text)
ubprsBatchPredictionId = lens _ubprsBatchPredictionId (\ s a -> s{_ubprsBatchPredictionId = a});
ubprsResponseStatus :: Lens' UpdateBatchPredictionResponse Int
ubprsResponseStatus = lens _ubprsResponseStatus (\ s a -> s{_ubprsResponseStatus = a});