@@ -161,12 +161,13 @@ cwCreationTime
161161 = lens _cwCreationTime
162162 (\ s a -> s{_cwCreationTime = a})
163163
164−-- | Status of this course work.. If unspecified, the default state is
164+-- | Status of this course work. If unspecified, the default state is
165165-- \`DRAFT\`.
166166cwState :: Lens' CourseWork (Maybe Text)
167167cwState = lens _cwState (\ s a -> s{_cwState = a})
168168
169−-- | Additional materials.
169+-- | Additional materials. CourseWork must have no more than 20 material
170+-- items.
170171cwMaterials :: Lens' CourseWork [Material]
171172cwMaterials
172173 = lens _cwMaterials (\ s a -> s{_cwMaterials = a}) .
@@ -179,7 +180,8 @@ cwCourseId
179180 = lens _cwCourseId (\ s a -> s{_cwCourseId = a})
180181
181182-- | Maximum grade for this course work. If zero or unspecified, this
182−-- assignment is considered ungraded. This must be an integer value.
183+-- assignment is considered ungraded. This must be a non-negative integer
184+-- value.
183185cwMaxPoints :: Lens' CourseWork (Maybe Double)
184186cwMaxPoints
185187 = lens _cwMaxPoints (\ s a -> s{_cwMaxPoints = a}) .
@@ -376,6 +378,91 @@ instance ToJSON DriveFile where
376378 ("id" .=) <$> _dfId, ("title" .=) <$> _dfTitle,
377379 ("alternateLink" .=) <$> _dfAlternateLink])
378380
381+-- | An invitation to become the guardian of a specified user, sent to a
382+-- specified email address.
383+--
384+-- /See:/ 'guardianInvitation' smart constructor.
385+data GuardianInvitation = GuardianInvitation'
386+ { _giCreationTime :: !(Maybe Text)
387+ , _giStudentId :: !(Maybe Text)
388+ , _giState :: !(Maybe Text)
389+ , _giInvitationId :: !(Maybe Text)
390+ , _giInvitedEmailAddress :: !(Maybe Text)
391+ } deriving (Eq,Show,Data,Typeable,Generic)
392+
393+-- | Creates a value of 'GuardianInvitation' with the minimum fields required to make a request.
394+--
395+-- Use one of the following lenses to modify other fields as desired:
396+--
397+-- * 'giCreationTime'
398+--
399+-- * 'giStudentId'
400+--
401+-- * 'giState'
402+--
403+-- * 'giInvitationId'
404+--
405+-- * 'giInvitedEmailAddress'
406+guardianInvitation
407+ :: GuardianInvitation
408+guardianInvitation =
409+ GuardianInvitation'
410+ { _giCreationTime = Nothing
411+ , _giStudentId = Nothing
412+ , _giState = Nothing
413+ , _giInvitationId = Nothing
414+ , _giInvitedEmailAddress = Nothing
415+ }
416+
417+-- | The time that this invitation was created. Read-only.
418+giCreationTime :: Lens' GuardianInvitation (Maybe Text)
419+giCreationTime
420+ = lens _giCreationTime
421+ (\ s a -> s{_giCreationTime = a})
422+
423+-- | ID of the student (in standard format)
424+giStudentId :: Lens' GuardianInvitation (Maybe Text)
425+giStudentId
426+ = lens _giStudentId (\ s a -> s{_giStudentId = a})
427+
428+-- | The state that this invitation is in.
429+giState :: Lens' GuardianInvitation (Maybe Text)
430+giState = lens _giState (\ s a -> s{_giState = a})
431+
432+-- | Unique identifier for this invitation. Read-only.
433+giInvitationId :: Lens' GuardianInvitation (Maybe Text)
434+giInvitationId
435+ = lens _giInvitationId
436+ (\ s a -> s{_giInvitationId = a})
437+
438+-- | Email address that the invitation was sent to. This field is only
439+-- visible to domain administrators.
440+giInvitedEmailAddress :: Lens' GuardianInvitation (Maybe Text)
441+giInvitedEmailAddress
442+ = lens _giInvitedEmailAddress
443+ (\ s a -> s{_giInvitedEmailAddress = a})
444+
445+instance FromJSON GuardianInvitation where
446+ parseJSON
447+ = withObject "GuardianInvitation"
448+ (\ o ->
449+ GuardianInvitation' <$>
450+ (o .:? "creationTime") <*> (o .:? "studentId") <*>
451+ (o .:? "state")
452+ <*> (o .:? "invitationId")
453+ <*> (o .:? "invitedEmailAddress"))
454+
455+instance ToJSON GuardianInvitation where
456+ toJSON GuardianInvitation'{..}
457+ = object
458+ (catMaybes
459+ [("creationTime" .=) <$> _giCreationTime,
460+ ("studentId" .=) <$> _giStudentId,
461+ ("state" .=) <$> _giState,
462+ ("invitationId" .=) <$> _giInvitationId,
463+ ("invitedEmailAddress" .=) <$>
464+ _giInvitedEmailAddress])
465+
379466-- | Request to return a student submission.
380467--
381468-- /See:/ 'returnStudentSubmissionRequest' smart constructor.
@@ -650,7 +737,8 @@ modifyAttachmentsRequest =
650737 { _marAddAttachments = Nothing
651738 }
652739
653−-- | Attachments to add. This may only contain link attachments.
740+-- | Attachments to add. A student submission may not have more than 20
741+-- attachments. This may only contain link attachments.
654742marAddAttachments :: Lens' ModifyAttachmentsRequest [Attachment]
655743marAddAttachments
656744 = lens _marAddAttachments
@@ -882,6 +970,79 @@ instance ToJSON ListInvitationsResponse where
882970 [("nextPageToken" .=) <$> _lirNextPageToken,
883971 ("invitations" .=) <$> _lirInvitations])
884972
973+-- | Association between a student and a guardian of that student. The
974+-- guardian may receive information about the student\'s course work.
975+--
976+-- /See:/ 'guardian' smart constructor.
977+data Guardian = Guardian'
978+ { _gStudentId :: !(Maybe Text)
979+ , _gGuardianId :: !(Maybe Text)
980+ , _gInvitedEmailAddress :: !(Maybe Text)
981+ , _gGuardianProFile :: !(Maybe UserProFile)
982+ } deriving (Eq,Show,Data,Typeable,Generic)
983+
984+-- | Creates a value of 'Guardian' with the minimum fields required to make a request.
985+--
986+-- Use one of the following lenses to modify other fields as desired:
987+--
988+-- * 'gStudentId'
989+--
990+-- * 'gGuardianId'
991+--
992+-- * 'gInvitedEmailAddress'
993+--
994+-- * 'gGuardianProFile'
995+guardian
996+ :: Guardian
997+guardian =
998+ Guardian'
999+ { _gStudentId = Nothing
1000+ , _gGuardianId = Nothing
1001+ , _gInvitedEmailAddress = Nothing
1002+ , _gGuardianProFile = Nothing
1003+ }
1004+
1005+-- | Identifier for the student to whom the guardian relationship applies.
1006+gStudentId :: Lens' Guardian (Maybe Text)
1007+gStudentId
1008+ = lens _gStudentId (\ s a -> s{_gStudentId = a})
1009+
1010+-- | Identifier for the guardian.
1011+gGuardianId :: Lens' Guardian (Maybe Text)
1012+gGuardianId
1013+ = lens _gGuardianId (\ s a -> s{_gGuardianId = a})
1014+
1015+-- | The email address to which the initial guardian invitation was sent.
1016+-- This field is only visible to domain administrators.
1017+gInvitedEmailAddress :: Lens' Guardian (Maybe Text)
1018+gInvitedEmailAddress
1019+ = lens _gInvitedEmailAddress
1020+ (\ s a -> s{_gInvitedEmailAddress = a})
1021+
1022+-- | User profile for the guardian.
1023+gGuardianProFile :: Lens' Guardian (Maybe UserProFile)
1024+gGuardianProFile
1025+ = lens _gGuardianProFile
1026+ (\ s a -> s{_gGuardianProFile = a})
1027+
1028+instance FromJSON Guardian where
1029+ parseJSON
1030+ = withObject "Guardian"
1031+ (\ o ->
1032+ Guardian' <$>
1033+ (o .:? "studentId") <*> (o .:? "guardianId") <*>
1034+ (o .:? "invitedEmailAddress")
1035+ <*> (o .:? "guardianProfile"))
1036+
1037+instance ToJSON Guardian where
1038+ toJSON Guardian'{..}
1039+ = object
1040+ (catMaybes
1041+ [("studentId" .=) <$> _gStudentId,
1042+ ("guardianId" .=) <$> _gGuardianId,
1043+ ("invitedEmailAddress" .=) <$> _gInvitedEmailAddress,
1044+ ("guardianProfile" .=) <$> _gGuardianProFile])
1045+
8851046-- | A material attached to a course as part of a material set.
8861047--
8871048-- /See:/ 'courseMaterial' smart constructor.
@@ -1203,7 +1364,7 @@ studentSubmission =
12031364 , _ssCourseWorkId = Nothing
12041365 }
12051366
1206−-- | Creation time of this submission.. This may be unset if the student has
1367+-- | Creation time of this submission. This may be unset if the student has
12071368-- not accessed this item. Read-only.
12081369ssCreationTime :: Lens' StudentSubmission (Maybe Text)
12091370ssCreationTime
@@ -1223,7 +1384,7 @@ ssCourseId :: Lens' StudentSubmission (Maybe Text)
12231384ssCourseId
12241385 = lens _ssCourseId (\ s a -> s{_ssCourseId = a})
12251386
1226−-- | Submission content when course_work_type is MUTIPLE_CHOICE_QUESTION.
1387+-- | Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION.
12271388ssMultipleChoiceSubmission :: Lens' StudentSubmission (Maybe MultipleChoiceSubmission)
12281389ssMultipleChoiceSubmission
12291390 = lens _ssMultipleChoiceSubmission
@@ -1265,8 +1426,8 @@ ssCourseWorkType
12651426 = lens _ssCourseWorkType
12661427 (\ s a -> s{_ssCourseWorkType = a})
12671428
1268−-- | Optional grade. If unset, no grade was set. This must be an integer
1269−-- value. This may be modified only by course teachers.
1429+-- | Optional grade. If unset, no grade was set. This must be a non-negative
1430+-- integer value. This may be modified only by course teachers.
12701431ssAssignedGrade :: Lens' StudentSubmission (Maybe Double)
12711432ssAssignedGrade
12721433 = lens _ssAssignedGrade
@@ -1278,9 +1439,9 @@ ssAssignedGrade
12781439ssId :: Lens' StudentSubmission (Maybe Text)
12791440ssId = lens _ssId (\ s a -> s{_ssId = a})
12801441
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.
1442+-- | Optional pending grade. If unset, no grade was set. This must be a
1443+-- non-negative integer value. This is only visible to and modifiable by
1444+-- course teachers.
12841445ssDraftGrade :: Lens' StudentSubmission (Maybe Double)
12851446ssDraftGrade
12861447 = lens _ssDraftGrade (\ s a -> s{_ssDraftGrade = a})
@@ -1343,6 +1504,59 @@ instance ToJSON StudentSubmission where
13431504 ("alternateLink" .=) <$> _ssAlternateLink,
13441505 ("courseWorkId" .=) <$> _ssCourseWorkId])
13451506
1507+-- | Response when listing guardians.
1508+--
1509+-- /See:/ 'listGuardiansResponse' smart constructor.
1510+data ListGuardiansResponse = ListGuardiansResponse'
1511+ { _lgrNextPageToken :: !(Maybe Text)
1512+ , _lgrGuardians :: !(Maybe [Guardian])
1513+ } deriving (Eq,Show,Data,Typeable,Generic)
1514+
1515+-- | Creates a value of 'ListGuardiansResponse' with the minimum fields required to make a request.
1516+--
1517+-- Use one of the following lenses to modify other fields as desired:
1518+--
1519+-- * 'lgrNextPageToken'
1520+--
1521+-- * 'lgrGuardians'
1522+listGuardiansResponse
1523+ :: ListGuardiansResponse
1524+listGuardiansResponse =
1525+ ListGuardiansResponse'
1526+ { _lgrNextPageToken = Nothing
1527+ , _lgrGuardians = Nothing
1528+ }
1529+
1530+-- | Token identifying the next page of results to return. If empty, no
1531+-- further results are available.
1532+lgrNextPageToken :: Lens' ListGuardiansResponse (Maybe Text)
1533+lgrNextPageToken
1534+ = lens _lgrNextPageToken
1535+ (\ s a -> s{_lgrNextPageToken = a})
1536+
1537+-- | Guardians on this page of results that met the criteria specified in the
1538+-- request.
1539+lgrGuardians :: Lens' ListGuardiansResponse [Guardian]
1540+lgrGuardians
1541+ = lens _lgrGuardians (\ s a -> s{_lgrGuardians = a})
1542+ . _Default
1543+ . _Coerce
1544+
1545+instance FromJSON ListGuardiansResponse where
1546+ parseJSON
1547+ = withObject "ListGuardiansResponse"
1548+ (\ o ->
1549+ ListGuardiansResponse' <$>
1550+ (o .:? "nextPageToken") <*>
1551+ (o .:? "guardians" .!= mempty))
1552+
1553+instance ToJSON ListGuardiansResponse where
1554+ toJSON ListGuardiansResponse'{..}
1555+ = object
1556+ (catMaybes
1557+ [("nextPageToken" .=) <$> _lgrNextPageToken,
1558+ ("guardians" .=) <$> _lgrGuardians])
1559+
13461560-- | Represents a whole calendar date, e.g. date of birth. The time of day
13471561-- and time zone are either specified elsewhere or are not significant. The
13481562-- date is relative to the Proleptic Gregorian Calendar. The day may be 0
@@ -1905,6 +2119,7 @@ data Course = Course'
19052119 , _cTeacherGroupEmail :: !(Maybe Text)
19062120 , _cTeacherFolder :: !(Maybe DriveFolder)
19072121 , _cCourseState :: !(Maybe Text)
2122+ , _cGuardiansEnabled :: !(Maybe Bool)
19082123 , _cEnrollmentCode :: !(Maybe Text)
19092124 , _cUpdateTime :: !(Maybe Text)
19102125 , _cOwnerId :: !(Maybe Text)
@@ -1933,6 +2148,8 @@ data Course = Course'
19332148--
19342149-- * 'cCourseState'
19352150--
2151+-- * 'cGuardiansEnabled'
2152+--
19362153-- * 'cEnrollmentCode'
19372154--
19382155-- * 'cUpdateTime'
@@ -1962,6 +2179,7 @@ course =
19622179 , _cTeacherGroupEmail = Nothing
19632180 , _cTeacherFolder = Nothing
19642181 , _cCourseState = Nothing
2182+ , _cGuardiansEnabled = Nothing
19652183 , _cEnrollmentCode = Nothing
19662184 , _cUpdateTime = Nothing
19672185 , _cOwnerId = Nothing
@@ -2017,6 +2235,13 @@ cCourseState :: Lens' Course (Maybe Text)
20172235cCourseState
20182236 = lens _cCourseState (\ s a -> s{_cCourseState = a})
20192237
2238+-- | Whether or not guardian notifications are enabled for this course.
2239+-- Read-only.
2240+cGuardiansEnabled :: Lens' Course (Maybe Bool)
2241+cGuardiansEnabled
2242+ = lens _cGuardiansEnabled
2243+ (\ s a -> s{_cGuardiansEnabled = a})
2244+
20202245-- | Enrollment code to use when joining this course. Specifying this field
20212246-- in a course update mask results in an error. Read-only.
20222247cEnrollmentCode :: Lens' Course (Maybe Text)
@@ -2099,6 +2324,7 @@ instance FromJSON Course where
20992324 <*> (o .:? "teacherGroupEmail")
21002325 <*> (o .:? "teacherFolder")
21012326 <*> (o .:? "courseState")
2327+ <*> (o .:? "guardiansEnabled")
21022328 <*> (o .:? "enrollmentCode")
21032329 <*> (o .:? "updateTime")
21042330 <*> (o .:? "ownerId")
@@ -2120,6 +2346,7 @@ instance ToJSON Course where
21202346 ("teacherGroupEmail" .=) <$> _cTeacherGroupEmail,
21212347 ("teacherFolder" .=) <$> _cTeacherFolder,
21222348 ("courseState" .=) <$> _cCourseState,
2349+ ("guardiansEnabled" .=) <$> _cGuardiansEnabled,
21232350 ("enrollmentCode" .=) <$> _cEnrollmentCode,
21242351 ("updateTime" .=) <$> _cUpdateTime,
21252352 ("ownerId" .=) <$> _cOwnerId, ("name" .=) <$> _cName,
@@ -2209,6 +2436,61 @@ instance ToJSON TimeOfDay' where
22092436 ("minutes" .=) <$> _todMinutes,
22102437 ("seconds" .=) <$> _todSeconds])
22112438
2439+-- | Response when listing guardian invitations.
2440+--
2441+-- /See:/ 'listGuardianInvitationsResponse' smart constructor.
2442+data ListGuardianInvitationsResponse = ListGuardianInvitationsResponse'
2443+ { _lgirNextPageToken :: !(Maybe Text)
2444+ , _lgirGuardianInvitations :: !(Maybe [GuardianInvitation])
2445+ } deriving (Eq,Show,Data,Typeable,Generic)
2446+
2447+-- | Creates a value of 'ListGuardianInvitationsResponse' with the minimum fields required to make a request.
2448+--
2449+-- Use one of the following lenses to modify other fields as desired:
2450+--
2451+-- * 'lgirNextPageToken'
2452+--
2453+-- * 'lgirGuardianInvitations'
2454+listGuardianInvitationsResponse
2455+ :: ListGuardianInvitationsResponse
2456+listGuardianInvitationsResponse =
2457+ ListGuardianInvitationsResponse'
2458+ { _lgirNextPageToken = Nothing
2459+ , _lgirGuardianInvitations = Nothing
2460+ }
2461+
2462+-- | Token identifying the next page of results to return. If empty, no
2463+-- further results are available.
2464+lgirNextPageToken :: Lens' ListGuardianInvitationsResponse (Maybe Text)
2465+lgirNextPageToken
2466+ = lens _lgirNextPageToken
2467+ (\ s a -> s{_lgirNextPageToken = a})
2468+
2469+-- | Guardian invitations that matched the list request.
2470+lgirGuardianInvitations :: Lens' ListGuardianInvitationsResponse [GuardianInvitation]
2471+lgirGuardianInvitations
2472+ = lens _lgirGuardianInvitations
2473+ (\ s a -> s{_lgirGuardianInvitations = a})
2474+ . _Default
2475+ . _Coerce
2476+
2477+instance FromJSON ListGuardianInvitationsResponse
2478+ where
2479+ parseJSON
2480+ = withObject "ListGuardianInvitationsResponse"
2481+ (\ o ->
2482+ ListGuardianInvitationsResponse' <$>
2483+ (o .:? "nextPageToken") <*>
2484+ (o .:? "guardianInvitations" .!= mempty))
2485+
2486+instance ToJSON ListGuardianInvitationsResponse where
2487+ toJSON ListGuardianInvitationsResponse'{..}
2488+ = object
2489+ (catMaybes
2490+ [("nextPageToken" .=) <$> _lgirNextPageToken,
2491+ ("guardianInvitations" .=) <$>
2492+ _lgirGuardianInvitations])
2493+
22122494-- | Additional details for assignments.
22132495--
22142496-- /See:/ 'assignment' smart constructor.