{-# 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.Get
(
MembersGetResource
, membersGet
, MembersGet
, mgMemberKey
, mgGroupKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type MembersGetResource =
"admin" :>
"directory" :>
"v1" :>
"groups" :>
Capture "groupKey" Text :>
"members" :>
Capture "memberKey" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Member
data MembersGet = MembersGet'
{ _mgMemberKey :: !Text
, _mgGroupKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
membersGet
:: Text
-> Text
-> MembersGet
membersGet pMgMemberKey_ pMgGroupKey_ =
MembersGet'
{ _mgMemberKey = pMgMemberKey_
, _mgGroupKey = pMgGroupKey_
}
mgMemberKey :: Lens' MembersGet Text
mgMemberKey
= lens _mgMemberKey (\ s a -> s{_mgMemberKey = a})
mgGroupKey :: Lens' MembersGet Text
mgGroupKey
= lens _mgGroupKey (\ s a -> s{_mgGroupKey = a})
instance GoogleRequest MembersGet where
type Rs MembersGet = Member
type Scopes MembersGet =
'["https://www.googleapis.com/auth/admin.directory.group",
"https://www.googleapis.com/auth/admin.directory.group.member",
"https://www.googleapis.com/auth/admin.directory.group.member.readonly",
"https://www.googleapis.com/auth/admin.directory.group.readonly"]
requestClient MembersGet'{..}
= go _mgGroupKey _mgMemberKey (Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy MembersGetResource)
mempty