{-# 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.AndroidEnterprise.Users.Update
(
UsersUpdateResource
, usersUpdate
, UsersUpdate
, uuEnterpriseId
, uuPayload
, uuUserId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type UsersUpdateResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] User :> Put '[JSON] User
data UsersUpdate = UsersUpdate'
{ _uuEnterpriseId :: !Text
, _uuPayload :: !User
, _uuUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersUpdate
:: Text
-> User
-> Text
-> UsersUpdate
usersUpdate pUuEnterpriseId_ pUuPayload_ pUuUserId_ =
UsersUpdate'
{ _uuEnterpriseId = pUuEnterpriseId_
, _uuPayload = pUuPayload_
, _uuUserId = pUuUserId_
}
uuEnterpriseId :: Lens' UsersUpdate Text
uuEnterpriseId
= lens _uuEnterpriseId
(\ s a -> s{_uuEnterpriseId = a})
uuPayload :: Lens' UsersUpdate User
uuPayload
= lens _uuPayload (\ s a -> s{_uuPayload = a})
uuUserId :: Lens' UsersUpdate Text
uuUserId = lens _uuUserId (\ s a -> s{_uuUserId = a})
instance GoogleRequest UsersUpdate where
type Rs UsersUpdate = User
type Scopes UsersUpdate =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient UsersUpdate'{..}
= go _uuEnterpriseId _uuUserId (Just AltJSON)
_uuPayload
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy UsersUpdateResource)
mempty