module Network.AWS.MachineLearning.UpdateBatchPrediction
(
UpdateBatchPrediction
, updateBatchPrediction
, ubpBatchPredictionId
, ubpBatchPredictionName
, UpdateBatchPredictionResponse
, updateBatchPredictionResponse
, ubprBatchPredictionId
) where
import Network.AWS.Data (Object)
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.MachineLearning.Types
import qualified GHC.Exts
data UpdateBatchPrediction = UpdateBatchPrediction
{ _ubpBatchPredictionId :: Text
, _ubpBatchPredictionName :: Text
} deriving (Eq, Ord, Read, Show)
updateBatchPrediction :: Text
-> Text
-> UpdateBatchPrediction
updateBatchPrediction p1 p2 = UpdateBatchPrediction
{ _ubpBatchPredictionId = p1
, _ubpBatchPredictionName = p2
}
ubpBatchPredictionId :: Lens' UpdateBatchPrediction Text
ubpBatchPredictionId =
lens _ubpBatchPredictionId (\s a -> s { _ubpBatchPredictionId = a })
ubpBatchPredictionName :: Lens' UpdateBatchPrediction Text
ubpBatchPredictionName =
lens _ubpBatchPredictionName (\s a -> s { _ubpBatchPredictionName = a })
newtype UpdateBatchPredictionResponse = UpdateBatchPredictionResponse
{ _ubprBatchPredictionId :: Maybe Text
} deriving (Eq, Ord, Read, Show, Monoid)
updateBatchPredictionResponse :: UpdateBatchPredictionResponse
updateBatchPredictionResponse = UpdateBatchPredictionResponse
{ _ubprBatchPredictionId = Nothing
}
ubprBatchPredictionId :: Lens' UpdateBatchPredictionResponse (Maybe Text)
ubprBatchPredictionId =
lens _ubprBatchPredictionId (\s a -> s { _ubprBatchPredictionId = a })
instance ToPath UpdateBatchPrediction where
toPath = const "/"
instance ToQuery UpdateBatchPrediction where
toQuery = const mempty
instance ToHeaders UpdateBatchPrediction
instance ToJSON UpdateBatchPrediction where
toJSON UpdateBatchPrediction{..} = object
[ "BatchPredictionId" .= _ubpBatchPredictionId
, "BatchPredictionName" .= _ubpBatchPredictionName
]
instance AWSRequest UpdateBatchPrediction where
type Sv UpdateBatchPrediction = MachineLearning
type Rs UpdateBatchPrediction = UpdateBatchPredictionResponse
request = post "UpdateBatchPrediction"
response = jsonResponse
instance FromJSON UpdateBatchPredictionResponse where
parseJSON = withObject "UpdateBatchPredictionResponse" $ \o -> UpdateBatchPredictionResponse
<$> o .:? "BatchPredictionId"