{-# 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.UpdateAPNSVoipSandboxChannel
(
updateAPNSVoipSandboxChannel
, UpdateAPNSVoipSandboxChannel
, uavscApplicationId
, uavscAPNSVoipSandboxChannelRequest
, updateAPNSVoipSandboxChannelResponse
, UpdateAPNSVoipSandboxChannelResponse
, uavscrsResponseStatus
, uavscrsAPNSVoipSandboxChannelResponse
) 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
data UpdateAPNSVoipSandboxChannel = UpdateAPNSVoipSandboxChannel'
{ _uavscApplicationId :: !Text
, _uavscAPNSVoipSandboxChannelRequest :: !APNSVoipSandboxChannelRequest
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateAPNSVoipSandboxChannel
:: Text
-> APNSVoipSandboxChannelRequest
-> UpdateAPNSVoipSandboxChannel
updateAPNSVoipSandboxChannel pApplicationId_ pAPNSVoipSandboxChannelRequest_ =
UpdateAPNSVoipSandboxChannel'
{ _uavscApplicationId = pApplicationId_
, _uavscAPNSVoipSandboxChannelRequest = pAPNSVoipSandboxChannelRequest_
}
uavscApplicationId :: Lens' UpdateAPNSVoipSandboxChannel Text
uavscApplicationId = lens _uavscApplicationId (\ s a -> s{_uavscApplicationId = a})
uavscAPNSVoipSandboxChannelRequest :: Lens' UpdateAPNSVoipSandboxChannel APNSVoipSandboxChannelRequest
uavscAPNSVoipSandboxChannelRequest = lens _uavscAPNSVoipSandboxChannelRequest (\ s a -> s{_uavscAPNSVoipSandboxChannelRequest = a})
instance AWSRequest UpdateAPNSVoipSandboxChannel
where
type Rs UpdateAPNSVoipSandboxChannel =
UpdateAPNSVoipSandboxChannelResponse
request = putJSON pinpoint
response
= receiveJSON
(\ s h x ->
UpdateAPNSVoipSandboxChannelResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable UpdateAPNSVoipSandboxChannel where
instance NFData UpdateAPNSVoipSandboxChannel where
instance ToHeaders UpdateAPNSVoipSandboxChannel where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateAPNSVoipSandboxChannel where
toJSON UpdateAPNSVoipSandboxChannel'{..}
= object
(catMaybes
[Just
("APNSVoipSandboxChannelRequest" .=
_uavscAPNSVoipSandboxChannelRequest)])
instance ToPath UpdateAPNSVoipSandboxChannel where
toPath UpdateAPNSVoipSandboxChannel'{..}
= mconcat
["/v1/apps/", toBS _uavscApplicationId,
"/channels/apns_voip_sandbox"]
instance ToQuery UpdateAPNSVoipSandboxChannel where
toQuery = const mempty
data UpdateAPNSVoipSandboxChannelResponse = UpdateAPNSVoipSandboxChannelResponse'
{ _uavscrsResponseStatus :: !Int
, _uavscrsAPNSVoipSandboxChannelResponse :: !APNSVoipSandboxChannelResponse
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateAPNSVoipSandboxChannelResponse
:: Int
-> APNSVoipSandboxChannelResponse
-> UpdateAPNSVoipSandboxChannelResponse
updateAPNSVoipSandboxChannelResponse pResponseStatus_ pAPNSVoipSandboxChannelResponse_ =
UpdateAPNSVoipSandboxChannelResponse'
{ _uavscrsResponseStatus = pResponseStatus_
, _uavscrsAPNSVoipSandboxChannelResponse = pAPNSVoipSandboxChannelResponse_
}
uavscrsResponseStatus :: Lens' UpdateAPNSVoipSandboxChannelResponse Int
uavscrsResponseStatus = lens _uavscrsResponseStatus (\ s a -> s{_uavscrsResponseStatus = a})
uavscrsAPNSVoipSandboxChannelResponse :: Lens' UpdateAPNSVoipSandboxChannelResponse APNSVoipSandboxChannelResponse
uavscrsAPNSVoipSandboxChannelResponse = lens _uavscrsAPNSVoipSandboxChannelResponse (\ s a -> s{_uavscrsAPNSVoipSandboxChannelResponse = a})
instance NFData UpdateAPNSVoipSandboxChannelResponse
where