{-# 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.GetAPNSVoipChannel
(
getAPNSVoipChannel
, GetAPNSVoipChannel
, gavcApplicationId
, getAPNSVoipChannelResponse
, GetAPNSVoipChannelResponse
, gavcrsResponseStatus
, gavcrsAPNSVoipChannelResponse
) 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 GetAPNSVoipChannel = GetAPNSVoipChannel'
{ _gavcApplicationId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getAPNSVoipChannel
:: Text
-> GetAPNSVoipChannel
getAPNSVoipChannel pApplicationId_ =
GetAPNSVoipChannel' {_gavcApplicationId = pApplicationId_}
gavcApplicationId :: Lens' GetAPNSVoipChannel Text
gavcApplicationId = lens _gavcApplicationId (\ s a -> s{_gavcApplicationId = a})
instance AWSRequest GetAPNSVoipChannel where
type Rs GetAPNSVoipChannel =
GetAPNSVoipChannelResponse
request = get pinpoint
response
= receiveJSON
(\ s h x ->
GetAPNSVoipChannelResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable GetAPNSVoipChannel where
instance NFData GetAPNSVoipChannel where
instance ToHeaders GetAPNSVoipChannel where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath GetAPNSVoipChannel where
toPath GetAPNSVoipChannel'{..}
= mconcat
["/v1/apps/", toBS _gavcApplicationId,
"/channels/apns_voip"]
instance ToQuery GetAPNSVoipChannel where
toQuery = const mempty
data GetAPNSVoipChannelResponse = GetAPNSVoipChannelResponse'
{ _gavcrsResponseStatus :: !Int
, _gavcrsAPNSVoipChannelResponse :: !APNSVoipChannelResponse
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getAPNSVoipChannelResponse
:: Int
-> APNSVoipChannelResponse
-> GetAPNSVoipChannelResponse
getAPNSVoipChannelResponse pResponseStatus_ pAPNSVoipChannelResponse_ =
GetAPNSVoipChannelResponse'
{ _gavcrsResponseStatus = pResponseStatus_
, _gavcrsAPNSVoipChannelResponse = pAPNSVoipChannelResponse_
}
gavcrsResponseStatus :: Lens' GetAPNSVoipChannelResponse Int
gavcrsResponseStatus = lens _gavcrsResponseStatus (\ s a -> s{_gavcrsResponseStatus = a})
gavcrsAPNSVoipChannelResponse :: Lens' GetAPNSVoipChannelResponse APNSVoipChannelResponse
gavcrsAPNSVoipChannelResponse = lens _gavcrsAPNSVoipChannelResponse (\ s a -> s{_gavcrsAPNSVoipChannelResponse = a})
instance NFData GetAPNSVoipChannelResponse where