module Network.AWS.DirectoryService.UpdateRadius
(
updateRadius
, UpdateRadius
, urDirectoryId
, urRadiusSettings
, updateRadiusResponse
, UpdateRadiusResponse
, urrsResponseStatus
) where
import Network.AWS.DirectoryService.Types
import Network.AWS.DirectoryService.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateRadius = UpdateRadius'
{ _urDirectoryId :: !Text
, _urRadiusSettings :: !RadiusSettings
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateRadius
:: Text
-> RadiusSettings
-> UpdateRadius
updateRadius pDirectoryId_ pRadiusSettings_ =
UpdateRadius'
{ _urDirectoryId = pDirectoryId_
, _urRadiusSettings = pRadiusSettings_
}
urDirectoryId :: Lens' UpdateRadius Text
urDirectoryId = lens _urDirectoryId (\ s a -> s{_urDirectoryId = a});
urRadiusSettings :: Lens' UpdateRadius RadiusSettings
urRadiusSettings = lens _urRadiusSettings (\ s a -> s{_urRadiusSettings = a});
instance AWSRequest UpdateRadius where
type Rs UpdateRadius = UpdateRadiusResponse
request = postJSON directoryService
response
= receiveEmpty
(\ s h x ->
UpdateRadiusResponse' <$> (pure (fromEnum s)))
instance ToHeaders UpdateRadius where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DirectoryService_20150416.UpdateRadius" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateRadius where
toJSON UpdateRadius'{..}
= object
(catMaybes
[Just ("DirectoryId" .= _urDirectoryId),
Just ("RadiusSettings" .= _urRadiusSettings)])
instance ToPath UpdateRadius where
toPath = const "/"
instance ToQuery UpdateRadius where
toQuery = const mempty
newtype UpdateRadiusResponse = UpdateRadiusResponse'
{ _urrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateRadiusResponse
:: Int
-> UpdateRadiusResponse
updateRadiusResponse pResponseStatus_ =
UpdateRadiusResponse'
{ _urrsResponseStatus = pResponseStatus_
}
urrsResponseStatus :: Lens' UpdateRadiusResponse Int
urrsResponseStatus = lens _urrsResponseStatus (\ s a -> s{_urrsResponseStatus = a});