on develop help sign in
Regenerating gogol-classroom from latest service definition
commitc171275692ebdc54dd651efedefbd6995f853355 authorBrendan Hay <brendan.g.hay@gmail.com> dateMon 20 Jun 2016, 09:33 (10 years ago) parent6ff96f9
14 files changed+4637−11
gogol-classroom/gen/Network/Google/Classroom.hs+250 gogol-classroom/gen/Network/Google/Classroom/Types.hs+229 gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs+1707−11 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/Create.hs+207 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/Get.hs+197 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/List.hs+255 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/Get.hs+220 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/List.hs+300 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/ModifyAttachments.hs+250 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/Patch.hs+263 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/Reclaim.hs+249 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/Return.hs+251 gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/TurnIn.hs+249 gogol-classroom/gogol-classroom.cabal+10
gogol-classroom/gen/Network/Google/Classroom.hs+250
@@ -24,10 +24,17 @@ module Network.Google.Classroom
2424 -- * OAuth Scopes
2525 , classroomRostersReadOnlyScope
2626 , classroomCoursesScope
27+ , classroomCourseworkStudentsReadOnlyScope
2728 , classroomProFileEmailsScope
2829 , classroomProFilePhotosScope
30+ , classroomCourseworkMeScope
31+ , classroomCourseWorkReadOnlyScope
32+ , classroomStudentSubmissionsStudentsReadOnlyScope
2933 , classroomRostersScope
3034 , classroomCoursesReadOnlyScope
35+ , classroomCourseworkStudentsScope
36+ , classroomCourseworkMeReadOnlyScope
37+ , classroomStudentSubmissionsMeReadOnlyScope
3138
3239 -- * API Declaration
3340 , ClassroomAPI
@@ -43,6 +50,36 @@ module Network.Google.Classroom
4350 -- ** classroom.courses.aliases.list
4451 , module Network.Google.Resource.Classroom.Courses.Aliases.List
4552
53+ -- ** classroom.courses.courseWork.create
54+ , module Network.Google.Resource.Classroom.Courses.CourseWork.Create
55+
56+ -- ** classroom.courses.courseWork.get
57+ , module Network.Google.Resource.Classroom.Courses.CourseWork.Get
58+
59+ -- ** classroom.courses.courseWork.list
60+ , module Network.Google.Resource.Classroom.Courses.CourseWork.List
61+
62+ -- ** classroom.courses.courseWork.studentSubmissions.get
63+ , module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Get
64+
65+ -- ** classroom.courses.courseWork.studentSubmissions.list
66+ , module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.List
67+
68+ -- ** classroom.courses.courseWork.studentSubmissions.modifyAttachments
69+ , module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.ModifyAttachments
70+
71+ -- ** classroom.courses.courseWork.studentSubmissions.patch
72+ , module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Patch
73+
74+ -- ** classroom.courses.courseWork.studentSubmissions.reclaim
75+ , module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Reclaim
76+
77+ -- ** classroom.courses.courseWork.studentSubmissions.return
78+ , module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Return
79+
80+ -- ** classroom.courses.courseWork.studentSubmissions.turnIn
81+ , module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.TurnIn
82+
4683 -- ** classroom.courses.create
4784 , module Network.Google.Resource.Classroom.Courses.Create
4885
@@ -111,6 +148,49 @@ module Network.Google.Classroom
111148 , lcarNextPageToken
112149 , lcarAliases
113150
151+ -- ** CourseWork
152+ , CourseWork
153+ , courseWork
154+ , cwCreationTime
155+ , cwState
156+ , cwMaterials
157+ , cwCourseId
158+ , cwMaxPoints
159+ , cwWorkType
160+ , cwDueTime
161+ , cwAssociatedWithDeveloper
162+ , cwUpdateTime
163+ , cwMultipleChoiceQuestion
164+ , cwId
165+ , cwSubmissionModificationMode
166+ , cwDueDate
167+ , cwTitle
168+ , cwAlternateLink
169+ , cwAssignment
170+ , cwDescription
171+
172+ -- ** DriveFile
173+ , DriveFile
174+ , driveFile
175+ , dfThumbnailURL
176+ , dfId
177+ , dfTitle
178+ , dfAlternateLink
179+
180+ -- ** ReturnStudentSubmissionRequest
181+ , ReturnStudentSubmissionRequest
182+ , returnStudentSubmissionRequest
183+
184+ -- ** ReclaimStudentSubmissionRequest
185+ , ReclaimStudentSubmissionRequest
186+ , reclaimStudentSubmissionRequest
187+
188+ -- ** ListCourseWorkResponse
189+ , ListCourseWorkResponse
190+ , listCourseWorkResponse
191+ , lcwrCourseWork
192+ , lcwrNextPageToken
193+
114194 -- ** Empty
115195 , Empty
116196 , empty
@@ -120,12 +200,61 @@ module Network.Google.Classroom
120200 , globalPermission
121201 , gpPermission
122202
203+ -- ** Link
204+ , Link
205+ , link
206+ , lThumbnailURL
207+ , lURL
208+ , lTitle
209+
210+ -- ** AssignmentSubmission
211+ , AssignmentSubmission
212+ , assignmentSubmission
213+ , asAttachments
214+
215+ -- ** ModifyAttachmentsRequest
216+ , ModifyAttachmentsRequest
217+ , modifyAttachmentsRequest
218+ , marAddAttachments
219+
220+ -- ** ListStudentSubmissionsResponse
221+ , ListStudentSubmissionsResponse
222+ , listStudentSubmissionsResponse
223+ , lssrNextPageToken
224+ , lssrStudentSubmissions
225+
226+ -- ** Material
227+ , Material
228+ , material
229+ , mDriveFile
230+ , mLink
231+ , mYouTubeVideo
232+ , mForm
233+
234+ -- ** MultipleChoiceSubmission
235+ , MultipleChoiceSubmission
236+ , multipleChoiceSubmission
237+ , mcsAnswer
238+
123239 -- ** ListInvitationsResponse
124240 , ListInvitationsResponse
125241 , listInvitationsResponse
126242 , lirNextPageToken
127243 , lirInvitations
128244
245+ -- ** CourseMaterial
246+ , CourseMaterial
247+ , courseMaterial
248+ , cmDriveFile
249+ , cmLink
250+ , cmYouTubeVideo
251+ , cmForm
252+
253+ -- ** ShortAnswerSubmission
254+ , ShortAnswerSubmission
255+ , shortAnswerSubmission
256+ , sasAnswer
257+
129258 -- ** Invitation
130259 , Invitation
131260 , invitation
@@ -134,6 +263,49 @@ module Network.Google.Classroom
134263 , iRole
135264 , iId
136265
266+ -- ** Attachment
267+ , Attachment
268+ , attachment
269+ , aDriveFile
270+ , aLink
271+ , aYouTubeVideo
272+ , aForm
273+
274+ -- ** StudentSubmission
275+ , StudentSubmission
276+ , studentSubmission
277+ , ssCreationTime
278+ , ssLate
279+ , ssState
280+ , ssCourseId
281+ , ssMultipleChoiceSubmission
282+ , ssAssignmentSubmission
283+ , ssShortAnswerSubmission
284+ , ssAssociatedWithDeveloper
285+ , ssUserId
286+ , ssUpdateTime
287+ , ssCourseWorkType
288+ , ssAssignedGrade
289+ , ssId
290+ , ssDraftGrade
291+ , ssAlternateLink
292+ , ssCourseWorkId
293+
294+ -- ** Date
295+ , Date
296+ , date
297+ , dDay
298+ , dYear
299+ , dMonth
300+
301+ -- ** YouTubeVideo
302+ , YouTubeVideo
303+ , youTubeVideo
304+ , ytvThumbnailURL
305+ , ytvId
306+ , ytvTitle
307+ , ytvAlternateLink
308+
137309 -- ** Teacher
138310 , Teacher
139311 , teacher
@@ -141,6 +313,12 @@ module Network.Google.Classroom
141313 , tProFile
142314 , tUserId
143315
316+ -- ** CourseMaterialSet
317+ , CourseMaterialSet
318+ , courseMaterialSet
319+ , cmsMaterials
320+ , cmsTitle
321+
144322 -- ** Name
145323 , Name
146324 , name
@@ -154,6 +332,10 @@ module Network.Google.Classroom
154332 , lcrNextPageToken
155333 , lcrCourses
156334
335+ -- ** TurnInStudentSubmissionRequest
336+ , TurnInStudentSubmissionRequest
337+ , turnInStudentSubmissionRequest
338+
157339 -- ** UserProFile
158340 , UserProFile
159341 , userProFile
@@ -163,11 +345,26 @@ module Network.Google.Classroom
163345 , upfId
164346 , upfPermissions
165347
348+ -- ** DriveFolder
349+ , DriveFolder
350+ , driveFolder
351+ , dId
352+ , dTitle
353+ , dAlternateLink
354+
355+ -- ** MultipleChoiceQuestion
356+ , MultipleChoiceQuestion
357+ , multipleChoiceQuestion
358+ , mcqChoices
359+
166360 -- ** Course
167361 , Course
168362 , course
169363 , cCreationTime
170364 , cRoom
365+ , cCourseMaterialSets
366+ , cTeacherGroupEmail
367+ , cTeacherFolder
171368 , cCourseState
172369 , cEnrollmentCode
173370 , cUpdateTime
@@ -175,21 +372,49 @@ module Network.Google.Classroom
175372 , cName
176373 , cId
177374 , cAlternateLink
375+ , cCourseGroupEmail
178376 , cDescription
179377 , cDescriptionHeading
180378 , cSection
181379
380+ -- ** TimeOfDay'
381+ , TimeOfDay'
382+ , timeOfDay
383+ , todNanos
384+ , todHours
385+ , todMinutes
386+ , todSeconds
387+
388+ -- ** Assignment
389+ , Assignment
390+ , assignment
391+ , aStudentWorkFolder
392+
182393 -- ** ListStudentsResponse
183394 , ListStudentsResponse
184395 , listStudentsResponse
185396 , lsrNextPageToken
186397 , lsrStudents
187398
399+ -- ** SharedDriveFile
400+ , SharedDriveFile
401+ , sharedDriveFile
402+ , sdfDriveFile
403+ , sdfShareMode
404+
188405 -- ** CourseAlias
189406 , CourseAlias
190407 , courseAlias
191408 , caAlias
192409
410+ -- ** Form
411+ , Form
412+ , form
413+ , fThumbnailURL
414+ , fFormURL
415+ , fTitle
416+ , fResponseURL
417+
193418 -- ** ListTeachersResponse
194419 , ListTeachersResponse
195420 , listTeachersResponse
@@ -201,6 +426,7 @@ module Network.Google.Classroom
201426 , student
202427 , sCourseId
203428 , sProFile
429+ , sStudentWorkFolder
204430 , sUserId
205431 ) where
206432
@@ -209,6 +435,16 @@ import Network.Google.Prelude
209435import Network.Google.Resource.Classroom.Courses.Aliases.Create
210436import Network.Google.Resource.Classroom.Courses.Aliases.Delete
211437import Network.Google.Resource.Classroom.Courses.Aliases.List
438+import Network.Google.Resource.Classroom.Courses.CourseWork.Create
439+import Network.Google.Resource.Classroom.Courses.CourseWork.Get
440+import Network.Google.Resource.Classroom.Courses.CourseWork.List
441+import Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Get
442+import Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.List
443+import Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.ModifyAttachments
444+import Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Patch
445+import Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Reclaim
446+import Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Return
447+import Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.TurnIn
212448import Network.Google.Resource.Classroom.Courses.Create
213449import Network.Google.Resource.Classroom.Courses.Delete
214450import Network.Google.Resource.Classroom.Courses.Get
@@ -241,6 +477,20 @@ type ClassroomAPI =
241477 :<|> InvitationsGetResource
242478 :<|> InvitationsCreateResource
243479 :<|> InvitationsDeleteResource
480+ :<|>
481+ CoursesCourseWorkStudentSubmissionsReturnResource
482+ :<|> CoursesCourseWorkStudentSubmissionsListResource
483+ :<|>
484+ CoursesCourseWorkStudentSubmissionsReclaimResource
485+ :<|> CoursesCourseWorkStudentSubmissionsPatchResource
486+ :<|> CoursesCourseWorkStudentSubmissionsGetResource
487+ :<|>
488+ CoursesCourseWorkStudentSubmissionsTurnInResource
489+ :<|>
490+ CoursesCourseWorkStudentSubmissionsModifyAttachmentsResource
491+ :<|> CoursesCourseWorkListResource
492+ :<|> CoursesCourseWorkGetResource
493+ :<|> CoursesCourseWorkCreateResource
244494 :<|> CoursesTeachersListResource
245495 :<|> CoursesTeachersGetResource
246496 :<|> CoursesTeachersCreateResource
gogol-classroom/gen/Network/Google/Classroom/Types.hs+229
@@ -22,10 +22,17 @@ module Network.Google.Classroom.Types
2222 -- * OAuth Scopes
2323 , classroomRostersReadOnlyScope
2424 , classroomCoursesScope
25+ , classroomCourseworkStudentsReadOnlyScope
2526 , classroomProFileEmailsScope
2627 , classroomProFilePhotosScope
28+ , classroomCourseworkMeScope
29+ , classroomCourseWorkReadOnlyScope
30+ , classroomStudentSubmissionsStudentsReadOnlyScope
2731 , classroomRostersScope
2832 , classroomCoursesReadOnlyScope
33+ , classroomCourseworkStudentsScope
34+ , classroomCourseworkMeReadOnlyScope
35+ , classroomStudentSubmissionsMeReadOnlyScope
2936
3037 -- * ListCourseAliasesResponse
3138 , ListCourseAliasesResponse
@@ -33,6 +40,49 @@ module Network.Google.Classroom.Types
3340 , lcarNextPageToken
3441 , lcarAliases
3542
43+ -- * CourseWork
44+ , CourseWork
45+ , courseWork
46+ , cwCreationTime
47+ , cwState
48+ , cwMaterials
49+ , cwCourseId
50+ , cwMaxPoints
51+ , cwWorkType
52+ , cwDueTime
53+ , cwAssociatedWithDeveloper
54+ , cwUpdateTime
55+ , cwMultipleChoiceQuestion
56+ , cwId
57+ , cwSubmissionModificationMode
58+ , cwDueDate
59+ , cwTitle
60+ , cwAlternateLink
61+ , cwAssignment
62+ , cwDescription
63+
64+ -- * DriveFile
65+ , DriveFile
66+ , driveFile
67+ , dfThumbnailURL
68+ , dfId
69+ , dfTitle
70+ , dfAlternateLink
71+
72+ -- * ReturnStudentSubmissionRequest
73+ , ReturnStudentSubmissionRequest
74+ , returnStudentSubmissionRequest
75+
76+ -- * ReclaimStudentSubmissionRequest
77+ , ReclaimStudentSubmissionRequest
78+ , reclaimStudentSubmissionRequest
79+
80+ -- * ListCourseWorkResponse
81+ , ListCourseWorkResponse
82+ , listCourseWorkResponse
83+ , lcwrCourseWork
84+ , lcwrNextPageToken
85+
3686 -- * Empty
3787 , Empty
3888 , empty
@@ -42,12 +92,61 @@ module Network.Google.Classroom.Types
4292 , globalPermission
4393 , gpPermission
4494
95+ -- * Link
96+ , Link
97+ , link
98+ , lThumbnailURL
99+ , lURL
100+ , lTitle
101+
102+ -- * AssignmentSubmission
103+ , AssignmentSubmission
104+ , assignmentSubmission
105+ , asAttachments
106+
107+ -- * ModifyAttachmentsRequest
108+ , ModifyAttachmentsRequest
109+ , modifyAttachmentsRequest
110+ , marAddAttachments
111+
112+ -- * ListStudentSubmissionsResponse
113+ , ListStudentSubmissionsResponse
114+ , listStudentSubmissionsResponse
115+ , lssrNextPageToken
116+ , lssrStudentSubmissions
117+
118+ -- * Material
119+ , Material
120+ , material
121+ , mDriveFile
122+ , mLink
123+ , mYouTubeVideo
124+ , mForm
125+
126+ -- * MultipleChoiceSubmission
127+ , MultipleChoiceSubmission
128+ , multipleChoiceSubmission
129+ , mcsAnswer
130+
45131 -- * ListInvitationsResponse
46132 , ListInvitationsResponse
47133 , listInvitationsResponse
48134 , lirNextPageToken
49135 , lirInvitations
50136
137+ -- * CourseMaterial
138+ , CourseMaterial
139+ , courseMaterial
140+ , cmDriveFile
141+ , cmLink
142+ , cmYouTubeVideo
143+ , cmForm
144+
145+ -- * ShortAnswerSubmission
146+ , ShortAnswerSubmission
147+ , shortAnswerSubmission
148+ , sasAnswer
149+
51150 -- * Invitation
52151 , Invitation
53152 , invitation
@@ -56,6 +155,49 @@ module Network.Google.Classroom.Types
56155 , iRole
57156 , iId
58157
158+ -- * Attachment
159+ , Attachment
160+ , attachment
161+ , aDriveFile
162+ , aLink
163+ , aYouTubeVideo
164+ , aForm
165+
166+ -- * StudentSubmission
167+ , StudentSubmission
168+ , studentSubmission
169+ , ssCreationTime
170+ , ssLate
171+ , ssState
172+ , ssCourseId
173+ , ssMultipleChoiceSubmission
174+ , ssAssignmentSubmission
175+ , ssShortAnswerSubmission
176+ , ssAssociatedWithDeveloper
177+ , ssUserId
178+ , ssUpdateTime
179+ , ssCourseWorkType
180+ , ssAssignedGrade
181+ , ssId
182+ , ssDraftGrade
183+ , ssAlternateLink
184+ , ssCourseWorkId
185+
186+ -- * Date
187+ , Date
188+ , date
189+ , dDay
190+ , dYear
191+ , dMonth
192+
193+ -- * YouTubeVideo
194+ , YouTubeVideo
195+ , youTubeVideo
196+ , ytvThumbnailURL
197+ , ytvId
198+ , ytvTitle
199+ , ytvAlternateLink
200+
59201 -- * Teacher
60202 , Teacher
61203 , teacher
@@ -63,6 +205,12 @@ module Network.Google.Classroom.Types
63205 , tProFile
64206 , tUserId
65207
208+ -- * CourseMaterialSet
209+ , CourseMaterialSet
210+ , courseMaterialSet
211+ , cmsMaterials
212+ , cmsTitle
213+
66214 -- * Name
67215 , Name
68216 , name
@@ -76,6 +224,10 @@ module Network.Google.Classroom.Types
76224 , lcrNextPageToken
77225 , lcrCourses
78226
227+ -- * TurnInStudentSubmissionRequest
228+ , TurnInStudentSubmissionRequest
229+ , turnInStudentSubmissionRequest
230+
79231 -- * UserProFile
80232 , UserProFile
81233 , userProFile
@@ -85,11 +237,26 @@ module Network.Google.Classroom.Types
85237 , upfId
86238 , upfPermissions
87239
240+ -- * DriveFolder
241+ , DriveFolder
242+ , driveFolder
243+ , dId
244+ , dTitle
245+ , dAlternateLink
246+
247+ -- * MultipleChoiceQuestion
248+ , MultipleChoiceQuestion
249+ , multipleChoiceQuestion
250+ , mcqChoices
251+
88252 -- * Course
89253 , Course
90254 , course
91255 , cCreationTime
92256 , cRoom
257+ , cCourseMaterialSets
258+ , cTeacherGroupEmail
259+ , cTeacherFolder
93260 , cCourseState
94261 , cEnrollmentCode
95262 , cUpdateTime
@@ -97,21 +264,49 @@ module Network.Google.Classroom.Types
97264 , cName
98265 , cId
99266 , cAlternateLink
267+ , cCourseGroupEmail
100268 , cDescription
101269 , cDescriptionHeading
102270 , cSection
103271
272+ -- * TimeOfDay'
273+ , TimeOfDay'
274+ , timeOfDay
275+ , todNanos
276+ , todHours
277+ , todMinutes
278+ , todSeconds
279+
280+ -- * Assignment
281+ , Assignment
282+ , assignment
283+ , aStudentWorkFolder
284+
104285 -- * ListStudentsResponse
105286 , ListStudentsResponse
106287 , listStudentsResponse
107288 , lsrNextPageToken
108289 , lsrStudents
109290
291+ -- * SharedDriveFile
292+ , SharedDriveFile
293+ , sharedDriveFile
294+ , sdfDriveFile
295+ , sdfShareMode
296+
110297 -- * CourseAlias
111298 , CourseAlias
112299 , courseAlias
113300 , caAlias
114301
302+ -- * Form
303+ , Form
304+ , form
305+ , fThumbnailURL
306+ , fFormURL
307+ , fTitle
308+ , fResponseURL
309+
115310 -- * ListTeachersResponse
116311 , ListTeachersResponse
117312 , listTeachersResponse
@@ -123,6 +318,7 @@ module Network.Google.Classroom.Types
123318 , student
124319 , sCourseId
125320 , sProFile
321+ , sStudentWorkFolder
126322 , sUserId
127323 ) where
128324
@@ -144,6 +340,11 @@ classroomRostersReadOnlyScope = Proxy;
144340classroomCoursesScope :: Proxy '["https://www.googleapis.com/auth/classroom.courses"]
145341classroomCoursesScope = Proxy;
146342
343+-- | View course work and grades for students in the Google Classroom classes
344+-- you teach or administer
345+classroomCourseworkStudentsReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/classroom.coursework.students.readonly"]
346+classroomCourseworkStudentsReadOnlyScope = Proxy;
347+
147348-- | View the email addresses of people in your classes
148349classroomProFileEmailsScope :: Proxy '["https://www.googleapis.com/auth/classroom.profile.emails"]
149350classroomProFileEmailsScope = Proxy;
@@ -152,6 +353,20 @@ classroomProFileEmailsScope = Proxy;
152353classroomProFilePhotosScope :: Proxy '["https://www.googleapis.com/auth/classroom.profile.photos"]
153354classroomProFilePhotosScope = Proxy;
154355
356+-- | Manage your course work and view your grades in Google Classroom
357+classroomCourseworkMeScope :: Proxy '["https://www.googleapis.com/auth/classroom.coursework.me"]
358+classroomCourseworkMeScope = Proxy;
359+
360+-- | View instructions for teacher-assigned work in your Google Classroom
361+-- classes
362+classroomCourseWorkReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/classroom.course-work.readonly"]
363+classroomCourseWorkReadOnlyScope = Proxy;
364+
365+-- | View course work and grades for students in the Google Classroom classes
366+-- you teach or administer
367+classroomStudentSubmissionsStudentsReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/classroom.student-submissions.students.readonly"]
368+classroomStudentSubmissionsStudentsReadOnlyScope = Proxy;
369+
155370-- | Manage your Google Classroom class rosters
156371classroomRostersScope :: Proxy '["https://www.googleapis.com/auth/classroom.rosters"]
157372classroomRostersScope = Proxy;
@@ -159,3 +374,17 @@ classroomRostersScope = Proxy;
159374-- | View your Google Classroom classes
160375classroomCoursesReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/classroom.courses.readonly"]
161376classroomCoursesReadOnlyScope = Proxy;
377+
378+-- | Manage course work and grades for students in the Google Classroom
379+-- classes you teach and view the course work and grades for classes you
380+-- administer
381+classroomCourseworkStudentsScope :: Proxy '["https://www.googleapis.com/auth/classroom.coursework.students"]
382+classroomCourseworkStudentsScope = Proxy;
383+
384+-- | View your course work and grades in Google Classroom
385+classroomCourseworkMeReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/classroom.coursework.me.readonly"]
386+classroomCourseworkMeReadOnlyScope = Proxy;
387+
388+-- | View your course work and grades in Google Classroom
389+classroomStudentSubmissionsMeReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/classroom.student-submissions.me.readonly"]
390+classroomStudentSubmissionsMeReadOnlyScope = Proxy;
gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs+1707−11
@@ -72,6 +72,407 @@ instance ToJSON ListCourseAliasesResponse where
7272 [("nextPageToken" .=) <$> _lcarNextPageToken,
7373 ("aliases" .=) <$> _lcarAliases])
7474
75+-- | Course work created by a teacher for students of the course.
76+--
77+-- /See:/ 'courseWork' smart constructor.
78+data CourseWork = CourseWork'
79+ { _cwCreationTime :: !(Maybe Text)
80+ , _cwState :: !(Maybe Text)
81+ , _cwMaterials :: !(Maybe [Material])
82+ , _cwCourseId :: !(Maybe Text)
83+ , _cwMaxPoints :: !(Maybe (Textual Double))
84+ , _cwWorkType :: !(Maybe Text)
85+ , _cwDueTime :: !(Maybe TimeOfDay')
86+ , _cwAssociatedWithDeveloper :: !(Maybe Bool)
87+ , _cwUpdateTime :: !(Maybe Text)
88+ , _cwMultipleChoiceQuestion :: !(Maybe MultipleChoiceQuestion)
89+ , _cwId :: !(Maybe Text)
90+ , _cwSubmissionModificationMode :: !(Maybe Text)
91+ , _cwDueDate :: !(Maybe Date)
92+ , _cwTitle :: !(Maybe Text)
93+ , _cwAlternateLink :: !(Maybe Text)
94+ , _cwAssignment :: !(Maybe Assignment)
95+ , _cwDescription :: !(Maybe Text)
96+ } deriving (Eq,Show,Data,Typeable,Generic)
97+
98+-- | Creates a value of 'CourseWork' with the minimum fields required to make a request.
99+--
100+-- Use one of the following lenses to modify other fields as desired:
101+--
102+-- * 'cwCreationTime'
103+--
104+-- * 'cwState'
105+--
106+-- * 'cwMaterials'
107+--
108+-- * 'cwCourseId'
109+--
110+-- * 'cwMaxPoints'
111+--
112+-- * 'cwWorkType'
113+--
114+-- * 'cwDueTime'
115+--
116+-- * 'cwAssociatedWithDeveloper'
117+--
118+-- * 'cwUpdateTime'
119+--
120+-- * 'cwMultipleChoiceQuestion'
121+--
122+-- * 'cwId'
123+--
124+-- * 'cwSubmissionModificationMode'
125+--
126+-- * 'cwDueDate'
127+--
128+-- * 'cwTitle'
129+--
130+-- * 'cwAlternateLink'
131+--
132+-- * 'cwAssignment'
133+--
134+-- * 'cwDescription'
135+courseWork
136+ :: CourseWork
137+courseWork =
138+ CourseWork'
139+ { _cwCreationTime = Nothing
140+ , _cwState = Nothing
141+ , _cwMaterials = Nothing
142+ , _cwCourseId = Nothing
143+ , _cwMaxPoints = Nothing
144+ , _cwWorkType = Nothing
145+ , _cwDueTime = Nothing
146+ , _cwAssociatedWithDeveloper = Nothing
147+ , _cwUpdateTime = Nothing
148+ , _cwMultipleChoiceQuestion = Nothing
149+ , _cwId = Nothing
150+ , _cwSubmissionModificationMode = Nothing
151+ , _cwDueDate = Nothing
152+ , _cwTitle = Nothing
153+ , _cwAlternateLink = Nothing
154+ , _cwAssignment = Nothing
155+ , _cwDescription = Nothing
156+ }
157+
158+-- | Timestamp when this course work was created. Read-only.
159+cwCreationTime :: Lens' CourseWork (Maybe Text)
160+cwCreationTime
161+ = lens _cwCreationTime
162+ (\ s a -> s{_cwCreationTime = a})
163+
164+-- | Status of this course work.. If unspecified, the default state is
165+-- \`DRAFT\`.
166+cwState :: Lens' CourseWork (Maybe Text)
167+cwState = lens _cwState (\ s a -> s{_cwState = a})
168+
169+-- | Additional materials.
170+cwMaterials :: Lens' CourseWork [Material]
171+cwMaterials
172+ = lens _cwMaterials (\ s a -> s{_cwMaterials = a}) .
173+ _Default
174+ . _Coerce
175+
176+-- | Identifier of the course. Read-only.
177+cwCourseId :: Lens' CourseWork (Maybe Text)
178+cwCourseId
179+ = lens _cwCourseId (\ s a -> s{_cwCourseId = a})
180+
181+-- | Maximum grade for this course work. If zero or unspecified, this
182+-- assignment is considered ungraded. This must be an integer value.
183+cwMaxPoints :: Lens' CourseWork (Maybe Double)
184+cwMaxPoints
185+ = lens _cwMaxPoints (\ s a -> s{_cwMaxPoints = a}) .
186+ mapping _Coerce
187+
188+-- | Type of this course work. The type is set when the course work is
189+-- created and cannot be changed. When creating course work, this must be
190+-- \`ASSIGNMENT\`.
191+cwWorkType :: Lens' CourseWork (Maybe Text)
192+cwWorkType
193+ = lens _cwWorkType (\ s a -> s{_cwWorkType = a})
194+
195+-- | Optional time of day, in UTC, that submissions for this this course work
196+-- are due. This must be specified if \`due_date\` is specified.
197+cwDueTime :: Lens' CourseWork (Maybe TimeOfDay')
198+cwDueTime
199+ = lens _cwDueTime (\ s a -> s{_cwDueTime = a})
200+
201+-- | Whether this course work item is associated with the Developer Console
202+-- project making the request. See google.classroom.Work.CreateCourseWork
203+-- for more details. Read-only.
204+cwAssociatedWithDeveloper :: Lens' CourseWork (Maybe Bool)
205+cwAssociatedWithDeveloper
206+ = lens _cwAssociatedWithDeveloper
207+ (\ s a -> s{_cwAssociatedWithDeveloper = a})
208+
209+-- | Timestamp of the most recent change to this course work. Read-only.
210+cwUpdateTime :: Lens' CourseWork (Maybe Text)
211+cwUpdateTime
212+ = lens _cwUpdateTime (\ s a -> s{_cwUpdateTime = a})
213+
214+-- | Multiple choice question details. This is populated only when
215+-- \`work_type\` is \`MULTIPLE_CHOICE_QUESTION\`.
216+cwMultipleChoiceQuestion :: Lens' CourseWork (Maybe MultipleChoiceQuestion)
217+cwMultipleChoiceQuestion
218+ = lens _cwMultipleChoiceQuestion
219+ (\ s a -> s{_cwMultipleChoiceQuestion = a})
220+
221+-- | Classroom-assigned identifier of this course work, unique per course.
222+-- Read-only.
223+cwId :: Lens' CourseWork (Maybe Text)
224+cwId = lens _cwId (\ s a -> s{_cwId = a})
225+
226+-- | Setting to determine when students are allowed to modify submissions. If
227+-- unspecified, the default value is \`MODIFIABLE_UNTIL_TURNED_IN\`.
228+cwSubmissionModificationMode :: Lens' CourseWork (Maybe Text)
229+cwSubmissionModificationMode
230+ = lens _cwSubmissionModificationMode
231+ (\ s a -> s{_cwSubmissionModificationMode = a})
232+
233+-- | Optional date, in UTC, that submissions for this this course work are
234+-- due. This must be specified if \`due_time\` is specified.
235+cwDueDate :: Lens' CourseWork (Maybe Date)
236+cwDueDate
237+ = lens _cwDueDate (\ s a -> s{_cwDueDate = a})
238+
239+-- | Title of this course work. The title must be a valid UTF-8 string
240+-- containing between 1 and 3000 characters.
241+cwTitle :: Lens' CourseWork (Maybe Text)
242+cwTitle = lens _cwTitle (\ s a -> s{_cwTitle = a})
243+
244+-- | Absolute link to this course work in the Classroom web UI. This is only
245+-- populated if \`state\` is \`PUBLISHED\`. Read-only.
246+cwAlternateLink :: Lens' CourseWork (Maybe Text)
247+cwAlternateLink
248+ = lens _cwAlternateLink
249+ (\ s a -> s{_cwAlternateLink = a})
250+
251+-- | Assignment details. This is populated only when \`work_type\` is
252+-- \`ASSIGNMENT\`.
253+cwAssignment :: Lens' CourseWork (Maybe Assignment)
254+cwAssignment
255+ = lens _cwAssignment (\ s a -> s{_cwAssignment = a})
256+
257+-- | Optional description of this course work. If set, the description must
258+-- be a valid UTF-8 string containing no more than 30,000 characters.
259+cwDescription :: Lens' CourseWork (Maybe Text)
260+cwDescription
261+ = lens _cwDescription
262+ (\ s a -> s{_cwDescription = a})
263+
264+instance FromJSON CourseWork where
265+ parseJSON
266+ = withObject "CourseWork"
267+ (\ o ->
268+ CourseWork' <$>
269+ (o .:? "creationTime") <*> (o .:? "state") <*>
270+ (o .:? "materials" .!= mempty)
271+ <*> (o .:? "courseId")
272+ <*> (o .:? "maxPoints")
273+ <*> (o .:? "workType")
274+ <*> (o .:? "dueTime")
275+ <*> (o .:? "associatedWithDeveloper")
276+ <*> (o .:? "updateTime")
277+ <*> (o .:? "multipleChoiceQuestion")
278+ <*> (o .:? "id")
279+ <*> (o .:? "submissionModificationMode")
280+ <*> (o .:? "dueDate")
281+ <*> (o .:? "title")
282+ <*> (o .:? "alternateLink")
283+ <*> (o .:? "assignment")
284+ <*> (o .:? "description"))
285+
286+instance ToJSON CourseWork where
287+ toJSON CourseWork'{..}
288+ = object
289+ (catMaybes
290+ [("creationTime" .=) <$> _cwCreationTime,
291+ ("state" .=) <$> _cwState,
292+ ("materials" .=) <$> _cwMaterials,
293+ ("courseId" .=) <$> _cwCourseId,
294+ ("maxPoints" .=) <$> _cwMaxPoints,
295+ ("workType" .=) <$> _cwWorkType,
296+ ("dueTime" .=) <$> _cwDueTime,
297+ ("associatedWithDeveloper" .=) <$>
298+ _cwAssociatedWithDeveloper,
299+ ("updateTime" .=) <$> _cwUpdateTime,
300+ ("multipleChoiceQuestion" .=) <$>
301+ _cwMultipleChoiceQuestion,
302+ ("id" .=) <$> _cwId,
303+ ("submissionModificationMode" .=) <$>
304+ _cwSubmissionModificationMode,
305+ ("dueDate" .=) <$> _cwDueDate,
306+ ("title" .=) <$> _cwTitle,
307+ ("alternateLink" .=) <$> _cwAlternateLink,
308+ ("assignment" .=) <$> _cwAssignment,
309+ ("description" .=) <$> _cwDescription])
310+
311+-- | Representation of a Google Drive file.
312+--
313+-- /See:/ 'driveFile' smart constructor.
314+data DriveFile = DriveFile'
315+ { _dfThumbnailURL :: !(Maybe Text)
316+ , _dfId :: !(Maybe Text)
317+ , _dfTitle :: !(Maybe Text)
318+ , _dfAlternateLink :: !(Maybe Text)
319+ } deriving (Eq,Show,Data,Typeable,Generic)
320+
321+-- | Creates a value of 'DriveFile' with the minimum fields required to make a request.
322+--
323+-- Use one of the following lenses to modify other fields as desired:
324+--
325+-- * 'dfThumbnailURL'
326+--
327+-- * 'dfId'
328+--
329+-- * 'dfTitle'
330+--
331+-- * 'dfAlternateLink'
332+driveFile
333+ :: DriveFile
334+driveFile =
335+ DriveFile'
336+ { _dfThumbnailURL = Nothing
337+ , _dfId = Nothing
338+ , _dfTitle = Nothing
339+ , _dfAlternateLink = Nothing
340+ }
341+
342+-- | URL of a thumbnail image of the Drive item. Read-only.
343+dfThumbnailURL :: Lens' DriveFile (Maybe Text)
344+dfThumbnailURL
345+ = lens _dfThumbnailURL
346+ (\ s a -> s{_dfThumbnailURL = a})
347+
348+-- | Drive API resource ID.
349+dfId :: Lens' DriveFile (Maybe Text)
350+dfId = lens _dfId (\ s a -> s{_dfId = a})
351+
352+-- | Title of the Drive item. Read-only.
353+dfTitle :: Lens' DriveFile (Maybe Text)
354+dfTitle = lens _dfTitle (\ s a -> s{_dfTitle = a})
355+
356+-- | URL that can be used to access the Drive item. Read-only.
357+dfAlternateLink :: Lens' DriveFile (Maybe Text)
358+dfAlternateLink
359+ = lens _dfAlternateLink
360+ (\ s a -> s{_dfAlternateLink = a})
361+
362+instance FromJSON DriveFile where
363+ parseJSON
364+ = withObject "DriveFile"
365+ (\ o ->
366+ DriveFile' <$>
367+ (o .:? "thumbnailUrl") <*> (o .:? "id") <*>
368+ (o .:? "title")
369+ <*> (o .:? "alternateLink"))
370+
371+instance ToJSON DriveFile where
372+ toJSON DriveFile'{..}
373+ = object
374+ (catMaybes
375+ [("thumbnailUrl" .=) <$> _dfThumbnailURL,
376+ ("id" .=) <$> _dfId, ("title" .=) <$> _dfTitle,
377+ ("alternateLink" .=) <$> _dfAlternateLink])
378+
379+-- | Request to return a student submission.
380+--
381+-- /See:/ 'returnStudentSubmissionRequest' smart constructor.
382+data ReturnStudentSubmissionRequest =
383+ ReturnStudentSubmissionRequest'
384+ deriving (Eq,Show,Data,Typeable,Generic)
385+
386+-- | Creates a value of 'ReturnStudentSubmissionRequest' with the minimum fields required to make a request.
387+--
388+returnStudentSubmissionRequest
389+ :: ReturnStudentSubmissionRequest
390+returnStudentSubmissionRequest = ReturnStudentSubmissionRequest'
391+
392+instance FromJSON ReturnStudentSubmissionRequest
393+ where
394+ parseJSON
395+ = withObject "ReturnStudentSubmissionRequest"
396+ (\ o -> pure ReturnStudentSubmissionRequest')
397+
398+instance ToJSON ReturnStudentSubmissionRequest where
399+ toJSON = const emptyObject
400+
401+-- | Request to reclaim a student submission.
402+--
403+-- /See:/ 'reclaimStudentSubmissionRequest' smart constructor.
404+data ReclaimStudentSubmissionRequest =
405+ ReclaimStudentSubmissionRequest'
406+ deriving (Eq,Show,Data,Typeable,Generic)
407+
408+-- | Creates a value of 'ReclaimStudentSubmissionRequest' with the minimum fields required to make a request.
409+--
410+reclaimStudentSubmissionRequest
411+ :: ReclaimStudentSubmissionRequest
412+reclaimStudentSubmissionRequest = ReclaimStudentSubmissionRequest'
413+
414+instance FromJSON ReclaimStudentSubmissionRequest
415+ where
416+ parseJSON
417+ = withObject "ReclaimStudentSubmissionRequest"
418+ (\ o -> pure ReclaimStudentSubmissionRequest')
419+
420+instance ToJSON ReclaimStudentSubmissionRequest where
421+ toJSON = const emptyObject
422+
423+-- | Response when listing course work.
424+--
425+-- /See:/ 'listCourseWorkResponse' smart constructor.
426+data ListCourseWorkResponse = ListCourseWorkResponse'
427+ { _lcwrCourseWork :: !(Maybe [CourseWork])
428+ , _lcwrNextPageToken :: !(Maybe Text)
429+ } deriving (Eq,Show,Data,Typeable,Generic)
430+
431+-- | Creates a value of 'ListCourseWorkResponse' with the minimum fields required to make a request.
432+--
433+-- Use one of the following lenses to modify other fields as desired:
434+--
435+-- * 'lcwrCourseWork'
436+--
437+-- * 'lcwrNextPageToken'
438+listCourseWorkResponse
439+ :: ListCourseWorkResponse
440+listCourseWorkResponse =
441+ ListCourseWorkResponse'
442+ { _lcwrCourseWork = Nothing
443+ , _lcwrNextPageToken = Nothing
444+ }
445+
446+-- | Course work items that match the request.
447+lcwrCourseWork :: Lens' ListCourseWorkResponse [CourseWork]
448+lcwrCourseWork
449+ = lens _lcwrCourseWork
450+ (\ s a -> s{_lcwrCourseWork = a})
451+ . _Default
452+ . _Coerce
453+
454+-- | Token identifying the next page of results to return. If empty, no
455+-- further results are available.
456+lcwrNextPageToken :: Lens' ListCourseWorkResponse (Maybe Text)
457+lcwrNextPageToken
458+ = lens _lcwrNextPageToken
459+ (\ s a -> s{_lcwrNextPageToken = a})
460+
461+instance FromJSON ListCourseWorkResponse where
462+ parseJSON
463+ = withObject "ListCourseWorkResponse"
464+ (\ o ->
465+ ListCourseWorkResponse' <$>
466+ (o .:? "courseWork" .!= mempty) <*>
467+ (o .:? "nextPageToken"))
468+
469+instance ToJSON ListCourseWorkResponse where
470+ toJSON ListCourseWorkResponse'{..}
471+ = object
472+ (catMaybes
473+ [("courseWork" .=) <$> _lcwrCourseWork,
474+ ("nextPageToken" .=) <$> _lcwrNextPageToken])
475+
75476-- | A generic empty message that you can re-use to avoid defining duplicated
76477-- empty messages in your APIs. A typical example is to use it as the
77478-- request or the response type of an API method. For instance: service Foo
@@ -129,6 +530,305 @@ instance ToJSON GlobalPermission where
129530 = object
130531 (catMaybes [("permission" .=) <$> _gpPermission])
131532
533+-- | URL item.
534+--
535+-- /See:/ 'link' smart constructor.
536+data Link = Link'
537+ { _lThumbnailURL :: !(Maybe Text)
538+ , _lURL :: !(Maybe Text)
539+ , _lTitle :: !(Maybe Text)
540+ } deriving (Eq,Show,Data,Typeable,Generic)
541+
542+-- | Creates a value of 'Link' with the minimum fields required to make a request.
543+--
544+-- Use one of the following lenses to modify other fields as desired:
545+--
546+-- * 'lThumbnailURL'
547+--
548+-- * 'lURL'
549+--
550+-- * 'lTitle'
551+link
552+ :: Link
553+link =
554+ Link'
555+ { _lThumbnailURL = Nothing
556+ , _lURL = Nothing
557+ , _lTitle = Nothing
558+ }
559+
560+-- | URL of a thumbnail image of the target URL. Read-only.
561+lThumbnailURL :: Lens' Link (Maybe Text)
562+lThumbnailURL
563+ = lens _lThumbnailURL
564+ (\ s a -> s{_lThumbnailURL = a})
565+
566+-- | URL to link to. This must be a valid UTF-8 string containing between 1
567+-- and 2024 characters.
568+lURL :: Lens' Link (Maybe Text)
569+lURL = lens _lURL (\ s a -> s{_lURL = a})
570+
571+-- | Title of the target of the URL. Read-only.
572+lTitle :: Lens' Link (Maybe Text)
573+lTitle = lens _lTitle (\ s a -> s{_lTitle = a})
574+
575+instance FromJSON Link where
576+ parseJSON
577+ = withObject "Link"
578+ (\ o ->
579+ Link' <$>
580+ (o .:? "thumbnailUrl") <*> (o .:? "url") <*>
581+ (o .:? "title"))
582+
583+instance ToJSON Link where
584+ toJSON Link'{..}
585+ = object
586+ (catMaybes
587+ [("thumbnailUrl" .=) <$> _lThumbnailURL,
588+ ("url" .=) <$> _lURL, ("title" .=) <$> _lTitle])
589+
590+-- | Student work for an assignment.
591+--
592+-- /See:/ 'assignmentSubmission' smart constructor.
593+newtype AssignmentSubmission = AssignmentSubmission'
594+ { _asAttachments :: Maybe [Attachment]
595+ } deriving (Eq,Show,Data,Typeable,Generic)
596+
597+-- | Creates a value of 'AssignmentSubmission' with the minimum fields required to make a request.
598+--
599+-- Use one of the following lenses to modify other fields as desired:
600+--
601+-- * 'asAttachments'
602+assignmentSubmission
603+ :: AssignmentSubmission
604+assignmentSubmission =
605+ AssignmentSubmission'
606+ { _asAttachments = Nothing
607+ }
608+
609+-- | Attachments added by the student. Drive files that correspond to
610+-- materials with a share mode of SUBMISSION_COPY may not exist yet if the
611+-- student has not accessed the assignment in Classroom. Some attachment
612+-- metadata is only populated if the requesting user has permission to
613+-- access it. Identifier and alternate_link fields are available, but
614+-- others (e.g. title) may not be.
615+asAttachments :: Lens' AssignmentSubmission [Attachment]
616+asAttachments
617+ = lens _asAttachments
618+ (\ s a -> s{_asAttachments = a})
619+ . _Default
620+ . _Coerce
621+
622+instance FromJSON AssignmentSubmission where
623+ parseJSON
624+ = withObject "AssignmentSubmission"
625+ (\ o ->
626+ AssignmentSubmission' <$>
627+ (o .:? "attachments" .!= mempty))
628+
629+instance ToJSON AssignmentSubmission where
630+ toJSON AssignmentSubmission'{..}
631+ = object
632+ (catMaybes [("attachments" .=) <$> _asAttachments])
633+
634+-- | Request to modify the attachments of a student submission.
635+--
636+-- /See:/ 'modifyAttachmentsRequest' smart constructor.
637+newtype ModifyAttachmentsRequest = ModifyAttachmentsRequest'
638+ { _marAddAttachments :: Maybe [Attachment]
639+ } deriving (Eq,Show,Data,Typeable,Generic)
640+
641+-- | Creates a value of 'ModifyAttachmentsRequest' with the minimum fields required to make a request.
642+--
643+-- Use one of the following lenses to modify other fields as desired:
644+--
645+-- * 'marAddAttachments'
646+modifyAttachmentsRequest
647+ :: ModifyAttachmentsRequest
648+modifyAttachmentsRequest =
649+ ModifyAttachmentsRequest'
650+ { _marAddAttachments = Nothing
651+ }
652+
653+-- | Attachments to add. This may only contain link attachments.
654+marAddAttachments :: Lens' ModifyAttachmentsRequest [Attachment]
655+marAddAttachments
656+ = lens _marAddAttachments
657+ (\ s a -> s{_marAddAttachments = a})
658+ . _Default
659+ . _Coerce
660+
661+instance FromJSON ModifyAttachmentsRequest where
662+ parseJSON
663+ = withObject "ModifyAttachmentsRequest"
664+ (\ o ->
665+ ModifyAttachmentsRequest' <$>
666+ (o .:? "addAttachments" .!= mempty))
667+
668+instance ToJSON ModifyAttachmentsRequest where
669+ toJSON ModifyAttachmentsRequest'{..}
670+ = object
671+ (catMaybes
672+ [("addAttachments" .=) <$> _marAddAttachments])
673+
674+-- | Response when listing student submissions.
675+--
676+-- /See:/ 'listStudentSubmissionsResponse' smart constructor.
677+data ListStudentSubmissionsResponse = ListStudentSubmissionsResponse'
678+ { _lssrNextPageToken :: !(Maybe Text)
679+ , _lssrStudentSubmissions :: !(Maybe [StudentSubmission])
680+ } deriving (Eq,Show,Data,Typeable,Generic)
681+
682+-- | Creates a value of 'ListStudentSubmissionsResponse' with the minimum fields required to make a request.
683+--
684+-- Use one of the following lenses to modify other fields as desired:
685+--
686+-- * 'lssrNextPageToken'
687+--
688+-- * 'lssrStudentSubmissions'
689+listStudentSubmissionsResponse
690+ :: ListStudentSubmissionsResponse
691+listStudentSubmissionsResponse =
692+ ListStudentSubmissionsResponse'
693+ { _lssrNextPageToken = Nothing
694+ , _lssrStudentSubmissions = Nothing
695+ }
696+
697+-- | Token identifying the next page of results to return. If empty, no
698+-- further results are available.
699+lssrNextPageToken :: Lens' ListStudentSubmissionsResponse (Maybe Text)
700+lssrNextPageToken
701+ = lens _lssrNextPageToken
702+ (\ s a -> s{_lssrNextPageToken = a})
703+
704+-- | Student work that matches the request.
705+lssrStudentSubmissions :: Lens' ListStudentSubmissionsResponse [StudentSubmission]
706+lssrStudentSubmissions
707+ = lens _lssrStudentSubmissions
708+ (\ s a -> s{_lssrStudentSubmissions = a})
709+ . _Default
710+ . _Coerce
711+
712+instance FromJSON ListStudentSubmissionsResponse
713+ where
714+ parseJSON
715+ = withObject "ListStudentSubmissionsResponse"
716+ (\ o ->
717+ ListStudentSubmissionsResponse' <$>
718+ (o .:? "nextPageToken") <*>
719+ (o .:? "studentSubmissions" .!= mempty))
720+
721+instance ToJSON ListStudentSubmissionsResponse where
722+ toJSON ListStudentSubmissionsResponse'{..}
723+ = object
724+ (catMaybes
725+ [("nextPageToken" .=) <$> _lssrNextPageToken,
726+ ("studentSubmissions" .=) <$>
727+ _lssrStudentSubmissions])
728+
729+-- | Material attached to course work. When creating attachments, only the
730+-- Link field may be specified.
731+--
732+-- /See:/ 'material' smart constructor.
733+data Material = Material'
734+ { _mDriveFile :: !(Maybe SharedDriveFile)
735+ , _mLink :: !(Maybe Link)
736+ , _mYouTubeVideo :: !(Maybe YouTubeVideo)
737+ , _mForm :: !(Maybe Form)
738+ } deriving (Eq,Show,Data,Typeable,Generic)
739+
740+-- | Creates a value of 'Material' with the minimum fields required to make a request.
741+--
742+-- Use one of the following lenses to modify other fields as desired:
743+--
744+-- * 'mDriveFile'
745+--
746+-- * 'mLink'
747+--
748+-- * 'mYouTubeVideo'
749+--
750+-- * 'mForm'
751+material
752+ :: Material
753+material =
754+ Material'
755+ { _mDriveFile = Nothing
756+ , _mLink = Nothing
757+ , _mYouTubeVideo = Nothing
758+ , _mForm = Nothing
759+ }
760+
761+-- | Google Drive file material.
762+mDriveFile :: Lens' Material (Maybe SharedDriveFile)
763+mDriveFile
764+ = lens _mDriveFile (\ s a -> s{_mDriveFile = a})
765+
766+-- | Link material.
767+mLink :: Lens' Material (Maybe Link)
768+mLink = lens _mLink (\ s a -> s{_mLink = a})
769+
770+-- | YouTube video material.
771+mYouTubeVideo :: Lens' Material (Maybe YouTubeVideo)
772+mYouTubeVideo
773+ = lens _mYouTubeVideo
774+ (\ s a -> s{_mYouTubeVideo = a})
775+
776+-- | Google Forms material.
777+mForm :: Lens' Material (Maybe Form)
778+mForm = lens _mForm (\ s a -> s{_mForm = a})
779+
780+instance FromJSON Material where
781+ parseJSON
782+ = withObject "Material"
783+ (\ o ->
784+ Material' <$>
785+ (o .:? "driveFile") <*> (o .:? "link") <*>
786+ (o .:? "youtubeVideo")
787+ <*> (o .:? "form"))
788+
789+instance ToJSON Material where
790+ toJSON Material'{..}
791+ = object
792+ (catMaybes
793+ [("driveFile" .=) <$> _mDriveFile,
794+ ("link" .=) <$> _mLink,
795+ ("youtubeVideo" .=) <$> _mYouTubeVideo,
796+ ("form" .=) <$> _mForm])
797+
798+-- | Student work for a multiple-choice question.
799+--
800+-- /See:/ 'multipleChoiceSubmission' smart constructor.
801+newtype MultipleChoiceSubmission = MultipleChoiceSubmission'
802+ { _mcsAnswer :: Maybe Text
803+ } deriving (Eq,Show,Data,Typeable,Generic)
804+
805+-- | Creates a value of 'MultipleChoiceSubmission' with the minimum fields required to make a request.
806+--
807+-- Use one of the following lenses to modify other fields as desired:
808+--
809+-- * 'mcsAnswer'
810+multipleChoiceSubmission
811+ :: MultipleChoiceSubmission
812+multipleChoiceSubmission =
813+ MultipleChoiceSubmission'
814+ { _mcsAnswer = Nothing
815+ }
816+
817+-- | Student\'s select choice.
818+mcsAnswer :: Lens' MultipleChoiceSubmission (Maybe Text)
819+mcsAnswer
820+ = lens _mcsAnswer (\ s a -> s{_mcsAnswer = a})
821+
822+instance FromJSON MultipleChoiceSubmission where
823+ parseJSON
824+ = withObject "MultipleChoiceSubmission"
825+ (\ o ->
826+ MultipleChoiceSubmission' <$> (o .:? "answer"))
827+
828+instance ToJSON MultipleChoiceSubmission where
829+ toJSON MultipleChoiceSubmission'{..}
830+ = object (catMaybes [("answer" .=) <$> _mcsAnswer])
831+
132832-- | Response when listing invitations.
133833--
134834-- /See:/ 'listInvitationsResponse' smart constructor.
@@ -182,6 +882,107 @@ instance ToJSON ListInvitationsResponse where
182882 [("nextPageToken" .=) <$> _lirNextPageToken,
183883 ("invitations" .=) <$> _lirInvitations])
184884
885+-- | A material attached to a course as part of a material set.
886+--
887+-- /See:/ 'courseMaterial' smart constructor.
888+data CourseMaterial = CourseMaterial'
889+ { _cmDriveFile :: !(Maybe DriveFile)
890+ , _cmLink :: !(Maybe Link)
891+ , _cmYouTubeVideo :: !(Maybe YouTubeVideo)
892+ , _cmForm :: !(Maybe Form)
893+ } deriving (Eq,Show,Data,Typeable,Generic)
894+
895+-- | Creates a value of 'CourseMaterial' with the minimum fields required to make a request.
896+--
897+-- Use one of the following lenses to modify other fields as desired:
898+--
899+-- * 'cmDriveFile'
900+--
901+-- * 'cmLink'
902+--
903+-- * 'cmYouTubeVideo'
904+--
905+-- * 'cmForm'
906+courseMaterial
907+ :: CourseMaterial
908+courseMaterial =
909+ CourseMaterial'
910+ { _cmDriveFile = Nothing
911+ , _cmLink = Nothing
912+ , _cmYouTubeVideo = Nothing
913+ , _cmForm = Nothing
914+ }
915+
916+-- | Google Drive file attachment.
917+cmDriveFile :: Lens' CourseMaterial (Maybe DriveFile)
918+cmDriveFile
919+ = lens _cmDriveFile (\ s a -> s{_cmDriveFile = a})
920+
921+-- | Link atatchment.
922+cmLink :: Lens' CourseMaterial (Maybe Link)
923+cmLink = lens _cmLink (\ s a -> s{_cmLink = a})
924+
925+-- | Youtube video attachment.
926+cmYouTubeVideo :: Lens' CourseMaterial (Maybe YouTubeVideo)
927+cmYouTubeVideo
928+ = lens _cmYouTubeVideo
929+ (\ s a -> s{_cmYouTubeVideo = a})
930+
931+-- | Google Forms attachment.
932+cmForm :: Lens' CourseMaterial (Maybe Form)
933+cmForm = lens _cmForm (\ s a -> s{_cmForm = a})
934+
935+instance FromJSON CourseMaterial where
936+ parseJSON
937+ = withObject "CourseMaterial"
938+ (\ o ->
939+ CourseMaterial' <$>
940+ (o .:? "driveFile") <*> (o .:? "link") <*>
941+ (o .:? "youTubeVideo")
942+ <*> (o .:? "form"))
943+
944+instance ToJSON CourseMaterial where
945+ toJSON CourseMaterial'{..}
946+ = object
947+ (catMaybes
948+ [("driveFile" .=) <$> _cmDriveFile,
949+ ("link" .=) <$> _cmLink,
950+ ("youTubeVideo" .=) <$> _cmYouTubeVideo,
951+ ("form" .=) <$> _cmForm])
952+
953+-- | Student work for a short answer question.
954+--
955+-- /See:/ 'shortAnswerSubmission' smart constructor.
956+newtype ShortAnswerSubmission = ShortAnswerSubmission'
957+ { _sasAnswer :: Maybe Text
958+ } deriving (Eq,Show,Data,Typeable,Generic)
959+
960+-- | Creates a value of 'ShortAnswerSubmission' with the minimum fields required to make a request.
961+--
962+-- Use one of the following lenses to modify other fields as desired:
963+--
964+-- * 'sasAnswer'
965+shortAnswerSubmission
966+ :: ShortAnswerSubmission
967+shortAnswerSubmission =
968+ ShortAnswerSubmission'
969+ { _sasAnswer = Nothing
970+ }
971+
972+-- | Student response to a short-answer question.
973+sasAnswer :: Lens' ShortAnswerSubmission (Maybe Text)
974+sasAnswer
975+ = lens _sasAnswer (\ s a -> s{_sasAnswer = a})
976+
977+instance FromJSON ShortAnswerSubmission where
978+ parseJSON
979+ = withObject "ShortAnswerSubmission"
980+ (\ o -> ShortAnswerSubmission' <$> (o .:? "answer"))
981+
982+instance ToJSON ShortAnswerSubmission where
983+ toJSON ShortAnswerSubmission'{..}
984+ = object (catMaybes [("answer" .=) <$> _sasAnswer])
985+
185986-- | An invitation to join a course.
186987--
187988-- /See:/ 'invitation' smart constructor.
@@ -251,6 +1052,432 @@ instance ToJSON Invitation where
2511052 ("userId" .=) <$> _iUserId, ("role" .=) <$> _iRole,
2521053 ("id" .=) <$> _iId])
2531054
1055+-- | Attachment added to student assignment work. When creating attachments,
1056+-- only the Link field may be specified.
1057+--
1058+-- /See:/ 'attachment' smart constructor.
1059+data Attachment = Attachment'
1060+ { _aDriveFile :: !(Maybe DriveFile)
1061+ , _aLink :: !(Maybe Link)
1062+ , _aYouTubeVideo :: !(Maybe YouTubeVideo)
1063+ , _aForm :: !(Maybe Form)
1064+ } deriving (Eq,Show,Data,Typeable,Generic)
1065+
1066+-- | Creates a value of 'Attachment' with the minimum fields required to make a request.
1067+--
1068+-- Use one of the following lenses to modify other fields as desired:
1069+--
1070+-- * 'aDriveFile'
1071+--
1072+-- * 'aLink'
1073+--
1074+-- * 'aYouTubeVideo'
1075+--
1076+-- * 'aForm'
1077+attachment
1078+ :: Attachment
1079+attachment =
1080+ Attachment'
1081+ { _aDriveFile = Nothing
1082+ , _aLink = Nothing
1083+ , _aYouTubeVideo = Nothing
1084+ , _aForm = Nothing
1085+ }
1086+
1087+-- | Google Drive file attachment.
1088+aDriveFile :: Lens' Attachment (Maybe DriveFile)
1089+aDriveFile
1090+ = lens _aDriveFile (\ s a -> s{_aDriveFile = a})
1091+
1092+-- | Link attachment.
1093+aLink :: Lens' Attachment (Maybe Link)
1094+aLink = lens _aLink (\ s a -> s{_aLink = a})
1095+
1096+-- | Youtube video attachment.
1097+aYouTubeVideo :: Lens' Attachment (Maybe YouTubeVideo)
1098+aYouTubeVideo
1099+ = lens _aYouTubeVideo
1100+ (\ s a -> s{_aYouTubeVideo = a})
1101+
1102+-- | Google Forms attachment.
1103+aForm :: Lens' Attachment (Maybe Form)
1104+aForm = lens _aForm (\ s a -> s{_aForm = a})
1105+
1106+instance FromJSON Attachment where
1107+ parseJSON
1108+ = withObject "Attachment"
1109+ (\ o ->
1110+ Attachment' <$>
1111+ (o .:? "driveFile") <*> (o .:? "link") <*>
1112+ (o .:? "youTubeVideo")
1113+ <*> (o .:? "form"))
1114+
1115+instance ToJSON Attachment where
1116+ toJSON Attachment'{..}
1117+ = object
1118+ (catMaybes
1119+ [("driveFile" .=) <$> _aDriveFile,
1120+ ("link" .=) <$> _aLink,
1121+ ("youTubeVideo" .=) <$> _aYouTubeVideo,
1122+ ("form" .=) <$> _aForm])
1123+
1124+-- | Student submission for course work. StudentSubmission items are
1125+-- generated when a CourseWork item is created. StudentSubmissions that
1126+-- have never been accessed (i.e. with \`state\` = NEW) may not have a
1127+-- creation time or update time.
1128+--
1129+-- /See:/ 'studentSubmission' smart constructor.
1130+data StudentSubmission = StudentSubmission'
1131+ { _ssCreationTime :: !(Maybe Text)
1132+ , _ssLate :: !(Maybe Bool)
1133+ , _ssState :: !(Maybe Text)
1134+ , _ssCourseId :: !(Maybe Text)
1135+ , _ssMultipleChoiceSubmission :: !(Maybe MultipleChoiceSubmission)
1136+ , _ssAssignmentSubmission :: !(Maybe AssignmentSubmission)
1137+ , _ssShortAnswerSubmission :: !(Maybe ShortAnswerSubmission)
1138+ , _ssAssociatedWithDeveloper :: !(Maybe Bool)
1139+ , _ssUserId :: !(Maybe Text)
1140+ , _ssUpdateTime :: !(Maybe Text)
1141+ , _ssCourseWorkType :: !(Maybe Text)
1142+ , _ssAssignedGrade :: !(Maybe (Textual Double))
1143+ , _ssId :: !(Maybe Text)
1144+ , _ssDraftGrade :: !(Maybe (Textual Double))
1145+ , _ssAlternateLink :: !(Maybe Text)
1146+ , _ssCourseWorkId :: !(Maybe Text)
1147+ } deriving (Eq,Show,Data,Typeable,Generic)
1148+
1149+-- | Creates a value of 'StudentSubmission' with the minimum fields required to make a request.
1150+--
1151+-- Use one of the following lenses to modify other fields as desired:
1152+--
1153+-- * 'ssCreationTime'
1154+--
1155+-- * 'ssLate'
1156+--
1157+-- * 'ssState'
1158+--
1159+-- * 'ssCourseId'
1160+--
1161+-- * 'ssMultipleChoiceSubmission'
1162+--
1163+-- * 'ssAssignmentSubmission'
1164+--
1165+-- * 'ssShortAnswerSubmission'
1166+--
1167+-- * 'ssAssociatedWithDeveloper'
1168+--
1169+-- * 'ssUserId'
1170+--
1171+-- * 'ssUpdateTime'
1172+--
1173+-- * 'ssCourseWorkType'
1174+--
1175+-- * 'ssAssignedGrade'
1176+--
1177+-- * 'ssId'
1178+--
1179+-- * 'ssDraftGrade'
1180+--
1181+-- * 'ssAlternateLink'
1182+--
1183+-- * 'ssCourseWorkId'
1184+studentSubmission
1185+ :: StudentSubmission
1186+studentSubmission =
1187+ StudentSubmission'
1188+ { _ssCreationTime = Nothing
1189+ , _ssLate = Nothing
1190+ , _ssState = Nothing
1191+ , _ssCourseId = Nothing
1192+ , _ssMultipleChoiceSubmission = Nothing
1193+ , _ssAssignmentSubmission = Nothing
1194+ , _ssShortAnswerSubmission = Nothing
1195+ , _ssAssociatedWithDeveloper = Nothing
1196+ , _ssUserId = Nothing
1197+ , _ssUpdateTime = Nothing
1198+ , _ssCourseWorkType = Nothing
1199+ , _ssAssignedGrade = Nothing
1200+ , _ssId = Nothing
1201+ , _ssDraftGrade = Nothing
1202+ , _ssAlternateLink = Nothing
1203+ , _ssCourseWorkId = Nothing
1204+ }
1205+
1206+-- | Creation time of this submission.. This may be unset if the student has
1207+-- not accessed this item. Read-only.
1208+ssCreationTime :: Lens' StudentSubmission (Maybe Text)
1209+ssCreationTime
1210+ = lens _ssCreationTime
1211+ (\ s a -> s{_ssCreationTime = a})
1212+
1213+-- | Whether this submission is late. Read-only.
1214+ssLate :: Lens' StudentSubmission (Maybe Bool)
1215+ssLate = lens _ssLate (\ s a -> s{_ssLate = a})
1216+
1217+-- | State of this submission. Read-only.
1218+ssState :: Lens' StudentSubmission (Maybe Text)
1219+ssState = lens _ssState (\ s a -> s{_ssState = a})
1220+
1221+-- | Identifier of the course. Read-only.
1222+ssCourseId :: Lens' StudentSubmission (Maybe Text)
1223+ssCourseId
1224+ = lens _ssCourseId (\ s a -> s{_ssCourseId = a})
1225+
1226+-- | Submission content when course_work_type is MUTIPLE_CHOICE_QUESTION.
1227+ssMultipleChoiceSubmission :: Lens' StudentSubmission (Maybe MultipleChoiceSubmission)
1228+ssMultipleChoiceSubmission
1229+ = lens _ssMultipleChoiceSubmission
1230+ (\ s a -> s{_ssMultipleChoiceSubmission = a})
1231+
1232+-- | Submission content when course_work_type is ASSIGNMENT .
1233+ssAssignmentSubmission :: Lens' StudentSubmission (Maybe AssignmentSubmission)
1234+ssAssignmentSubmission
1235+ = lens _ssAssignmentSubmission
1236+ (\ s a -> s{_ssAssignmentSubmission = a})
1237+
1238+-- | Submission content when course_work_type is SHORT_ANSWER_QUESTION.
1239+ssShortAnswerSubmission :: Lens' StudentSubmission (Maybe ShortAnswerSubmission)
1240+ssShortAnswerSubmission
1241+ = lens _ssShortAnswerSubmission
1242+ (\ s a -> s{_ssShortAnswerSubmission = a})
1243+
1244+-- | Whether this student submission is associated with the Developer Console
1245+-- project making the request. See google.classroom.Work.CreateCourseWork
1246+-- for more details. Read-only.
1247+ssAssociatedWithDeveloper :: Lens' StudentSubmission (Maybe Bool)
1248+ssAssociatedWithDeveloper
1249+ = lens _ssAssociatedWithDeveloper
1250+ (\ s a -> s{_ssAssociatedWithDeveloper = a})
1251+
1252+-- | Identifier for the student that owns this submission. Read-only.
1253+ssUserId :: Lens' StudentSubmission (Maybe Text)
1254+ssUserId = lens _ssUserId (\ s a -> s{_ssUserId = a})
1255+
1256+-- | Last update time of this submission. This may be unset if the student
1257+-- has not accessed this item. Read-only.
1258+ssUpdateTime :: Lens' StudentSubmission (Maybe Text)
1259+ssUpdateTime
1260+ = lens _ssUpdateTime (\ s a -> s{_ssUpdateTime = a})
1261+
1262+-- | Type of course work this submission is for. Read-only.
1263+ssCourseWorkType :: Lens' StudentSubmission (Maybe Text)
1264+ssCourseWorkType
1265+ = lens _ssCourseWorkType
1266+ (\ s a -> s{_ssCourseWorkType = a})
1267+
1268+-- | Optional grade. If unset, no grade was set. This must be an integer
1269+-- value. This may be modified only by course teachers.
1270+ssAssignedGrade :: Lens' StudentSubmission (Maybe Double)
1271+ssAssignedGrade
1272+ = lens _ssAssignedGrade
1273+ (\ s a -> s{_ssAssignedGrade = a})
1274+ . mapping _Coerce
1275+
1276+-- | Classroom-assigned Identifier for the student submission. This is unique
1277+-- among submissions for the relevant course work. Read-only.
1278+ssId :: Lens' StudentSubmission (Maybe Text)
1279+ssId = lens _ssId (\ s a -> s{_ssId = a})
1280+
1281+-- | Optional pending grade. If unset, no grade was set. This must be an
1282+-- integer value. This is only visible to and modifiable by course
1283+-- teachers.
1284+ssDraftGrade :: Lens' StudentSubmission (Maybe Double)
1285+ssDraftGrade
1286+ = lens _ssDraftGrade (\ s a -> s{_ssDraftGrade = a})
1287+ . mapping _Coerce
1288+
1289+-- | Absolute link to the submission in the Classroom web UI. Read-only.
1290+ssAlternateLink :: Lens' StudentSubmission (Maybe Text)
1291+ssAlternateLink
1292+ = lens _ssAlternateLink
1293+ (\ s a -> s{_ssAlternateLink = a})
1294+
1295+-- | Identifier for the course work this corresponds to. Read-only.
1296+ssCourseWorkId :: Lens' StudentSubmission (Maybe Text)
1297+ssCourseWorkId
1298+ = lens _ssCourseWorkId
1299+ (\ s a -> s{_ssCourseWorkId = a})
1300+
1301+instance FromJSON StudentSubmission where
1302+ parseJSON
1303+ = withObject "StudentSubmission"
1304+ (\ o ->
1305+ StudentSubmission' <$>
1306+ (o .:? "creationTime") <*> (o .:? "late") <*>
1307+ (o .:? "state")
1308+ <*> (o .:? "courseId")
1309+ <*> (o .:? "multipleChoiceSubmission")
1310+ <*> (o .:? "assignmentSubmission")
1311+ <*> (o .:? "shortAnswerSubmission")
1312+ <*> (o .:? "associatedWithDeveloper")
1313+ <*> (o .:? "userId")
1314+ <*> (o .:? "updateTime")
1315+ <*> (o .:? "courseWorkType")
1316+ <*> (o .:? "assignedGrade")
1317+ <*> (o .:? "id")
1318+ <*> (o .:? "draftGrade")
1319+ <*> (o .:? "alternateLink")
1320+ <*> (o .:? "courseWorkId"))
1321+
1322+instance ToJSON StudentSubmission where
1323+ toJSON StudentSubmission'{..}
1324+ = object
1325+ (catMaybes
1326+ [("creationTime" .=) <$> _ssCreationTime,
1327+ ("late" .=) <$> _ssLate, ("state" .=) <$> _ssState,
1328+ ("courseId" .=) <$> _ssCourseId,
1329+ ("multipleChoiceSubmission" .=) <$>
1330+ _ssMultipleChoiceSubmission,
1331+ ("assignmentSubmission" .=) <$>
1332+ _ssAssignmentSubmission,
1333+ ("shortAnswerSubmission" .=) <$>
1334+ _ssShortAnswerSubmission,
1335+ ("associatedWithDeveloper" .=) <$>
1336+ _ssAssociatedWithDeveloper,
1337+ ("userId" .=) <$> _ssUserId,
1338+ ("updateTime" .=) <$> _ssUpdateTime,
1339+ ("courseWorkType" .=) <$> _ssCourseWorkType,
1340+ ("assignedGrade" .=) <$> _ssAssignedGrade,
1341+ ("id" .=) <$> _ssId,
1342+ ("draftGrade" .=) <$> _ssDraftGrade,
1343+ ("alternateLink" .=) <$> _ssAlternateLink,
1344+ ("courseWorkId" .=) <$> _ssCourseWorkId])
1345+
1346+-- | Represents a whole calendar date, e.g. date of birth. The time of day
1347+-- and time zone are either specified elsewhere or are not significant. The
1348+-- date is relative to the Proleptic Gregorian Calendar. The day may be 0
1349+-- to represent a year and month where the day is not significant, e.g.
1350+-- credit card expiration date. The year may be 0 to represent a month and
1351+-- day independent of year, e.g. anniversary date. Related types are
1352+-- google.type.TimeOfDay and \`google.protobuf.Timestamp\`.
1353+--
1354+-- /See:/ 'date' smart constructor.
1355+data Date = Date'
1356+ { _dDay :: !(Maybe (Textual Int32))
1357+ , _dYear :: !(Maybe (Textual Int32))
1358+ , _dMonth :: !(Maybe (Textual Int32))
1359+ } deriving (Eq,Show,Data,Typeable,Generic)
1360+
1361+-- | Creates a value of 'Date' with the minimum fields required to make a request.
1362+--
1363+-- Use one of the following lenses to modify other fields as desired:
1364+--
1365+-- * 'dDay'
1366+--
1367+-- * 'dYear'
1368+--
1369+-- * 'dMonth'
1370+date
1371+ :: Date
1372+date =
1373+ Date'
1374+ { _dDay = Nothing
1375+ , _dYear = Nothing
1376+ , _dMonth = Nothing
1377+ }
1378+
1379+-- | Day of month. Must be from 1 to 31 and valid for the year and month, or
1380+-- 0 if specifying a year\/month where the day is not significant.
1381+dDay :: Lens' Date (Maybe Int32)
1382+dDay
1383+ = lens _dDay (\ s a -> s{_dDay = a}) .
1384+ mapping _Coerce
1385+
1386+-- | Year of date. Must be from 1 to 9999, or 0 if specifying a date without
1387+-- a year.
1388+dYear :: Lens' Date (Maybe Int32)
1389+dYear
1390+ = lens _dYear (\ s a -> s{_dYear = a}) .
1391+ mapping _Coerce
1392+
1393+-- | Month of year. Must be from 1 to 12.
1394+dMonth :: Lens' Date (Maybe Int32)
1395+dMonth
1396+ = lens _dMonth (\ s a -> s{_dMonth = a}) .
1397+ mapping _Coerce
1398+
1399+instance FromJSON Date where
1400+ parseJSON
1401+ = withObject "Date"
1402+ (\ o ->
1403+ Date' <$>
1404+ (o .:? "day") <*> (o .:? "year") <*> (o .:? "month"))
1405+
1406+instance ToJSON Date where
1407+ toJSON Date'{..}
1408+ = object
1409+ (catMaybes
1410+ [("day" .=) <$> _dDay, ("year" .=) <$> _dYear,
1411+ ("month" .=) <$> _dMonth])
1412+
1413+-- | YouTube video item.
1414+--
1415+-- /See:/ 'youTubeVideo' smart constructor.
1416+data YouTubeVideo = YouTubeVideo'
1417+ { _ytvThumbnailURL :: !(Maybe Text)
1418+ , _ytvId :: !(Maybe Text)
1419+ , _ytvTitle :: !(Maybe Text)
1420+ , _ytvAlternateLink :: !(Maybe Text)
1421+ } deriving (Eq,Show,Data,Typeable,Generic)
1422+
1423+-- | Creates a value of 'YouTubeVideo' with the minimum fields required to make a request.
1424+--
1425+-- Use one of the following lenses to modify other fields as desired:
1426+--
1427+-- * 'ytvThumbnailURL'
1428+--
1429+-- * 'ytvId'
1430+--
1431+-- * 'ytvTitle'
1432+--
1433+-- * 'ytvAlternateLink'
1434+youTubeVideo
1435+ :: YouTubeVideo
1436+youTubeVideo =
1437+ YouTubeVideo'
1438+ { _ytvThumbnailURL = Nothing
1439+ , _ytvId = Nothing
1440+ , _ytvTitle = Nothing
1441+ , _ytvAlternateLink = Nothing
1442+ }
1443+
1444+-- | URL of a thumbnail image of the YouTube video. Read-only.
1445+ytvThumbnailURL :: Lens' YouTubeVideo (Maybe Text)
1446+ytvThumbnailURL
1447+ = lens _ytvThumbnailURL
1448+ (\ s a -> s{_ytvThumbnailURL = a})
1449+
1450+-- | YouTube API resource ID.
1451+ytvId :: Lens' YouTubeVideo (Maybe Text)
1452+ytvId = lens _ytvId (\ s a -> s{_ytvId = a})
1453+
1454+-- | Title of the YouTube video. Read-only.
1455+ytvTitle :: Lens' YouTubeVideo (Maybe Text)
1456+ytvTitle = lens _ytvTitle (\ s a -> s{_ytvTitle = a})
1457+
1458+-- | URL that can be used to view the YouTube video. Read-only.
1459+ytvAlternateLink :: Lens' YouTubeVideo (Maybe Text)
1460+ytvAlternateLink
1461+ = lens _ytvAlternateLink
1462+ (\ s a -> s{_ytvAlternateLink = a})
1463+
1464+instance FromJSON YouTubeVideo where
1465+ parseJSON
1466+ = withObject "YouTubeVideo"
1467+ (\ o ->
1468+ YouTubeVideo' <$>
1469+ (o .:? "thumbnailUrl") <*> (o .:? "id") <*>
1470+ (o .:? "title")
1471+ <*> (o .:? "alternateLink"))
1472+
1473+instance ToJSON YouTubeVideo where
1474+ toJSON YouTubeVideo'{..}
1475+ = object
1476+ (catMaybes
1477+ [("thumbnailUrl" .=) <$> _ytvThumbnailURL,
1478+ ("id" .=) <$> _ytvId, ("title" .=) <$> _ytvTitle,
1479+ ("alternateLink" .=) <$> _ytvAlternateLink])
1480+
2541481-- | Teacher of a course.
2551482--
2561483-- /See:/ 'teacher' smart constructor.
@@ -310,6 +1537,56 @@ instance ToJSON Teacher where
3101537 ("profile" .=) <$> _tProFile,
3111538 ("userId" .=) <$> _tUserId])
3121539
1540+-- | A set of materials that appears on the \"About\" page of the course.
1541+-- These materials might include a syllabus, schedule, or other background
1542+-- information relating to the course as a whole.
1543+--
1544+-- /See:/ 'courseMaterialSet' smart constructor.
1545+data CourseMaterialSet = CourseMaterialSet'
1546+ { _cmsMaterials :: !(Maybe [CourseMaterial])
1547+ , _cmsTitle :: !(Maybe Text)
1548+ } deriving (Eq,Show,Data,Typeable,Generic)
1549+
1550+-- | Creates a value of 'CourseMaterialSet' with the minimum fields required to make a request.
1551+--
1552+-- Use one of the following lenses to modify other fields as desired:
1553+--
1554+-- * 'cmsMaterials'
1555+--
1556+-- * 'cmsTitle'
1557+courseMaterialSet
1558+ :: CourseMaterialSet
1559+courseMaterialSet =
1560+ CourseMaterialSet'
1561+ { _cmsMaterials = Nothing
1562+ , _cmsTitle = Nothing
1563+ }
1564+
1565+-- | Materials attached to this set.
1566+cmsMaterials :: Lens' CourseMaterialSet [CourseMaterial]
1567+cmsMaterials
1568+ = lens _cmsMaterials (\ s a -> s{_cmsMaterials = a})
1569+ . _Default
1570+ . _Coerce
1571+
1572+-- | Title for this set.
1573+cmsTitle :: Lens' CourseMaterialSet (Maybe Text)
1574+cmsTitle = lens _cmsTitle (\ s a -> s{_cmsTitle = a})
1575+
1576+instance FromJSON CourseMaterialSet where
1577+ parseJSON
1578+ = withObject "CourseMaterialSet"
1579+ (\ o ->
1580+ CourseMaterialSet' <$>
1581+ (o .:? "materials" .!= mempty) <*> (o .:? "title"))
1582+
1583+instance ToJSON CourseMaterialSet where
1584+ toJSON CourseMaterialSet'{..}
1585+ = object
1586+ (catMaybes
1587+ [("materials" .=) <$> _cmsMaterials,
1588+ ("title" .=) <$> _cmsTitle])
1589+
3131590-- | Details of the user\'s name.
3141591--
3151592-- /See:/ 'name' smart constructor.
@@ -421,6 +1698,28 @@ instance ToJSON ListCoursesResponse where
4211698 [("nextPageToken" .=) <$> _lcrNextPageToken,
4221699 ("courses" .=) <$> _lcrCourses])
4231700
1701+-- | Request to turn in a student submission.
1702+--
1703+-- /See:/ 'turnInStudentSubmissionRequest' smart constructor.
1704+data TurnInStudentSubmissionRequest =
1705+ TurnInStudentSubmissionRequest'
1706+ deriving (Eq,Show,Data,Typeable,Generic)
1707+
1708+-- | Creates a value of 'TurnInStudentSubmissionRequest' with the minimum fields required to make a request.
1709+--
1710+turnInStudentSubmissionRequest
1711+ :: TurnInStudentSubmissionRequest
1712+turnInStudentSubmissionRequest = TurnInStudentSubmissionRequest'
1713+
1714+instance FromJSON TurnInStudentSubmissionRequest
1715+ where
1716+ parseJSON
1717+ = withObject "TurnInStudentSubmissionRequest"
1718+ (\ o -> pure TurnInStudentSubmissionRequest')
1719+
1720+instance ToJSON TurnInStudentSubmissionRequest where
1721+ toJSON = const emptyObject
1722+
4241723-- | Global information for a user.
4251724--
4261725-- /See:/ 'userProFile' smart constructor.
@@ -503,12 +1802,108 @@ instance ToJSON UserProFile where
5031802 ("id" .=) <$> _upfId,
5041803 ("permissions" .=) <$> _upfPermissions])
5051804
1805+-- | Representation of a Google Drive folder.
1806+--
1807+-- /See:/ 'driveFolder' smart constructor.
1808+data DriveFolder = DriveFolder'
1809+ { _dId :: !(Maybe Text)
1810+ , _dTitle :: !(Maybe Text)
1811+ , _dAlternateLink :: !(Maybe Text)
1812+ } deriving (Eq,Show,Data,Typeable,Generic)
1813+
1814+-- | Creates a value of 'DriveFolder' with the minimum fields required to make a request.
1815+--
1816+-- Use one of the following lenses to modify other fields as desired:
1817+--
1818+-- * 'dId'
1819+--
1820+-- * 'dTitle'
1821+--
1822+-- * 'dAlternateLink'
1823+driveFolder
1824+ :: DriveFolder
1825+driveFolder =
1826+ DriveFolder'
1827+ { _dId = Nothing
1828+ , _dTitle = Nothing
1829+ , _dAlternateLink = Nothing
1830+ }
1831+
1832+-- | Drive API resource ID.
1833+dId :: Lens' DriveFolder (Maybe Text)
1834+dId = lens _dId (\ s a -> s{_dId = a})
1835+
1836+-- | Title of the Drive folder. Read-only.
1837+dTitle :: Lens' DriveFolder (Maybe Text)
1838+dTitle = lens _dTitle (\ s a -> s{_dTitle = a})
1839+
1840+-- | URL that can be used to access the Drive folder. Read-only.
1841+dAlternateLink :: Lens' DriveFolder (Maybe Text)
1842+dAlternateLink
1843+ = lens _dAlternateLink
1844+ (\ s a -> s{_dAlternateLink = a})
1845+
1846+instance FromJSON DriveFolder where
1847+ parseJSON
1848+ = withObject "DriveFolder"
1849+ (\ o ->
1850+ DriveFolder' <$>
1851+ (o .:? "id") <*> (o .:? "title") <*>
1852+ (o .:? "alternateLink"))
1853+
1854+instance ToJSON DriveFolder where
1855+ toJSON DriveFolder'{..}
1856+ = object
1857+ (catMaybes
1858+ [("id" .=) <$> _dId, ("title" .=) <$> _dTitle,
1859+ ("alternateLink" .=) <$> _dAlternateLink])
1860+
1861+-- | Additional details for multiple-choice questions.
1862+--
1863+-- /See:/ 'multipleChoiceQuestion' smart constructor.
1864+newtype MultipleChoiceQuestion = MultipleChoiceQuestion'
1865+ { _mcqChoices :: Maybe [Text]
1866+ } deriving (Eq,Show,Data,Typeable,Generic)
1867+
1868+-- | Creates a value of 'MultipleChoiceQuestion' with the minimum fields required to make a request.
1869+--
1870+-- Use one of the following lenses to modify other fields as desired:
1871+--
1872+-- * 'mcqChoices'
1873+multipleChoiceQuestion
1874+ :: MultipleChoiceQuestion
1875+multipleChoiceQuestion =
1876+ MultipleChoiceQuestion'
1877+ { _mcqChoices = Nothing
1878+ }
1879+
1880+-- | Possible choices.
1881+mcqChoices :: Lens' MultipleChoiceQuestion [Text]
1882+mcqChoices
1883+ = lens _mcqChoices (\ s a -> s{_mcqChoices = a}) .
1884+ _Default
1885+ . _Coerce
1886+
1887+instance FromJSON MultipleChoiceQuestion where
1888+ parseJSON
1889+ = withObject "MultipleChoiceQuestion"
1890+ (\ o ->
1891+ MultipleChoiceQuestion' <$>
1892+ (o .:? "choices" .!= mempty))
1893+
1894+instance ToJSON MultipleChoiceQuestion where
1895+ toJSON MultipleChoiceQuestion'{..}
1896+ = object (catMaybes [("choices" .=) <$> _mcqChoices])
1897+
5061898-- | A Course in Classroom.
5071899--
5081900-- /See:/ 'course' smart constructor.
5091901data Course = Course'
5101902 { _cCreationTime :: !(Maybe Text)
5111903 , _cRoom :: !(Maybe Text)
1904+ , _cCourseMaterialSets :: !(Maybe [CourseMaterialSet])
1905+ , _cTeacherGroupEmail :: !(Maybe Text)
1906+ , _cTeacherFolder :: !(Maybe DriveFolder)
5121907 , _cCourseState :: !(Maybe Text)
5131908 , _cEnrollmentCode :: !(Maybe Text)
5141909 , _cUpdateTime :: !(Maybe Text)
@@ -516,6 +1911,7 @@ data Course = Course'
5161911 , _cName :: !(Maybe Text)
5171912 , _cId :: !(Maybe Text)
5181913 , _cAlternateLink :: !(Maybe Text)
1914+ , _cCourseGroupEmail :: !(Maybe Text)
5191915 , _cDescription :: !(Maybe Text)
5201916 , _cDescriptionHeading :: !(Maybe Text)
5211917 , _cSection :: !(Maybe Text)
@@ -529,6 +1925,12 @@ data Course = Course'
5291925--
5301926-- * 'cRoom'
5311927--
1928+-- * 'cCourseMaterialSets'
1929+--
1930+-- * 'cTeacherGroupEmail'
1931+--
1932+-- * 'cTeacherFolder'
1933+--
5321934-- * 'cCourseState'
5331935--
5341936-- * 'cEnrollmentCode'
@@ -543,6 +1945,8 @@ data Course = Course'
5431945--
5441946-- * 'cAlternateLink'
5451947--
1948+-- * 'cCourseGroupEmail'
1949+--
5461950-- * 'cDescription'
5471951--
5481952-- * 'cDescriptionHeading'
@@ -554,6 +1958,9 @@ course =
5541958 Course'
5551959 { _cCreationTime = Nothing
5561960 , _cRoom = Nothing
1961+ , _cCourseMaterialSets = Nothing
1962+ , _cTeacherGroupEmail = Nothing
1963+ , _cTeacherFolder = Nothing
5571964 , _cCourseState = Nothing
5581965 , _cEnrollmentCode = Nothing
5591966 , _cUpdateTime = Nothing
@@ -561,13 +1968,14 @@ course =
5611968 , _cName = Nothing
5621969 , _cId = Nothing
5631970 , _cAlternateLink = Nothing
1971+ , _cCourseGroupEmail = Nothing
5641972 , _cDescription = Nothing
5651973 , _cDescriptionHeading = Nothing
5661974 , _cSection = Nothing
5671975 }
5681976
5691977-- | Creation time of the course. Specifying this field in a course update
570−-- mask will result in an error. Read-only.
1978+-- mask results in an error. Read-only.
5711979cCreationTime :: Lens' Course (Maybe Text)
5721980cCreationTime
5731981 = lens _cCreationTime
@@ -578,6 +1986,31 @@ cCreationTime
5781986cRoom :: Lens' Course (Maybe Text)
5791987cRoom = lens _cRoom (\ s a -> s{_cRoom = a})
5801988
1989+-- | Sets of materials that appear on the \"about\" page of this course.
1990+-- Read-only.
1991+cCourseMaterialSets :: Lens' Course [CourseMaterialSet]
1992+cCourseMaterialSets
1993+ = lens _cCourseMaterialSets
1994+ (\ s a -> s{_cCourseMaterialSets = a})
1995+ . _Default
1996+ . _Coerce
1997+
1998+-- | The email address of a Google group containing all teachers of the
1999+-- course. This group does not accept email and can only be used for
2000+-- permissions. Read-only.
2001+cTeacherGroupEmail :: Lens' Course (Maybe Text)
2002+cTeacherGroupEmail
2003+ = lens _cTeacherGroupEmail
2004+ (\ s a -> s{_cTeacherGroupEmail = a})
2005+
2006+-- | Information about a Drive Folder that is shared with all teachers of the
2007+-- course. This field will only be set for teachers of the course and
2008+-- domain administrators. Read-only.
2009+cTeacherFolder :: Lens' Course (Maybe DriveFolder)
2010+cTeacherFolder
2011+ = lens _cTeacherFolder
2012+ (\ s a -> s{_cTeacherFolder = a})
2013+
5812014-- | State of the course. If unspecified, the default state is
5822015-- \`PROVISIONED\`.
5832016cCourseState :: Lens' Course (Maybe Text)
@@ -585,14 +2018,14 @@ cCourseState
5852018 = lens _cCourseState (\ s a -> s{_cCourseState = a})
5862019
5872020-- | Enrollment code to use when joining this course. Specifying this field
588−-- in a course update mask will result in an error. Read-only.
2021+-- in a course update mask results in an error. Read-only.
5892022cEnrollmentCode :: Lens' Course (Maybe Text)
5902023cEnrollmentCode
5912024 = lens _cEnrollmentCode
5922025 (\ s a -> s{_cEnrollmentCode = a})
5932026
5942027-- | Time of the most recent update to this course. Specifying this field in
595−-- a course update mask will result in an error. Read-only.
2028+-- a course update mask results in an error. Read-only.
5962029cUpdateTime :: Lens' Course (Maybe Text)
5972030cUpdateTime
5982031 = lens _cUpdateTime (\ s a -> s{_cUpdateTime = a})
@@ -602,8 +2035,8 @@ cUpdateTime
6022035-- be one of the following: * the numeric identifier for the user * the
6032036-- email address of the user * the string literal \`\"me\"\`, indicating
6042037-- the requesting user This must be set in a create request. Specifying
605−-- this field in a course update mask will result in an
606−-- \`INVALID_ARGUMENT\` error.
2038+-- this field in a course update mask results in an \`INVALID_ARGUMENT\`
2039+-- error.
6072040cOwnerId :: Lens' Course (Maybe Text)
6082041cOwnerId = lens _cOwnerId (\ s a -> s{_cOwnerId = a})
6092042
@@ -617,7 +2050,7 @@ cName = lens _cName (\ s a -> s{_cName = a})
6172050-- course, you may optionally set this identifier to an alias string in the
6182051-- request to create a corresponding alias. The \`id\` is still assigned by
6192052-- Classroom and cannot be updated after the course is created. Specifying
620−-- this field in a course update mask will result in an error.
2053+-- this field in a course update mask results in an error.
6212054cId :: Lens' Course (Maybe Text)
6222055cId = lens _cId (\ s a -> s{_cId = a})
6232056
@@ -627,6 +2060,14 @@ cAlternateLink
6272060 = lens _cAlternateLink
6282061 (\ s a -> s{_cAlternateLink = a})
6292062
2063+-- | The email address of a Google group containing all members of the
2064+-- course. This group does not accept email and can only be used for
2065+-- permissions. Read-only.
2066+cCourseGroupEmail :: Lens' Course (Maybe Text)
2067+cCourseGroupEmail
2068+ = lens _cCourseGroupEmail
2069+ (\ s a -> s{_cCourseGroupEmail = a})
2070+
6302071-- | Optional description. For example, \"We\'ll be learning about the
6312072-- structure of living creatures from a combination of textbooks, guest
6322073-- lectures, and lab work. Expect to be excited!\" If set, this field must
@@ -654,13 +2095,17 @@ instance FromJSON Course where
6542095 (\ o ->
6552096 Course' <$>
6562097 (o .:? "creationTime") <*> (o .:? "room") <*>
657− (o .:? "courseState")
2098+ (o .:? "courseMaterialSets" .!= mempty)
2099+ <*> (o .:? "teacherGroupEmail")
2100+ <*> (o .:? "teacherFolder")
2101+ <*> (o .:? "courseState")
6582102 <*> (o .:? "enrollmentCode")
6592103 <*> (o .:? "updateTime")
6602104 <*> (o .:? "ownerId")
6612105 <*> (o .:? "name")
6622106 <*> (o .:? "id")
6632107 <*> (o .:? "alternateLink")
2108+ <*> (o .:? "courseGroupEmail")
6642109 <*> (o .:? "description")
6652110 <*> (o .:? "descriptionHeading")
6662111 <*> (o .:? "section"))
@@ -671,16 +2116,136 @@ instance ToJSON Course where
6712116 (catMaybes
6722117 [("creationTime" .=) <$> _cCreationTime,
6732118 ("room" .=) <$> _cRoom,
2119+ ("courseMaterialSets" .=) <$> _cCourseMaterialSets,
2120+ ("teacherGroupEmail" .=) <$> _cTeacherGroupEmail,
2121+ ("teacherFolder" .=) <$> _cTeacherFolder,
6742122 ("courseState" .=) <$> _cCourseState,
6752123 ("enrollmentCode" .=) <$> _cEnrollmentCode,
6762124 ("updateTime" .=) <$> _cUpdateTime,
6772125 ("ownerId" .=) <$> _cOwnerId, ("name" .=) <$> _cName,
6782126 ("id" .=) <$> _cId,
6792127 ("alternateLink" .=) <$> _cAlternateLink,
2128+ ("courseGroupEmail" .=) <$> _cCourseGroupEmail,
6802129 ("description" .=) <$> _cDescription,
6812130 ("descriptionHeading" .=) <$> _cDescriptionHeading,
6822131 ("section" .=) <$> _cSection])
6832132
2133+-- | Represents a time of day. The date and time zone are either not
2134+-- significant or are specified elsewhere. An API may chose to allow leap
2135+-- seconds. Related types are google.type.Date and
2136+-- \`google.protobuf.Timestamp\`.
2137+--
2138+-- /See:/ 'timeOfDay' smart constructor.
2139+data TimeOfDay' = TimeOfDay''
2140+ { _todNanos :: !(Maybe (Textual Int32))
2141+ , _todHours :: !(Maybe (Textual Int32))
2142+ , _todMinutes :: !(Maybe (Textual Int32))
2143+ , _todSeconds :: !(Maybe (Textual Int32))
2144+ } deriving (Eq,Show,Data,Typeable,Generic)
2145+
2146+-- | Creates a value of 'TimeOfDay' with the minimum fields required to make a request.
2147+--
2148+-- Use one of the following lenses to modify other fields as desired:
2149+--
2150+-- * 'todNanos'
2151+--
2152+-- * 'todHours'
2153+--
2154+-- * 'todMinutes'
2155+--
2156+-- * 'todSeconds'
2157+timeOfDay
2158+ :: TimeOfDay'
2159+timeOfDay =
2160+ TimeOfDay''
2161+ { _todNanos = Nothing
2162+ , _todHours = Nothing
2163+ , _todMinutes = Nothing
2164+ , _todSeconds = Nothing
2165+ }
2166+
2167+-- | Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
2168+todNanos :: Lens' TimeOfDay' (Maybe Int32)
2169+todNanos
2170+ = lens _todNanos (\ s a -> s{_todNanos = a}) .
2171+ mapping _Coerce
2172+
2173+-- | Hours of day in 24 hour format. Should be from 0 to 23. An API may
2174+-- choose to allow the value \"24:00:00\" for scenarios like business
2175+-- closing time.
2176+todHours :: Lens' TimeOfDay' (Maybe Int32)
2177+todHours
2178+ = lens _todHours (\ s a -> s{_todHours = a}) .
2179+ mapping _Coerce
2180+
2181+-- | Minutes of hour of day. Must be from 0 to 59.
2182+todMinutes :: Lens' TimeOfDay' (Maybe Int32)
2183+todMinutes
2184+ = lens _todMinutes (\ s a -> s{_todMinutes = a}) .
2185+ mapping _Coerce
2186+
2187+-- | Seconds of minutes of the time. Must normally be from 0 to 59. An API
2188+-- may allow the value 60 if it allows leap-seconds.
2189+todSeconds :: Lens' TimeOfDay' (Maybe Int32)
2190+todSeconds
2191+ = lens _todSeconds (\ s a -> s{_todSeconds = a}) .
2192+ mapping _Coerce
2193+
2194+instance FromJSON TimeOfDay' where
2195+ parseJSON
2196+ = withObject "TimeOfDay"
2197+ (\ o ->
2198+ TimeOfDay'' <$>
2199+ (o .:? "nanos") <*> (o .:? "hours") <*>
2200+ (o .:? "minutes")
2201+ <*> (o .:? "seconds"))
2202+
2203+instance ToJSON TimeOfDay' where
2204+ toJSON TimeOfDay''{..}
2205+ = object
2206+ (catMaybes
2207+ [("nanos" .=) <$> _todNanos,
2208+ ("hours" .=) <$> _todHours,
2209+ ("minutes" .=) <$> _todMinutes,
2210+ ("seconds" .=) <$> _todSeconds])
2211+
2212+-- | Additional details for assignments.
2213+--
2214+-- /See:/ 'assignment' smart constructor.
2215+newtype Assignment = Assignment'
2216+ { _aStudentWorkFolder :: Maybe DriveFolder
2217+ } deriving (Eq,Show,Data,Typeable,Generic)
2218+
2219+-- | Creates a value of 'Assignment' with the minimum fields required to make a request.
2220+--
2221+-- Use one of the following lenses to modify other fields as desired:
2222+--
2223+-- * 'aStudentWorkFolder'
2224+assignment
2225+ :: Assignment
2226+assignment =
2227+ Assignment'
2228+ { _aStudentWorkFolder = Nothing
2229+ }
2230+
2231+-- | Drive folder where attachments from student submissions are placed. This
2232+-- is only populated for course teachers.
2233+aStudentWorkFolder :: Lens' Assignment (Maybe DriveFolder)
2234+aStudentWorkFolder
2235+ = lens _aStudentWorkFolder
2236+ (\ s a -> s{_aStudentWorkFolder = a})
2237+
2238+instance FromJSON Assignment where
2239+ parseJSON
2240+ = withObject "Assignment"
2241+ (\ o -> Assignment' <$> (o .:? "studentWorkFolder"))
2242+
2243+instance ToJSON Assignment where
2244+ toJSON Assignment'{..}
2245+ = object
2246+ (catMaybes
2247+ [("studentWorkFolder" .=) <$> _aStudentWorkFolder])
2248+
6842249-- | Response when listing students.
6852250--
6862251-- /See:/ 'listStudentsResponse' smart constructor.
@@ -733,6 +2298,53 @@ instance ToJSON ListStudentsResponse where
7332298 [("nextPageToken" .=) <$> _lsrNextPageToken,
7342299 ("students" .=) <$> _lsrStudents])
7352300
2301+-- | Drive file that is used as material for course work.
2302+--
2303+-- /See:/ 'sharedDriveFile' smart constructor.
2304+data SharedDriveFile = SharedDriveFile'
2305+ { _sdfDriveFile :: !(Maybe DriveFile)
2306+ , _sdfShareMode :: !(Maybe Text)
2307+ } deriving (Eq,Show,Data,Typeable,Generic)
2308+
2309+-- | Creates a value of 'SharedDriveFile' with the minimum fields required to make a request.
2310+--
2311+-- Use one of the following lenses to modify other fields as desired:
2312+--
2313+-- * 'sdfDriveFile'
2314+--
2315+-- * 'sdfShareMode'
2316+sharedDriveFile
2317+ :: SharedDriveFile
2318+sharedDriveFile =
2319+ SharedDriveFile'
2320+ { _sdfDriveFile = Nothing
2321+ , _sdfShareMode = Nothing
2322+ }
2323+
2324+-- | Drive file details.
2325+sdfDriveFile :: Lens' SharedDriveFile (Maybe DriveFile)
2326+sdfDriveFile
2327+ = lens _sdfDriveFile (\ s a -> s{_sdfDriveFile = a})
2328+
2329+-- | Mechanism by which students access the Drive item.
2330+sdfShareMode :: Lens' SharedDriveFile (Maybe Text)
2331+sdfShareMode
2332+ = lens _sdfShareMode (\ s a -> s{_sdfShareMode = a})
2333+
2334+instance FromJSON SharedDriveFile where
2335+ parseJSON
2336+ = withObject "SharedDriveFile"
2337+ (\ o ->
2338+ SharedDriveFile' <$>
2339+ (o .:? "driveFile") <*> (o .:? "shareMode"))
2340+
2341+instance ToJSON SharedDriveFile where
2342+ toJSON SharedDriveFile'{..}
2343+ = object
2344+ (catMaybes
2345+ [("driveFile" .=) <$> _sdfDriveFile,
2346+ ("shareMode" .=) <$> _sdfShareMode])
2347+
7362348-- | Alternative identifier for a course. An alias uniquely identifies a
7372349-- course. It must be unique within one of the following scopes: * domain:
7382350-- A domain-scoped alias is visible to all users within the alias
@@ -779,6 +2391,76 @@ instance ToJSON CourseAlias where
7792391 toJSON CourseAlias'{..}
7802392 = object (catMaybes [("alias" .=) <$> _caAlias])
7812393
2394+-- | Google Forms item.
2395+--
2396+-- /See:/ 'form' smart constructor.
2397+data Form = Form'
2398+ { _fThumbnailURL :: !(Maybe Text)
2399+ , _fFormURL :: !(Maybe Text)
2400+ , _fTitle :: !(Maybe Text)
2401+ , _fResponseURL :: !(Maybe Text)
2402+ } deriving (Eq,Show,Data,Typeable,Generic)
2403+
2404+-- | Creates a value of 'Form' with the minimum fields required to make a request.
2405+--
2406+-- Use one of the following lenses to modify other fields as desired:
2407+--
2408+-- * 'fThumbnailURL'
2409+--
2410+-- * 'fFormURL'
2411+--
2412+-- * 'fTitle'
2413+--
2414+-- * 'fResponseURL'
2415+form
2416+ :: Form
2417+form =
2418+ Form'
2419+ { _fThumbnailURL = Nothing
2420+ , _fFormURL = Nothing
2421+ , _fTitle = Nothing
2422+ , _fResponseURL = Nothing
2423+ }
2424+
2425+-- | URL of a thumbnail image of the Form. Read-only.
2426+fThumbnailURL :: Lens' Form (Maybe Text)
2427+fThumbnailURL
2428+ = lens _fThumbnailURL
2429+ (\ s a -> s{_fThumbnailURL = a})
2430+
2431+-- | URL of the form.
2432+fFormURL :: Lens' Form (Maybe Text)
2433+fFormURL = lens _fFormURL (\ s a -> s{_fFormURL = a})
2434+
2435+-- | Title of the Form. Read-only.
2436+fTitle :: Lens' Form (Maybe Text)
2437+fTitle = lens _fTitle (\ s a -> s{_fTitle = a})
2438+
2439+-- | URL of the form responses document. Only set if respsonses have been
2440+-- recorded and only when the requesting user is an editor of the form.
2441+-- Read-only.
2442+fResponseURL :: Lens' Form (Maybe Text)
2443+fResponseURL
2444+ = lens _fResponseURL (\ s a -> s{_fResponseURL = a})
2445+
2446+instance FromJSON Form where
2447+ parseJSON
2448+ = withObject "Form"
2449+ (\ o ->
2450+ Form' <$>
2451+ (o .:? "thumbnailUrl") <*> (o .:? "formUrl") <*>
2452+ (o .:? "title")
2453+ <*> (o .:? "responseUrl"))
2454+
2455+instance ToJSON Form where
2456+ toJSON Form'{..}
2457+ = object
2458+ (catMaybes
2459+ [("thumbnailUrl" .=) <$> _fThumbnailURL,
2460+ ("formUrl" .=) <$> _fFormURL,
2461+ ("title" .=) <$> _fTitle,
2462+ ("responseUrl" .=) <$> _fResponseURL])
2463+
7822464-- | Response when listing teachers.
7832465--
7842466-- /See:/ 'listTeachersResponse' smart constructor.
@@ -835,9 +2517,10 @@ instance ToJSON ListTeachersResponse where
8352517--
8362518-- /See:/ 'student' smart constructor.
8372519data Student = Student'
838− { _sCourseId :: !(Maybe Text)
839− , _sProFile :: !(Maybe UserProFile)
840− , _sUserId :: !(Maybe Text)
2520+ { _sCourseId :: !(Maybe Text)
2521+ , _sProFile :: !(Maybe UserProFile)
2522+ , _sStudentWorkFolder :: !(Maybe DriveFolder)
2523+ , _sUserId :: !(Maybe Text)
8412524 } deriving (Eq,Show,Data,Typeable,Generic)
8422525
8432526-- | Creates a value of 'Student' with the minimum fields required to make a request.
@@ -848,6 +2531,8 @@ data Student = Student'
8482531--
8492532-- * 'sProFile'
8502533--
2534+-- * 'sStudentWorkFolder'
2535+--
8512536-- * 'sUserId'
8522537student
8532538 :: Student
@@ -855,6 +2540,7 @@ student =
8552540 Student'
8562541 { _sCourseId = Nothing
8572542 , _sProFile = Nothing
2543+ , _sStudentWorkFolder = Nothing
8582544 , _sUserId = Nothing
8592545 }
8602546
@@ -867,6 +2553,14 @@ sCourseId
8672553sProFile :: Lens' Student (Maybe UserProFile)
8682554sProFile = lens _sProFile (\ s a -> s{_sProFile = a})
8692555
2556+-- | Information about a Drive Folder for this student\'s work in this
2557+-- course. Only visible to the student and domain administrators.
2558+-- Read-only.
2559+sStudentWorkFolder :: Lens' Student (Maybe DriveFolder)
2560+sStudentWorkFolder
2561+ = lens _sStudentWorkFolder
2562+ (\ s a -> s{_sStudentWorkFolder = a})
2563+
8702564-- | Identifier of the user. When specified as a parameter of a request, this
8712565-- identifier can be one of the following: * the numeric identifier for the
8722566-- user * the email address of the user * the string literal \`\"me\"\`,
@@ -880,7 +2574,8 @@ instance FromJSON Student where
8802574 (\ o ->
8812575 Student' <$>
8822576 (o .:? "courseId") <*> (o .:? "profile") <*>
883− (o .:? "userId"))
2577+ (o .:? "studentWorkFolder")
2578+ <*> (o .:? "userId"))
8842579
8852580instance ToJSON Student where
8862581 toJSON Student'{..}
@@ -888,4 +2583,5 @@ instance ToJSON Student where
8882583 (catMaybes
8892584 [("courseId" .=) <$> _sCourseId,
8902585 ("profile" .=) <$> _sProFile,
2586+ ("studentWorkFolder" .=) <$> _sStudentWorkFolder,
8912587 ("userId" .=) <$> _sUserId])
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/Create.hsnew file+207
@@ -0,0 +1,207 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.Create
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Creates course work. The resulting course work (and corresponding
24+-- student submissions) are associated with the Developer Console project
25+-- of the [OAuth client
26+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to make
27+-- the request. Classroom API requests to modify course work and student
28+-- submissions must be made with an OAuth client ID from the associated
29+-- Developer Console project. This method returns the following error
30+-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted
31+-- to access the requested course, create course work in the requested
32+-- course, or for access errors. * \`INVALID_ARGUMENT\` if the request is
33+-- malformed. * \`NOT_FOUND\` if the requested course does not exist.
34+--
35+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.create@.
36+module Network.Google.Resource.Classroom.Courses.CourseWork.Create
37+ (
38+ -- * REST Resource
39+ CoursesCourseWorkCreateResource
40+
41+ -- * Creating a Request
42+ , coursesCourseWorkCreate
43+ , CoursesCourseWorkCreate
44+
45+ -- * Request Lenses
46+ , ccwcXgafv
47+ , ccwcUploadProtocol
48+ , ccwcPp
49+ , ccwcCourseId
50+ , ccwcAccessToken
51+ , ccwcUploadType
52+ , ccwcPayload
53+ , ccwcBearerToken
54+ , ccwcCallback
55+ ) where
56+
57+import Network.Google.Classroom.Types
58+import Network.Google.Prelude
59+
60+-- | A resource alias for @classroom.courses.courseWork.create@ method which the
61+-- 'CoursesCourseWorkCreate' request conforms to.
62+type CoursesCourseWorkCreateResource =
63+ "v1" :>
64+ "courses" :>
65+ Capture "courseId" Text :>
66+ "courseWork" :>
67+ QueryParam "$.xgafv" Text :>
68+ QueryParam "upload_protocol" Text :>
69+ QueryParam "pp" Bool :>
70+ QueryParam "access_token" Text :>
71+ QueryParam "uploadType" Text :>
72+ QueryParam "bearer_token" Text :>
73+ QueryParam "callback" Text :>
74+ QueryParam "alt" AltJSON :>
75+ ReqBody '[JSON] CourseWork :>
76+ Post '[JSON] CourseWork
77+
78+-- | Creates course work. The resulting course work (and corresponding
79+-- student submissions) are associated with the Developer Console project
80+-- of the [OAuth client
81+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to make
82+-- the request. Classroom API requests to modify course work and student
83+-- submissions must be made with an OAuth client ID from the associated
84+-- Developer Console project. This method returns the following error
85+-- codes: * \`PERMISSION_DENIED\` if the requesting user is not permitted
86+-- to access the requested course, create course work in the requested
87+-- course, or for access errors. * \`INVALID_ARGUMENT\` if the request is
88+-- malformed. * \`NOT_FOUND\` if the requested course does not exist.
89+--
90+-- /See:/ 'coursesCourseWorkCreate' smart constructor.
91+data CoursesCourseWorkCreate = CoursesCourseWorkCreate'
92+ { _ccwcXgafv :: !(Maybe Text)
93+ , _ccwcUploadProtocol :: !(Maybe Text)
94+ , _ccwcPp :: !Bool
95+ , _ccwcCourseId :: !Text
96+ , _ccwcAccessToken :: !(Maybe Text)
97+ , _ccwcUploadType :: !(Maybe Text)
98+ , _ccwcPayload :: !CourseWork
99+ , _ccwcBearerToken :: !(Maybe Text)
100+ , _ccwcCallback :: !(Maybe Text)
101+ } deriving (Eq,Show,Data,Typeable,Generic)
102+
103+-- | Creates a value of 'CoursesCourseWorkCreate' with the minimum fields required to make a request.
104+--
105+-- Use one of the following lenses to modify other fields as desired:
106+--
107+-- * 'ccwcXgafv'
108+--
109+-- * 'ccwcUploadProtocol'
110+--
111+-- * 'ccwcPp'
112+--
113+-- * 'ccwcCourseId'
114+--
115+-- * 'ccwcAccessToken'
116+--
117+-- * 'ccwcUploadType'
118+--
119+-- * 'ccwcPayload'
120+--
121+-- * 'ccwcBearerToken'
122+--
123+-- * 'ccwcCallback'
124+coursesCourseWorkCreate
125+ :: Text -- ^ 'ccwcCourseId'
126+ -> CourseWork -- ^ 'ccwcPayload'
127+ -> CoursesCourseWorkCreate
128+coursesCourseWorkCreate pCcwcCourseId_ pCcwcPayload_ =
129+ CoursesCourseWorkCreate'
130+ { _ccwcXgafv = Nothing
131+ , _ccwcUploadProtocol = Nothing
132+ , _ccwcPp = True
133+ , _ccwcCourseId = pCcwcCourseId_
134+ , _ccwcAccessToken = Nothing
135+ , _ccwcUploadType = Nothing
136+ , _ccwcPayload = pCcwcPayload_
137+ , _ccwcBearerToken = Nothing
138+ , _ccwcCallback = Nothing
139+ }
140+
141+-- | V1 error format.
142+ccwcXgafv :: Lens' CoursesCourseWorkCreate (Maybe Text)
143+ccwcXgafv
144+ = lens _ccwcXgafv (\ s a -> s{_ccwcXgafv = a})
145+
146+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
147+ccwcUploadProtocol :: Lens' CoursesCourseWorkCreate (Maybe Text)
148+ccwcUploadProtocol
149+ = lens _ccwcUploadProtocol
150+ (\ s a -> s{_ccwcUploadProtocol = a})
151+
152+-- | Pretty-print response.
153+ccwcPp :: Lens' CoursesCourseWorkCreate Bool
154+ccwcPp = lens _ccwcPp (\ s a -> s{_ccwcPp = a})
155+
156+-- | Identifier of the course. This identifier can be either the
157+-- Classroom-assigned identifier or an alias.
158+ccwcCourseId :: Lens' CoursesCourseWorkCreate Text
159+ccwcCourseId
160+ = lens _ccwcCourseId (\ s a -> s{_ccwcCourseId = a})
161+
162+-- | OAuth access token.
163+ccwcAccessToken :: Lens' CoursesCourseWorkCreate (Maybe Text)
164+ccwcAccessToken
165+ = lens _ccwcAccessToken
166+ (\ s a -> s{_ccwcAccessToken = a})
167+
168+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
169+ccwcUploadType :: Lens' CoursesCourseWorkCreate (Maybe Text)
170+ccwcUploadType
171+ = lens _ccwcUploadType
172+ (\ s a -> s{_ccwcUploadType = a})
173+
174+-- | Multipart request metadata.
175+ccwcPayload :: Lens' CoursesCourseWorkCreate CourseWork
176+ccwcPayload
177+ = lens _ccwcPayload (\ s a -> s{_ccwcPayload = a})
178+
179+-- | OAuth bearer token.
180+ccwcBearerToken :: Lens' CoursesCourseWorkCreate (Maybe Text)
181+ccwcBearerToken
182+ = lens _ccwcBearerToken
183+ (\ s a -> s{_ccwcBearerToken = a})
184+
185+-- | JSONP
186+ccwcCallback :: Lens' CoursesCourseWorkCreate (Maybe Text)
187+ccwcCallback
188+ = lens _ccwcCallback (\ s a -> s{_ccwcCallback = a})
189+
190+instance GoogleRequest CoursesCourseWorkCreate where
191+ type Rs CoursesCourseWorkCreate = CourseWork
192+ type Scopes CoursesCourseWorkCreate =
193+ '["https://www.googleapis.com/auth/classroom.coursework.students"]
194+ requestClient CoursesCourseWorkCreate'{..}
195+ = go _ccwcCourseId _ccwcXgafv _ccwcUploadProtocol
196+ (Just _ccwcPp)
197+ _ccwcAccessToken
198+ _ccwcUploadType
199+ _ccwcBearerToken
200+ _ccwcCallback
201+ (Just AltJSON)
202+ _ccwcPayload
203+ classroomService
204+ where go
205+ = buildClient
206+ (Proxy :: Proxy CoursesCourseWorkCreateResource)
207+ mempty
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/Get.hsnew file+197
@@ -0,0 +1,197 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.Get
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Returns course work. This method returns the following error codes: *
24+-- \`PERMISSION_DENIED\` if the requesting user is not permitted to access
25+-- the requested course or course work, or for access errors. *
26+-- \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\` if the
27+-- requested course or course work does not exist.
28+--
29+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.get@.
30+module Network.Google.Resource.Classroom.Courses.CourseWork.Get
31+ (
32+ -- * REST Resource
33+ CoursesCourseWorkGetResource
34+
35+ -- * Creating a Request
36+ , coursesCourseWorkGet
37+ , CoursesCourseWorkGet
38+
39+ -- * Request Lenses
40+ , ccwgXgafv
41+ , ccwgUploadProtocol
42+ , ccwgPp
43+ , ccwgCourseId
44+ , ccwgAccessToken
45+ , ccwgUploadType
46+ , ccwgBearerToken
47+ , ccwgId
48+ , ccwgCallback
49+ ) where
50+
51+import Network.Google.Classroom.Types
52+import Network.Google.Prelude
53+
54+-- | A resource alias for @classroom.courses.courseWork.get@ method which the
55+-- 'CoursesCourseWorkGet' request conforms to.
56+type CoursesCourseWorkGetResource =
57+ "v1" :>
58+ "courses" :>
59+ Capture "courseId" Text :>
60+ "courseWork" :>
61+ Capture "id" Text :>
62+ QueryParam "$.xgafv" Text :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :> Get '[JSON] CourseWork
70+
71+-- | Returns course work. This method returns the following error codes: *
72+-- \`PERMISSION_DENIED\` if the requesting user is not permitted to access
73+-- the requested course or course work, or for access errors. *
74+-- \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\` if the
75+-- requested course or course work does not exist.
76+--
77+-- /See:/ 'coursesCourseWorkGet' smart constructor.
78+data CoursesCourseWorkGet = CoursesCourseWorkGet'
79+ { _ccwgXgafv :: !(Maybe Text)
80+ , _ccwgUploadProtocol :: !(Maybe Text)
81+ , _ccwgPp :: !Bool
82+ , _ccwgCourseId :: !Text
83+ , _ccwgAccessToken :: !(Maybe Text)
84+ , _ccwgUploadType :: !(Maybe Text)
85+ , _ccwgBearerToken :: !(Maybe Text)
86+ , _ccwgId :: !Text
87+ , _ccwgCallback :: !(Maybe Text)
88+ } deriving (Eq,Show,Data,Typeable,Generic)
89+
90+-- | Creates a value of 'CoursesCourseWorkGet' with the minimum fields required to make a request.
91+--
92+-- Use one of the following lenses to modify other fields as desired:
93+--
94+-- * 'ccwgXgafv'
95+--
96+-- * 'ccwgUploadProtocol'
97+--
98+-- * 'ccwgPp'
99+--
100+-- * 'ccwgCourseId'
101+--
102+-- * 'ccwgAccessToken'
103+--
104+-- * 'ccwgUploadType'
105+--
106+-- * 'ccwgBearerToken'
107+--
108+-- * 'ccwgId'
109+--
110+-- * 'ccwgCallback'
111+coursesCourseWorkGet
112+ :: Text -- ^ 'ccwgCourseId'
113+ -> Text -- ^ 'ccwgId'
114+ -> CoursesCourseWorkGet
115+coursesCourseWorkGet pCcwgCourseId_ pCcwgId_ =
116+ CoursesCourseWorkGet'
117+ { _ccwgXgafv = Nothing
118+ , _ccwgUploadProtocol = Nothing
119+ , _ccwgPp = True
120+ , _ccwgCourseId = pCcwgCourseId_
121+ , _ccwgAccessToken = Nothing
122+ , _ccwgUploadType = Nothing
123+ , _ccwgBearerToken = Nothing
124+ , _ccwgId = pCcwgId_
125+ , _ccwgCallback = Nothing
126+ }
127+
128+-- | V1 error format.
129+ccwgXgafv :: Lens' CoursesCourseWorkGet (Maybe Text)
130+ccwgXgafv
131+ = lens _ccwgXgafv (\ s a -> s{_ccwgXgafv = a})
132+
133+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
134+ccwgUploadProtocol :: Lens' CoursesCourseWorkGet (Maybe Text)
135+ccwgUploadProtocol
136+ = lens _ccwgUploadProtocol
137+ (\ s a -> s{_ccwgUploadProtocol = a})
138+
139+-- | Pretty-print response.
140+ccwgPp :: Lens' CoursesCourseWorkGet Bool
141+ccwgPp = lens _ccwgPp (\ s a -> s{_ccwgPp = a})
142+
143+-- | Identifier of the course. This identifier can be either the
144+-- Classroom-assigned identifier or an alias.
145+ccwgCourseId :: Lens' CoursesCourseWorkGet Text
146+ccwgCourseId
147+ = lens _ccwgCourseId (\ s a -> s{_ccwgCourseId = a})
148+
149+-- | OAuth access token.
150+ccwgAccessToken :: Lens' CoursesCourseWorkGet (Maybe Text)
151+ccwgAccessToken
152+ = lens _ccwgAccessToken
153+ (\ s a -> s{_ccwgAccessToken = a})
154+
155+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
156+ccwgUploadType :: Lens' CoursesCourseWorkGet (Maybe Text)
157+ccwgUploadType
158+ = lens _ccwgUploadType
159+ (\ s a -> s{_ccwgUploadType = a})
160+
161+-- | OAuth bearer token.
162+ccwgBearerToken :: Lens' CoursesCourseWorkGet (Maybe Text)
163+ccwgBearerToken
164+ = lens _ccwgBearerToken
165+ (\ s a -> s{_ccwgBearerToken = a})
166+
167+-- | Identifier of the course work.
168+ccwgId :: Lens' CoursesCourseWorkGet Text
169+ccwgId = lens _ccwgId (\ s a -> s{_ccwgId = a})
170+
171+-- | JSONP
172+ccwgCallback :: Lens' CoursesCourseWorkGet (Maybe Text)
173+ccwgCallback
174+ = lens _ccwgCallback (\ s a -> s{_ccwgCallback = a})
175+
176+instance GoogleRequest CoursesCourseWorkGet where
177+ type Rs CoursesCourseWorkGet = CourseWork
178+ type Scopes CoursesCourseWorkGet =
179+ '["https://www.googleapis.com/auth/classroom.course-work.readonly",
180+ "https://www.googleapis.com/auth/classroom.coursework.me",
181+ "https://www.googleapis.com/auth/classroom.coursework.me.readonly",
182+ "https://www.googleapis.com/auth/classroom.coursework.students",
183+ "https://www.googleapis.com/auth/classroom.coursework.students.readonly"]
184+ requestClient CoursesCourseWorkGet'{..}
185+ = go _ccwgCourseId _ccwgId _ccwgXgafv
186+ _ccwgUploadProtocol
187+ (Just _ccwgPp)
188+ _ccwgAccessToken
189+ _ccwgUploadType
190+ _ccwgBearerToken
191+ _ccwgCallback
192+ (Just AltJSON)
193+ classroomService
194+ where go
195+ = buildClient
196+ (Proxy :: Proxy CoursesCourseWorkGetResource)
197+ mempty
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/List.hsnew file+255
@@ -0,0 +1,255 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Returns a list of course work that the requester is permitted to view.
24+-- Course students may only view \`PUBLISHED\` course work. Course teachers
25+-- and domain administrators may view all course work. This method returns
26+-- the following error codes: * \`PERMISSION_DENIED\` if the requesting
27+-- user is not permitted to access the requested course or for access
28+-- errors. * \`INVALID_ARGUMENT\` if the request is malformed. *
29+-- \`NOT_FOUND\` if the requested course does not exist.
30+--
31+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.list@.
32+module Network.Google.Resource.Classroom.Courses.CourseWork.List
33+ (
34+ -- * REST Resource
35+ CoursesCourseWorkListResource
36+
37+ -- * Creating a Request
38+ , coursesCourseWorkList
39+ , CoursesCourseWorkList
40+
41+ -- * Request Lenses
42+ , ccwlXgafv
43+ , ccwlUploadProtocol
44+ , ccwlOrderBy
45+ , ccwlPp
46+ , ccwlCourseId
47+ , ccwlAccessToken
48+ , ccwlCourseWorkStates
49+ , ccwlUploadType
50+ , ccwlBearerToken
51+ , ccwlPageToken
52+ , ccwlPageSize
53+ , ccwlCallback
54+ ) where
55+
56+import Network.Google.Classroom.Types
57+import Network.Google.Prelude
58+
59+-- | A resource alias for @classroom.courses.courseWork.list@ method which the
60+-- 'CoursesCourseWorkList' request conforms to.
61+type CoursesCourseWorkListResource =
62+ "v1" :>
63+ "courses" :>
64+ Capture "courseId" Text :>
65+ "courseWork" :>
66+ QueryParam "$.xgafv" Text :>
67+ QueryParam "upload_protocol" Text :>
68+ QueryParam "orderBy" Text :>
69+ QueryParam "pp" Bool :>
70+ QueryParam "access_token" Text :>
71+ QueryParams "courseWorkStates" Text :>
72+ QueryParam "uploadType" Text :>
73+ QueryParam "bearer_token" Text :>
74+ QueryParam "pageToken" Text :>
75+ QueryParam "pageSize" (Textual Int32) :>
76+ QueryParam "callback" Text :>
77+ QueryParam "alt" AltJSON :>
78+ Get '[JSON] ListCourseWorkResponse
79+
80+-- | Returns a list of course work that the requester is permitted to view.
81+-- Course students may only view \`PUBLISHED\` course work. Course teachers
82+-- and domain administrators may view all course work. This method returns
83+-- the following error codes: * \`PERMISSION_DENIED\` if the requesting
84+-- user is not permitted to access the requested course or for access
85+-- errors. * \`INVALID_ARGUMENT\` if the request is malformed. *
86+-- \`NOT_FOUND\` if the requested course does not exist.
87+--
88+-- /See:/ 'coursesCourseWorkList' smart constructor.
89+data CoursesCourseWorkList = CoursesCourseWorkList'
90+ { _ccwlXgafv :: !(Maybe Text)
91+ , _ccwlUploadProtocol :: !(Maybe Text)
92+ , _ccwlOrderBy :: !(Maybe Text)
93+ , _ccwlPp :: !Bool
94+ , _ccwlCourseId :: !Text
95+ , _ccwlAccessToken :: !(Maybe Text)
96+ , _ccwlCourseWorkStates :: !(Maybe [Text])
97+ , _ccwlUploadType :: !(Maybe Text)
98+ , _ccwlBearerToken :: !(Maybe Text)
99+ , _ccwlPageToken :: !(Maybe Text)
100+ , _ccwlPageSize :: !(Maybe (Textual Int32))
101+ , _ccwlCallback :: !(Maybe Text)
102+ } deriving (Eq,Show,Data,Typeable,Generic)
103+
104+-- | Creates a value of 'CoursesCourseWorkList' with the minimum fields required to make a request.
105+--
106+-- Use one of the following lenses to modify other fields as desired:
107+--
108+-- * 'ccwlXgafv'
109+--
110+-- * 'ccwlUploadProtocol'
111+--
112+-- * 'ccwlOrderBy'
113+--
114+-- * 'ccwlPp'
115+--
116+-- * 'ccwlCourseId'
117+--
118+-- * 'ccwlAccessToken'
119+--
120+-- * 'ccwlCourseWorkStates'
121+--
122+-- * 'ccwlUploadType'
123+--
124+-- * 'ccwlBearerToken'
125+--
126+-- * 'ccwlPageToken'
127+--
128+-- * 'ccwlPageSize'
129+--
130+-- * 'ccwlCallback'
131+coursesCourseWorkList
132+ :: Text -- ^ 'ccwlCourseId'
133+ -> CoursesCourseWorkList
134+coursesCourseWorkList pCcwlCourseId_ =
135+ CoursesCourseWorkList'
136+ { _ccwlXgafv = Nothing
137+ , _ccwlUploadProtocol = Nothing
138+ , _ccwlOrderBy = Nothing
139+ , _ccwlPp = True
140+ , _ccwlCourseId = pCcwlCourseId_
141+ , _ccwlAccessToken = Nothing
142+ , _ccwlCourseWorkStates = Nothing
143+ , _ccwlUploadType = Nothing
144+ , _ccwlBearerToken = Nothing
145+ , _ccwlPageToken = Nothing
146+ , _ccwlPageSize = Nothing
147+ , _ccwlCallback = Nothing
148+ }
149+
150+-- | V1 error format.
151+ccwlXgafv :: Lens' CoursesCourseWorkList (Maybe Text)
152+ccwlXgafv
153+ = lens _ccwlXgafv (\ s a -> s{_ccwlXgafv = a})
154+
155+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
156+ccwlUploadProtocol :: Lens' CoursesCourseWorkList (Maybe Text)
157+ccwlUploadProtocol
158+ = lens _ccwlUploadProtocol
159+ (\ s a -> s{_ccwlUploadProtocol = a})
160+
161+-- | Optional sort ordering for results. A comma-separated list of fields
162+-- with an optional sort direction keyword. Supported fields are
163+-- \`updateTime\` and \`dueDate\`. Supported direction keywords are \`asc\`
164+-- and \`desc\`. If not specified, \`updateTime desc\` is the default
165+-- behavior. Examples: \`dueDate asc,updateTime desc\`,
166+-- \`updateTime,dueDate desc\`
167+ccwlOrderBy :: Lens' CoursesCourseWorkList (Maybe Text)
168+ccwlOrderBy
169+ = lens _ccwlOrderBy (\ s a -> s{_ccwlOrderBy = a})
170+
171+-- | Pretty-print response.
172+ccwlPp :: Lens' CoursesCourseWorkList Bool
173+ccwlPp = lens _ccwlPp (\ s a -> s{_ccwlPp = a})
174+
175+-- | Identifier of the course. This identifier can be either the
176+-- Classroom-assigned identifier or an alias.
177+ccwlCourseId :: Lens' CoursesCourseWorkList Text
178+ccwlCourseId
179+ = lens _ccwlCourseId (\ s a -> s{_ccwlCourseId = a})
180+
181+-- | OAuth access token.
182+ccwlAccessToken :: Lens' CoursesCourseWorkList (Maybe Text)
183+ccwlAccessToken
184+ = lens _ccwlAccessToken
185+ (\ s a -> s{_ccwlAccessToken = a})
186+
187+-- | Restriction on the work status to return. Only courseWork that matches
188+-- is returned. If unspecified, items with a work status of \`PUBLISHED\`
189+-- is returned.
190+ccwlCourseWorkStates :: Lens' CoursesCourseWorkList [Text]
191+ccwlCourseWorkStates
192+ = lens _ccwlCourseWorkStates
193+ (\ s a -> s{_ccwlCourseWorkStates = a})
194+ . _Default
195+ . _Coerce
196+
197+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
198+ccwlUploadType :: Lens' CoursesCourseWorkList (Maybe Text)
199+ccwlUploadType
200+ = lens _ccwlUploadType
201+ (\ s a -> s{_ccwlUploadType = a})
202+
203+-- | OAuth bearer token.
204+ccwlBearerToken :: Lens' CoursesCourseWorkList (Maybe Text)
205+ccwlBearerToken
206+ = lens _ccwlBearerToken
207+ (\ s a -> s{_ccwlBearerToken = a})
208+
209+-- | nextPageToken value returned from a previous list call, indicating that
210+-- the subsequent page of results should be returned. The list request must
211+-- be otherwise identical to the one that resulted in this token.
212+ccwlPageToken :: Lens' CoursesCourseWorkList (Maybe Text)
213+ccwlPageToken
214+ = lens _ccwlPageToken
215+ (\ s a -> s{_ccwlPageToken = a})
216+
217+-- | Maximum number of items to return. Zero or unspecified indicates that
218+-- the server may assign a maximum. The server may return fewer than the
219+-- specified number of results.
220+ccwlPageSize :: Lens' CoursesCourseWorkList (Maybe Int32)
221+ccwlPageSize
222+ = lens _ccwlPageSize (\ s a -> s{_ccwlPageSize = a})
223+ . mapping _Coerce
224+
225+-- | JSONP
226+ccwlCallback :: Lens' CoursesCourseWorkList (Maybe Text)
227+ccwlCallback
228+ = lens _ccwlCallback (\ s a -> s{_ccwlCallback = a})
229+
230+instance GoogleRequest CoursesCourseWorkList where
231+ type Rs CoursesCourseWorkList =
232+ ListCourseWorkResponse
233+ type Scopes CoursesCourseWorkList =
234+ '["https://www.googleapis.com/auth/classroom.course-work.readonly",
235+ "https://www.googleapis.com/auth/classroom.coursework.me",
236+ "https://www.googleapis.com/auth/classroom.coursework.me.readonly",
237+ "https://www.googleapis.com/auth/classroom.coursework.students",
238+ "https://www.googleapis.com/auth/classroom.coursework.students.readonly"]
239+ requestClient CoursesCourseWorkList'{..}
240+ = go _ccwlCourseId _ccwlXgafv _ccwlUploadProtocol
241+ _ccwlOrderBy
242+ (Just _ccwlPp)
243+ _ccwlAccessToken
244+ (_ccwlCourseWorkStates ^. _Default)
245+ _ccwlUploadType
246+ _ccwlBearerToken
247+ _ccwlPageToken
248+ _ccwlPageSize
249+ _ccwlCallback
250+ (Just AltJSON)
251+ classroomService
252+ where go
253+ = buildClient
254+ (Proxy :: Proxy CoursesCourseWorkListResource)
255+ mempty
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/Get.hsnew file+220
@@ -0,0 +1,220 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Get
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Returns a student submission. * \`PERMISSION_DENIED\` if the requesting
24+-- user is not permitted to access the requested course, course work, or
25+-- student submission or for access errors. * \`INVALID_ARGUMENT\` if the
26+-- request is malformed. * \`NOT_FOUND\` if the requested course, course
27+-- work, or student submission does not exist.
28+--
29+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.studentSubmissions.get@.
30+module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Get
31+ (
32+ -- * REST Resource
33+ CoursesCourseWorkStudentSubmissionsGetResource
34+
35+ -- * Creating a Request
36+ , coursesCourseWorkStudentSubmissionsGet
37+ , CoursesCourseWorkStudentSubmissionsGet
38+
39+ -- * Request Lenses
40+ , ccwssgXgafv
41+ , ccwssgUploadProtocol
42+ , ccwssgPp
43+ , ccwssgCourseId
44+ , ccwssgAccessToken
45+ , ccwssgUploadType
46+ , ccwssgBearerToken
47+ , ccwssgId
48+ , ccwssgCallback
49+ , ccwssgCourseWorkId
50+ ) where
51+
52+import Network.Google.Classroom.Types
53+import Network.Google.Prelude
54+
55+-- | A resource alias for @classroom.courses.courseWork.studentSubmissions.get@ method which the
56+-- 'CoursesCourseWorkStudentSubmissionsGet' request conforms to.
57+type CoursesCourseWorkStudentSubmissionsGetResource =
58+ "v1" :>
59+ "courses" :>
60+ Capture "courseId" Text :>
61+ "courseWork" :>
62+ Capture "courseWorkId" Text :>
63+ "studentSubmissions" :>
64+ Capture "id" Text :>
65+ QueryParam "$.xgafv" Text :>
66+ QueryParam "upload_protocol" Text :>
67+ QueryParam "pp" Bool :>
68+ QueryParam "access_token" Text :>
69+ QueryParam "uploadType" Text :>
70+ QueryParam "bearer_token" Text :>
71+ QueryParam "callback" Text :>
72+ QueryParam "alt" AltJSON :>
73+ Get '[JSON] StudentSubmission
74+
75+-- | Returns a student submission. * \`PERMISSION_DENIED\` if the requesting
76+-- user is not permitted to access the requested course, course work, or
77+-- student submission or for access errors. * \`INVALID_ARGUMENT\` if the
78+-- request is malformed. * \`NOT_FOUND\` if the requested course, course
79+-- work, or student submission does not exist.
80+--
81+-- /See:/ 'coursesCourseWorkStudentSubmissionsGet' smart constructor.
82+data CoursesCourseWorkStudentSubmissionsGet = CoursesCourseWorkStudentSubmissionsGet'
83+ { _ccwssgXgafv :: !(Maybe Text)
84+ , _ccwssgUploadProtocol :: !(Maybe Text)
85+ , _ccwssgPp :: !Bool
86+ , _ccwssgCourseId :: !Text
87+ , _ccwssgAccessToken :: !(Maybe Text)
88+ , _ccwssgUploadType :: !(Maybe Text)
89+ , _ccwssgBearerToken :: !(Maybe Text)
90+ , _ccwssgId :: !Text
91+ , _ccwssgCallback :: !(Maybe Text)
92+ , _ccwssgCourseWorkId :: !Text
93+ } deriving (Eq,Show,Data,Typeable,Generic)
94+
95+-- | Creates a value of 'CoursesCourseWorkStudentSubmissionsGet' with the minimum fields required to make a request.
96+--
97+-- Use one of the following lenses to modify other fields as desired:
98+--
99+-- * 'ccwssgXgafv'
100+--
101+-- * 'ccwssgUploadProtocol'
102+--
103+-- * 'ccwssgPp'
104+--
105+-- * 'ccwssgCourseId'
106+--
107+-- * 'ccwssgAccessToken'
108+--
109+-- * 'ccwssgUploadType'
110+--
111+-- * 'ccwssgBearerToken'
112+--
113+-- * 'ccwssgId'
114+--
115+-- * 'ccwssgCallback'
116+--
117+-- * 'ccwssgCourseWorkId'
118+coursesCourseWorkStudentSubmissionsGet
119+ :: Text -- ^ 'ccwssgCourseId'
120+ -> Text -- ^ 'ccwssgId'
121+ -> Text -- ^ 'ccwssgCourseWorkId'
122+ -> CoursesCourseWorkStudentSubmissionsGet
123+coursesCourseWorkStudentSubmissionsGet pCcwssgCourseId_ pCcwssgId_ pCcwssgCourseWorkId_ =
124+ CoursesCourseWorkStudentSubmissionsGet'
125+ { _ccwssgXgafv = Nothing
126+ , _ccwssgUploadProtocol = Nothing
127+ , _ccwssgPp = True
128+ , _ccwssgCourseId = pCcwssgCourseId_
129+ , _ccwssgAccessToken = Nothing
130+ , _ccwssgUploadType = Nothing
131+ , _ccwssgBearerToken = Nothing
132+ , _ccwssgId = pCcwssgId_
133+ , _ccwssgCallback = Nothing
134+ , _ccwssgCourseWorkId = pCcwssgCourseWorkId_
135+ }
136+
137+-- | V1 error format.
138+ccwssgXgafv :: Lens' CoursesCourseWorkStudentSubmissionsGet (Maybe Text)
139+ccwssgXgafv
140+ = lens _ccwssgXgafv (\ s a -> s{_ccwssgXgafv = a})
141+
142+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
143+ccwssgUploadProtocol :: Lens' CoursesCourseWorkStudentSubmissionsGet (Maybe Text)
144+ccwssgUploadProtocol
145+ = lens _ccwssgUploadProtocol
146+ (\ s a -> s{_ccwssgUploadProtocol = a})
147+
148+-- | Pretty-print response.
149+ccwssgPp :: Lens' CoursesCourseWorkStudentSubmissionsGet Bool
150+ccwssgPp = lens _ccwssgPp (\ s a -> s{_ccwssgPp = a})
151+
152+-- | Identifier of the course. This identifier can be either the
153+-- Classroom-assigned identifier or an alias.
154+ccwssgCourseId :: Lens' CoursesCourseWorkStudentSubmissionsGet Text
155+ccwssgCourseId
156+ = lens _ccwssgCourseId
157+ (\ s a -> s{_ccwssgCourseId = a})
158+
159+-- | OAuth access token.
160+ccwssgAccessToken :: Lens' CoursesCourseWorkStudentSubmissionsGet (Maybe Text)
161+ccwssgAccessToken
162+ = lens _ccwssgAccessToken
163+ (\ s a -> s{_ccwssgAccessToken = a})
164+
165+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
166+ccwssgUploadType :: Lens' CoursesCourseWorkStudentSubmissionsGet (Maybe Text)
167+ccwssgUploadType
168+ = lens _ccwssgUploadType
169+ (\ s a -> s{_ccwssgUploadType = a})
170+
171+-- | OAuth bearer token.
172+ccwssgBearerToken :: Lens' CoursesCourseWorkStudentSubmissionsGet (Maybe Text)
173+ccwssgBearerToken
174+ = lens _ccwssgBearerToken
175+ (\ s a -> s{_ccwssgBearerToken = a})
176+
177+-- | Identifier of the student submission.
178+ccwssgId :: Lens' CoursesCourseWorkStudentSubmissionsGet Text
179+ccwssgId = lens _ccwssgId (\ s a -> s{_ccwssgId = a})
180+
181+-- | JSONP
182+ccwssgCallback :: Lens' CoursesCourseWorkStudentSubmissionsGet (Maybe Text)
183+ccwssgCallback
184+ = lens _ccwssgCallback
185+ (\ s a -> s{_ccwssgCallback = a})
186+
187+-- | Identifier of the course work.
188+ccwssgCourseWorkId :: Lens' CoursesCourseWorkStudentSubmissionsGet Text
189+ccwssgCourseWorkId
190+ = lens _ccwssgCourseWorkId
191+ (\ s a -> s{_ccwssgCourseWorkId = a})
192+
193+instance GoogleRequest
194+ CoursesCourseWorkStudentSubmissionsGet where
195+ type Rs CoursesCourseWorkStudentSubmissionsGet =
196+ StudentSubmission
197+ type Scopes CoursesCourseWorkStudentSubmissionsGet =
198+ '["https://www.googleapis.com/auth/classroom.coursework.me",
199+ "https://www.googleapis.com/auth/classroom.coursework.me.readonly",
200+ "https://www.googleapis.com/auth/classroom.coursework.students",
201+ "https://www.googleapis.com/auth/classroom.coursework.students.readonly",
202+ "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly",
203+ "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly"]
204+ requestClient
205+ CoursesCourseWorkStudentSubmissionsGet'{..}
206+ = go _ccwssgCourseId _ccwssgCourseWorkId _ccwssgId
207+ _ccwssgXgafv
208+ _ccwssgUploadProtocol
209+ (Just _ccwssgPp)
210+ _ccwssgAccessToken
211+ _ccwssgUploadType
212+ _ccwssgBearerToken
213+ _ccwssgCallback
214+ (Just AltJSON)
215+ classroomService
216+ where go
217+ = buildClient
218+ (Proxy ::
219+ Proxy CoursesCourseWorkStudentSubmissionsGetResource)
220+ mempty
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/List.hsnew file+300
@@ -0,0 +1,300 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Returns a list of student submissions that the requester is permitted to
24+-- view, factoring in the OAuth scopes of the request. \`-\` may be
25+-- specified as the \`course_work_id\` to include student submissions for
26+-- multiple course work items. Course students may only view their own
27+-- work. Course teachers and domain administrators may view all student
28+-- submissions. This method returns the following error codes: *
29+-- \`PERMISSION_DENIED\` if the requesting user is not permitted to access
30+-- the requested course or course work, or for access errors. *
31+-- \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\` if the
32+-- requested course does not exist.
33+--
34+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.studentSubmissions.list@.
35+module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.List
36+ (
37+ -- * REST Resource
38+ CoursesCourseWorkStudentSubmissionsListResource
39+
40+ -- * Creating a Request
41+ , coursesCourseWorkStudentSubmissionsList
42+ , CoursesCourseWorkStudentSubmissionsList
43+
44+ -- * Request Lenses
45+ , ccwsslStates
46+ , ccwsslXgafv
47+ , ccwsslLate
48+ , ccwsslUploadProtocol
49+ , ccwsslPp
50+ , ccwsslCourseId
51+ , ccwsslAccessToken
52+ , ccwsslUploadType
53+ , ccwsslUserId
54+ , ccwsslBearerToken
55+ , ccwsslPageToken
56+ , ccwsslPageSize
57+ , ccwsslCallback
58+ , ccwsslCourseWorkId
59+ ) where
60+
61+import Network.Google.Classroom.Types
62+import Network.Google.Prelude
63+
64+-- | A resource alias for @classroom.courses.courseWork.studentSubmissions.list@ method which the
65+-- 'CoursesCourseWorkStudentSubmissionsList' request conforms to.
66+type CoursesCourseWorkStudentSubmissionsListResource
67+ =
68+ "v1" :>
69+ "courses" :>
70+ Capture "courseId" Text :>
71+ "courseWork" :>
72+ Capture "courseWorkId" Text :>
73+ "studentSubmissions" :>
74+ QueryParams "states" Text :>
75+ QueryParam "$.xgafv" Text :>
76+ QueryParam "late" Text :>
77+ QueryParam "upload_protocol" Text :>
78+ QueryParam "pp" Bool :>
79+ QueryParam "access_token" Text :>
80+ QueryParam "uploadType" Text :>
81+ QueryParam "userId" Text :>
82+ QueryParam "bearer_token" Text :>
83+ QueryParam "pageToken" Text :>
84+ QueryParam "pageSize" (Textual Int32) :>
85+ QueryParam "callback" Text :>
86+ QueryParam "alt" AltJSON :>
87+ Get '[JSON]
88+ ListStudentSubmissionsResponse
89+
90+-- | Returns a list of student submissions that the requester is permitted to
91+-- view, factoring in the OAuth scopes of the request. \`-\` may be
92+-- specified as the \`course_work_id\` to include student submissions for
93+-- multiple course work items. Course students may only view their own
94+-- work. Course teachers and domain administrators may view all student
95+-- submissions. This method returns the following error codes: *
96+-- \`PERMISSION_DENIED\` if the requesting user is not permitted to access
97+-- the requested course or course work, or for access errors. *
98+-- \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\` if the
99+-- requested course does not exist.
100+--
101+-- /See:/ 'coursesCourseWorkStudentSubmissionsList' smart constructor.
102+data CoursesCourseWorkStudentSubmissionsList = CoursesCourseWorkStudentSubmissionsList'
103+ { _ccwsslStates :: !(Maybe [Text])
104+ , _ccwsslXgafv :: !(Maybe Text)
105+ , _ccwsslLate :: !(Maybe Text)
106+ , _ccwsslUploadProtocol :: !(Maybe Text)
107+ , _ccwsslPp :: !Bool
108+ , _ccwsslCourseId :: !Text
109+ , _ccwsslAccessToken :: !(Maybe Text)
110+ , _ccwsslUploadType :: !(Maybe Text)
111+ , _ccwsslUserId :: !(Maybe Text)
112+ , _ccwsslBearerToken :: !(Maybe Text)
113+ , _ccwsslPageToken :: !(Maybe Text)
114+ , _ccwsslPageSize :: !(Maybe (Textual Int32))
115+ , _ccwsslCallback :: !(Maybe Text)
116+ , _ccwsslCourseWorkId :: !Text
117+ } deriving (Eq,Show,Data,Typeable,Generic)
118+
119+-- | Creates a value of 'CoursesCourseWorkStudentSubmissionsList' with the minimum fields required to make a request.
120+--
121+-- Use one of the following lenses to modify other fields as desired:
122+--
123+-- * 'ccwsslStates'
124+--
125+-- * 'ccwsslXgafv'
126+--
127+-- * 'ccwsslLate'
128+--
129+-- * 'ccwsslUploadProtocol'
130+--
131+-- * 'ccwsslPp'
132+--
133+-- * 'ccwsslCourseId'
134+--
135+-- * 'ccwsslAccessToken'
136+--
137+-- * 'ccwsslUploadType'
138+--
139+-- * 'ccwsslUserId'
140+--
141+-- * 'ccwsslBearerToken'
142+--
143+-- * 'ccwsslPageToken'
144+--
145+-- * 'ccwsslPageSize'
146+--
147+-- * 'ccwsslCallback'
148+--
149+-- * 'ccwsslCourseWorkId'
150+coursesCourseWorkStudentSubmissionsList
151+ :: Text -- ^ 'ccwsslCourseId'
152+ -> Text -- ^ 'ccwsslCourseWorkId'
153+ -> CoursesCourseWorkStudentSubmissionsList
154+coursesCourseWorkStudentSubmissionsList pCcwsslCourseId_ pCcwsslCourseWorkId_ =
155+ CoursesCourseWorkStudentSubmissionsList'
156+ { _ccwsslStates = Nothing
157+ , _ccwsslXgafv = Nothing
158+ , _ccwsslLate = Nothing
159+ , _ccwsslUploadProtocol = Nothing
160+ , _ccwsslPp = True
161+ , _ccwsslCourseId = pCcwsslCourseId_
162+ , _ccwsslAccessToken = Nothing
163+ , _ccwsslUploadType = Nothing
164+ , _ccwsslUserId = Nothing
165+ , _ccwsslBearerToken = Nothing
166+ , _ccwsslPageToken = Nothing
167+ , _ccwsslPageSize = Nothing
168+ , _ccwsslCallback = Nothing
169+ , _ccwsslCourseWorkId = pCcwsslCourseWorkId_
170+ }
171+
172+-- | Requested submission states. If specified, returned student submissions
173+-- match one of the specified submission states.
174+ccwsslStates :: Lens' CoursesCourseWorkStudentSubmissionsList [Text]
175+ccwsslStates
176+ = lens _ccwsslStates (\ s a -> s{_ccwsslStates = a})
177+ . _Default
178+ . _Coerce
179+
180+-- | V1 error format.
181+ccwsslXgafv :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Text)
182+ccwsslXgafv
183+ = lens _ccwsslXgafv (\ s a -> s{_ccwsslXgafv = a})
184+
185+-- | Requested lateness value. If specified, returned student submissions are
186+-- restricted by the requested value. If unspecified, submissions are
187+-- returned regardless of \`late\` value.
188+ccwsslLate :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Text)
189+ccwsslLate
190+ = lens _ccwsslLate (\ s a -> s{_ccwsslLate = a})
191+
192+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
193+ccwsslUploadProtocol :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Text)
194+ccwsslUploadProtocol
195+ = lens _ccwsslUploadProtocol
196+ (\ s a -> s{_ccwsslUploadProtocol = a})
197+
198+-- | Pretty-print response.
199+ccwsslPp :: Lens' CoursesCourseWorkStudentSubmissionsList Bool
200+ccwsslPp = lens _ccwsslPp (\ s a -> s{_ccwsslPp = a})
201+
202+-- | Identifier of the course. This identifier can be either the
203+-- Classroom-assigned identifier or an alias.
204+ccwsslCourseId :: Lens' CoursesCourseWorkStudentSubmissionsList Text
205+ccwsslCourseId
206+ = lens _ccwsslCourseId
207+ (\ s a -> s{_ccwsslCourseId = a})
208+
209+-- | OAuth access token.
210+ccwsslAccessToken :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Text)
211+ccwsslAccessToken
212+ = lens _ccwsslAccessToken
213+ (\ s a -> s{_ccwsslAccessToken = a})
214+
215+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
216+ccwsslUploadType :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Text)
217+ccwsslUploadType
218+ = lens _ccwsslUploadType
219+ (\ s a -> s{_ccwsslUploadType = a})
220+
221+-- | Optional argument to restrict returned student work to those owned by
222+-- the student with the specified identifier. The identifier can be one of
223+-- the following: * the numeric identifier for the user * the email address
224+-- of the user * the string literal \`\"me\"\`, indicating the requesting
225+-- user
226+ccwsslUserId :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Text)
227+ccwsslUserId
228+ = lens _ccwsslUserId (\ s a -> s{_ccwsslUserId = a})
229+
230+-- | OAuth bearer token.
231+ccwsslBearerToken :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Text)
232+ccwsslBearerToken
233+ = lens _ccwsslBearerToken
234+ (\ s a -> s{_ccwsslBearerToken = a})
235+
236+-- | nextPageToken value returned from a previous list call, indicating that
237+-- the subsequent page of results should be returned. The list request must
238+-- be otherwise identical to the one that resulted in this token.
239+ccwsslPageToken :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Text)
240+ccwsslPageToken
241+ = lens _ccwsslPageToken
242+ (\ s a -> s{_ccwsslPageToken = a})
243+
244+-- | Maximum number of items to return. Zero or unspecified indicates that
245+-- the server may assign a maximum. The server may return fewer than the
246+-- specified number of results.
247+ccwsslPageSize :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Int32)
248+ccwsslPageSize
249+ = lens _ccwsslPageSize
250+ (\ s a -> s{_ccwsslPageSize = a})
251+ . mapping _Coerce
252+
253+-- | JSONP
254+ccwsslCallback :: Lens' CoursesCourseWorkStudentSubmissionsList (Maybe Text)
255+ccwsslCallback
256+ = lens _ccwsslCallback
257+ (\ s a -> s{_ccwsslCallback = a})
258+
259+-- | Identifer of the student work to request. If \`user_id\` is specified,
260+-- this may be set to the string literal \`\"-\"\` to request student work
261+-- for all course work in the specified course.
262+ccwsslCourseWorkId :: Lens' CoursesCourseWorkStudentSubmissionsList Text
263+ccwsslCourseWorkId
264+ = lens _ccwsslCourseWorkId
265+ (\ s a -> s{_ccwsslCourseWorkId = a})
266+
267+instance GoogleRequest
268+ CoursesCourseWorkStudentSubmissionsList where
269+ type Rs CoursesCourseWorkStudentSubmissionsList =
270+ ListStudentSubmissionsResponse
271+ type Scopes CoursesCourseWorkStudentSubmissionsList =
272+ '["https://www.googleapis.com/auth/classroom.coursework.me",
273+ "https://www.googleapis.com/auth/classroom.coursework.me.readonly",
274+ "https://www.googleapis.com/auth/classroom.coursework.students",
275+ "https://www.googleapis.com/auth/classroom.coursework.students.readonly",
276+ "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly",
277+ "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly"]
278+ requestClient
279+ CoursesCourseWorkStudentSubmissionsList'{..}
280+ = go _ccwsslCourseId _ccwsslCourseWorkId
281+ (_ccwsslStates ^. _Default)
282+ _ccwsslXgafv
283+ _ccwsslLate
284+ _ccwsslUploadProtocol
285+ (Just _ccwsslPp)
286+ _ccwsslAccessToken
287+ _ccwsslUploadType
288+ _ccwsslUserId
289+ _ccwsslBearerToken
290+ _ccwsslPageToken
291+ _ccwsslPageSize
292+ _ccwsslCallback
293+ (Just AltJSON)
294+ classroomService
295+ where go
296+ = buildClient
297+ (Proxy ::
298+ Proxy
299+ CoursesCourseWorkStudentSubmissionsListResource)
300+ mempty
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/ModifyAttachments.hsnew file+250
@@ -0,0 +1,250 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.ModifyAttachments
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Modifies attachments of student submission. Attachments may only be
24+-- added to student submissions whose type is \`ASSIGNMENT\`. This request
25+-- must be made by the Developer Console project of the [OAuth client
26+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
27+-- the corresponding course work item. This method returns the following
28+-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not
29+-- permitted to access the requested course or course work, if the user is
30+-- not permitted to modify attachments on the requested student submission,
31+-- or for access errors. * \`INVALID_ARGUMENT\` if the request is
32+-- malformed. * \`NOT_FOUND\` if the requested course, course work, or
33+-- student submission does not exist.
34+--
35+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.studentSubmissions.modifyAttachments@.
36+module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.ModifyAttachments
37+ (
38+ -- * REST Resource
39+ CoursesCourseWorkStudentSubmissionsModifyAttachmentsResource
40+
41+ -- * Creating a Request
42+ , coursesCourseWorkStudentSubmissionsModifyAttachments
43+ , CoursesCourseWorkStudentSubmissionsModifyAttachments
44+
45+ -- * Request Lenses
46+ , ccwssmaXgafv
47+ , ccwssmaUploadProtocol
48+ , ccwssmaPp
49+ , ccwssmaCourseId
50+ , ccwssmaAccessToken
51+ , ccwssmaUploadType
52+ , ccwssmaPayload
53+ , ccwssmaBearerToken
54+ , ccwssmaId
55+ , ccwssmaCallback
56+ , ccwssmaCourseWorkId
57+ ) where
58+
59+import Network.Google.Classroom.Types
60+import Network.Google.Prelude
61+
62+-- | A resource alias for @classroom.courses.courseWork.studentSubmissions.modifyAttachments@ method which the
63+-- 'CoursesCourseWorkStudentSubmissionsModifyAttachments' request conforms to.
64+type CoursesCourseWorkStudentSubmissionsModifyAttachmentsResource
65+ =
66+ "v1" :>
67+ "courses" :>
68+ Capture "courseId" Text :>
69+ "courseWork" :>
70+ Capture "courseWorkId" Text :>
71+ "studentSubmissions" :>
72+ CaptureMode "id" "modifyAttachments" Text :>
73+ QueryParam "$.xgafv" Text :>
74+ QueryParam "upload_protocol" Text :>
75+ QueryParam "pp" Bool :>
76+ QueryParam "access_token" Text :>
77+ QueryParam "uploadType" Text :>
78+ QueryParam "bearer_token" Text :>
79+ QueryParam "callback" Text :>
80+ QueryParam "alt" AltJSON :>
81+ ReqBody '[JSON] ModifyAttachmentsRequest :>
82+ Post '[JSON] StudentSubmission
83+
84+-- | Modifies attachments of student submission. Attachments may only be
85+-- added to student submissions whose type is \`ASSIGNMENT\`. This request
86+-- must be made by the Developer Console project of the [OAuth client
87+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
88+-- the corresponding course work item. This method returns the following
89+-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not
90+-- permitted to access the requested course or course work, if the user is
91+-- not permitted to modify attachments on the requested student submission,
92+-- or for access errors. * \`INVALID_ARGUMENT\` if the request is
93+-- malformed. * \`NOT_FOUND\` if the requested course, course work, or
94+-- student submission does not exist.
95+--
96+-- /See:/ 'coursesCourseWorkStudentSubmissionsModifyAttachments' smart constructor.
97+data CoursesCourseWorkStudentSubmissionsModifyAttachments = CoursesCourseWorkStudentSubmissionsModifyAttachments'
98+ { _ccwssmaXgafv :: !(Maybe Text)
99+ , _ccwssmaUploadProtocol :: !(Maybe Text)
100+ , _ccwssmaPp :: !Bool
101+ , _ccwssmaCourseId :: !Text
102+ , _ccwssmaAccessToken :: !(Maybe Text)
103+ , _ccwssmaUploadType :: !(Maybe Text)
104+ , _ccwssmaPayload :: !ModifyAttachmentsRequest
105+ , _ccwssmaBearerToken :: !(Maybe Text)
106+ , _ccwssmaId :: !Text
107+ , _ccwssmaCallback :: !(Maybe Text)
108+ , _ccwssmaCourseWorkId :: !Text
109+ } deriving (Eq,Show,Data,Typeable,Generic)
110+
111+-- | Creates a value of 'CoursesCourseWorkStudentSubmissionsModifyAttachments' with the minimum fields required to make a request.
112+--
113+-- Use one of the following lenses to modify other fields as desired:
114+--
115+-- * 'ccwssmaXgafv'
116+--
117+-- * 'ccwssmaUploadProtocol'
118+--
119+-- * 'ccwssmaPp'
120+--
121+-- * 'ccwssmaCourseId'
122+--
123+-- * 'ccwssmaAccessToken'
124+--
125+-- * 'ccwssmaUploadType'
126+--
127+-- * 'ccwssmaPayload'
128+--
129+-- * 'ccwssmaBearerToken'
130+--
131+-- * 'ccwssmaId'
132+--
133+-- * 'ccwssmaCallback'
134+--
135+-- * 'ccwssmaCourseWorkId'
136+coursesCourseWorkStudentSubmissionsModifyAttachments
137+ :: Text -- ^ 'ccwssmaCourseId'
138+ -> ModifyAttachmentsRequest -- ^ 'ccwssmaPayload'
139+ -> Text -- ^ 'ccwssmaId'
140+ -> Text -- ^ 'ccwssmaCourseWorkId'
141+ -> CoursesCourseWorkStudentSubmissionsModifyAttachments
142+coursesCourseWorkStudentSubmissionsModifyAttachments pCcwssmaCourseId_ pCcwssmaPayload_ pCcwssmaId_ pCcwssmaCourseWorkId_ =
143+ CoursesCourseWorkStudentSubmissionsModifyAttachments'
144+ { _ccwssmaXgafv = Nothing
145+ , _ccwssmaUploadProtocol = Nothing
146+ , _ccwssmaPp = True
147+ , _ccwssmaCourseId = pCcwssmaCourseId_
148+ , _ccwssmaAccessToken = Nothing
149+ , _ccwssmaUploadType = Nothing
150+ , _ccwssmaPayload = pCcwssmaPayload_
151+ , _ccwssmaBearerToken = Nothing
152+ , _ccwssmaId = pCcwssmaId_
153+ , _ccwssmaCallback = Nothing
154+ , _ccwssmaCourseWorkId = pCcwssmaCourseWorkId_
155+ }
156+
157+-- | V1 error format.
158+ccwssmaXgafv :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments (Maybe Text)
159+ccwssmaXgafv
160+ = lens _ccwssmaXgafv (\ s a -> s{_ccwssmaXgafv = a})
161+
162+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
163+ccwssmaUploadProtocol :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments (Maybe Text)
164+ccwssmaUploadProtocol
165+ = lens _ccwssmaUploadProtocol
166+ (\ s a -> s{_ccwssmaUploadProtocol = a})
167+
168+-- | Pretty-print response.
169+ccwssmaPp :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments Bool
170+ccwssmaPp
171+ = lens _ccwssmaPp (\ s a -> s{_ccwssmaPp = a})
172+
173+-- | Identifier of the course. This identifier can be either the
174+-- Classroom-assigned identifier or an alias.
175+ccwssmaCourseId :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments Text
176+ccwssmaCourseId
177+ = lens _ccwssmaCourseId
178+ (\ s a -> s{_ccwssmaCourseId = a})
179+
180+-- | OAuth access token.
181+ccwssmaAccessToken :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments (Maybe Text)
182+ccwssmaAccessToken
183+ = lens _ccwssmaAccessToken
184+ (\ s a -> s{_ccwssmaAccessToken = a})
185+
186+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
187+ccwssmaUploadType :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments (Maybe Text)
188+ccwssmaUploadType
189+ = lens _ccwssmaUploadType
190+ (\ s a -> s{_ccwssmaUploadType = a})
191+
192+-- | Multipart request metadata.
193+ccwssmaPayload :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments ModifyAttachmentsRequest
194+ccwssmaPayload
195+ = lens _ccwssmaPayload
196+ (\ s a -> s{_ccwssmaPayload = a})
197+
198+-- | OAuth bearer token.
199+ccwssmaBearerToken :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments (Maybe Text)
200+ccwssmaBearerToken
201+ = lens _ccwssmaBearerToken
202+ (\ s a -> s{_ccwssmaBearerToken = a})
203+
204+-- | Identifier of the student submission.
205+ccwssmaId :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments Text
206+ccwssmaId
207+ = lens _ccwssmaId (\ s a -> s{_ccwssmaId = a})
208+
209+-- | JSONP
210+ccwssmaCallback :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments (Maybe Text)
211+ccwssmaCallback
212+ = lens _ccwssmaCallback
213+ (\ s a -> s{_ccwssmaCallback = a})
214+
215+-- | Identifier of the course work.
216+ccwssmaCourseWorkId :: Lens' CoursesCourseWorkStudentSubmissionsModifyAttachments Text
217+ccwssmaCourseWorkId
218+ = lens _ccwssmaCourseWorkId
219+ (\ s a -> s{_ccwssmaCourseWorkId = a})
220+
221+instance GoogleRequest
222+ CoursesCourseWorkStudentSubmissionsModifyAttachments
223+ where
224+ type Rs
225+ CoursesCourseWorkStudentSubmissionsModifyAttachments
226+ = StudentSubmission
227+ type Scopes
228+ CoursesCourseWorkStudentSubmissionsModifyAttachments
229+ =
230+ '["https://www.googleapis.com/auth/classroom.coursework.me",
231+ "https://www.googleapis.com/auth/classroom.coursework.students"]
232+ requestClient
233+ CoursesCourseWorkStudentSubmissionsModifyAttachments'{..}
234+ = go _ccwssmaCourseId _ccwssmaCourseWorkId _ccwssmaId
235+ _ccwssmaXgafv
236+ _ccwssmaUploadProtocol
237+ (Just _ccwssmaPp)
238+ _ccwssmaAccessToken
239+ _ccwssmaUploadType
240+ _ccwssmaBearerToken
241+ _ccwssmaCallback
242+ (Just AltJSON)
243+ _ccwssmaPayload
244+ classroomService
245+ where go
246+ = buildClient
247+ (Proxy ::
248+ Proxy
249+ CoursesCourseWorkStudentSubmissionsModifyAttachmentsResource)
250+ mempty
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/Patch.hsnew file+263
@@ -0,0 +1,263 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Patch
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Updates one or more fields of a student submission. See
24+-- google.classroom.v1.StudentSubmission for details of which fields may be
25+-- updated and who may change them. This request must be made by the
26+-- Developer Console project of the [OAuth client
27+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
28+-- the corresponding course work item. This method returns the following
29+-- error codes: * \`PERMISSION_DENIED\` if the requesting developer project
30+-- did not create the corresponding course work, if the user is not
31+-- permitted to make the requested modification to the student submission,
32+-- or for access errors. * \`INVALID_ARGUMENT\` if the request is
33+-- malformed. * \`NOT_FOUND\` if the requested course, course work, or
34+-- student submission does not exist.
35+--
36+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.studentSubmissions.patch@.
37+module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Patch
38+ (
39+ -- * REST Resource
40+ CoursesCourseWorkStudentSubmissionsPatchResource
41+
42+ -- * Creating a Request
43+ , coursesCourseWorkStudentSubmissionsPatch
44+ , CoursesCourseWorkStudentSubmissionsPatch
45+
46+ -- * Request Lenses
47+ , ccwsspXgafv
48+ , ccwsspUploadProtocol
49+ , ccwsspUpdateMask
50+ , ccwsspPp
51+ , ccwsspCourseId
52+ , ccwsspAccessToken
53+ , ccwsspUploadType
54+ , ccwsspPayload
55+ , ccwsspBearerToken
56+ , ccwsspId
57+ , ccwsspCallback
58+ , ccwsspCourseWorkId
59+ ) where
60+
61+import Network.Google.Classroom.Types
62+import Network.Google.Prelude
63+
64+-- | A resource alias for @classroom.courses.courseWork.studentSubmissions.patch@ method which the
65+-- 'CoursesCourseWorkStudentSubmissionsPatch' request conforms to.
66+type CoursesCourseWorkStudentSubmissionsPatchResource
67+ =
68+ "v1" :>
69+ "courses" :>
70+ Capture "courseId" Text :>
71+ "courseWork" :>
72+ Capture "courseWorkId" Text :>
73+ "studentSubmissions" :>
74+ Capture "id" Text :>
75+ QueryParam "$.xgafv" Text :>
76+ QueryParam "upload_protocol" Text :>
77+ QueryParam "updateMask" Text :>
78+ QueryParam "pp" Bool :>
79+ QueryParam "access_token" Text :>
80+ QueryParam "uploadType" Text :>
81+ QueryParam "bearer_token" Text :>
82+ QueryParam "callback" Text :>
83+ QueryParam "alt" AltJSON :>
84+ ReqBody '[JSON] StudentSubmission :>
85+ Patch '[JSON] StudentSubmission
86+
87+-- | Updates one or more fields of a student submission. See
88+-- google.classroom.v1.StudentSubmission for details of which fields may be
89+-- updated and who may change them. This request must be made by the
90+-- Developer Console project of the [OAuth client
91+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
92+-- the corresponding course work item. This method returns the following
93+-- error codes: * \`PERMISSION_DENIED\` if the requesting developer project
94+-- did not create the corresponding course work, if the user is not
95+-- permitted to make the requested modification to the student submission,
96+-- or for access errors. * \`INVALID_ARGUMENT\` if the request is
97+-- malformed. * \`NOT_FOUND\` if the requested course, course work, or
98+-- student submission does not exist.
99+--
100+-- /See:/ 'coursesCourseWorkStudentSubmissionsPatch' smart constructor.
101+data CoursesCourseWorkStudentSubmissionsPatch = CoursesCourseWorkStudentSubmissionsPatch'
102+ { _ccwsspXgafv :: !(Maybe Text)
103+ , _ccwsspUploadProtocol :: !(Maybe Text)
104+ , _ccwsspUpdateMask :: !(Maybe Text)
105+ , _ccwsspPp :: !Bool
106+ , _ccwsspCourseId :: !Text
107+ , _ccwsspAccessToken :: !(Maybe Text)
108+ , _ccwsspUploadType :: !(Maybe Text)
109+ , _ccwsspPayload :: !StudentSubmission
110+ , _ccwsspBearerToken :: !(Maybe Text)
111+ , _ccwsspId :: !Text
112+ , _ccwsspCallback :: !(Maybe Text)
113+ , _ccwsspCourseWorkId :: !Text
114+ } deriving (Eq,Show,Data,Typeable,Generic)
115+
116+-- | Creates a value of 'CoursesCourseWorkStudentSubmissionsPatch' with the minimum fields required to make a request.
117+--
118+-- Use one of the following lenses to modify other fields as desired:
119+--
120+-- * 'ccwsspXgafv'
121+--
122+-- * 'ccwsspUploadProtocol'
123+--
124+-- * 'ccwsspUpdateMask'
125+--
126+-- * 'ccwsspPp'
127+--
128+-- * 'ccwsspCourseId'
129+--
130+-- * 'ccwsspAccessToken'
131+--
132+-- * 'ccwsspUploadType'
133+--
134+-- * 'ccwsspPayload'
135+--
136+-- * 'ccwsspBearerToken'
137+--
138+-- * 'ccwsspId'
139+--
140+-- * 'ccwsspCallback'
141+--
142+-- * 'ccwsspCourseWorkId'
143+coursesCourseWorkStudentSubmissionsPatch
144+ :: Text -- ^ 'ccwsspCourseId'
145+ -> StudentSubmission -- ^ 'ccwsspPayload'
146+ -> Text -- ^ 'ccwsspId'
147+ -> Text -- ^ 'ccwsspCourseWorkId'
148+ -> CoursesCourseWorkStudentSubmissionsPatch
149+coursesCourseWorkStudentSubmissionsPatch pCcwsspCourseId_ pCcwsspPayload_ pCcwsspId_ pCcwsspCourseWorkId_ =
150+ CoursesCourseWorkStudentSubmissionsPatch'
151+ { _ccwsspXgafv = Nothing
152+ , _ccwsspUploadProtocol = Nothing
153+ , _ccwsspUpdateMask = Nothing
154+ , _ccwsspPp = True
155+ , _ccwsspCourseId = pCcwsspCourseId_
156+ , _ccwsspAccessToken = Nothing
157+ , _ccwsspUploadType = Nothing
158+ , _ccwsspPayload = pCcwsspPayload_
159+ , _ccwsspBearerToken = Nothing
160+ , _ccwsspId = pCcwsspId_
161+ , _ccwsspCallback = Nothing
162+ , _ccwsspCourseWorkId = pCcwsspCourseWorkId_
163+ }
164+
165+-- | V1 error format.
166+ccwsspXgafv :: Lens' CoursesCourseWorkStudentSubmissionsPatch (Maybe Text)
167+ccwsspXgafv
168+ = lens _ccwsspXgafv (\ s a -> s{_ccwsspXgafv = a})
169+
170+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
171+ccwsspUploadProtocol :: Lens' CoursesCourseWorkStudentSubmissionsPatch (Maybe Text)
172+ccwsspUploadProtocol
173+ = lens _ccwsspUploadProtocol
174+ (\ s a -> s{_ccwsspUploadProtocol = a})
175+
176+-- | Mask that identifies which fields on the student submission to update.
177+-- This field is required to do an update. The update fails if invalid
178+-- fields are specified. The following fields may be specified by teachers:
179+-- * \`draft_grade\` * \`assigned_grade\`
180+ccwsspUpdateMask :: Lens' CoursesCourseWorkStudentSubmissionsPatch (Maybe Text)
181+ccwsspUpdateMask
182+ = lens _ccwsspUpdateMask
183+ (\ s a -> s{_ccwsspUpdateMask = a})
184+
185+-- | Pretty-print response.
186+ccwsspPp :: Lens' CoursesCourseWorkStudentSubmissionsPatch Bool
187+ccwsspPp = lens _ccwsspPp (\ s a -> s{_ccwsspPp = a})
188+
189+-- | Identifier of the course. This identifier can be either the
190+-- Classroom-assigned identifier or an alias.
191+ccwsspCourseId :: Lens' CoursesCourseWorkStudentSubmissionsPatch Text
192+ccwsspCourseId
193+ = lens _ccwsspCourseId
194+ (\ s a -> s{_ccwsspCourseId = a})
195+
196+-- | OAuth access token.
197+ccwsspAccessToken :: Lens' CoursesCourseWorkStudentSubmissionsPatch (Maybe Text)
198+ccwsspAccessToken
199+ = lens _ccwsspAccessToken
200+ (\ s a -> s{_ccwsspAccessToken = a})
201+
202+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
203+ccwsspUploadType :: Lens' CoursesCourseWorkStudentSubmissionsPatch (Maybe Text)
204+ccwsspUploadType
205+ = lens _ccwsspUploadType
206+ (\ s a -> s{_ccwsspUploadType = a})
207+
208+-- | Multipart request metadata.
209+ccwsspPayload :: Lens' CoursesCourseWorkStudentSubmissionsPatch StudentSubmission
210+ccwsspPayload
211+ = lens _ccwsspPayload
212+ (\ s a -> s{_ccwsspPayload = a})
213+
214+-- | OAuth bearer token.
215+ccwsspBearerToken :: Lens' CoursesCourseWorkStudentSubmissionsPatch (Maybe Text)
216+ccwsspBearerToken
217+ = lens _ccwsspBearerToken
218+ (\ s a -> s{_ccwsspBearerToken = a})
219+
220+-- | Identifier of the student submission.
221+ccwsspId :: Lens' CoursesCourseWorkStudentSubmissionsPatch Text
222+ccwsspId = lens _ccwsspId (\ s a -> s{_ccwsspId = a})
223+
224+-- | JSONP
225+ccwsspCallback :: Lens' CoursesCourseWorkStudentSubmissionsPatch (Maybe Text)
226+ccwsspCallback
227+ = lens _ccwsspCallback
228+ (\ s a -> s{_ccwsspCallback = a})
229+
230+-- | Identifier of the course work.
231+ccwsspCourseWorkId :: Lens' CoursesCourseWorkStudentSubmissionsPatch Text
232+ccwsspCourseWorkId
233+ = lens _ccwsspCourseWorkId
234+ (\ s a -> s{_ccwsspCourseWorkId = a})
235+
236+instance GoogleRequest
237+ CoursesCourseWorkStudentSubmissionsPatch where
238+ type Rs CoursesCourseWorkStudentSubmissionsPatch =
239+ StudentSubmission
240+ type Scopes CoursesCourseWorkStudentSubmissionsPatch
241+ =
242+ '["https://www.googleapis.com/auth/classroom.coursework.me",
243+ "https://www.googleapis.com/auth/classroom.coursework.students"]
244+ requestClient
245+ CoursesCourseWorkStudentSubmissionsPatch'{..}
246+ = go _ccwsspCourseId _ccwsspCourseWorkId _ccwsspId
247+ _ccwsspXgafv
248+ _ccwsspUploadProtocol
249+ _ccwsspUpdateMask
250+ (Just _ccwsspPp)
251+ _ccwsspAccessToken
252+ _ccwsspUploadType
253+ _ccwsspBearerToken
254+ _ccwsspCallback
255+ (Just AltJSON)
256+ _ccwsspPayload
257+ classroomService
258+ where go
259+ = buildClient
260+ (Proxy ::
261+ Proxy
262+ CoursesCourseWorkStudentSubmissionsPatchResource)
263+ mempty
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/Reclaim.hsnew file+249
@@ -0,0 +1,249 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Reclaim
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Reclaims a student submission on behalf of the student that owns it.
24+-- Reclaiming a student submission transfers ownership of attached Drive
25+-- files to the student and update the submission state. Only the student
26+-- that ownes the requested student submission may call this method, and
27+-- only for a student submission that has been turned in. This request must
28+-- be made by the Developer Console project of the [OAuth client
29+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
30+-- the corresponding course work item. This method returns the following
31+-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not
32+-- permitted to access the requested course or course work, unsubmit the
33+-- requested student submission, or for access errors. *
34+-- \`FAILED_PRECONDITION\` if the student submission has not been turned
35+-- in. * \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\`
36+-- if the requested course, course work, or student submission does not
37+-- exist.
38+--
39+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.studentSubmissions.reclaim@.
40+module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Reclaim
41+ (
42+ -- * REST Resource
43+ CoursesCourseWorkStudentSubmissionsReclaimResource
44+
45+ -- * Creating a Request
46+ , coursesCourseWorkStudentSubmissionsReclaim
47+ , CoursesCourseWorkStudentSubmissionsReclaim
48+
49+ -- * Request Lenses
50+ , couXgafv
51+ , couUploadProtocol
52+ , couPp
53+ , couCourseId
54+ , couAccessToken
55+ , couUploadType
56+ , couPayload
57+ , couBearerToken
58+ , couId
59+ , couCallback
60+ , couCourseWorkId
61+ ) where
62+
63+import Network.Google.Classroom.Types
64+import Network.Google.Prelude
65+
66+-- | A resource alias for @classroom.courses.courseWork.studentSubmissions.reclaim@ method which the
67+-- 'CoursesCourseWorkStudentSubmissionsReclaim' request conforms to.
68+type CoursesCourseWorkStudentSubmissionsReclaimResource
69+ =
70+ "v1" :>
71+ "courses" :>
72+ Capture "courseId" Text :>
73+ "courseWork" :>
74+ Capture "courseWorkId" Text :>
75+ "studentSubmissions" :>
76+ CaptureMode "id" "reclaim" Text :>
77+ QueryParam "$.xgafv" Text :>
78+ QueryParam "upload_protocol" Text :>
79+ QueryParam "pp" Bool :>
80+ QueryParam "access_token" Text :>
81+ QueryParam "uploadType" Text :>
82+ QueryParam "bearer_token" Text :>
83+ QueryParam "callback" Text :>
84+ QueryParam "alt" AltJSON :>
85+ ReqBody '[JSON]
86+ ReclaimStudentSubmissionRequest
87+ :> Post '[JSON] Empty
88+
89+-- | Reclaims a student submission on behalf of the student that owns it.
90+-- Reclaiming a student submission transfers ownership of attached Drive
91+-- files to the student and update the submission state. Only the student
92+-- that ownes the requested student submission may call this method, and
93+-- only for a student submission that has been turned in. This request must
94+-- be made by the Developer Console project of the [OAuth client
95+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
96+-- the corresponding course work item. This method returns the following
97+-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not
98+-- permitted to access the requested course or course work, unsubmit the
99+-- requested student submission, or for access errors. *
100+-- \`FAILED_PRECONDITION\` if the student submission has not been turned
101+-- in. * \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\`
102+-- if the requested course, course work, or student submission does not
103+-- exist.
104+--
105+-- /See:/ 'coursesCourseWorkStudentSubmissionsReclaim' smart constructor.
106+data CoursesCourseWorkStudentSubmissionsReclaim = CoursesCourseWorkStudentSubmissionsReclaim'
107+ { _couXgafv :: !(Maybe Text)
108+ , _couUploadProtocol :: !(Maybe Text)
109+ , _couPp :: !Bool
110+ , _couCourseId :: !Text
111+ , _couAccessToken :: !(Maybe Text)
112+ , _couUploadType :: !(Maybe Text)
113+ , _couPayload :: !ReclaimStudentSubmissionRequest
114+ , _couBearerToken :: !(Maybe Text)
115+ , _couId :: !Text
116+ , _couCallback :: !(Maybe Text)
117+ , _couCourseWorkId :: !Text
118+ } deriving (Eq,Show,Data,Typeable,Generic)
119+
120+-- | Creates a value of 'CoursesCourseWorkStudentSubmissionsReclaim' with the minimum fields required to make a request.
121+--
122+-- Use one of the following lenses to modify other fields as desired:
123+--
124+-- * 'couXgafv'
125+--
126+-- * 'couUploadProtocol'
127+--
128+-- * 'couPp'
129+--
130+-- * 'couCourseId'
131+--
132+-- * 'couAccessToken'
133+--
134+-- * 'couUploadType'
135+--
136+-- * 'couPayload'
137+--
138+-- * 'couBearerToken'
139+--
140+-- * 'couId'
141+--
142+-- * 'couCallback'
143+--
144+-- * 'couCourseWorkId'
145+coursesCourseWorkStudentSubmissionsReclaim
146+ :: Text -- ^ 'couCourseId'
147+ -> ReclaimStudentSubmissionRequest -- ^ 'couPayload'
148+ -> Text -- ^ 'couId'
149+ -> Text -- ^ 'couCourseWorkId'
150+ -> CoursesCourseWorkStudentSubmissionsReclaim
151+coursesCourseWorkStudentSubmissionsReclaim pCouCourseId_ pCouPayload_ pCouId_ pCouCourseWorkId_ =
152+ CoursesCourseWorkStudentSubmissionsReclaim'
153+ { _couXgafv = Nothing
154+ , _couUploadProtocol = Nothing
155+ , _couPp = True
156+ , _couCourseId = pCouCourseId_
157+ , _couAccessToken = Nothing
158+ , _couUploadType = Nothing
159+ , _couPayload = pCouPayload_
160+ , _couBearerToken = Nothing
161+ , _couId = pCouId_
162+ , _couCallback = Nothing
163+ , _couCourseWorkId = pCouCourseWorkId_
164+ }
165+
166+-- | V1 error format.
167+couXgafv :: Lens' CoursesCourseWorkStudentSubmissionsReclaim (Maybe Text)
168+couXgafv = lens _couXgafv (\ s a -> s{_couXgafv = a})
169+
170+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
171+couUploadProtocol :: Lens' CoursesCourseWorkStudentSubmissionsReclaim (Maybe Text)
172+couUploadProtocol
173+ = lens _couUploadProtocol
174+ (\ s a -> s{_couUploadProtocol = a})
175+
176+-- | Pretty-print response.
177+couPp :: Lens' CoursesCourseWorkStudentSubmissionsReclaim Bool
178+couPp = lens _couPp (\ s a -> s{_couPp = a})
179+
180+-- | Identifier of the course. This identifier can be either the
181+-- Classroom-assigned identifier or an alias.
182+couCourseId :: Lens' CoursesCourseWorkStudentSubmissionsReclaim Text
183+couCourseId
184+ = lens _couCourseId (\ s a -> s{_couCourseId = a})
185+
186+-- | OAuth access token.
187+couAccessToken :: Lens' CoursesCourseWorkStudentSubmissionsReclaim (Maybe Text)
188+couAccessToken
189+ = lens _couAccessToken
190+ (\ s a -> s{_couAccessToken = a})
191+
192+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
193+couUploadType :: Lens' CoursesCourseWorkStudentSubmissionsReclaim (Maybe Text)
194+couUploadType
195+ = lens _couUploadType
196+ (\ s a -> s{_couUploadType = a})
197+
198+-- | Multipart request metadata.
199+couPayload :: Lens' CoursesCourseWorkStudentSubmissionsReclaim ReclaimStudentSubmissionRequest
200+couPayload
201+ = lens _couPayload (\ s a -> s{_couPayload = a})
202+
203+-- | OAuth bearer token.
204+couBearerToken :: Lens' CoursesCourseWorkStudentSubmissionsReclaim (Maybe Text)
205+couBearerToken
206+ = lens _couBearerToken
207+ (\ s a -> s{_couBearerToken = a})
208+
209+-- | Identifier of the student submission.
210+couId :: Lens' CoursesCourseWorkStudentSubmissionsReclaim Text
211+couId = lens _couId (\ s a -> s{_couId = a})
212+
213+-- | JSONP
214+couCallback :: Lens' CoursesCourseWorkStudentSubmissionsReclaim (Maybe Text)
215+couCallback
216+ = lens _couCallback (\ s a -> s{_couCallback = a})
217+
218+-- | Identifier of the course work.
219+couCourseWorkId :: Lens' CoursesCourseWorkStudentSubmissionsReclaim Text
220+couCourseWorkId
221+ = lens _couCourseWorkId
222+ (\ s a -> s{_couCourseWorkId = a})
223+
224+instance GoogleRequest
225+ CoursesCourseWorkStudentSubmissionsReclaim where
226+ type Rs CoursesCourseWorkStudentSubmissionsReclaim =
227+ Empty
228+ type Scopes
229+ CoursesCourseWorkStudentSubmissionsReclaim
230+ =
231+ '["https://www.googleapis.com/auth/classroom.coursework.me"]
232+ requestClient
233+ CoursesCourseWorkStudentSubmissionsReclaim'{..}
234+ = go _couCourseId _couCourseWorkId _couId _couXgafv
235+ _couUploadProtocol
236+ (Just _couPp)
237+ _couAccessToken
238+ _couUploadType
239+ _couBearerToken
240+ _couCallback
241+ (Just AltJSON)
242+ _couPayload
243+ classroomService
244+ where go
245+ = buildClient
246+ (Proxy ::
247+ Proxy
248+ CoursesCourseWorkStudentSubmissionsReclaimResource)
249+ mempty
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/Return.hsnew file+251
@@ -0,0 +1,251 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Return
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Returns a student submission. Returning a student submission transfers
24+-- ownership of attached Drive files to the student and may also update the
25+-- submission state. Unlike the Classroom application, returning a student
26+-- submission does not set assignedGrade to the draftGrade value. Only a
27+-- teacher of the course that contains the requested student submission may
28+-- call this method. This request must be made by the Developer Console
29+-- project of the [OAuth client
30+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
31+-- the corresponding course work item. This method returns the following
32+-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not
33+-- permitted to access the requested course or course work, return the
34+-- requested student submission, or for access errors. *
35+-- \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\` if the
36+-- requested course, course work, or student submission does not exist.
37+--
38+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.studentSubmissions.return@.
39+module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Return
40+ (
41+ -- * REST Resource
42+ CoursesCourseWorkStudentSubmissionsReturnResource
43+
44+ -- * Creating a Request
45+ , coursesCourseWorkStudentSubmissionsReturn
46+ , CoursesCourseWorkStudentSubmissionsReturn
47+
48+ -- * Request Lenses
49+ , ccwssrXgafv
50+ , ccwssrUploadProtocol
51+ , ccwssrPp
52+ , ccwssrCourseId
53+ , ccwssrAccessToken
54+ , ccwssrUploadType
55+ , ccwssrPayload
56+ , ccwssrBearerToken
57+ , ccwssrId
58+ , ccwssrCallback
59+ , ccwssrCourseWorkId
60+ ) where
61+
62+import Network.Google.Classroom.Types
63+import Network.Google.Prelude
64+
65+-- | A resource alias for @classroom.courses.courseWork.studentSubmissions.return@ method which the
66+-- 'CoursesCourseWorkStudentSubmissionsReturn' request conforms to.
67+type CoursesCourseWorkStudentSubmissionsReturnResource
68+ =
69+ "v1" :>
70+ "courses" :>
71+ Capture "courseId" Text :>
72+ "courseWork" :>
73+ Capture "courseWorkId" Text :>
74+ "studentSubmissions" :>
75+ CaptureMode "id" "return" Text :>
76+ QueryParam "$.xgafv" Text :>
77+ QueryParam "upload_protocol" Text :>
78+ QueryParam "pp" Bool :>
79+ QueryParam "access_token" Text :>
80+ QueryParam "uploadType" Text :>
81+ QueryParam "bearer_token" Text :>
82+ QueryParam "callback" Text :>
83+ QueryParam "alt" AltJSON :>
84+ ReqBody '[JSON]
85+ ReturnStudentSubmissionRequest
86+ :> Post '[JSON] Empty
87+
88+-- | Returns a student submission. Returning a student submission transfers
89+-- ownership of attached Drive files to the student and may also update the
90+-- submission state. Unlike the Classroom application, returning a student
91+-- submission does not set assignedGrade to the draftGrade value. Only a
92+-- teacher of the course that contains the requested student submission may
93+-- call this method. This request must be made by the Developer Console
94+-- project of the [OAuth client
95+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
96+-- the corresponding course work item. This method returns the following
97+-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not
98+-- permitted to access the requested course or course work, return the
99+-- requested student submission, or for access errors. *
100+-- \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\` if the
101+-- requested course, course work, or student submission does not exist.
102+--
103+-- /See:/ 'coursesCourseWorkStudentSubmissionsReturn' smart constructor.
104+data CoursesCourseWorkStudentSubmissionsReturn = CoursesCourseWorkStudentSubmissionsReturn'
105+ { _ccwssrXgafv :: !(Maybe Text)
106+ , _ccwssrUploadProtocol :: !(Maybe Text)
107+ , _ccwssrPp :: !Bool
108+ , _ccwssrCourseId :: !Text
109+ , _ccwssrAccessToken :: !(Maybe Text)
110+ , _ccwssrUploadType :: !(Maybe Text)
111+ , _ccwssrPayload :: !ReturnStudentSubmissionRequest
112+ , _ccwssrBearerToken :: !(Maybe Text)
113+ , _ccwssrId :: !Text
114+ , _ccwssrCallback :: !(Maybe Text)
115+ , _ccwssrCourseWorkId :: !Text
116+ } deriving (Eq,Show,Data,Typeable,Generic)
117+
118+-- | Creates a value of 'CoursesCourseWorkStudentSubmissionsReturn' with the minimum fields required to make a request.
119+--
120+-- Use one of the following lenses to modify other fields as desired:
121+--
122+-- * 'ccwssrXgafv'
123+--
124+-- * 'ccwssrUploadProtocol'
125+--
126+-- * 'ccwssrPp'
127+--
128+-- * 'ccwssrCourseId'
129+--
130+-- * 'ccwssrAccessToken'
131+--
132+-- * 'ccwssrUploadType'
133+--
134+-- * 'ccwssrPayload'
135+--
136+-- * 'ccwssrBearerToken'
137+--
138+-- * 'ccwssrId'
139+--
140+-- * 'ccwssrCallback'
141+--
142+-- * 'ccwssrCourseWorkId'
143+coursesCourseWorkStudentSubmissionsReturn
144+ :: Text -- ^ 'ccwssrCourseId'
145+ -> ReturnStudentSubmissionRequest -- ^ 'ccwssrPayload'
146+ -> Text -- ^ 'ccwssrId'
147+ -> Text -- ^ 'ccwssrCourseWorkId'
148+ -> CoursesCourseWorkStudentSubmissionsReturn
149+coursesCourseWorkStudentSubmissionsReturn pCcwssrCourseId_ pCcwssrPayload_ pCcwssrId_ pCcwssrCourseWorkId_ =
150+ CoursesCourseWorkStudentSubmissionsReturn'
151+ { _ccwssrXgafv = Nothing
152+ , _ccwssrUploadProtocol = Nothing
153+ , _ccwssrPp = True
154+ , _ccwssrCourseId = pCcwssrCourseId_
155+ , _ccwssrAccessToken = Nothing
156+ , _ccwssrUploadType = Nothing
157+ , _ccwssrPayload = pCcwssrPayload_
158+ , _ccwssrBearerToken = Nothing
159+ , _ccwssrId = pCcwssrId_
160+ , _ccwssrCallback = Nothing
161+ , _ccwssrCourseWorkId = pCcwssrCourseWorkId_
162+ }
163+
164+-- | V1 error format.
165+ccwssrXgafv :: Lens' CoursesCourseWorkStudentSubmissionsReturn (Maybe Text)
166+ccwssrXgafv
167+ = lens _ccwssrXgafv (\ s a -> s{_ccwssrXgafv = a})
168+
169+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
170+ccwssrUploadProtocol :: Lens' CoursesCourseWorkStudentSubmissionsReturn (Maybe Text)
171+ccwssrUploadProtocol
172+ = lens _ccwssrUploadProtocol
173+ (\ s a -> s{_ccwssrUploadProtocol = a})
174+
175+-- | Pretty-print response.
176+ccwssrPp :: Lens' CoursesCourseWorkStudentSubmissionsReturn Bool
177+ccwssrPp = lens _ccwssrPp (\ s a -> s{_ccwssrPp = a})
178+
179+-- | Identifier of the course. This identifier can be either the
180+-- Classroom-assigned identifier or an alias.
181+ccwssrCourseId :: Lens' CoursesCourseWorkStudentSubmissionsReturn Text
182+ccwssrCourseId
183+ = lens _ccwssrCourseId
184+ (\ s a -> s{_ccwssrCourseId = a})
185+
186+-- | OAuth access token.
187+ccwssrAccessToken :: Lens' CoursesCourseWorkStudentSubmissionsReturn (Maybe Text)
188+ccwssrAccessToken
189+ = lens _ccwssrAccessToken
190+ (\ s a -> s{_ccwssrAccessToken = a})
191+
192+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
193+ccwssrUploadType :: Lens' CoursesCourseWorkStudentSubmissionsReturn (Maybe Text)
194+ccwssrUploadType
195+ = lens _ccwssrUploadType
196+ (\ s a -> s{_ccwssrUploadType = a})
197+
198+-- | Multipart request metadata.
199+ccwssrPayload :: Lens' CoursesCourseWorkStudentSubmissionsReturn ReturnStudentSubmissionRequest
200+ccwssrPayload
201+ = lens _ccwssrPayload
202+ (\ s a -> s{_ccwssrPayload = a})
203+
204+-- | OAuth bearer token.
205+ccwssrBearerToken :: Lens' CoursesCourseWorkStudentSubmissionsReturn (Maybe Text)
206+ccwssrBearerToken
207+ = lens _ccwssrBearerToken
208+ (\ s a -> s{_ccwssrBearerToken = a})
209+
210+-- | Identifier of the student submission.
211+ccwssrId :: Lens' CoursesCourseWorkStudentSubmissionsReturn Text
212+ccwssrId = lens _ccwssrId (\ s a -> s{_ccwssrId = a})
213+
214+-- | JSONP
215+ccwssrCallback :: Lens' CoursesCourseWorkStudentSubmissionsReturn (Maybe Text)
216+ccwssrCallback
217+ = lens _ccwssrCallback
218+ (\ s a -> s{_ccwssrCallback = a})
219+
220+-- | Identifier of the course work.
221+ccwssrCourseWorkId :: Lens' CoursesCourseWorkStudentSubmissionsReturn Text
222+ccwssrCourseWorkId
223+ = lens _ccwssrCourseWorkId
224+ (\ s a -> s{_ccwssrCourseWorkId = a})
225+
226+instance GoogleRequest
227+ CoursesCourseWorkStudentSubmissionsReturn where
228+ type Rs CoursesCourseWorkStudentSubmissionsReturn =
229+ Empty
230+ type Scopes CoursesCourseWorkStudentSubmissionsReturn
231+ =
232+ '["https://www.googleapis.com/auth/classroom.coursework.students"]
233+ requestClient
234+ CoursesCourseWorkStudentSubmissionsReturn'{..}
235+ = go _ccwssrCourseId _ccwssrCourseWorkId _ccwssrId
236+ _ccwssrXgafv
237+ _ccwssrUploadProtocol
238+ (Just _ccwssrPp)
239+ _ccwssrAccessToken
240+ _ccwssrUploadType
241+ _ccwssrBearerToken
242+ _ccwssrCallback
243+ (Just AltJSON)
244+ _ccwssrPayload
245+ classroomService
246+ where go
247+ = buildClient
248+ (Proxy ::
249+ Proxy
250+ CoursesCourseWorkStudentSubmissionsReturnResource)
251+ mempty
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/TurnIn.hsnew file+249
@@ -0,0 +1,249 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.TurnIn
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Turns in a student submission. Turning in a student submission transfers
24+-- ownership of attached Drive files to the teacher and may also update the
25+-- submission state. This may only be called by the student that owns the
26+-- specified student submission. This request must be made by the Developer
27+-- Console project of the [OAuth client
28+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
29+-- the corresponding course work item. This method returns the following
30+-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not
31+-- permitted to access the requested course or course work, turn in the
32+-- requested student submission, or for access errors. *
33+-- \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\` if the
34+-- requested course, course work, or student submission does not exist.
35+--
36+-- /See:/ <https://developers.google.com/classroom/ Google Classroom API Reference> for @classroom.courses.courseWork.studentSubmissions.turnIn@.
37+module Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.TurnIn
38+ (
39+ -- * REST Resource
40+ CoursesCourseWorkStudentSubmissionsTurnInResource
41+
42+ -- * Creating a Request
43+ , coursesCourseWorkStudentSubmissionsTurnIn
44+ , CoursesCourseWorkStudentSubmissionsTurnIn
45+
46+ -- * Request Lenses
47+ , ccwsstiXgafv
48+ , ccwsstiUploadProtocol
49+ , ccwsstiPp
50+ , ccwsstiCourseId
51+ , ccwsstiAccessToken
52+ , ccwsstiUploadType
53+ , ccwsstiPayload
54+ , ccwsstiBearerToken
55+ , ccwsstiId
56+ , ccwsstiCallback
57+ , ccwsstiCourseWorkId
58+ ) where
59+
60+import Network.Google.Classroom.Types
61+import Network.Google.Prelude
62+
63+-- | A resource alias for @classroom.courses.courseWork.studentSubmissions.turnIn@ method which the
64+-- 'CoursesCourseWorkStudentSubmissionsTurnIn' request conforms to.
65+type CoursesCourseWorkStudentSubmissionsTurnInResource
66+ =
67+ "v1" :>
68+ "courses" :>
69+ Capture "courseId" Text :>
70+ "courseWork" :>
71+ Capture "courseWorkId" Text :>
72+ "studentSubmissions" :>
73+ CaptureMode "id" "turnIn" Text :>
74+ QueryParam "$.xgafv" Text :>
75+ QueryParam "upload_protocol" Text :>
76+ QueryParam "pp" Bool :>
77+ QueryParam "access_token" Text :>
78+ QueryParam "uploadType" Text :>
79+ QueryParam "bearer_token" Text :>
80+ QueryParam "callback" Text :>
81+ QueryParam "alt" AltJSON :>
82+ ReqBody '[JSON]
83+ TurnInStudentSubmissionRequest
84+ :> Post '[JSON] Empty
85+
86+-- | Turns in a student submission. Turning in a student submission transfers
87+-- ownership of attached Drive files to the teacher and may also update the
88+-- submission state. This may only be called by the student that owns the
89+-- specified student submission. This request must be made by the Developer
90+-- Console project of the [OAuth client
91+-- ID](https:\/\/support.google.com\/cloud\/answer\/6158849) used to create
92+-- the corresponding course work item. This method returns the following
93+-- error codes: * \`PERMISSION_DENIED\` if the requesting user is not
94+-- permitted to access the requested course or course work, turn in the
95+-- requested student submission, or for access errors. *
96+-- \`INVALID_ARGUMENT\` if the request is malformed. * \`NOT_FOUND\` if the
97+-- requested course, course work, or student submission does not exist.
98+--
99+-- /See:/ 'coursesCourseWorkStudentSubmissionsTurnIn' smart constructor.
100+data CoursesCourseWorkStudentSubmissionsTurnIn = CoursesCourseWorkStudentSubmissionsTurnIn'
101+ { _ccwsstiXgafv :: !(Maybe Text)
102+ , _ccwsstiUploadProtocol :: !(Maybe Text)
103+ , _ccwsstiPp :: !Bool
104+ , _ccwsstiCourseId :: !Text
105+ , _ccwsstiAccessToken :: !(Maybe Text)
106+ , _ccwsstiUploadType :: !(Maybe Text)
107+ , _ccwsstiPayload :: !TurnInStudentSubmissionRequest
108+ , _ccwsstiBearerToken :: !(Maybe Text)
109+ , _ccwsstiId :: !Text
110+ , _ccwsstiCallback :: !(Maybe Text)
111+ , _ccwsstiCourseWorkId :: !Text
112+ } deriving (Eq,Show,Data,Typeable,Generic)
113+
114+-- | Creates a value of 'CoursesCourseWorkStudentSubmissionsTurnIn' with the minimum fields required to make a request.
115+--
116+-- Use one of the following lenses to modify other fields as desired:
117+--
118+-- * 'ccwsstiXgafv'
119+--
120+-- * 'ccwsstiUploadProtocol'
121+--
122+-- * 'ccwsstiPp'
123+--
124+-- * 'ccwsstiCourseId'
125+--
126+-- * 'ccwsstiAccessToken'
127+--
128+-- * 'ccwsstiUploadType'
129+--
130+-- * 'ccwsstiPayload'
131+--
132+-- * 'ccwsstiBearerToken'
133+--
134+-- * 'ccwsstiId'
135+--
136+-- * 'ccwsstiCallback'
137+--
138+-- * 'ccwsstiCourseWorkId'
139+coursesCourseWorkStudentSubmissionsTurnIn
140+ :: Text -- ^ 'ccwsstiCourseId'
141+ -> TurnInStudentSubmissionRequest -- ^ 'ccwsstiPayload'
142+ -> Text -- ^ 'ccwsstiId'
143+ -> Text -- ^ 'ccwsstiCourseWorkId'
144+ -> CoursesCourseWorkStudentSubmissionsTurnIn
145+coursesCourseWorkStudentSubmissionsTurnIn pCcwsstiCourseId_ pCcwsstiPayload_ pCcwsstiId_ pCcwsstiCourseWorkId_ =
146+ CoursesCourseWorkStudentSubmissionsTurnIn'
147+ { _ccwsstiXgafv = Nothing
148+ , _ccwsstiUploadProtocol = Nothing
149+ , _ccwsstiPp = True
150+ , _ccwsstiCourseId = pCcwsstiCourseId_
151+ , _ccwsstiAccessToken = Nothing
152+ , _ccwsstiUploadType = Nothing
153+ , _ccwsstiPayload = pCcwsstiPayload_
154+ , _ccwsstiBearerToken = Nothing
155+ , _ccwsstiId = pCcwsstiId_
156+ , _ccwsstiCallback = Nothing
157+ , _ccwsstiCourseWorkId = pCcwsstiCourseWorkId_
158+ }
159+
160+-- | V1 error format.
161+ccwsstiXgafv :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn (Maybe Text)
162+ccwsstiXgafv
163+ = lens _ccwsstiXgafv (\ s a -> s{_ccwsstiXgafv = a})
164+
165+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
166+ccwsstiUploadProtocol :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn (Maybe Text)
167+ccwsstiUploadProtocol
168+ = lens _ccwsstiUploadProtocol
169+ (\ s a -> s{_ccwsstiUploadProtocol = a})
170+
171+-- | Pretty-print response.
172+ccwsstiPp :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn Bool
173+ccwsstiPp
174+ = lens _ccwsstiPp (\ s a -> s{_ccwsstiPp = a})
175+
176+-- | Identifier of the course. This identifier can be either the
177+-- Classroom-assigned identifier or an alias.
178+ccwsstiCourseId :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn Text
179+ccwsstiCourseId
180+ = lens _ccwsstiCourseId
181+ (\ s a -> s{_ccwsstiCourseId = a})
182+
183+-- | OAuth access token.
184+ccwsstiAccessToken :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn (Maybe Text)
185+ccwsstiAccessToken
186+ = lens _ccwsstiAccessToken
187+ (\ s a -> s{_ccwsstiAccessToken = a})
188+
189+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
190+ccwsstiUploadType :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn (Maybe Text)
191+ccwsstiUploadType
192+ = lens _ccwsstiUploadType
193+ (\ s a -> s{_ccwsstiUploadType = a})
194+
195+-- | Multipart request metadata.
196+ccwsstiPayload :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn TurnInStudentSubmissionRequest
197+ccwsstiPayload
198+ = lens _ccwsstiPayload
199+ (\ s a -> s{_ccwsstiPayload = a})
200+
201+-- | OAuth bearer token.
202+ccwsstiBearerToken :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn (Maybe Text)
203+ccwsstiBearerToken
204+ = lens _ccwsstiBearerToken
205+ (\ s a -> s{_ccwsstiBearerToken = a})
206+
207+-- | Identifier of the student submission.
208+ccwsstiId :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn Text
209+ccwsstiId
210+ = lens _ccwsstiId (\ s a -> s{_ccwsstiId = a})
211+
212+-- | JSONP
213+ccwsstiCallback :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn (Maybe Text)
214+ccwsstiCallback
215+ = lens _ccwsstiCallback
216+ (\ s a -> s{_ccwsstiCallback = a})
217+
218+-- | Identifier of the course work.
219+ccwsstiCourseWorkId :: Lens' CoursesCourseWorkStudentSubmissionsTurnIn Text
220+ccwsstiCourseWorkId
221+ = lens _ccwsstiCourseWorkId
222+ (\ s a -> s{_ccwsstiCourseWorkId = a})
223+
224+instance GoogleRequest
225+ CoursesCourseWorkStudentSubmissionsTurnIn where
226+ type Rs CoursesCourseWorkStudentSubmissionsTurnIn =
227+ Empty
228+ type Scopes CoursesCourseWorkStudentSubmissionsTurnIn
229+ =
230+ '["https://www.googleapis.com/auth/classroom.coursework.me"]
231+ requestClient
232+ CoursesCourseWorkStudentSubmissionsTurnIn'{..}
233+ = go _ccwsstiCourseId _ccwsstiCourseWorkId _ccwsstiId
234+ _ccwsstiXgafv
235+ _ccwsstiUploadProtocol
236+ (Just _ccwsstiPp)
237+ _ccwsstiAccessToken
238+ _ccwsstiUploadType
239+ _ccwsstiBearerToken
240+ _ccwsstiCallback
241+ (Just AltJSON)
242+ _ccwsstiPayload
243+ classroomService
244+ where go
245+ = buildClient
246+ (Proxy ::
247+ Proxy
248+ CoursesCourseWorkStudentSubmissionsTurnInResource)
249+ mempty
gogol-classroom/gogol-classroom.cabal+10
@@ -38,6 +38,16 @@ library
3838 , Network.Google.Resource.Classroom.Courses.Aliases.Create
3939 , Network.Google.Resource.Classroom.Courses.Aliases.Delete
4040 , Network.Google.Resource.Classroom.Courses.Aliases.List
41+ , Network.Google.Resource.Classroom.Courses.CourseWork.Create
42+ , Network.Google.Resource.Classroom.Courses.CourseWork.Get
43+ , Network.Google.Resource.Classroom.Courses.CourseWork.List
44+ , Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Get
45+ , Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.List
46+ , Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.ModifyAttachments
47+ , Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Patch
48+ , Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Reclaim
49+ , Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.Return
50+ , Network.Google.Resource.Classroom.Courses.CourseWork.StudentSubmissions.TurnIn
4151 , Network.Google.Resource.Classroom.Courses.Create
4252 , Network.Google.Resource.Classroom.Courses.Delete
4353 , Network.Google.Resource.Classroom.Courses.Get