module Network.AWS.DirectoryService.DeleteConditionalForwarder
(
deleteConditionalForwarder
, DeleteConditionalForwarder
, delDirectoryId
, delRemoteDomainName
, deleteConditionalForwarderResponse
, DeleteConditionalForwarderResponse
, drsResponseStatus
) where
import Network.AWS.DirectoryService.Types
import Network.AWS.DirectoryService.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteConditionalForwarder = DeleteConditionalForwarder'
{ _delDirectoryId :: !Text
, _delRemoteDomainName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteConditionalForwarder
:: Text
-> Text
-> DeleteConditionalForwarder
deleteConditionalForwarder pDirectoryId_ pRemoteDomainName_ =
DeleteConditionalForwarder'
{_delDirectoryId = pDirectoryId_, _delRemoteDomainName = pRemoteDomainName_}
delDirectoryId :: Lens' DeleteConditionalForwarder Text
delDirectoryId = lens _delDirectoryId (\ s a -> s{_delDirectoryId = a});
delRemoteDomainName :: Lens' DeleteConditionalForwarder Text
delRemoteDomainName = lens _delRemoteDomainName (\ s a -> s{_delRemoteDomainName = a});
instance AWSRequest DeleteConditionalForwarder where
type Rs DeleteConditionalForwarder =
DeleteConditionalForwarderResponse
request = postJSON directoryService
response
= receiveEmpty
(\ s h x ->
DeleteConditionalForwarderResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteConditionalForwarder where
instance NFData DeleteConditionalForwarder where
instance ToHeaders DeleteConditionalForwarder where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DirectoryService_20150416.DeleteConditionalForwarder"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteConditionalForwarder where
toJSON DeleteConditionalForwarder'{..}
= object
(catMaybes
[Just ("DirectoryId" .= _delDirectoryId),
Just ("RemoteDomainName" .= _delRemoteDomainName)])
instance ToPath DeleteConditionalForwarder where
toPath = const "/"
instance ToQuery DeleteConditionalForwarder where
toQuery = const mempty
newtype DeleteConditionalForwarderResponse = DeleteConditionalForwarderResponse'
{ _drsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteConditionalForwarderResponse
:: Int
-> DeleteConditionalForwarderResponse
deleteConditionalForwarderResponse pResponseStatus_ =
DeleteConditionalForwarderResponse' {_drsResponseStatus = pResponseStatus_}
drsResponseStatus :: Lens' DeleteConditionalForwarderResponse Int
drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});
instance NFData DeleteConditionalForwarderResponse
where