{-# 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.DeleteAPNSChannel
(
deleteAPNSChannel
, DeleteAPNSChannel
, dacApplicationId
, deleteAPNSChannelResponse
, DeleteAPNSChannelResponse
, dacrsResponseStatus
, dacrsAPNSChannelResponse
) 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 DeleteAPNSChannel = DeleteAPNSChannel'
{ _dacApplicationId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteAPNSChannel
:: Text
-> DeleteAPNSChannel
deleteAPNSChannel pApplicationId_ =
DeleteAPNSChannel' {_dacApplicationId = pApplicationId_}
dacApplicationId :: Lens' DeleteAPNSChannel Text
dacApplicationId = lens _dacApplicationId (\ s a -> s{_dacApplicationId = a})
instance AWSRequest DeleteAPNSChannel where
type Rs DeleteAPNSChannel = DeleteAPNSChannelResponse
request = delete pinpoint
response
= receiveJSON
(\ s h x ->
DeleteAPNSChannelResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable DeleteAPNSChannel where
instance NFData DeleteAPNSChannel where
instance ToHeaders DeleteAPNSChannel where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteAPNSChannel where
toPath DeleteAPNSChannel'{..}
= mconcat
["/v1/apps/", toBS _dacApplicationId,
"/channels/apns"]
instance ToQuery DeleteAPNSChannel where
toQuery = const mempty
data DeleteAPNSChannelResponse = DeleteAPNSChannelResponse'
{ _dacrsResponseStatus :: !Int
, _dacrsAPNSChannelResponse :: !APNSChannelResponse
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteAPNSChannelResponse
:: Int
-> APNSChannelResponse
-> DeleteAPNSChannelResponse
deleteAPNSChannelResponse pResponseStatus_ pAPNSChannelResponse_ =
DeleteAPNSChannelResponse'
{ _dacrsResponseStatus = pResponseStatus_
, _dacrsAPNSChannelResponse = pAPNSChannelResponse_
}
dacrsResponseStatus :: Lens' DeleteAPNSChannelResponse Int
dacrsResponseStatus = lens _dacrsResponseStatus (\ s a -> s{_dacrsResponseStatus = a})
dacrsAPNSChannelResponse :: Lens' DeleteAPNSChannelResponse APNSChannelResponse
dacrsAPNSChannelResponse = lens _dacrsAPNSChannelResponse (\ s a -> s{_dacrsAPNSChannelResponse = a})
instance NFData DeleteAPNSChannelResponse where