{-# 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.Update
(
UsersUpdateResource
, usersUpdate
, UsersUpdate
, uPayload
, uUserKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type UsersUpdateResource =
"admin" :>
"directory" :>
"v1" :>
"users" :>
Capture "userKey" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] User :> Put '[JSON] User
data UsersUpdate = UsersUpdate'
{ _uPayload :: !User
, _uUserKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersUpdate
:: User
-> Text
-> UsersUpdate
usersUpdate pUPayload_ pUUserKey_ =
UsersUpdate'
{ _uPayload = pUPayload_
, _uUserKey = pUUserKey_
}
uPayload :: Lens' UsersUpdate User
uPayload = lens _uPayload (\ s a -> s{_uPayload = a})
uUserKey :: Lens' UsersUpdate Text
uUserKey = lens _uUserKey (\ s a -> s{_uUserKey = a})
instance GoogleRequest UsersUpdate where
type Rs UsersUpdate = User
type Scopes UsersUpdate =
'["https://www.googleapis.com/auth/admin.directory.user"]
requestClient UsersUpdate'{..}
= go _uUserKey (Just AltJSON) _uPayload
directoryService
where go
= buildClient (Proxy :: Proxy UsersUpdateResource)
mempty