module Network.AWS.MachineLearning.GetEvaluation
(
getEvaluation
, GetEvaluation
, geEvaluationId
, getEvaluationResponse
, GetEvaluationResponse
, gersPerformanceMetrics
, gersLastUpdatedAt
, gersCreatedAt
, gersInputDataLocationS3
, gersMLModelId
, gersName
, gersCreatedByIAMUser
, gersLogURI
, gersMessage
, gersEvaluationId
, gersEvaluationDataSourceId
, gersStatus
) where
import Network.AWS.MachineLearning.Types
import Network.AWS.MachineLearning.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype GetEvaluation = GetEvaluation'
{ _geEvaluationId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getEvaluation
:: Text
-> GetEvaluation
getEvaluation pEvaluationId_ =
GetEvaluation'
{ _geEvaluationId = pEvaluationId_
}
geEvaluationId :: Lens' GetEvaluation Text
geEvaluationId = lens _geEvaluationId (\ s a -> s{_geEvaluationId = a});
instance AWSRequest GetEvaluation where
type Rs GetEvaluation = GetEvaluationResponse
request = postJSON machineLearning
response
= receiveJSON
(\ s h x ->
GetEvaluationResponse' <$>
(x .?> "PerformanceMetrics") <*>
(x .?> "LastUpdatedAt")
<*> (x .?> "CreatedAt")
<*> (x .?> "InputDataLocationS3")
<*> (x .?> "MLModelId")
<*> (x .?> "Name")
<*> (x .?> "CreatedByIamUser")
<*> (x .?> "LogUri")
<*> (x .?> "Message")
<*> (x .?> "EvaluationId")
<*> (x .?> "EvaluationDataSourceId")
<*> (pure (fromEnum s)))
instance ToHeaders GetEvaluation where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AmazonML_20141212.GetEvaluation" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetEvaluation where
toJSON GetEvaluation'{..}
= object
(catMaybes
[Just ("EvaluationId" .= _geEvaluationId)])
instance ToPath GetEvaluation where
toPath = const "/"
instance ToQuery GetEvaluation where
toQuery = const mempty
data GetEvaluationResponse = GetEvaluationResponse'
{ _gersPerformanceMetrics :: !(Maybe PerformanceMetrics)
, _gersLastUpdatedAt :: !(Maybe POSIX)
, _gersCreatedAt :: !(Maybe POSIX)
, _gersInputDataLocationS3 :: !(Maybe Text)
, _gersMLModelId :: !(Maybe Text)
, _gersName :: !(Maybe Text)
, _gersCreatedByIAMUser :: !(Maybe Text)
, _gersLogURI :: !(Maybe Text)
, _gersMessage :: !(Maybe Text)
, _gersEvaluationId :: !(Maybe Text)
, _gersEvaluationDataSourceId :: !(Maybe Text)
, _gersStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getEvaluationResponse
:: Int
-> GetEvaluationResponse
getEvaluationResponse pStatus_ =
GetEvaluationResponse'
{ _gersPerformanceMetrics = Nothing
, _gersLastUpdatedAt = Nothing
, _gersCreatedAt = Nothing
, _gersInputDataLocationS3 = Nothing
, _gersMLModelId = Nothing
, _gersName = Nothing
, _gersCreatedByIAMUser = Nothing
, _gersLogURI = Nothing
, _gersMessage = Nothing
, _gersEvaluationId = Nothing
, _gersEvaluationDataSourceId = Nothing
, _gersStatus = pStatus_
}
gersPerformanceMetrics :: Lens' GetEvaluationResponse (Maybe PerformanceMetrics)
gersPerformanceMetrics = lens _gersPerformanceMetrics (\ s a -> s{_gersPerformanceMetrics = a});
gersLastUpdatedAt :: Lens' GetEvaluationResponse (Maybe UTCTime)
gersLastUpdatedAt = lens _gersLastUpdatedAt (\ s a -> s{_gersLastUpdatedAt = a}) . mapping _Time;
gersCreatedAt :: Lens' GetEvaluationResponse (Maybe UTCTime)
gersCreatedAt = lens _gersCreatedAt (\ s a -> s{_gersCreatedAt = a}) . mapping _Time;
gersInputDataLocationS3 :: Lens' GetEvaluationResponse (Maybe Text)
gersInputDataLocationS3 = lens _gersInputDataLocationS3 (\ s a -> s{_gersInputDataLocationS3 = a});
gersMLModelId :: Lens' GetEvaluationResponse (Maybe Text)
gersMLModelId = lens _gersMLModelId (\ s a -> s{_gersMLModelId = a});
gersName :: Lens' GetEvaluationResponse (Maybe Text)
gersName = lens _gersName (\ s a -> s{_gersName = a});
gersCreatedByIAMUser :: Lens' GetEvaluationResponse (Maybe Text)
gersCreatedByIAMUser = lens _gersCreatedByIAMUser (\ s a -> s{_gersCreatedByIAMUser = a});
gersLogURI :: Lens' GetEvaluationResponse (Maybe Text)
gersLogURI = lens _gersLogURI (\ s a -> s{_gersLogURI = a});
gersMessage :: Lens' GetEvaluationResponse (Maybe Text)
gersMessage = lens _gersMessage (\ s a -> s{_gersMessage = a});
gersEvaluationId :: Lens' GetEvaluationResponse (Maybe Text)
gersEvaluationId = lens _gersEvaluationId (\ s a -> s{_gersEvaluationId = a});
gersEvaluationDataSourceId :: Lens' GetEvaluationResponse (Maybe Text)
gersEvaluationDataSourceId = lens _gersEvaluationDataSourceId (\ s a -> s{_gersEvaluationDataSourceId = a});
gersStatus :: Lens' GetEvaluationResponse Int
gersStatus = lens _gersStatus (\ s a -> s{_gersStatus = a});