module Network.AWS.APIGateway.UpdateAccount
(
updateAccount
, UpdateAccount
, uaPatchOperations
, account
, Account
, aCloudwatchRoleARN
, 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 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