{-# 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.Members.Update
(
MembersUpdateResource
, membersUpdate
, MembersUpdate
, muMemberKey
, muGroupKey
, muPayload
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type MembersUpdateResource =
"admin" :>
"directory" :>
"v1" :>
"groups" :>
Capture "groupKey" Text :>
"members" :>
Capture "memberKey" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Member :> Put '[JSON] Member
data MembersUpdate = MembersUpdate'
{ _muMemberKey :: !Text
, _muGroupKey :: !Text
, _muPayload :: !Member
} deriving (Eq,Show,Data,Typeable,Generic)
membersUpdate
:: Text
-> Text
-> Member
-> MembersUpdate
membersUpdate pMuMemberKey_ pMuGroupKey_ pMuPayload_ =
MembersUpdate'
{ _muMemberKey = pMuMemberKey_
, _muGroupKey = pMuGroupKey_
, _muPayload = pMuPayload_
}
muMemberKey :: Lens' MembersUpdate Text
muMemberKey
= lens _muMemberKey (\ s a -> s{_muMemberKey = a})
muGroupKey :: Lens' MembersUpdate Text
muGroupKey
= lens _muGroupKey (\ s a -> s{_muGroupKey = a})
muPayload :: Lens' MembersUpdate Member
muPayload
= lens _muPayload (\ s a -> s{_muPayload = a})
instance GoogleRequest MembersUpdate where
type Rs MembersUpdate = Member
type Scopes MembersUpdate =
'["https://www.googleapis.com/auth/admin.directory.group",
"https://www.googleapis.com/auth/admin.directory.group.member"]
requestClient MembersUpdate'{..}
= go _muGroupKey _muMemberKey (Just AltJSON)
_muPayload
directoryService
where go
= buildClient (Proxy :: Proxy MembersUpdateResource)
mempty