{-# 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.Classroom.Courses.Students.List
(
CoursesStudentsListResource
, coursesStudentsList
, CoursesStudentsList
, cslXgafv
, cslUploadProtocol
, cslCourseId
, cslAccessToken
, cslUploadType
, cslPageToken
, cslPageSize
, cslCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesStudentsListResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"students" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListStudentsResponse
data CoursesStudentsList = CoursesStudentsList'
{ _cslXgafv :: !(Maybe Xgafv)
, _cslUploadProtocol :: !(Maybe Text)
, _cslCourseId :: !Text
, _cslAccessToken :: !(Maybe Text)
, _cslUploadType :: !(Maybe Text)
, _cslPageToken :: !(Maybe Text)
, _cslPageSize :: !(Maybe (Textual Int32))
, _cslCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesStudentsList
:: Text
-> CoursesStudentsList
coursesStudentsList pCslCourseId_ =
CoursesStudentsList'
{ _cslXgafv = Nothing
, _cslUploadProtocol = Nothing
, _cslCourseId = pCslCourseId_
, _cslAccessToken = Nothing
, _cslUploadType = Nothing
, _cslPageToken = Nothing
, _cslPageSize = Nothing
, _cslCallback = Nothing
}
cslXgafv :: Lens' CoursesStudentsList (Maybe Xgafv)
cslXgafv = lens _cslXgafv (\ s a -> s{_cslXgafv = a})
cslUploadProtocol :: Lens' CoursesStudentsList (Maybe Text)
cslUploadProtocol
= lens _cslUploadProtocol
(\ s a -> s{_cslUploadProtocol = a})
cslCourseId :: Lens' CoursesStudentsList Text
cslCourseId
= lens _cslCourseId (\ s a -> s{_cslCourseId = a})
cslAccessToken :: Lens' CoursesStudentsList (Maybe Text)
cslAccessToken
= lens _cslAccessToken
(\ s a -> s{_cslAccessToken = a})
cslUploadType :: Lens' CoursesStudentsList (Maybe Text)
cslUploadType
= lens _cslUploadType
(\ s a -> s{_cslUploadType = a})
cslPageToken :: Lens' CoursesStudentsList (Maybe Text)
cslPageToken
= lens _cslPageToken (\ s a -> s{_cslPageToken = a})
cslPageSize :: Lens' CoursesStudentsList (Maybe Int32)
cslPageSize
= lens _cslPageSize (\ s a -> s{_cslPageSize = a}) .
mapping _Coerce
cslCallback :: Lens' CoursesStudentsList (Maybe Text)
cslCallback
= lens _cslCallback (\ s a -> s{_cslCallback = a})
instance GoogleRequest CoursesStudentsList where
type Rs CoursesStudentsList = ListStudentsResponse
type Scopes CoursesStudentsList =
'["https://www.googleapis.com/auth/classroom.profile.emails",
"https://www.googleapis.com/auth/classroom.profile.photos",
"https://www.googleapis.com/auth/classroom.rosters",
"https://www.googleapis.com/auth/classroom.rosters.readonly"]
requestClient CoursesStudentsList'{..}
= go _cslCourseId _cslXgafv _cslUploadProtocol
_cslAccessToken
_cslUploadType
_cslPageToken
_cslPageSize
_cslCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesStudentsListResource)
mempty