{-# 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.DeleteSmsChannel
(
deleteSmsChannel
, DeleteSmsChannel
, dscApplicationId
, deleteSmsChannelResponse
, DeleteSmsChannelResponse
, dscrsResponseStatus
, dscrsSMSChannelResponse
) 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 DeleteSmsChannel = DeleteSmsChannel'
{ _dscApplicationId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSmsChannel
:: Text
-> DeleteSmsChannel
deleteSmsChannel pApplicationId_ =
DeleteSmsChannel' {_dscApplicationId = pApplicationId_}
dscApplicationId :: Lens' DeleteSmsChannel Text
dscApplicationId = lens _dscApplicationId (\ s a -> s{_dscApplicationId = a})
instance AWSRequest DeleteSmsChannel where
type Rs DeleteSmsChannel = DeleteSmsChannelResponse
request = delete pinpoint
response
= receiveJSON
(\ s h x ->
DeleteSmsChannelResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable DeleteSmsChannel where
instance NFData DeleteSmsChannel where
instance ToHeaders DeleteSmsChannel where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteSmsChannel where
toPath DeleteSmsChannel'{..}
= mconcat
["/v1/apps/", toBS _dscApplicationId,
"/channels/sms"]
instance ToQuery DeleteSmsChannel where
toQuery = const mempty
data DeleteSmsChannelResponse = DeleteSmsChannelResponse'
{ _dscrsResponseStatus :: !Int
, _dscrsSMSChannelResponse :: !SMSChannelResponse
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSmsChannelResponse
:: Int
-> SMSChannelResponse
-> DeleteSmsChannelResponse
deleteSmsChannelResponse pResponseStatus_ pSMSChannelResponse_ =
DeleteSmsChannelResponse'
{ _dscrsResponseStatus = pResponseStatus_
, _dscrsSMSChannelResponse = pSMSChannelResponse_
}
dscrsResponseStatus :: Lens' DeleteSmsChannelResponse Int
dscrsResponseStatus = lens _dscrsResponseStatus (\ s a -> s{_dscrsResponseStatus = a})
dscrsSMSChannelResponse :: Lens' DeleteSmsChannelResponse SMSChannelResponse
dscrsSMSChannelResponse = lens _dscrsSMSChannelResponse (\ s a -> s{_dscrsSMSChannelResponse = a})
instance NFData DeleteSmsChannelResponse where