module Network.AWS.SNS.GetPlatformApplicationAttributes
(
GetPlatformApplicationAttributes
, getPlatformApplicationAttributes
, gpaaPlatformApplicationArn
, GetPlatformApplicationAttributesResponse
, getPlatformApplicationAttributesResponse
, gpaarAttributes
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.SNS.Types
import qualified GHC.Exts
newtype GetPlatformApplicationAttributes = GetPlatformApplicationAttributes
{ _gpaaPlatformApplicationArn :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
getPlatformApplicationAttributes :: Text
-> GetPlatformApplicationAttributes
getPlatformApplicationAttributes p1 = GetPlatformApplicationAttributes
{ _gpaaPlatformApplicationArn = p1
}
gpaaPlatformApplicationArn :: Lens' GetPlatformApplicationAttributes Text
gpaaPlatformApplicationArn =
lens _gpaaPlatformApplicationArn
(\s a -> s { _gpaaPlatformApplicationArn = a })
newtype GetPlatformApplicationAttributesResponse = GetPlatformApplicationAttributesResponse
{ _gpaarAttributes :: EMap "entry" "key" "value" Text Text
} deriving (Eq, Show, Monoid, Semigroup)
getPlatformApplicationAttributesResponse :: GetPlatformApplicationAttributesResponse
getPlatformApplicationAttributesResponse = GetPlatformApplicationAttributesResponse
{ _gpaarAttributes = mempty
}
gpaarAttributes :: Lens' GetPlatformApplicationAttributesResponse (HashMap Text Text)
gpaarAttributes = lens _gpaarAttributes (\s a -> s { _gpaarAttributes = a }) . _EMap
instance ToPath GetPlatformApplicationAttributes where
toPath = const "/"
instance ToQuery GetPlatformApplicationAttributes where
toQuery GetPlatformApplicationAttributes{..} = mconcat
[ "PlatformApplicationArn" =? _gpaaPlatformApplicationArn
]
instance ToHeaders GetPlatformApplicationAttributes
instance AWSRequest GetPlatformApplicationAttributes where
type Sv GetPlatformApplicationAttributes = SNS
type Rs GetPlatformApplicationAttributes = GetPlatformApplicationAttributesResponse
request = post "GetPlatformApplicationAttributes"
response = xmlResponse
instance FromXML GetPlatformApplicationAttributesResponse where
parseXML = withElement "GetPlatformApplicationAttributesResult" $ \x -> GetPlatformApplicationAttributesResponse
<$> x .@ "Attributes"