{-# 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.GetApplicationSettings
(
getApplicationSettings
, GetApplicationSettings
, gasApplicationId
, getApplicationSettingsResponse
, GetApplicationSettingsResponse
, gassrsResponseStatus
, gassrsApplicationSettingsResource
) 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 GetApplicationSettings = GetApplicationSettings'
{ _gasApplicationId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getApplicationSettings
:: Text
-> GetApplicationSettings
getApplicationSettings pApplicationId_ =
GetApplicationSettings' {_gasApplicationId = pApplicationId_}
gasApplicationId :: Lens' GetApplicationSettings Text
gasApplicationId = lens _gasApplicationId (\ s a -> s{_gasApplicationId = a})
instance AWSRequest GetApplicationSettings where
type Rs GetApplicationSettings =
GetApplicationSettingsResponse
request = get pinpoint
response
= receiveJSON
(\ s h x ->
GetApplicationSettingsResponse' <$>
(pure (fromEnum s)) <*> (eitherParseJSON x))
instance Hashable GetApplicationSettings where
instance NFData GetApplicationSettings where
instance ToHeaders GetApplicationSettings where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath GetApplicationSettings where
toPath GetApplicationSettings'{..}
= mconcat
["/v1/apps/", toBS _gasApplicationId, "/settings"]
instance ToQuery GetApplicationSettings where
toQuery = const mempty
data GetApplicationSettingsResponse = GetApplicationSettingsResponse'
{ _gassrsResponseStatus :: !Int
, _gassrsApplicationSettingsResource :: !ApplicationSettingsResource
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getApplicationSettingsResponse
:: Int
-> ApplicationSettingsResource
-> GetApplicationSettingsResponse
getApplicationSettingsResponse pResponseStatus_ pApplicationSettingsResource_ =
GetApplicationSettingsResponse'
{ _gassrsResponseStatus = pResponseStatus_
, _gassrsApplicationSettingsResource = pApplicationSettingsResource_
}
gassrsResponseStatus :: Lens' GetApplicationSettingsResponse Int
gassrsResponseStatus = lens _gassrsResponseStatus (\ s a -> s{_gassrsResponseStatus = a})
gassrsApplicationSettingsResource :: Lens' GetApplicationSettingsResponse ApplicationSettingsResource
gassrsApplicationSettingsResource = lens _gassrsApplicationSettingsResource (\ s a -> s{_gassrsApplicationSettingsResource = a})
instance NFData GetApplicationSettingsResponse where