{-# 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.Get
(
CoursesCourseWorkGetResource
, coursesCourseWorkGet
, CoursesCourseWorkGet
, ccwgXgafv
, ccwgUploadProtocol
, ccwgCourseId
, ccwgAccessToken
, ccwgUploadType
, ccwgId
, ccwgCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesCourseWorkGetResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"courseWork" :>
Capture "id" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] CourseWork
data CoursesCourseWorkGet = CoursesCourseWorkGet'
{ _ccwgXgafv :: !(Maybe Xgafv)
, _ccwgUploadProtocol :: !(Maybe Text)
, _ccwgCourseId :: !Text
, _ccwgAccessToken :: !(Maybe Text)
, _ccwgUploadType :: !(Maybe Text)
, _ccwgId :: !Text
, _ccwgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesCourseWorkGet
:: Text
-> Text
-> CoursesCourseWorkGet
coursesCourseWorkGet pCcwgCourseId_ pCcwgId_ =
CoursesCourseWorkGet'
{ _ccwgXgafv = Nothing
, _ccwgUploadProtocol = Nothing
, _ccwgCourseId = pCcwgCourseId_
, _ccwgAccessToken = Nothing
, _ccwgUploadType = Nothing
, _ccwgId = pCcwgId_
, _ccwgCallback = Nothing
}
ccwgXgafv :: Lens' CoursesCourseWorkGet (Maybe Xgafv)
ccwgXgafv
= lens _ccwgXgafv (\ s a -> s{_ccwgXgafv = a})
ccwgUploadProtocol :: Lens' CoursesCourseWorkGet (Maybe Text)
ccwgUploadProtocol
= lens _ccwgUploadProtocol
(\ s a -> s{_ccwgUploadProtocol = a})
ccwgCourseId :: Lens' CoursesCourseWorkGet Text
ccwgCourseId
= lens _ccwgCourseId (\ s a -> s{_ccwgCourseId = a})
ccwgAccessToken :: Lens' CoursesCourseWorkGet (Maybe Text)
ccwgAccessToken
= lens _ccwgAccessToken
(\ s a -> s{_ccwgAccessToken = a})
ccwgUploadType :: Lens' CoursesCourseWorkGet (Maybe Text)
ccwgUploadType
= lens _ccwgUploadType
(\ s a -> s{_ccwgUploadType = a})
ccwgId :: Lens' CoursesCourseWorkGet Text
ccwgId = lens _ccwgId (\ s a -> s{_ccwgId = a})
ccwgCallback :: Lens' CoursesCourseWorkGet (Maybe Text)
ccwgCallback
= lens _ccwgCallback (\ s a -> s{_ccwgCallback = a})
instance GoogleRequest CoursesCourseWorkGet where
type Rs CoursesCourseWorkGet = CourseWork
type Scopes CoursesCourseWorkGet =
'["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 CoursesCourseWorkGet'{..}
= go _ccwgCourseId _ccwgId _ccwgXgafv
_ccwgUploadProtocol
_ccwgAccessToken
_ccwgUploadType
_ccwgCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesCourseWorkGetResource)
mempty