module Network.AWS.DirectoryService.DisableSSO
(
disableSSO
, DisableSSO
, dssoUserName
, dssoPassword
, dssoDirectoryId
, disableSSOResponse
, DisableSSOResponse
, dssorsResponseStatus
) where
import Network.AWS.DirectoryService.Types
import Network.AWS.DirectoryService.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DisableSSO = DisableSSO'
{ _dssoUserName :: !(Maybe Text)
, _dssoPassword :: !(Maybe (Sensitive Text))
, _dssoDirectoryId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
disableSSO
:: Text
-> DisableSSO
disableSSO pDirectoryId_ =
DisableSSO'
{ _dssoUserName = Nothing
, _dssoPassword = Nothing
, _dssoDirectoryId = pDirectoryId_
}
dssoUserName :: Lens' DisableSSO (Maybe Text)
dssoUserName = lens _dssoUserName (\ s a -> s{_dssoUserName = a});
dssoPassword :: Lens' DisableSSO (Maybe Text)
dssoPassword = lens _dssoPassword (\ s a -> s{_dssoPassword = a}) . mapping _Sensitive;
dssoDirectoryId :: Lens' DisableSSO Text
dssoDirectoryId = lens _dssoDirectoryId (\ s a -> s{_dssoDirectoryId = a});
instance AWSRequest DisableSSO where
type Rs DisableSSO = DisableSSOResponse
request = postJSON directoryService
response
= receiveEmpty
(\ s h x ->
DisableSSOResponse' <$> (pure (fromEnum s)))
instance Hashable DisableSSO
instance NFData DisableSSO
instance ToHeaders DisableSSO where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DirectoryService_20150416.DisableSso" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DisableSSO where
toJSON DisableSSO'{..}
= object
(catMaybes
[("UserName" .=) <$> _dssoUserName,
("Password" .=) <$> _dssoPassword,
Just ("DirectoryId" .= _dssoDirectoryId)])
instance ToPath DisableSSO where
toPath = const "/"
instance ToQuery DisableSSO where
toQuery = const mempty
newtype DisableSSOResponse = DisableSSOResponse'
{ _dssorsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
disableSSOResponse
:: Int
-> DisableSSOResponse
disableSSOResponse pResponseStatus_ =
DisableSSOResponse'
{ _dssorsResponseStatus = pResponseStatus_
}
dssorsResponseStatus :: Lens' DisableSSOResponse Int
dssorsResponseStatus = lens _dssorsResponseStatus (\ s a -> s{_dssorsResponseStatus = a});
instance NFData DisableSSOResponse