{-# 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.List
(
CoursesListResource
, coursesList
, CoursesList
, clStudentId
, clXgafv
, clUploadProtocol
, clAccessToken
, clUploadType
, clTeacherId
, clPageToken
, clPageSize
, clCourseStates
, clCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesListResource =
"v1" :>
"courses" :>
QueryParam "studentId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "teacherId" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParams "courseStates" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListCoursesResponse
data CoursesList = CoursesList'
{ _clStudentId :: !(Maybe Text)
, _clXgafv :: !(Maybe Xgafv)
, _clUploadProtocol :: !(Maybe Text)
, _clAccessToken :: !(Maybe Text)
, _clUploadType :: !(Maybe Text)
, _clTeacherId :: !(Maybe Text)
, _clPageToken :: !(Maybe Text)
, _clPageSize :: !(Maybe (Textual Int32))
, _clCourseStates :: !(Maybe [Text])
, _clCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesList
:: CoursesList
coursesList =
CoursesList'
{ _clStudentId = Nothing
, _clXgafv = Nothing
, _clUploadProtocol = Nothing
, _clAccessToken = Nothing
, _clUploadType = Nothing
, _clTeacherId = Nothing
, _clPageToken = Nothing
, _clPageSize = Nothing
, _clCourseStates = Nothing
, _clCallback = Nothing
}
clStudentId :: Lens' CoursesList (Maybe Text)
clStudentId
= lens _clStudentId (\ s a -> s{_clStudentId = a})
clXgafv :: Lens' CoursesList (Maybe Xgafv)
clXgafv = lens _clXgafv (\ s a -> s{_clXgafv = a})
clUploadProtocol :: Lens' CoursesList (Maybe Text)
clUploadProtocol
= lens _clUploadProtocol
(\ s a -> s{_clUploadProtocol = a})
clAccessToken :: Lens' CoursesList (Maybe Text)
clAccessToken
= lens _clAccessToken
(\ s a -> s{_clAccessToken = a})
clUploadType :: Lens' CoursesList (Maybe Text)
clUploadType
= lens _clUploadType (\ s a -> s{_clUploadType = a})
clTeacherId :: Lens' CoursesList (Maybe Text)
clTeacherId
= lens _clTeacherId (\ s a -> s{_clTeacherId = a})
clPageToken :: Lens' CoursesList (Maybe Text)
clPageToken
= lens _clPageToken (\ s a -> s{_clPageToken = a})
clPageSize :: Lens' CoursesList (Maybe Int32)
clPageSize
= lens _clPageSize (\ s a -> s{_clPageSize = a}) .
mapping _Coerce
clCourseStates :: Lens' CoursesList [Text]
clCourseStates
= lens _clCourseStates
(\ s a -> s{_clCourseStates = a})
. _Default
. _Coerce
clCallback :: Lens' CoursesList (Maybe Text)
clCallback
= lens _clCallback (\ s a -> s{_clCallback = a})
instance GoogleRequest CoursesList where
type Rs CoursesList = ListCoursesResponse
type Scopes CoursesList =
'["https://www.googleapis.com/auth/classroom.courses",
"https://www.googleapis.com/auth/classroom.courses.readonly"]
requestClient CoursesList'{..}
= go _clStudentId _clXgafv _clUploadProtocol
_clAccessToken
_clUploadType
_clTeacherId
_clPageToken
_clPageSize
(_clCourseStates ^. _Default)
_clCallback
(Just AltJSON)
classroomService
where go
= buildClient (Proxy :: Proxy CoursesListResource)
mempty