{-# 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.Groups.List
(
GroupsListResource
, groupsList
, GroupsList
, glOrderBy
, glDomain
, glSortOrder
, glCustomer
, glQuery
, glPageToken
, glUserKey
, glMaxResults
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type GroupsListResource =
"admin" :>
"directory" :>
"v1" :>
"groups" :>
QueryParam "orderBy" GroupsListOrderBy :>
QueryParam "domain" Text :>
QueryParam "sortOrder" GroupsListSortOrder :>
QueryParam "customer" Text :>
QueryParam "query" Text :>
QueryParam "pageToken" Text :>
QueryParam "userKey" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Groups
data GroupsList = GroupsList'
{ _glOrderBy :: !(Maybe GroupsListOrderBy)
, _glDomain :: !(Maybe Text)
, _glSortOrder :: !(Maybe GroupsListSortOrder)
, _glCustomer :: !(Maybe Text)
, _glQuery :: !(Maybe Text)
, _glPageToken :: !(Maybe Text)
, _glUserKey :: !(Maybe Text)
, _glMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
groupsList
:: GroupsList
groupsList =
GroupsList'
{ _glOrderBy = Nothing
, _glDomain = Nothing
, _glSortOrder = Nothing
, _glCustomer = Nothing
, _glQuery = Nothing
, _glPageToken = Nothing
, _glUserKey = Nothing
, _glMaxResults = Nothing
}
glOrderBy :: Lens' GroupsList (Maybe GroupsListOrderBy)
glOrderBy
= lens _glOrderBy (\ s a -> s{_glOrderBy = a})
glDomain :: Lens' GroupsList (Maybe Text)
glDomain = lens _glDomain (\ s a -> s{_glDomain = a})
glSortOrder :: Lens' GroupsList (Maybe GroupsListSortOrder)
glSortOrder
= lens _glSortOrder (\ s a -> s{_glSortOrder = a})
glCustomer :: Lens' GroupsList (Maybe Text)
glCustomer
= lens _glCustomer (\ s a -> s{_glCustomer = a})
glQuery :: Lens' GroupsList (Maybe Text)
glQuery = lens _glQuery (\ s a -> s{_glQuery = a})
glPageToken :: Lens' GroupsList (Maybe Text)
glPageToken
= lens _glPageToken (\ s a -> s{_glPageToken = a})
glUserKey :: Lens' GroupsList (Maybe Text)
glUserKey
= lens _glUserKey (\ s a -> s{_glUserKey = a})
glMaxResults :: Lens' GroupsList (Maybe Int32)
glMaxResults
= lens _glMaxResults (\ s a -> s{_glMaxResults = a})
. mapping _Coerce
instance GoogleRequest GroupsList where
type Rs GroupsList = Groups
type Scopes GroupsList =
'["https://www.googleapis.com/auth/admin.directory.group",
"https://www.googleapis.com/auth/admin.directory.group.readonly"]
requestClient GroupsList'{..}
= go _glOrderBy _glDomain _glSortOrder _glCustomer
_glQuery
_glPageToken
_glUserKey
_glMaxResults
(Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy GroupsListResource)
mempty