module Network.AWS.Budgets.DeleteSubscriber
(
deleteSubscriber
, DeleteSubscriber
, dsAccountId
, dsBudgetName
, dsNotification
, dsSubscriber
, deleteSubscriberResponse
, DeleteSubscriberResponse
, dsrsResponseStatus
) where
import Network.AWS.Budgets.Types
import Network.AWS.Budgets.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteSubscriber = DeleteSubscriber'
{ _dsAccountId :: !Text
, _dsBudgetName :: !Text
, _dsNotification :: !Notification
, _dsSubscriber :: !Subscriber
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSubscriber
:: Text
-> Text
-> Notification
-> Subscriber
-> DeleteSubscriber
deleteSubscriber pAccountId_ pBudgetName_ pNotification_ pSubscriber_ =
DeleteSubscriber'
{ _dsAccountId = pAccountId_
, _dsBudgetName = pBudgetName_
, _dsNotification = pNotification_
, _dsSubscriber = pSubscriber_
}
dsAccountId :: Lens' DeleteSubscriber Text
dsAccountId = lens _dsAccountId (\ s a -> s{_dsAccountId = a});
dsBudgetName :: Lens' DeleteSubscriber Text
dsBudgetName = lens _dsBudgetName (\ s a -> s{_dsBudgetName = a});
dsNotification :: Lens' DeleteSubscriber Notification
dsNotification = lens _dsNotification (\ s a -> s{_dsNotification = a});
dsSubscriber :: Lens' DeleteSubscriber Subscriber
dsSubscriber = lens _dsSubscriber (\ s a -> s{_dsSubscriber = a});
instance AWSRequest DeleteSubscriber where
type Rs DeleteSubscriber = DeleteSubscriberResponse
request = postJSON budgets
response
= receiveEmpty
(\ s h x ->
DeleteSubscriberResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteSubscriber where
instance NFData DeleteSubscriber where
instance ToHeaders DeleteSubscriber where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSBudgetServiceGateway.DeleteSubscriber" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteSubscriber where
toJSON DeleteSubscriber'{..}
= object
(catMaybes
[Just ("AccountId" .= _dsAccountId),
Just ("BudgetName" .= _dsBudgetName),
Just ("Notification" .= _dsNotification),
Just ("Subscriber" .= _dsSubscriber)])
instance ToPath DeleteSubscriber where
toPath = const "/"
instance ToQuery DeleteSubscriber where
toQuery = const mempty
newtype DeleteSubscriberResponse = DeleteSubscriberResponse'
{ _dsrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSubscriberResponse
:: Int
-> DeleteSubscriberResponse
deleteSubscriberResponse pResponseStatus_ =
DeleteSubscriberResponse' {_dsrsResponseStatus = pResponseStatus_}
dsrsResponseStatus :: Lens' DeleteSubscriberResponse Int
dsrsResponseStatus = lens _dsrsResponseStatus (\ s a -> s{_dsrsResponseStatus = a});
instance NFData DeleteSubscriberResponse where