module Network.AWS.Support.DescribeTrustedAdvisorCheckSummaries
(
describeTrustedAdvisorCheckSummaries
, DescribeTrustedAdvisorCheckSummaries
, dtacsCheckIds
, describeTrustedAdvisorCheckSummariesResponse
, DescribeTrustedAdvisorCheckSummariesResponse
, dtacsrsStatus
, dtacsrsSummaries
) 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 DescribeTrustedAdvisorCheckSummaries = DescribeTrustedAdvisorCheckSummaries'
{ _dtacsCheckIds :: [Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeTrustedAdvisorCheckSummaries
:: DescribeTrustedAdvisorCheckSummaries
describeTrustedAdvisorCheckSummaries =
DescribeTrustedAdvisorCheckSummaries'
{ _dtacsCheckIds = mempty
}
dtacsCheckIds :: Lens' DescribeTrustedAdvisorCheckSummaries [Text]
dtacsCheckIds = lens _dtacsCheckIds (\ s a -> s{_dtacsCheckIds = a}) . _Coerce;
instance AWSRequest
DescribeTrustedAdvisorCheckSummaries where
type Rs DescribeTrustedAdvisorCheckSummaries =
DescribeTrustedAdvisorCheckSummariesResponse
request = postJSON support
response
= receiveJSON
(\ s h x ->
DescribeTrustedAdvisorCheckSummariesResponse' <$>
(pure (fromEnum s)) <*>
(x .?> "summaries" .!@ mempty))
instance ToHeaders
DescribeTrustedAdvisorCheckSummaries where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSSupport_20130415.DescribeTrustedAdvisorCheckSummaries"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DescribeTrustedAdvisorCheckSummaries
where
toJSON DescribeTrustedAdvisorCheckSummaries'{..}
= object
(catMaybes [Just ("checkIds" .= _dtacsCheckIds)])
instance ToPath DescribeTrustedAdvisorCheckSummaries
where
toPath = const "/"
instance ToQuery DescribeTrustedAdvisorCheckSummaries
where
toQuery = const mempty
data DescribeTrustedAdvisorCheckSummariesResponse = DescribeTrustedAdvisorCheckSummariesResponse'
{ _dtacsrsStatus :: !Int
, _dtacsrsSummaries :: ![TrustedAdvisorCheckSummary]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeTrustedAdvisorCheckSummariesResponse
:: Int
-> DescribeTrustedAdvisorCheckSummariesResponse
describeTrustedAdvisorCheckSummariesResponse pStatus_ =
DescribeTrustedAdvisorCheckSummariesResponse'
{ _dtacsrsStatus = pStatus_
, _dtacsrsSummaries = mempty
}
dtacsrsStatus :: Lens' DescribeTrustedAdvisorCheckSummariesResponse Int
dtacsrsStatus = lens _dtacsrsStatus (\ s a -> s{_dtacsrsStatus = a});
dtacsrsSummaries :: Lens' DescribeTrustedAdvisorCheckSummariesResponse [TrustedAdvisorCheckSummary]
dtacsrsSummaries = lens _dtacsrsSummaries (\ s a -> s{_dtacsrsSummaries = a}) . _Coerce;