{-# 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.GetAPNSSandboxChannel
(
getAPNSSandboxChannel
, GetAPNSSandboxChannel
, gascApplicationId
, getAPNSSandboxChannelResponse
, GetAPNSSandboxChannelResponse
, gascrsResponseStatus
, gascrsAPNSSandboxChannelResponse
) 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 GetAPNSSandboxChannel = GetAPNSSandboxChannel'
{ _gascApplicationId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getAPNSSandboxChannel
:: Text
-> GetAPNSSandboxChannel
getAPNSSandboxChannel pApplicationId_ =
GetAPNSSandboxChannel' {_gascApplicationId = pApplicationId_}
gascApplicationId :: Lens' GetAPNSSandboxChannel Text
gascApplicationId = lens _gascApplicationId (\ s a -> s{_gascApplicationId = a})
instance AWSRequest GetAPNSSandboxChannel where
type Rs GetAPNSSandboxChannel =
GetAPNSSandboxChannelResponse
request = get pinpoint
response
= receiveJSON
(\ s h x ->
GetAPNSSandboxChannelResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable GetAPNSSandboxChannel where
instance NFData GetAPNSSandboxChannel where
instance ToHeaders GetAPNSSandboxChannel where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath GetAPNSSandboxChannel where
toPath GetAPNSSandboxChannel'{..}
= mconcat
["/v1/apps/", toBS _gascApplicationId,
"/channels/apns_sandbox"]
instance ToQuery GetAPNSSandboxChannel where
toQuery = const mempty
data GetAPNSSandboxChannelResponse = GetAPNSSandboxChannelResponse'
{ _gascrsResponseStatus :: !Int
, _gascrsAPNSSandboxChannelResponse :: !APNSSandboxChannelResponse
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getAPNSSandboxChannelResponse
:: Int
-> APNSSandboxChannelResponse
-> GetAPNSSandboxChannelResponse
getAPNSSandboxChannelResponse pResponseStatus_ pAPNSSandboxChannelResponse_ =
GetAPNSSandboxChannelResponse'
{ _gascrsResponseStatus = pResponseStatus_
, _gascrsAPNSSandboxChannelResponse = pAPNSSandboxChannelResponse_
}
gascrsResponseStatus :: Lens' GetAPNSSandboxChannelResponse Int
gascrsResponseStatus = lens _gascrsResponseStatus (\ s a -> s{_gascrsResponseStatus = a})
gascrsAPNSSandboxChannelResponse :: Lens' GetAPNSSandboxChannelResponse APNSSandboxChannelResponse
gascrsAPNSSandboxChannelResponse = lens _gascrsAPNSSandboxChannelResponse (\ s a -> s{_gascrsAPNSSandboxChannelResponse = a})
instance NFData GetAPNSSandboxChannelResponse where