{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Directory.Users.Undelete
(
UsersUndeleteResource
, usersUndelete
, UsersUndelete
, uuPayload
, uuUserKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type UsersUndeleteResource =
"admin" :>
"directory" :>
"v1" :>
"users" :>
Capture "userKey" Text :>
"undelete" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UserUndelete :> Post '[JSON] ()
data UsersUndelete = UsersUndelete'
{ _uuPayload :: !UserUndelete
, _uuUserKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersUndelete
:: UserUndelete
-> Text
-> UsersUndelete
usersUndelete pUuPayload_ pUuUserKey_ =
UsersUndelete'
{ _uuPayload = pUuPayload_
, _uuUserKey = pUuUserKey_
}
uuPayload :: Lens' UsersUndelete UserUndelete
uuPayload
= lens _uuPayload (\ s a -> s{_uuPayload = a})
uuUserKey :: Lens' UsersUndelete Text
uuUserKey
= lens _uuUserKey (\ s a -> s{_uuUserKey = a})
instance GoogleRequest UsersUndelete where
type Rs UsersUndelete = ()
type Scopes UsersUndelete =
'["https://www.googleapis.com/auth/admin.directory.user"]
requestClient UsersUndelete'{..}
= go _uuUserKey (Just AltJSON) _uuPayload
directoryService
where go
= buildClient (Proxy :: Proxy UsersUndeleteResource)
mempty