{-# 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.Patch
(
UsersPatchResource
, usersPatch
, UsersPatch
, upEnterpriseId
, upPayload
, upUserId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type UsersPatchResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] User :> Patch '[JSON] User
data UsersPatch = UsersPatch'
{ _upEnterpriseId :: !Text
, _upPayload :: !User
, _upUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersPatch
:: Text
-> User
-> Text
-> UsersPatch
usersPatch pUpEnterpriseId_ pUpPayload_ pUpUserId_ =
UsersPatch'
{ _upEnterpriseId = pUpEnterpriseId_
, _upPayload = pUpPayload_
, _upUserId = pUpUserId_
}
upEnterpriseId :: Lens' UsersPatch Text
upEnterpriseId
= lens _upEnterpriseId
(\ s a -> s{_upEnterpriseId = a})
upPayload :: Lens' UsersPatch User
upPayload
= lens _upPayload (\ s a -> s{_upPayload = a})
upUserId :: Lens' UsersPatch Text
upUserId = lens _upUserId (\ s a -> s{_upUserId = a})
instance GoogleRequest UsersPatch where
type Rs UsersPatch = User
type Scopes UsersPatch =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient UsersPatch'{..}
= go _upEnterpriseId _upUserId (Just AltJSON)
_upPayload
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy UsersPatchResource)
mempty