module Network.AWS.SNS.GetPlatformApplicationAttributes
(
getPlatformApplicationAttributes
, GetPlatformApplicationAttributes
, gpaaPlatformApplicationARN
, getPlatformApplicationAttributesResponse
, GetPlatformApplicationAttributesResponse
, gpaarsAttributes
, gpaarsStatus
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SNS.Types
import Network.AWS.SNS.Types.Product
newtype GetPlatformApplicationAttributes = GetPlatformApplicationAttributes'
{ _gpaaPlatformApplicationARN :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getPlatformApplicationAttributes
:: Text
-> GetPlatformApplicationAttributes
getPlatformApplicationAttributes pPlatformApplicationARN_ =
GetPlatformApplicationAttributes'
{ _gpaaPlatformApplicationARN = pPlatformApplicationARN_
}
gpaaPlatformApplicationARN :: Lens' GetPlatformApplicationAttributes Text
gpaaPlatformApplicationARN = lens _gpaaPlatformApplicationARN (\ s a -> s{_gpaaPlatformApplicationARN = a});
instance AWSRequest GetPlatformApplicationAttributes
where
type Rs GetPlatformApplicationAttributes =
GetPlatformApplicationAttributesResponse
request = postQuery sNS
response
= receiveXMLWrapper
"GetPlatformApplicationAttributesResult"
(\ s h x ->
GetPlatformApplicationAttributesResponse' <$>
(x .@? "Attributes" .!@ mempty >>=
may (parseXMLMap "entry" "key" "value"))
<*> (pure (fromEnum s)))
instance ToHeaders GetPlatformApplicationAttributes
where
toHeaders = const mempty
instance ToPath GetPlatformApplicationAttributes
where
toPath = const "/"
instance ToQuery GetPlatformApplicationAttributes
where
toQuery GetPlatformApplicationAttributes'{..}
= mconcat
["Action" =:
("GetPlatformApplicationAttributes" :: ByteString),
"Version" =: ("2010-03-31" :: ByteString),
"PlatformApplicationArn" =:
_gpaaPlatformApplicationARN]
data GetPlatformApplicationAttributesResponse = GetPlatformApplicationAttributesResponse'
{ _gpaarsAttributes :: !(Maybe (Map Text Text))
, _gpaarsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getPlatformApplicationAttributesResponse
:: Int
-> GetPlatformApplicationAttributesResponse
getPlatformApplicationAttributesResponse pStatus_ =
GetPlatformApplicationAttributesResponse'
{ _gpaarsAttributes = Nothing
, _gpaarsStatus = pStatus_
}
gpaarsAttributes :: Lens' GetPlatformApplicationAttributesResponse (HashMap Text Text)
gpaarsAttributes = lens _gpaarsAttributes (\ s a -> s{_gpaarsAttributes = a}) . _Default . _Map;
gpaarsStatus :: Lens' GetPlatformApplicationAttributesResponse Int
gpaarsStatus = lens _gpaarsStatus (\ s a -> s{_gpaarsStatus = a});