{-# 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.SNS.GetPlatformApplicationAttributes
(
getPlatformApplicationAttributes
, GetPlatformApplicationAttributes
, gpaaPlatformApplicationARN
, getPlatformApplicationAttributesResponse
, GetPlatformApplicationAttributesResponse
, gpaarsAttributes
, gpaarsResponseStatus
) where
import Network.AWS.Lens
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 Hashable GetPlatformApplicationAttributes
where
instance NFData GetPlatformApplicationAttributes
where
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))
, _gpaarsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getPlatformApplicationAttributesResponse
:: Int
-> GetPlatformApplicationAttributesResponse
getPlatformApplicationAttributesResponse pResponseStatus_ =
GetPlatformApplicationAttributesResponse'
{_gpaarsAttributes = Nothing, _gpaarsResponseStatus = pResponseStatus_}
gpaarsAttributes :: Lens' GetPlatformApplicationAttributesResponse (HashMap Text Text)
gpaarsAttributes = lens _gpaarsAttributes (\ s a -> s{_gpaarsAttributes = a}) . _Default . _Map
gpaarsResponseStatus :: Lens' GetPlatformApplicationAttributesResponse Int
gpaarsResponseStatus = lens _gpaarsResponseStatus (\ s a -> s{_gpaarsResponseStatus = a})
instance NFData
GetPlatformApplicationAttributesResponse
where