@@ -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])