{-# 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.APIGateway.UpdateAccount
(
updateAccount
, UpdateAccount
, uaPatchOperations
, account
, Account
, aApiKeyVersion
, aCloudwatchRoleARN
, aFeatures
, aThrottleSettings
) where
import Network.AWS.APIGateway.Types
import Network.AWS.APIGateway.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype UpdateAccount = UpdateAccount'
{ _uaPatchOperations :: Maybe [PatchOperation]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateAccount
:: UpdateAccount
updateAccount =
UpdateAccount'
{ _uaPatchOperations = Nothing
}
uaPatchOperations :: Lens' UpdateAccount [PatchOperation]
uaPatchOperations = lens _uaPatchOperations (\ s a -> s{_uaPatchOperations = a}) . _Default . _Coerce;
instance AWSRequest UpdateAccount where
type Rs UpdateAccount = Account
request = patchJSON apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable UpdateAccount
instance NFData UpdateAccount
instance ToHeaders UpdateAccount where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToJSON UpdateAccount where
toJSON UpdateAccount'{..}
= object
(catMaybes
[("patchOperations" .=) <$> _uaPatchOperations])
instance ToPath UpdateAccount where
toPath = const "/account"
instance ToQuery UpdateAccount where
toQuery = const mempty