module Network.AWS.SES.GetIdentityNotificationAttributes
(
getIdentityNotificationAttributes
, GetIdentityNotificationAttributes
, ginaIdentities
, getIdentityNotificationAttributesResponse
, GetIdentityNotificationAttributesResponse
, ginarsStatus
, ginarsNotificationAttributes
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SES.Types
import Network.AWS.SES.Types.Product
newtype GetIdentityNotificationAttributes = GetIdentityNotificationAttributes'
{ _ginaIdentities :: [Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getIdentityNotificationAttributes
:: GetIdentityNotificationAttributes
getIdentityNotificationAttributes =
GetIdentityNotificationAttributes'
{ _ginaIdentities = mempty
}
ginaIdentities :: Lens' GetIdentityNotificationAttributes [Text]
ginaIdentities = lens _ginaIdentities (\ s a -> s{_ginaIdentities = a}) . _Coerce;
instance AWSRequest GetIdentityNotificationAttributes
where
type Rs GetIdentityNotificationAttributes =
GetIdentityNotificationAttributesResponse
request = postQuery sES
response
= receiveXMLWrapper
"GetIdentityNotificationAttributesResult"
(\ s h x ->
GetIdentityNotificationAttributesResponse' <$>
(pure (fromEnum s)) <*>
(x .@? "NotificationAttributes" .!@ mempty >>=
parseXMLMap "entry" "key" "value"))
instance ToHeaders GetIdentityNotificationAttributes
where
toHeaders = const mempty
instance ToPath GetIdentityNotificationAttributes
where
toPath = const "/"
instance ToQuery GetIdentityNotificationAttributes
where
toQuery GetIdentityNotificationAttributes'{..}
= mconcat
["Action" =:
("GetIdentityNotificationAttributes" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"Identities" =: toQueryList "member" _ginaIdentities]
data GetIdentityNotificationAttributesResponse = GetIdentityNotificationAttributesResponse'
{ _ginarsStatus :: !Int
, _ginarsNotificationAttributes :: !(Map Text IdentityNotificationAttributes)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getIdentityNotificationAttributesResponse
:: Int
-> GetIdentityNotificationAttributesResponse
getIdentityNotificationAttributesResponse pStatus_ =
GetIdentityNotificationAttributesResponse'
{ _ginarsStatus = pStatus_
, _ginarsNotificationAttributes = mempty
}
ginarsStatus :: Lens' GetIdentityNotificationAttributesResponse Int
ginarsStatus = lens _ginarsStatus (\ s a -> s{_ginarsStatus = a});
ginarsNotificationAttributes :: Lens' GetIdentityNotificationAttributesResponse (HashMap Text IdentityNotificationAttributes)
ginarsNotificationAttributes = lens _ginarsNotificationAttributes (\ s a -> s{_ginarsNotificationAttributes = a}) . _Map;