{-# 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.Patch
(
MembersPatchResource
, membersPatch
, MembersPatch
, mpMemberKey
, mpGroupKey
, mpPayload
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type MembersPatchResource =
"admin" :>
"directory" :>
"v1" :>
"groups" :>
Capture "groupKey" Text :>
"members" :>
Capture "memberKey" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Member :> Patch '[JSON] Member
data MembersPatch = MembersPatch'
{ _mpMemberKey :: !Text
, _mpGroupKey :: !Text
, _mpPayload :: !Member
} deriving (Eq,Show,Data,Typeable,Generic)
membersPatch
:: Text
-> Text
-> Member
-> MembersPatch
membersPatch pMpMemberKey_ pMpGroupKey_ pMpPayload_ =
MembersPatch'
{ _mpMemberKey = pMpMemberKey_
, _mpGroupKey = pMpGroupKey_
, _mpPayload = pMpPayload_
}
mpMemberKey :: Lens' MembersPatch Text
mpMemberKey
= lens _mpMemberKey (\ s a -> s{_mpMemberKey = a})
mpGroupKey :: Lens' MembersPatch Text
mpGroupKey
= lens _mpGroupKey (\ s a -> s{_mpGroupKey = a})
mpPayload :: Lens' MembersPatch Member
mpPayload
= lens _mpPayload (\ s a -> s{_mpPayload = a})
instance GoogleRequest MembersPatch where
type Rs MembersPatch = Member
type Scopes MembersPatch =
'["https://www.googleapis.com/auth/admin.directory.group",
"https://www.googleapis.com/auth/admin.directory.group.member"]
requestClient MembersPatch'{..}
= go _mpGroupKey _mpMemberKey (Just AltJSON)
_mpPayload
directoryService
where go
= buildClient (Proxy :: Proxy MembersPatchResource)
mempty