{-# 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.Unsubscribe
(
unsubscribe
, Unsubscribe
, uSubscriptionARN
, unsubscribeResponse
, UnsubscribeResponse
) 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 Unsubscribe = Unsubscribe'
{ _uSubscriptionARN :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
unsubscribe
:: Text
-> Unsubscribe
unsubscribe pSubscriptionARN_ =
Unsubscribe' {_uSubscriptionARN = pSubscriptionARN_}
uSubscriptionARN :: Lens' Unsubscribe Text
uSubscriptionARN = lens _uSubscriptionARN (\ s a -> s{_uSubscriptionARN = a})
instance AWSRequest Unsubscribe where
type Rs Unsubscribe = UnsubscribeResponse
request = postQuery sns
response = receiveNull UnsubscribeResponse'
instance Hashable Unsubscribe where
instance NFData Unsubscribe where
instance ToHeaders Unsubscribe where
toHeaders = const mempty
instance ToPath Unsubscribe where
toPath = const "/"
instance ToQuery Unsubscribe where
toQuery Unsubscribe'{..}
= mconcat
["Action" =: ("Unsubscribe" :: ByteString),
"Version" =: ("2010-03-31" :: ByteString),
"SubscriptionArn" =: _uSubscriptionARN]
data UnsubscribeResponse =
UnsubscribeResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
unsubscribeResponse
:: UnsubscribeResponse
unsubscribeResponse = UnsubscribeResponse'
instance NFData UnsubscribeResponse where