module Network.AWS.SES.GetSendQuota
(
GetSendQuota
, getSendQuota
, GetSendQuotaResponse
, getSendQuotaResponse
, gsqrMax24HourSend
, gsqrMaxSendRate
, gsqrSentLast24Hours
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.SES.Types
import qualified GHC.Exts
data GetSendQuota = GetSendQuota
deriving (Eq, Ord, Show, Generic)
getSendQuota :: GetSendQuota
getSendQuota = GetSendQuota
data GetSendQuotaResponse = GetSendQuotaResponse
{ _gsqrMax24HourSend :: Maybe Double
, _gsqrMaxSendRate :: Maybe Double
, _gsqrSentLast24Hours :: Maybe Double
} deriving (Eq, Ord, Show)
getSendQuotaResponse :: GetSendQuotaResponse
getSendQuotaResponse = GetSendQuotaResponse
{ _gsqrMax24HourSend = Nothing
, _gsqrMaxSendRate = Nothing
, _gsqrSentLast24Hours = Nothing
}
gsqrMax24HourSend :: Lens' GetSendQuotaResponse (Maybe Double)
gsqrMax24HourSend =
lens _gsqrMax24HourSend (\s a -> s { _gsqrMax24HourSend = a })
gsqrMaxSendRate :: Lens' GetSendQuotaResponse (Maybe Double)
gsqrMaxSendRate = lens _gsqrMaxSendRate (\s a -> s { _gsqrMaxSendRate = a })
gsqrSentLast24Hours :: Lens' GetSendQuotaResponse (Maybe Double)
gsqrSentLast24Hours =
lens _gsqrSentLast24Hours (\s a -> s { _gsqrSentLast24Hours = a })
instance ToPath GetSendQuota where
toPath = const "/"
instance ToQuery GetSendQuota where
toQuery = const mempty
instance ToHeaders GetSendQuota
instance AWSRequest GetSendQuota where
type Sv GetSendQuota = SES
type Rs GetSendQuota = GetSendQuotaResponse
request = post "GetSendQuota"
response = xmlResponse
instance FromXML GetSendQuotaResponse where
parseXML = withElement "GetSendQuotaResult" $ \x -> GetSendQuotaResponse
<$> x .@? "Max24HourSend"
<*> x .@? "MaxSendRate"
<*> x .@? "SentLast24Hours"