module Network.AWS.MachineLearning.GetBatchPrediction
(
GetBatchPrediction
, getBatchPrediction
, gbpBatchPredictionId
, GetBatchPredictionResponse
, getBatchPredictionResponse
, gbprBatchPredictionDataSourceId
, gbprBatchPredictionId
, gbprCreatedAt
, gbprCreatedByIamUser
, gbprInputDataLocationS3
, gbprLastUpdatedAt
, gbprLogUri
, gbprMLModelId
, gbprMessage
, gbprName
, gbprOutputUri
, gbprStatus
) where
import Network.AWS.Data (Object)
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.MachineLearning.Types
import qualified GHC.Exts
newtype GetBatchPrediction = GetBatchPrediction
{ _gbpBatchPredictionId :: Text
} deriving (Eq, Ord, Read, Show, Monoid, IsString)
getBatchPrediction :: Text
-> GetBatchPrediction
getBatchPrediction p1 = GetBatchPrediction
{ _gbpBatchPredictionId = p1
}
gbpBatchPredictionId :: Lens' GetBatchPrediction Text
gbpBatchPredictionId =
lens _gbpBatchPredictionId (\s a -> s { _gbpBatchPredictionId = a })
data GetBatchPredictionResponse = GetBatchPredictionResponse
{ _gbprBatchPredictionDataSourceId :: Maybe Text
, _gbprBatchPredictionId :: Maybe Text
, _gbprCreatedAt :: Maybe POSIX
, _gbprCreatedByIamUser :: Maybe Text
, _gbprInputDataLocationS3 :: Maybe Text
, _gbprLastUpdatedAt :: Maybe POSIX
, _gbprLogUri :: Maybe Text
, _gbprMLModelId :: Maybe Text
, _gbprMessage :: Maybe Text
, _gbprName :: Maybe Text
, _gbprOutputUri :: Maybe Text
, _gbprStatus :: Maybe EntityStatus
} deriving (Eq, Read, Show)
getBatchPredictionResponse :: GetBatchPredictionResponse
getBatchPredictionResponse = GetBatchPredictionResponse
{ _gbprBatchPredictionId = Nothing
, _gbprMLModelId = Nothing
, _gbprBatchPredictionDataSourceId = Nothing
, _gbprInputDataLocationS3 = Nothing
, _gbprCreatedByIamUser = Nothing
, _gbprCreatedAt = Nothing
, _gbprLastUpdatedAt = Nothing
, _gbprName = Nothing
, _gbprStatus = Nothing
, _gbprOutputUri = Nothing
, _gbprLogUri = Nothing
, _gbprMessage = Nothing
}
gbprBatchPredictionDataSourceId :: Lens' GetBatchPredictionResponse (Maybe Text)
gbprBatchPredictionDataSourceId =
lens _gbprBatchPredictionDataSourceId
(\s a -> s { _gbprBatchPredictionDataSourceId = a })
gbprBatchPredictionId :: Lens' GetBatchPredictionResponse (Maybe Text)
gbprBatchPredictionId =
lens _gbprBatchPredictionId (\s a -> s { _gbprBatchPredictionId = a })
gbprCreatedAt :: Lens' GetBatchPredictionResponse (Maybe UTCTime)
gbprCreatedAt = lens _gbprCreatedAt (\s a -> s { _gbprCreatedAt = a }) . mapping _Time
gbprCreatedByIamUser :: Lens' GetBatchPredictionResponse (Maybe Text)
gbprCreatedByIamUser =
lens _gbprCreatedByIamUser (\s a -> s { _gbprCreatedByIamUser = a })
gbprInputDataLocationS3 :: Lens' GetBatchPredictionResponse (Maybe Text)
gbprInputDataLocationS3 =
lens _gbprInputDataLocationS3 (\s a -> s { _gbprInputDataLocationS3 = a })
gbprLastUpdatedAt :: Lens' GetBatchPredictionResponse (Maybe UTCTime)
gbprLastUpdatedAt =
lens _gbprLastUpdatedAt (\s a -> s { _gbprLastUpdatedAt = a })
. mapping _Time
gbprLogUri :: Lens' GetBatchPredictionResponse (Maybe Text)
gbprLogUri = lens _gbprLogUri (\s a -> s { _gbprLogUri = a })
gbprMLModelId :: Lens' GetBatchPredictionResponse (Maybe Text)
gbprMLModelId = lens _gbprMLModelId (\s a -> s { _gbprMLModelId = a })
gbprMessage :: Lens' GetBatchPredictionResponse (Maybe Text)
gbprMessage = lens _gbprMessage (\s a -> s { _gbprMessage = a })
gbprName :: Lens' GetBatchPredictionResponse (Maybe Text)
gbprName = lens _gbprName (\s a -> s { _gbprName = a })
gbprOutputUri :: Lens' GetBatchPredictionResponse (Maybe Text)
gbprOutputUri = lens _gbprOutputUri (\s a -> s { _gbprOutputUri = a })
gbprStatus :: Lens' GetBatchPredictionResponse (Maybe EntityStatus)
gbprStatus = lens _gbprStatus (\s a -> s { _gbprStatus = a })
instance ToPath GetBatchPrediction where
toPath = const "/"
instance ToQuery GetBatchPrediction where
toQuery = const mempty
instance ToHeaders GetBatchPrediction
instance ToJSON GetBatchPrediction where
toJSON GetBatchPrediction{..} = object
[ "BatchPredictionId" .= _gbpBatchPredictionId
]
instance AWSRequest GetBatchPrediction where
type Sv GetBatchPrediction = MachineLearning
type Rs GetBatchPrediction = GetBatchPredictionResponse
request = post "GetBatchPrediction"
response = jsonResponse
instance FromJSON GetBatchPredictionResponse where
parseJSON = withObject "GetBatchPredictionResponse" $ \o -> GetBatchPredictionResponse
<$> o .:? "BatchPredictionDataSourceId"
<*> o .:? "BatchPredictionId"
<*> o .:? "CreatedAt"
<*> o .:? "CreatedByIamUser"
<*> o .:? "InputDataLocationS3"
<*> o .:? "LastUpdatedAt"
<*> o .:? "LogUri"
<*> o .:? "MLModelId"
<*> o .:? "Message"
<*> o .:? "Name"
<*> o .:? "OutputUri"
<*> o .:? "Status"