{-# 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.CognitoIdentityProvider.DeleteUser
(
deleteUser
, DeleteUser
, duAccessToken
, deleteUserResponse
, DeleteUserResponse
) where
import Network.AWS.CognitoIdentityProvider.Types
import Network.AWS.CognitoIdentityProvider.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteUser = DeleteUser'
{ _duAccessToken :: Maybe (Sensitive Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteUser
:: DeleteUser
deleteUser =
DeleteUser'
{ _duAccessToken = Nothing
}
duAccessToken :: Lens' DeleteUser (Maybe Text)
duAccessToken = lens _duAccessToken (\ s a -> s{_duAccessToken = a}) . mapping _Sensitive;
instance AWSRequest DeleteUser where
type Rs DeleteUser = DeleteUserResponse
request = postJSON cognitoIdentityProvider
response = receiveNull DeleteUserResponse'
instance Hashable DeleteUser
instance NFData DeleteUser
instance ToHeaders DeleteUser where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSCognitoIdentityProviderService.DeleteUser" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteUser where
toJSON DeleteUser'{..}
= object
(catMaybes [("AccessToken" .=) <$> _duAccessToken])
instance ToPath DeleteUser where
toPath = const "/"
instance ToQuery DeleteUser where
toQuery = const mempty
data DeleteUserResponse =
DeleteUserResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteUserResponse
:: DeleteUserResponse
deleteUserResponse = DeleteUserResponse'
instance NFData DeleteUserResponse