module Network.AWS.Support.RefreshTrustedAdvisorCheck
(
refreshTrustedAdvisorCheck
, RefreshTrustedAdvisorCheck
, rtacCheckId
, refreshTrustedAdvisorCheckResponse
, RefreshTrustedAdvisorCheckResponse
, rtacrsResponseStatus
, rtacrsStatus
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Support.Types
import Network.AWS.Support.Types.Product
newtype RefreshTrustedAdvisorCheck = RefreshTrustedAdvisorCheck'
{ _rtacCheckId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
refreshTrustedAdvisorCheck
:: Text
-> RefreshTrustedAdvisorCheck
refreshTrustedAdvisorCheck pCheckId_ =
RefreshTrustedAdvisorCheck'
{ _rtacCheckId = pCheckId_
}
rtacCheckId :: Lens' RefreshTrustedAdvisorCheck Text
rtacCheckId = lens _rtacCheckId (\ s a -> s{_rtacCheckId = a});
instance AWSRequest RefreshTrustedAdvisorCheck where
type Rs RefreshTrustedAdvisorCheck =
RefreshTrustedAdvisorCheckResponse
request = postJSON support
response
= receiveJSON
(\ s h x ->
RefreshTrustedAdvisorCheckResponse' <$>
(pure (fromEnum s)) <*> (x .:> "status"))
instance ToHeaders RefreshTrustedAdvisorCheck where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSSupport_20130415.RefreshTrustedAdvisorCheck" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON RefreshTrustedAdvisorCheck where
toJSON RefreshTrustedAdvisorCheck'{..}
= object
(catMaybes [Just ("checkId" .= _rtacCheckId)])
instance ToPath RefreshTrustedAdvisorCheck where
toPath = const "/"
instance ToQuery RefreshTrustedAdvisorCheck where
toQuery = const mempty
data RefreshTrustedAdvisorCheckResponse = RefreshTrustedAdvisorCheckResponse'
{ _rtacrsResponseStatus :: !Int
, _rtacrsStatus :: !TrustedAdvisorCheckRefreshStatus
} deriving (Eq,Read,Show,Data,Typeable,Generic)
refreshTrustedAdvisorCheckResponse
:: Int
-> TrustedAdvisorCheckRefreshStatus
-> RefreshTrustedAdvisorCheckResponse
refreshTrustedAdvisorCheckResponse pResponseStatus_ pStatus_ =
RefreshTrustedAdvisorCheckResponse'
{ _rtacrsResponseStatus = pResponseStatus_
, _rtacrsStatus = pStatus_
}
rtacrsResponseStatus :: Lens' RefreshTrustedAdvisorCheckResponse Int
rtacrsResponseStatus = lens _rtacrsResponseStatus (\ s a -> s{_rtacrsResponseStatus = a});
rtacrsStatus :: Lens' RefreshTrustedAdvisorCheckResponse TrustedAdvisorCheckRefreshStatus
rtacrsStatus = lens _rtacrsStatus (\ s a -> s{_rtacrsStatus = a});