{-# 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.Pinpoint.DeleteAPNSVoipChannel
(
deleteAPNSVoipChannel
, DeleteAPNSVoipChannel
, davcApplicationId
, deleteAPNSVoipChannelResponse
, DeleteAPNSVoipChannelResponse
, davcrsResponseStatus
, davcrsAPNSVoipChannelResponse
) where
import Network.AWS.Lens
import Network.AWS.Pinpoint.Types
import Network.AWS.Pinpoint.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteAPNSVoipChannel = DeleteAPNSVoipChannel'
{ _davcApplicationId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteAPNSVoipChannel
:: Text
-> DeleteAPNSVoipChannel
deleteAPNSVoipChannel pApplicationId_ =
DeleteAPNSVoipChannel' {_davcApplicationId = pApplicationId_}
davcApplicationId :: Lens' DeleteAPNSVoipChannel Text
davcApplicationId = lens _davcApplicationId (\ s a -> s{_davcApplicationId = a})
instance AWSRequest DeleteAPNSVoipChannel where
type Rs DeleteAPNSVoipChannel =
DeleteAPNSVoipChannelResponse
request = delete pinpoint
response
= receiveJSON
(\ s h x ->
DeleteAPNSVoipChannelResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable DeleteAPNSVoipChannel where
instance NFData DeleteAPNSVoipChannel where
instance ToHeaders DeleteAPNSVoipChannel where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteAPNSVoipChannel where
toPath DeleteAPNSVoipChannel'{..}
= mconcat
["/v1/apps/", toBS _davcApplicationId,
"/channels/apns_voip"]
instance ToQuery DeleteAPNSVoipChannel where
toQuery = const mempty
data DeleteAPNSVoipChannelResponse = DeleteAPNSVoipChannelResponse'
{ _davcrsResponseStatus :: !Int
, _davcrsAPNSVoipChannelResponse :: !APNSVoipChannelResponse
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteAPNSVoipChannelResponse
:: Int
-> APNSVoipChannelResponse
-> DeleteAPNSVoipChannelResponse
deleteAPNSVoipChannelResponse pResponseStatus_ pAPNSVoipChannelResponse_ =
DeleteAPNSVoipChannelResponse'
{ _davcrsResponseStatus = pResponseStatus_
, _davcrsAPNSVoipChannelResponse = pAPNSVoipChannelResponse_
}
davcrsResponseStatus :: Lens' DeleteAPNSVoipChannelResponse Int
davcrsResponseStatus = lens _davcrsResponseStatus (\ s a -> s{_davcrsResponseStatus = a})
davcrsAPNSVoipChannelResponse :: Lens' DeleteAPNSVoipChannelResponse APNSVoipChannelResponse
davcrsAPNSVoipChannelResponse = lens _davcrsAPNSVoipChannelResponse (\ s a -> s{_davcrsAPNSVoipChannelResponse = a})
instance NFData DeleteAPNSVoipChannelResponse where