module Network.AWS.SES.GetSendStatistics
(
GetSendStatistics
, getSendStatistics
, GetSendStatisticsResponse
, getSendStatisticsResponse
, gssrSendDataPoints
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.SES.Types
import qualified GHC.Exts
data GetSendStatistics = GetSendStatistics
deriving (Eq, Ord, Show, Generic)
getSendStatistics :: GetSendStatistics
getSendStatistics = GetSendStatistics
newtype GetSendStatisticsResponse = GetSendStatisticsResponse
{ _gssrSendDataPoints :: List "member" SendDataPoint
} deriving (Eq, Show, Monoid, Semigroup)
instance GHC.Exts.IsList GetSendStatisticsResponse where
type Item GetSendStatisticsResponse = SendDataPoint
fromList = GetSendStatisticsResponse . GHC.Exts.fromList
toList = GHC.Exts.toList . _gssrSendDataPoints
getSendStatisticsResponse :: GetSendStatisticsResponse
getSendStatisticsResponse = GetSendStatisticsResponse
{ _gssrSendDataPoints = mempty
}
gssrSendDataPoints :: Lens' GetSendStatisticsResponse [SendDataPoint]
gssrSendDataPoints =
lens _gssrSendDataPoints (\s a -> s { _gssrSendDataPoints = a })
. _List
instance ToPath GetSendStatistics where
toPath = const "/"
instance ToQuery GetSendStatistics where
toQuery = const mempty
instance ToHeaders GetSendStatistics
instance AWSRequest GetSendStatistics where
type Sv GetSendStatistics = SES
type Rs GetSendStatistics = GetSendStatisticsResponse
request = post "GetSendStatistics"
response = xmlResponse
instance FromXML GetSendStatisticsResponse where
parseXML = withElement "GetSendStatisticsResult" $ \x -> GetSendStatisticsResponse
<$> x .@? "SendDataPoints" .!@ mempty