{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.Support.DescribeTrustedAdvisorCheckRefreshStatuses
(
describeTrustedAdvisorCheckRefreshStatuses
, DescribeTrustedAdvisorCheckRefreshStatuses
, dtacrsCheckIds
, describeTrustedAdvisorCheckRefreshStatusesResponse
, DescribeTrustedAdvisorCheckRefreshStatusesResponse
, dtacrsrsResponseStatus
, dtacrsrsStatuses
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Support.Types
import Network.AWS.Support.Types.Product
newtype DescribeTrustedAdvisorCheckRefreshStatuses = DescribeTrustedAdvisorCheckRefreshStatuses'
{ _dtacrsCheckIds :: [Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeTrustedAdvisorCheckRefreshStatuses
:: DescribeTrustedAdvisorCheckRefreshStatuses
describeTrustedAdvisorCheckRefreshStatuses =
DescribeTrustedAdvisorCheckRefreshStatuses' {_dtacrsCheckIds = mempty}
dtacrsCheckIds :: Lens' DescribeTrustedAdvisorCheckRefreshStatuses [Text]
dtacrsCheckIds = lens _dtacrsCheckIds (\ s a -> s{_dtacrsCheckIds = a}) . _Coerce
instance AWSRequest
DescribeTrustedAdvisorCheckRefreshStatuses
where
type Rs DescribeTrustedAdvisorCheckRefreshStatuses =
DescribeTrustedAdvisorCheckRefreshStatusesResponse
request = postJSON support
response
= receiveJSON
(\ s h x ->
DescribeTrustedAdvisorCheckRefreshStatusesResponse'
<$>
(pure (fromEnum s)) <*>
(x .?> "statuses" .!@ mempty))
instance Hashable
DescribeTrustedAdvisorCheckRefreshStatuses
where
instance NFData
DescribeTrustedAdvisorCheckRefreshStatuses
where
instance ToHeaders
DescribeTrustedAdvisorCheckRefreshStatuses
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSSupport_20130415.DescribeTrustedAdvisorCheckRefreshStatuses"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON
DescribeTrustedAdvisorCheckRefreshStatuses
where
toJSON
DescribeTrustedAdvisorCheckRefreshStatuses'{..}
= object
(catMaybes [Just ("checkIds" .= _dtacrsCheckIds)])
instance ToPath
DescribeTrustedAdvisorCheckRefreshStatuses
where
toPath = const "/"
instance ToQuery
DescribeTrustedAdvisorCheckRefreshStatuses
where
toQuery = const mempty
data DescribeTrustedAdvisorCheckRefreshStatusesResponse = DescribeTrustedAdvisorCheckRefreshStatusesResponse'
{ _dtacrsrsResponseStatus :: !Int
, _dtacrsrsStatuses :: ![TrustedAdvisorCheckRefreshStatus]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeTrustedAdvisorCheckRefreshStatusesResponse
:: Int
-> DescribeTrustedAdvisorCheckRefreshStatusesResponse
describeTrustedAdvisorCheckRefreshStatusesResponse pResponseStatus_ =
DescribeTrustedAdvisorCheckRefreshStatusesResponse'
{_dtacrsrsResponseStatus = pResponseStatus_, _dtacrsrsStatuses = mempty}
dtacrsrsResponseStatus :: Lens' DescribeTrustedAdvisorCheckRefreshStatusesResponse Int
dtacrsrsResponseStatus = lens _dtacrsrsResponseStatus (\ s a -> s{_dtacrsrsResponseStatus = a})
dtacrsrsStatuses :: Lens' DescribeTrustedAdvisorCheckRefreshStatusesResponse [TrustedAdvisorCheckRefreshStatus]
dtacrsrsStatuses = lens _dtacrsrsStatuses (\ s a -> s{_dtacrsrsStatuses = a}) . _Coerce
instance NFData
DescribeTrustedAdvisorCheckRefreshStatusesResponse
where