{-# 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.List
(
MembersListResource
, membersList
, MembersList
, mlRoles
, mlGroupKey
, mlPageToken
, mlIncludeDerivedMembership
, mlMaxResults
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type MembersListResource =
"admin" :>
"directory" :>
"v1" :>
"groups" :>
Capture "groupKey" Text :>
"members" :>
QueryParam "roles" Text :>
QueryParam "pageToken" Text :>
QueryParam "includeDerivedMembership" Bool :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Members
data MembersList = MembersList'
{ _mlRoles :: !(Maybe Text)
, _mlGroupKey :: !Text
, _mlPageToken :: !(Maybe Text)
, _mlIncludeDerivedMembership :: !(Maybe Bool)
, _mlMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
membersList
:: Text
-> MembersList
membersList pMlGroupKey_ =
MembersList'
{ _mlRoles = Nothing
, _mlGroupKey = pMlGroupKey_
, _mlPageToken = Nothing
, _mlIncludeDerivedMembership = Nothing
, _mlMaxResults = Nothing
}
mlRoles :: Lens' MembersList (Maybe Text)
mlRoles = lens _mlRoles (\ s a -> s{_mlRoles = a})
mlGroupKey :: Lens' MembersList Text
mlGroupKey
= lens _mlGroupKey (\ s a -> s{_mlGroupKey = a})
mlPageToken :: Lens' MembersList (Maybe Text)
mlPageToken
= lens _mlPageToken (\ s a -> s{_mlPageToken = a})
mlIncludeDerivedMembership :: Lens' MembersList (Maybe Bool)
mlIncludeDerivedMembership
= lens _mlIncludeDerivedMembership
(\ s a -> s{_mlIncludeDerivedMembership = a})
mlMaxResults :: Lens' MembersList (Maybe Int32)
mlMaxResults
= lens _mlMaxResults (\ s a -> s{_mlMaxResults = a})
. mapping _Coerce
instance GoogleRequest MembersList where
type Rs MembersList = Members
type Scopes MembersList =
'["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 MembersList'{..}
= go _mlGroupKey _mlRoles _mlPageToken
_mlIncludeDerivedMembership
_mlMaxResults
(Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy MembersListResource)
mempty