{-# 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.SES.GetIdentityNotificationAttributes
(
getIdentityNotificationAttributes
, GetIdentityNotificationAttributes
, ginaIdentities
, getIdentityNotificationAttributesResponse
, GetIdentityNotificationAttributesResponse
, ginarsResponseStatus
, ginarsNotificationAttributes
) where
import Network.AWS.Lens
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 Hashable GetIdentityNotificationAttributes
where
instance NFData GetIdentityNotificationAttributes
where
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'
{ _ginarsResponseStatus :: !Int
, _ginarsNotificationAttributes :: !(Map Text IdentityNotificationAttributes)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getIdentityNotificationAttributesResponse
:: Int
-> GetIdentityNotificationAttributesResponse
getIdentityNotificationAttributesResponse pResponseStatus_ =
GetIdentityNotificationAttributesResponse'
{ _ginarsResponseStatus = pResponseStatus_
, _ginarsNotificationAttributes = mempty
}
ginarsResponseStatus :: Lens' GetIdentityNotificationAttributesResponse Int
ginarsResponseStatus = lens _ginarsResponseStatus (\ s a -> s{_ginarsResponseStatus = a})
ginarsNotificationAttributes :: Lens' GetIdentityNotificationAttributesResponse (HashMap Text IdentityNotificationAttributes)
ginarsNotificationAttributes = lens _ginarsNotificationAttributes (\ s a -> s{_ginarsNotificationAttributes = a}) . _Map
instance NFData
GetIdentityNotificationAttributesResponse
where