{-# 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.WorkDocs.DeleteUser
(
deleteUser
, DeleteUser
, duuAuthenticationToken
, duuUserId
, deleteUserResponse
, DeleteUserResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.WorkDocs.Types
import Network.AWS.WorkDocs.Types.Product
data DeleteUser = DeleteUser'
{ _duuAuthenticationToken :: !(Maybe (Sensitive Text))
, _duuUserId :: !Text
} deriving (Eq, Show, Data, Typeable, Generic)
deleteUser
:: Text
-> DeleteUser
deleteUser pUserId_ =
DeleteUser' {_duuAuthenticationToken = Nothing, _duuUserId = pUserId_}
duuAuthenticationToken :: Lens' DeleteUser (Maybe Text)
duuAuthenticationToken = lens _duuAuthenticationToken (\ s a -> s{_duuAuthenticationToken = a}) . mapping _Sensitive
duuUserId :: Lens' DeleteUser Text
duuUserId = lens _duuUserId (\ s a -> s{_duuUserId = a})
instance AWSRequest DeleteUser where
type Rs DeleteUser = DeleteUserResponse
request = delete workDocs
response = receiveNull DeleteUserResponse'
instance Hashable DeleteUser where
instance NFData DeleteUser where
instance ToHeaders DeleteUser where
toHeaders DeleteUser'{..}
= mconcat
["Authentication" =# _duuAuthenticationToken,
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)]
instance ToPath DeleteUser where
toPath DeleteUser'{..}
= mconcat ["/api/v1/users/", toBS _duuUserId]
instance ToQuery DeleteUser where
toQuery = const mempty
data DeleteUserResponse =
DeleteUserResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteUserResponse
:: DeleteUserResponse
deleteUserResponse = DeleteUserResponse'
instance NFData DeleteUserResponse where