{-# 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.WorkDocs.DeleteNotificationSubscription
(
deleteNotificationSubscription
, DeleteNotificationSubscription
, dnsSubscriptionId
, dnsOrganizationId
, deleteNotificationSubscriptionResponse
, DeleteNotificationSubscriptionResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.WorkDocs.Types
import Network.AWS.WorkDocs.Types.Product
data DeleteNotificationSubscription = DeleteNotificationSubscription'
{ _dnsSubscriptionId :: !Text
, _dnsOrganizationId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteNotificationSubscription
:: Text
-> Text
-> DeleteNotificationSubscription
deleteNotificationSubscription pSubscriptionId_ pOrganizationId_ =
DeleteNotificationSubscription'
{ _dnsSubscriptionId = pSubscriptionId_
, _dnsOrganizationId = pOrganizationId_
}
dnsSubscriptionId :: Lens' DeleteNotificationSubscription Text
dnsSubscriptionId = lens _dnsSubscriptionId (\ s a -> s{_dnsSubscriptionId = a})
dnsOrganizationId :: Lens' DeleteNotificationSubscription Text
dnsOrganizationId = lens _dnsOrganizationId (\ s a -> s{_dnsOrganizationId = a})
instance AWSRequest DeleteNotificationSubscription
where
type Rs DeleteNotificationSubscription =
DeleteNotificationSubscriptionResponse
request = delete workDocs
response
= receiveNull DeleteNotificationSubscriptionResponse'
instance Hashable DeleteNotificationSubscription
where
instance NFData DeleteNotificationSubscription where
instance ToHeaders DeleteNotificationSubscription
where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteNotificationSubscription where
toPath DeleteNotificationSubscription'{..}
= mconcat
["/api/v1/organizations/", toBS _dnsOrganizationId,
"/subscriptions/", toBS _dnsSubscriptionId]
instance ToQuery DeleteNotificationSubscription where
toQuery = const mempty
data DeleteNotificationSubscriptionResponse =
DeleteNotificationSubscriptionResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteNotificationSubscriptionResponse
:: DeleteNotificationSubscriptionResponse
deleteNotificationSubscriptionResponse = DeleteNotificationSubscriptionResponse'
instance NFData
DeleteNotificationSubscriptionResponse
where