@@ -161,12 +161,13 @@ cwCreationTime
161 = lens _cwCreationTime
161 = lens _cwCreationTime
162 (\ s a -> s{_cwCreationTime = a})
162 (\ s a -> s{_cwCreationTime = a})
164−-- | Status of this course work.. If unspecified, the default state is
164+-- | Status of this course work. If unspecified, the default state is
165-- \`DRAFT\`.
165-- \`DRAFT\`.
166cwState :: Lens' CourseWork (Maybe Text)
166cwState :: Lens' CourseWork (Maybe Text)
167cwState = lens _cwState (\ s a -> s{_cwState = a})
167cwState = lens _cwState (\ s a -> s{_cwState = a})
169−-- | Additional materials.
169+-- | Additional materials. CourseWork must have no more than 20 material
170cwMaterials :: Lens' CourseWork [Material]
171cwMaterials :: Lens' CourseWork [Material]
171cwMaterials
172cwMaterials
172 = lens _cwMaterials (\ s a -> s{_cwMaterials = a}) .
173 = lens _cwMaterials (\ s a -> s{_cwMaterials = a}) .
@@ -179,7 +180,8 @@ cwCourseId
179 = lens _cwCourseId (\ s a -> s{_cwCourseId = a})
180 = lens _cwCourseId (\ s a -> s{_cwCourseId = a})
181-- | Maximum grade for this course work. If zero or unspecified, this
182-- | 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
183cwMaxPoints :: Lens' CourseWork (Maybe Double)
185cwMaxPoints :: Lens' CourseWork (Maybe Double)
184cwMaxPoints
186cwMaxPoints
185 = lens _cwMaxPoints (\ s a -> s{_cwMaxPoints = a}) .
187 = lens _cwMaxPoints (\ s a -> s{_cwMaxPoints = a}) .
@@ -376,6 +378,91 @@ instance ToJSON DriveFile where
376 ("id" .=) <$> _dfId, ("title" .=) <$> _dfTitle,
378 ("id" .=) <$> _dfId, ("title" .=) <$> _dfTitle,
377 ("alternateLink" .=) <$> _dfAlternateLink])
379 ("alternateLink" .=) <$> _dfAlternateLink])
381+-- | An invitation to become the guardian of a specified user, sent to a
382+-- specified email address.
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)
393+-- | Creates a value of 'GuardianInvitation' with the minimum fields required to make a request.
395+-- Use one of the following lenses to modify other fields as desired:
397+-- * 'giCreationTime'
403+-- * 'giInvitationId'
405+-- * 'giInvitedEmailAddress'
407+ :: GuardianInvitation
410+ { _giCreationTime = Nothing
411+ , _giStudentId = Nothing
412+ , _giState = Nothing
413+ , _giInvitationId = Nothing
414+ , _giInvitedEmailAddress = Nothing
417+-- | The time that this invitation was created. Read-only.
418+giCreationTime :: Lens' GuardianInvitation (Maybe Text)
420+ = lens _giCreationTime
421+ (\ s a -> s{_giCreationTime = a})
423+-- | ID of the student (in standard format)
424+giStudentId :: Lens' GuardianInvitation (Maybe Text)
426+ = lens _giStudentId (\ s a -> s{_giStudentId = a})
428+-- | The state that this invitation is in.
429+giState :: Lens' GuardianInvitation (Maybe Text)
430+giState = lens _giState (\ s a -> s{_giState = a})
432+-- | Unique identifier for this invitation. Read-only.
433+giInvitationId :: Lens' GuardianInvitation (Maybe Text)
435+ = lens _giInvitationId
436+ (\ s a -> s{_giInvitationId = a})
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})
445+instance FromJSON GuardianInvitation where
447+ = withObject "GuardianInvitation"
449+ GuardianInvitation' <$>
450+ (o .:? "creationTime") <*> (o .:? "studentId") <*>
452+ <*> (o .:? "invitationId")
453+ <*> (o .:? "invitedEmailAddress"))
455+instance ToJSON GuardianInvitation where
456+ toJSON GuardianInvitation'{..}
459+ [("creationTime" .=) <$> _giCreationTime,
460+ ("studentId" .=) <$> _giStudentId,
461+ ("state" .=) <$> _giState,
462+ ("invitationId" .=) <$> _giInvitationId,
463+ ("invitedEmailAddress" .=) <$>
464+ _giInvitedEmailAddress])
379-- | Request to return a student submission.
466-- | Request to return a student submission.
381-- /See:/ 'returnStudentSubmissionRequest' smart constructor.
468-- /See:/ 'returnStudentSubmissionRequest' smart constructor.
@@ -650,7 +737,8 @@ modifyAttachmentsRequest =
650 { _marAddAttachments = Nothing
737 { _marAddAttachments = Nothing
740+-- | Attachments to add. A student submission may not have more than 20
653−-- | Attachments to add. This may only contain link attachments.
741+-- attachments. This may only contain link attachments.
654marAddAttachments :: Lens' ModifyAttachmentsRequest [Attachment]
742marAddAttachments :: Lens' ModifyAttachmentsRequest [Attachment]
655marAddAttachments
743marAddAttachments
656 = lens _marAddAttachments
744 = lens _marAddAttachments
@@ -882,6 +970,79 @@ instance ToJSON ListInvitationsResponse where
882 [("nextPageToken" .=) <$> _lirNextPageToken,
970 [("nextPageToken" .=) <$> _lirNextPageToken,
883 ("invitations" .=) <$> _lirInvitations])
971 ("invitations" .=) <$> _lirInvitations])
973+-- | Association between a student and a guardian of that student. The
974+-- guardian may receive information about the student\'s course work.
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)
984+-- | Creates a value of 'Guardian' with the minimum fields required to make a request.
986+-- Use one of the following lenses to modify other fields as desired:
992+-- * 'gInvitedEmailAddress'
994+-- * 'gGuardianProFile'
999+ { _gStudentId = Nothing
1000+ , _gGuardianId = Nothing
1001+ , _gInvitedEmailAddress = Nothing
1002+ , _gGuardianProFile = Nothing
1005+-- | Identifier for the student to whom the guardian relationship applies.
1006+gStudentId :: Lens' Guardian (Maybe Text)
1008+ = lens _gStudentId (\ s a -> s{_gStudentId = a})
1010+-- | Identifier for the guardian.
1011+gGuardianId :: Lens' Guardian (Maybe Text)
1013+ = lens _gGuardianId (\ s a -> s{_gGuardianId = a})
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})
1022+-- | User profile for the guardian.
1023+gGuardianProFile :: Lens' Guardian (Maybe UserProFile)
1025+ = lens _gGuardianProFile
1026+ (\ s a -> s{_gGuardianProFile = a})
1028+instance FromJSON Guardian where
1030+ = withObject "Guardian"
1033+ (o .:? "studentId") <*> (o .:? "guardianId") <*>
1034+ (o .:? "invitedEmailAddress")
1035+ <*> (o .:? "guardianProfile"))
1037+instance ToJSON Guardian where
1038+ toJSON Guardian'{..}
1041+ [("studentId" .=) <$> _gStudentId,
1042+ ("guardianId" .=) <$> _gGuardianId,
1043+ ("invitedEmailAddress" .=) <$> _gInvitedEmailAddress,
1044+ ("guardianProfile" .=) <$> _gGuardianProFile])
885-- | A material attached to a course as part of a material set.
1046-- | A material attached to a course as part of a material set.
887-- /See:/ 'courseMaterial' smart constructor.
1048-- /See:/ 'courseMaterial' smart constructor.
@@ -1203,7 +1364,7 @@ studentSubmission =
1203 , _ssCourseWorkId = Nothing
1364 , _ssCourseWorkId = Nothing
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
1207-- not accessed this item. Read-only.
1368-- not accessed this item. Read-only.
1208ssCreationTime :: Lens' StudentSubmission (Maybe Text)
1369ssCreationTime :: Lens' StudentSubmission (Maybe Text)
1209ssCreationTime
1370ssCreationTime
@@ -1223,7 +1384,7 @@ ssCourseId :: Lens' StudentSubmission (Maybe Text)
1223ssCourseId
1384ssCourseId
1224 = lens _ssCourseId (\ s a -> s{_ssCourseId = a})
1385 = lens _ssCourseId (\ s a -> s{_ssCourseId = a})
1226−-- | Submission content when course_work_type is MUTIPLE_CHOICE_QUESTION.
1387+-- | Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION.
1227ssMultipleChoiceSubmission :: Lens' StudentSubmission (Maybe MultipleChoiceSubmission)
1388ssMultipleChoiceSubmission :: Lens' StudentSubmission (Maybe MultipleChoiceSubmission)
1228ssMultipleChoiceSubmission
1389ssMultipleChoiceSubmission
1229 = lens _ssMultipleChoiceSubmission
1390 = lens _ssMultipleChoiceSubmission
@@ -1265,8 +1426,8 @@ ssCourseWorkType
1265 = lens _ssCourseWorkType
1426 = lens _ssCourseWorkType
1266 (\ s a -> s{_ssCourseWorkType = a})
1427 (\ s a -> s{_ssCourseWorkType = a})
1268−-- | Optional grade. If unset, no grade was set. This must be an integer
1429+-- | Optional grade. If unset, no grade was set. This must be a non-negative
1269−-- value. This may be modified only by course teachers.
1430+-- integer value. This may be modified only by course teachers.
1270ssAssignedGrade :: Lens' StudentSubmission (Maybe Double)
1431ssAssignedGrade :: Lens' StudentSubmission (Maybe Double)
1271ssAssignedGrade
1432ssAssignedGrade
1272 = lens _ssAssignedGrade
1433 = lens _ssAssignedGrade
@@ -1278,9 +1439,9 @@ ssAssignedGrade
1278ssId :: Lens' StudentSubmission (Maybe Text)
1439ssId :: Lens' StudentSubmission (Maybe Text)
1279ssId = lens _ssId (\ s a -> s{_ssId = a})
1440ssId = lens _ssId (\ s a -> s{_ssId = a})
1281−-- | Optional pending grade. If unset, no grade was set. This must be an
1442+-- | Optional pending grade. If unset, no grade was set. This must be a
1282−-- integer value. This is only visible to and modifiable by course
1443+-- non-negative integer value. This is only visible to and modifiable by
1283−-- teachers.
1444+-- course teachers.
1284ssDraftGrade :: Lens' StudentSubmission (Maybe Double)
1445ssDraftGrade :: Lens' StudentSubmission (Maybe Double)
1285ssDraftGrade
1446ssDraftGrade
1286 = lens _ssDraftGrade (\ s a -> s{_ssDraftGrade = a})
1447 = lens _ssDraftGrade (\ s a -> s{_ssDraftGrade = a})
@@ -1343,6 +1504,59 @@ instance ToJSON StudentSubmission where
1343 ("alternateLink" .=) <$> _ssAlternateLink,
1504 ("alternateLink" .=) <$> _ssAlternateLink,
1344 ("courseWorkId" .=) <$> _ssCourseWorkId])
1505 ("courseWorkId" .=) <$> _ssCourseWorkId])
1507+-- | Response when listing guardians.
1509+-- /See:/ 'listGuardiansResponse' smart constructor.
1510+data ListGuardiansResponse = ListGuardiansResponse'
1511+ { _lgrNextPageToken :: !(Maybe Text)
1512+ , _lgrGuardians :: !(Maybe [Guardian])
1513+ } deriving (Eq,Show,Data,Typeable,Generic)
1515+-- | Creates a value of 'ListGuardiansResponse' with the minimum fields required to make a request.
1517+-- Use one of the following lenses to modify other fields as desired:
1519+-- * 'lgrNextPageToken'
1522+listGuardiansResponse
1523+ :: ListGuardiansResponse
1524+listGuardiansResponse =
1525+ ListGuardiansResponse'
1526+ { _lgrNextPageToken = Nothing
1527+ , _lgrGuardians = Nothing
1530+-- | Token identifying the next page of results to return. If empty, no
1531+-- further results are available.
1532+lgrNextPageToken :: Lens' ListGuardiansResponse (Maybe Text)
1534+ = lens _lgrNextPageToken
1535+ (\ s a -> s{_lgrNextPageToken = a})
1537+-- | Guardians on this page of results that met the criteria specified in the
1539+lgrGuardians :: Lens' ListGuardiansResponse [Guardian]
1541+ = lens _lgrGuardians (\ s a -> s{_lgrGuardians = a})
1545+instance FromJSON ListGuardiansResponse where
1547+ = withObject "ListGuardiansResponse"
1549+ ListGuardiansResponse' <$>
1550+ (o .:? "nextPageToken") <*>
1551+ (o .:? "guardians" .!= mempty))
1553+instance ToJSON ListGuardiansResponse where
1554+ toJSON ListGuardiansResponse'{..}
1557+ [("nextPageToken" .=) <$> _lgrNextPageToken,
1558+ ("guardians" .=) <$> _lgrGuardians])
1346-- | Represents a whole calendar date, e.g. date of birth. The time of day
1560-- | 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
1561-- 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
1562-- date is relative to the Proleptic Gregorian Calendar. The day may be 0
@@ -1905,6 +2119,7 @@ data Course = Course'
1905 , _cTeacherGroupEmail :: !(Maybe Text)
2119 , _cTeacherGroupEmail :: !(Maybe Text)
1906 , _cTeacherFolder :: !(Maybe DriveFolder)
2120 , _cTeacherFolder :: !(Maybe DriveFolder)
1907 , _cCourseState :: !(Maybe Text)
2121 , _cCourseState :: !(Maybe Text)
2122+ , _cGuardiansEnabled :: !(Maybe Bool)
1908 , _cEnrollmentCode :: !(Maybe Text)
2123 , _cEnrollmentCode :: !(Maybe Text)
1909 , _cUpdateTime :: !(Maybe Text)
2124 , _cUpdateTime :: !(Maybe Text)
1910 , _cOwnerId :: !(Maybe Text)
2125 , _cOwnerId :: !(Maybe Text)
@@ -1933,6 +2148,8 @@ data Course = Course'
1934-- * 'cCourseState'
2149-- * 'cCourseState'
2151+-- * 'cGuardiansEnabled'
1936-- * 'cEnrollmentCode'
2153-- * 'cEnrollmentCode'
1938-- * 'cUpdateTime'
2155-- * 'cUpdateTime'
@@ -1962,6 +2179,7 @@ course =
1962 , _cTeacherGroupEmail = Nothing
2179 , _cTeacherGroupEmail = Nothing
1963 , _cTeacherFolder = Nothing
2180 , _cTeacherFolder = Nothing
1964 , _cCourseState = Nothing
2181 , _cCourseState = Nothing
2182+ , _cGuardiansEnabled = Nothing
1965 , _cEnrollmentCode = Nothing
2183 , _cEnrollmentCode = Nothing
1966 , _cUpdateTime = Nothing
2184 , _cUpdateTime = Nothing
1967 , _cOwnerId = Nothing
2185 , _cOwnerId = Nothing
@@ -2017,6 +2235,13 @@ cCourseState :: Lens' Course (Maybe Text)
2017cCourseState
2235cCourseState
2018 = lens _cCourseState (\ s a -> s{_cCourseState = a})
2236 = lens _cCourseState (\ s a -> s{_cCourseState = a})
2238+-- | Whether or not guardian notifications are enabled for this course.
2240+cGuardiansEnabled :: Lens' Course (Maybe Bool)
2242+ = lens _cGuardiansEnabled
2243+ (\ s a -> s{_cGuardiansEnabled = a})
2020-- | Enrollment code to use when joining this course. Specifying this field
2245-- | Enrollment code to use when joining this course. Specifying this field
2021-- in a course update mask results in an error. Read-only.
2246-- in a course update mask results in an error. Read-only.
2022cEnrollmentCode :: Lens' Course (Maybe Text)
2247cEnrollmentCode :: Lens' Course (Maybe Text)
@@ -2099,6 +2324,7 @@ instance FromJSON Course where
2099 <*> (o .:? "teacherGroupEmail")
2324 <*> (o .:? "teacherGroupEmail")
2100 <*> (o .:? "teacherFolder")
2325 <*> (o .:? "teacherFolder")
2101 <*> (o .:? "courseState")
2326 <*> (o .:? "courseState")
2327+ <*> (o .:? "guardiansEnabled")
2102 <*> (o .:? "enrollmentCode")
2328 <*> (o .:? "enrollmentCode")
2103 <*> (o .:? "updateTime")
2329 <*> (o .:? "updateTime")
2104 <*> (o .:? "ownerId")
2330 <*> (o .:? "ownerId")
@@ -2120,6 +2346,7 @@ instance ToJSON Course where
2120 ("teacherGroupEmail" .=) <$> _cTeacherGroupEmail,
2346 ("teacherGroupEmail" .=) <$> _cTeacherGroupEmail,
2121 ("teacherFolder" .=) <$> _cTeacherFolder,
2347 ("teacherFolder" .=) <$> _cTeacherFolder,
2122 ("courseState" .=) <$> _cCourseState,
2348 ("courseState" .=) <$> _cCourseState,
2349+ ("guardiansEnabled" .=) <$> _cGuardiansEnabled,
2123 ("enrollmentCode" .=) <$> _cEnrollmentCode,
2350 ("enrollmentCode" .=) <$> _cEnrollmentCode,
2124 ("updateTime" .=) <$> _cUpdateTime,
2351 ("updateTime" .=) <$> _cUpdateTime,
2125 ("ownerId" .=) <$> _cOwnerId, ("name" .=) <$> _cName,
2352 ("ownerId" .=) <$> _cOwnerId, ("name" .=) <$> _cName,
@@ -2209,6 +2436,61 @@ instance ToJSON TimeOfDay' where
2209 ("minutes" .=) <$> _todMinutes,
2436 ("minutes" .=) <$> _todMinutes,
2210 ("seconds" .=) <$> _todSeconds])
2437 ("seconds" .=) <$> _todSeconds])
2439+-- | Response when listing guardian invitations.
2441+-- /See:/ 'listGuardianInvitationsResponse' smart constructor.
2442+data ListGuardianInvitationsResponse = ListGuardianInvitationsResponse'
2443+ { _lgirNextPageToken :: !(Maybe Text)
2444+ , _lgirGuardianInvitations :: !(Maybe [GuardianInvitation])
2445+ } deriving (Eq,Show,Data,Typeable,Generic)
2447+-- | Creates a value of 'ListGuardianInvitationsResponse' with the minimum fields required to make a request.
2449+-- Use one of the following lenses to modify other fields as desired:
2451+-- * 'lgirNextPageToken'
2453+-- * 'lgirGuardianInvitations'
2454+listGuardianInvitationsResponse
2455+ :: ListGuardianInvitationsResponse
2456+listGuardianInvitationsResponse =
2457+ ListGuardianInvitationsResponse'
2458+ { _lgirNextPageToken = Nothing
2459+ , _lgirGuardianInvitations = Nothing
2462+-- | Token identifying the next page of results to return. If empty, no
2463+-- further results are available.
2464+lgirNextPageToken :: Lens' ListGuardianInvitationsResponse (Maybe Text)
2466+ = lens _lgirNextPageToken
2467+ (\ s a -> s{_lgirNextPageToken = a})
2469+-- | Guardian invitations that matched the list request.
2470+lgirGuardianInvitations :: Lens' ListGuardianInvitationsResponse [GuardianInvitation]
2471+lgirGuardianInvitations
2472+ = lens _lgirGuardianInvitations
2473+ (\ s a -> s{_lgirGuardianInvitations = a})
2477+instance FromJSON ListGuardianInvitationsResponse
2480+ = withObject "ListGuardianInvitationsResponse"
2482+ ListGuardianInvitationsResponse' <$>
2483+ (o .:? "nextPageToken") <*>
2484+ (o .:? "guardianInvitations" .!= mempty))
2486+instance ToJSON ListGuardianInvitationsResponse where
2487+ toJSON ListGuardianInvitationsResponse'{..}
2490+ [("nextPageToken" .=) <$> _lgirNextPageToken,
2491+ ("guardianInvitations" .=) <$>
2492+ _lgirGuardianInvitations])
2212-- | Additional details for assignments.
2494-- | Additional details for assignments.
2214-- /See:/ 'assignment' smart constructor.
2496-- /See:/ 'assignment' smart constructor.