{-# 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.ELBv2.DeleteListener
(
deleteListener
, DeleteListener
, dlListenerARN
, deleteListenerResponse
, DeleteListenerResponse
, dlrsResponseStatus
) where
import Network.AWS.ELBv2.Types
import Network.AWS.ELBv2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteListener = DeleteListener'
{ _dlListenerARN :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteListener
:: Text
-> DeleteListener
deleteListener pListenerARN_ =
DeleteListener'
{ _dlListenerARN = pListenerARN_
}
dlListenerARN :: Lens' DeleteListener Text
dlListenerARN = lens _dlListenerARN (\ s a -> s{_dlListenerARN = a});
instance AWSRequest DeleteListener where
type Rs DeleteListener = DeleteListenerResponse
request = postQuery eLBv2
response
= receiveXMLWrapper "DeleteListenerResult"
(\ s h x ->
DeleteListenerResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteListener
instance NFData DeleteListener
instance ToHeaders DeleteListener where
toHeaders = const mempty
instance ToPath DeleteListener where
toPath = const "/"
instance ToQuery DeleteListener where
toQuery DeleteListener'{..}
= mconcat
["Action" =: ("DeleteListener" :: ByteString),
"Version" =: ("2015-12-01" :: ByteString),
"ListenerArn" =: _dlListenerARN]
newtype DeleteListenerResponse = DeleteListenerResponse'
{ _dlrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteListenerResponse
:: Int
-> DeleteListenerResponse
deleteListenerResponse pResponseStatus_ =
DeleteListenerResponse'
{ _dlrsResponseStatus = pResponseStatus_
}
dlrsResponseStatus :: Lens' DeleteListenerResponse Int
dlrsResponseStatus = lens _dlrsResponseStatus (\ s a -> s{_dlrsResponseStatus = a});
instance NFData DeleteListenerResponse