{-# 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.DeleteGCMChannel
(
deleteGCMChannel
, DeleteGCMChannel
, dgcApplicationId
, deleteGCMChannelResponse
, DeleteGCMChannelResponse
, dgcrsResponseStatus
, dgcrsGCMChannelResponse
) 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 DeleteGCMChannel = DeleteGCMChannel'
{ _dgcApplicationId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteGCMChannel
:: Text
-> DeleteGCMChannel
deleteGCMChannel pApplicationId_ =
DeleteGCMChannel' {_dgcApplicationId = pApplicationId_}
dgcApplicationId :: Lens' DeleteGCMChannel Text
dgcApplicationId = lens _dgcApplicationId (\ s a -> s{_dgcApplicationId = a})
instance AWSRequest DeleteGCMChannel where
type Rs DeleteGCMChannel = DeleteGCMChannelResponse
request = delete pinpoint
response
= receiveJSON
(\ s h x ->
DeleteGCMChannelResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable DeleteGCMChannel where
instance NFData DeleteGCMChannel where
instance ToHeaders DeleteGCMChannel where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteGCMChannel where
toPath DeleteGCMChannel'{..}
= mconcat
["/v1/apps/", toBS _dgcApplicationId,
"/channels/gcm"]
instance ToQuery DeleteGCMChannel where
toQuery = const mempty
data DeleteGCMChannelResponse = DeleteGCMChannelResponse'
{ _dgcrsResponseStatus :: !Int
, _dgcrsGCMChannelResponse :: !GCMChannelResponse
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteGCMChannelResponse
:: Int
-> GCMChannelResponse
-> DeleteGCMChannelResponse
deleteGCMChannelResponse pResponseStatus_ pGCMChannelResponse_ =
DeleteGCMChannelResponse'
{ _dgcrsResponseStatus = pResponseStatus_
, _dgcrsGCMChannelResponse = pGCMChannelResponse_
}
dgcrsResponseStatus :: Lens' DeleteGCMChannelResponse Int
dgcrsResponseStatus = lens _dgcrsResponseStatus (\ s a -> s{_dgcrsResponseStatus = a})
dgcrsGCMChannelResponse :: Lens' DeleteGCMChannelResponse GCMChannelResponse
dgcrsGCMChannelResponse = lens _dgcrsGCMChannelResponse (\ s a -> s{_dgcrsGCMChannelResponse = a})
instance NFData DeleteGCMChannelResponse where