module Network.AWS.Support.DescribeTrustedAdvisorCheckResult
(
describeTrustedAdvisorCheckResult
, DescribeTrustedAdvisorCheckResult
, dtacrLanguage
, dtacrCheckId
, describeTrustedAdvisorCheckResultResponse
, DescribeTrustedAdvisorCheckResultResponse
, dtacrrsResult
, dtacrrsResponseStatus
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Support.Types
import Network.AWS.Support.Types.Product
data DescribeTrustedAdvisorCheckResult = DescribeTrustedAdvisorCheckResult'
{ _dtacrLanguage :: !(Maybe Text)
, _dtacrCheckId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeTrustedAdvisorCheckResult
:: Text
-> DescribeTrustedAdvisorCheckResult
describeTrustedAdvisorCheckResult pCheckId_ =
DescribeTrustedAdvisorCheckResult'
{ _dtacrLanguage = Nothing
, _dtacrCheckId = pCheckId_
}
dtacrLanguage :: Lens' DescribeTrustedAdvisorCheckResult (Maybe Text)
dtacrLanguage = lens _dtacrLanguage (\ s a -> s{_dtacrLanguage = a});
dtacrCheckId :: Lens' DescribeTrustedAdvisorCheckResult Text
dtacrCheckId = lens _dtacrCheckId (\ s a -> s{_dtacrCheckId = a});
instance AWSRequest DescribeTrustedAdvisorCheckResult
where
type Rs DescribeTrustedAdvisorCheckResult =
DescribeTrustedAdvisorCheckResultResponse
request = postJSON support
response
= receiveJSON
(\ s h x ->
DescribeTrustedAdvisorCheckResultResponse' <$>
(x .?> "result") <*> (pure (fromEnum s)))
instance ToHeaders DescribeTrustedAdvisorCheckResult
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSSupport_20130415.DescribeTrustedAdvisorCheckResult"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DescribeTrustedAdvisorCheckResult
where
toJSON DescribeTrustedAdvisorCheckResult'{..}
= object
(catMaybes
[("language" .=) <$> _dtacrLanguage,
Just ("checkId" .= _dtacrCheckId)])
instance ToPath DescribeTrustedAdvisorCheckResult
where
toPath = const "/"
instance ToQuery DescribeTrustedAdvisorCheckResult
where
toQuery = const mempty
data DescribeTrustedAdvisorCheckResultResponse = DescribeTrustedAdvisorCheckResultResponse'
{ _dtacrrsResult :: !(Maybe TrustedAdvisorCheckResult)
, _dtacrrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeTrustedAdvisorCheckResultResponse
:: Int
-> DescribeTrustedAdvisorCheckResultResponse
describeTrustedAdvisorCheckResultResponse pResponseStatus_ =
DescribeTrustedAdvisorCheckResultResponse'
{ _dtacrrsResult = Nothing
, _dtacrrsResponseStatus = pResponseStatus_
}
dtacrrsResult :: Lens' DescribeTrustedAdvisorCheckResultResponse (Maybe TrustedAdvisorCheckResult)
dtacrrsResult = lens _dtacrrsResult (\ s a -> s{_dtacrrsResult = a});
dtacrrsResponseStatus :: Lens' DescribeTrustedAdvisorCheckResultResponse Int
dtacrrsResponseStatus = lens _dtacrrsResponseStatus (\ s a -> s{_dtacrrsResponseStatus = a});