{-# 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.CourseWork.List
(
CoursesCourseWorkListResource
, coursesCourseWorkList
, CoursesCourseWorkList
, ccwlXgafv
, ccwlUploadProtocol
, ccwlOrderBy
, ccwlCourseId
, ccwlAccessToken
, ccwlCourseWorkStates
, ccwlUploadType
, ccwlPageToken
, ccwlPageSize
, ccwlCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesCourseWorkListResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"courseWork" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "orderBy" Text :>
QueryParam "access_token" Text :>
QueryParams "courseWorkStates" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListCourseWorkResponse
data CoursesCourseWorkList = CoursesCourseWorkList'
{ _ccwlXgafv :: !(Maybe Xgafv)
, _ccwlUploadProtocol :: !(Maybe Text)
, _ccwlOrderBy :: !(Maybe Text)
, _ccwlCourseId :: !Text
, _ccwlAccessToken :: !(Maybe Text)
, _ccwlCourseWorkStates :: !(Maybe [Text])
, _ccwlUploadType :: !(Maybe Text)
, _ccwlPageToken :: !(Maybe Text)
, _ccwlPageSize :: !(Maybe (Textual Int32))
, _ccwlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesCourseWorkList
:: Text
-> CoursesCourseWorkList
coursesCourseWorkList pCcwlCourseId_ =
CoursesCourseWorkList'
{ _ccwlXgafv = Nothing
, _ccwlUploadProtocol = Nothing
, _ccwlOrderBy = Nothing
, _ccwlCourseId = pCcwlCourseId_
, _ccwlAccessToken = Nothing
, _ccwlCourseWorkStates = Nothing
, _ccwlUploadType = Nothing
, _ccwlPageToken = Nothing
, _ccwlPageSize = Nothing
, _ccwlCallback = Nothing
}
ccwlXgafv :: Lens' CoursesCourseWorkList (Maybe Xgafv)
ccwlXgafv
= lens _ccwlXgafv (\ s a -> s{_ccwlXgafv = a})
ccwlUploadProtocol :: Lens' CoursesCourseWorkList (Maybe Text)
ccwlUploadProtocol
= lens _ccwlUploadProtocol
(\ s a -> s{_ccwlUploadProtocol = a})
ccwlOrderBy :: Lens' CoursesCourseWorkList (Maybe Text)
ccwlOrderBy
= lens _ccwlOrderBy (\ s a -> s{_ccwlOrderBy = a})
ccwlCourseId :: Lens' CoursesCourseWorkList Text
ccwlCourseId
= lens _ccwlCourseId (\ s a -> s{_ccwlCourseId = a})
ccwlAccessToken :: Lens' CoursesCourseWorkList (Maybe Text)
ccwlAccessToken
= lens _ccwlAccessToken
(\ s a -> s{_ccwlAccessToken = a})
ccwlCourseWorkStates :: Lens' CoursesCourseWorkList [Text]
ccwlCourseWorkStates
= lens _ccwlCourseWorkStates
(\ s a -> s{_ccwlCourseWorkStates = a})
. _Default
. _Coerce
ccwlUploadType :: Lens' CoursesCourseWorkList (Maybe Text)
ccwlUploadType
= lens _ccwlUploadType
(\ s a -> s{_ccwlUploadType = a})
ccwlPageToken :: Lens' CoursesCourseWorkList (Maybe Text)
ccwlPageToken
= lens _ccwlPageToken
(\ s a -> s{_ccwlPageToken = a})
ccwlPageSize :: Lens' CoursesCourseWorkList (Maybe Int32)
ccwlPageSize
= lens _ccwlPageSize (\ s a -> s{_ccwlPageSize = a})
. mapping _Coerce
ccwlCallback :: Lens' CoursesCourseWorkList (Maybe Text)
ccwlCallback
= lens _ccwlCallback (\ s a -> s{_ccwlCallback = a})
instance GoogleRequest CoursesCourseWorkList where
type Rs CoursesCourseWorkList =
ListCourseWorkResponse
type Scopes CoursesCourseWorkList =
'["https://www.googleapis.com/auth/classroom.coursework.me",
"https://www.googleapis.com/auth/classroom.coursework.me.readonly",
"https://www.googleapis.com/auth/classroom.coursework.students",
"https://www.googleapis.com/auth/classroom.coursework.students.readonly"]
requestClient CoursesCourseWorkList'{..}
= go _ccwlCourseId _ccwlXgafv _ccwlUploadProtocol
_ccwlOrderBy
_ccwlAccessToken
(_ccwlCourseWorkStates ^. _Default)
_ccwlUploadType
_ccwlPageToken
_ccwlPageSize
_ccwlCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesCourseWorkListResource)
mempty