{-# 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.Lambda.GetAccountSettings
(
getAccountSettings
, GetAccountSettings
, getAccountSettingsResponse
, GetAccountSettingsResponse
, gasrsAccountLimit
, gasrsAccountUsage
, gasrsResponseStatus
) where
import Network.AWS.Lambda.Types
import Network.AWS.Lambda.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data GetAccountSettings =
GetAccountSettings'
deriving (Eq, Read, Show, Data, Typeable, Generic)
getAccountSettings
:: GetAccountSettings
getAccountSettings = GetAccountSettings'
instance AWSRequest GetAccountSettings where
type Rs GetAccountSettings =
GetAccountSettingsResponse
request = get lambda
response
= receiveJSON
(\ s h x ->
GetAccountSettingsResponse' <$>
(x .?> "AccountLimit") <*> (x .?> "AccountUsage") <*>
(pure (fromEnum s)))
instance Hashable GetAccountSettings where
instance NFData GetAccountSettings where
instance ToHeaders GetAccountSettings where
toHeaders = const mempty
instance ToPath GetAccountSettings where
toPath = const "/2016-08-19/account-settings/"
instance ToQuery GetAccountSettings where
toQuery = const mempty
data GetAccountSettingsResponse = GetAccountSettingsResponse'
{ _gasrsAccountLimit :: !(Maybe AccountLimit)
, _gasrsAccountUsage :: !(Maybe AccountUsage)
, _gasrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getAccountSettingsResponse
:: Int
-> GetAccountSettingsResponse
getAccountSettingsResponse pResponseStatus_ =
GetAccountSettingsResponse'
{ _gasrsAccountLimit = Nothing
, _gasrsAccountUsage = Nothing
, _gasrsResponseStatus = pResponseStatus_
}
gasrsAccountLimit :: Lens' GetAccountSettingsResponse (Maybe AccountLimit)
gasrsAccountLimit = lens _gasrsAccountLimit (\ s a -> s{_gasrsAccountLimit = a})
gasrsAccountUsage :: Lens' GetAccountSettingsResponse (Maybe AccountUsage)
gasrsAccountUsage = lens _gasrsAccountUsage (\ s a -> s{_gasrsAccountUsage = a})
gasrsResponseStatus :: Lens' GetAccountSettingsResponse Int
gasrsResponseStatus = lens _gasrsResponseStatus (\ s a -> s{_gasrsResponseStatus = a})
instance NFData GetAccountSettingsResponse where