{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Classroom.Types.Product where
import Network.Google.Classroom.Types.Sum
import Network.Google.Prelude
data ListCourseAliasesResponse = ListCourseAliasesResponse'
{ _lcarNextPageToken :: !(Maybe Text)
, _lcarAliases :: !(Maybe [CourseAlias])
} deriving (Eq,Show,Data,Typeable,Generic)
listCourseAliasesResponse
:: ListCourseAliasesResponse
listCourseAliasesResponse =
ListCourseAliasesResponse'
{ _lcarNextPageToken = Nothing
, _lcarAliases = Nothing
}
lcarNextPageToken :: Lens' ListCourseAliasesResponse (Maybe Text)
lcarNextPageToken
= lens _lcarNextPageToken
(\ s a -> s{_lcarNextPageToken = a})
lcarAliases :: Lens' ListCourseAliasesResponse [CourseAlias]
lcarAliases
= lens _lcarAliases (\ s a -> s{_lcarAliases = a}) .
_Default
. _Coerce
instance FromJSON ListCourseAliasesResponse where
parseJSON
= withObject "ListCourseAliasesResponse"
(\ o ->
ListCourseAliasesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "aliases" .!= mempty))
instance ToJSON ListCourseAliasesResponse where
toJSON ListCourseAliasesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lcarNextPageToken,
("aliases" .=) <$> _lcarAliases])
data CourseWork = CourseWork'
{ _cwCreationTime :: !(Maybe DateTime')
, _cwScheduledTime :: !(Maybe DateTime')
, _cwState :: !(Maybe CourseWorkState)
, _cwAssigneeMode :: !(Maybe CourseWorkAssigneeMode)
, _cwMaterials :: !(Maybe [Material])
, _cwCourseId :: !(Maybe Text)
, _cwIndividualStudentsOptions :: !(Maybe IndividualStudentsOptions)
, _cwMaxPoints :: !(Maybe (Textual Double))
, _cwWorkType :: !(Maybe CourseWorkWorkType)
, _cwDueTime :: !(Maybe TimeOfDay')
, _cwAssociatedWithDeveloper :: !(Maybe Bool)
, _cwUpdateTime :: !(Maybe DateTime')
, _cwMultipleChoiceQuestion :: !(Maybe MultipleChoiceQuestion)
, _cwId :: !(Maybe Text)
, _cwSubmissionModificationMode :: !(Maybe CourseWorkSubmissionModificationMode)
, _cwDueDate :: !(Maybe Date)
, _cwCreatorUserId :: !(Maybe Text)
, _cwTitle :: !(Maybe Text)
, _cwAlternateLink :: !(Maybe Text)
, _cwAssignment :: !(Maybe Assignment)
, _cwDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
courseWork
:: CourseWork
courseWork =
CourseWork'
{ _cwCreationTime = Nothing
, _cwScheduledTime = Nothing
, _cwState = Nothing
, _cwAssigneeMode = Nothing
, _cwMaterials = Nothing
, _cwCourseId = Nothing
, _cwIndividualStudentsOptions = Nothing
, _cwMaxPoints = Nothing
, _cwWorkType = Nothing
, _cwDueTime = Nothing
, _cwAssociatedWithDeveloper = Nothing
, _cwUpdateTime = Nothing
, _cwMultipleChoiceQuestion = Nothing
, _cwId = Nothing
, _cwSubmissionModificationMode = Nothing
, _cwDueDate = Nothing
, _cwCreatorUserId = Nothing
, _cwTitle = Nothing
, _cwAlternateLink = Nothing
, _cwAssignment = Nothing
, _cwDescription = Nothing
}
cwCreationTime :: Lens' CourseWork (Maybe UTCTime)
cwCreationTime
= lens _cwCreationTime
(\ s a -> s{_cwCreationTime = a})
. mapping _DateTime
cwScheduledTime :: Lens' CourseWork (Maybe UTCTime)
cwScheduledTime
= lens _cwScheduledTime
(\ s a -> s{_cwScheduledTime = a})
. mapping _DateTime
cwState :: Lens' CourseWork (Maybe CourseWorkState)
cwState = lens _cwState (\ s a -> s{_cwState = a})
cwAssigneeMode :: Lens' CourseWork (Maybe CourseWorkAssigneeMode)
cwAssigneeMode
= lens _cwAssigneeMode
(\ s a -> s{_cwAssigneeMode = a})
cwMaterials :: Lens' CourseWork [Material]
cwMaterials
= lens _cwMaterials (\ s a -> s{_cwMaterials = a}) .
_Default
. _Coerce
cwCourseId :: Lens' CourseWork (Maybe Text)
cwCourseId
= lens _cwCourseId (\ s a -> s{_cwCourseId = a})
cwIndividualStudentsOptions :: Lens' CourseWork (Maybe IndividualStudentsOptions)
cwIndividualStudentsOptions
= lens _cwIndividualStudentsOptions
(\ s a -> s{_cwIndividualStudentsOptions = a})
cwMaxPoints :: Lens' CourseWork (Maybe Double)
cwMaxPoints
= lens _cwMaxPoints (\ s a -> s{_cwMaxPoints = a}) .
mapping _Coerce
cwWorkType :: Lens' CourseWork (Maybe CourseWorkWorkType)
cwWorkType
= lens _cwWorkType (\ s a -> s{_cwWorkType = a})
cwDueTime :: Lens' CourseWork (Maybe TimeOfDay')
cwDueTime
= lens _cwDueTime (\ s a -> s{_cwDueTime = a})
cwAssociatedWithDeveloper :: Lens' CourseWork (Maybe Bool)
cwAssociatedWithDeveloper
= lens _cwAssociatedWithDeveloper
(\ s a -> s{_cwAssociatedWithDeveloper = a})
cwUpdateTime :: Lens' CourseWork (Maybe UTCTime)
cwUpdateTime
= lens _cwUpdateTime (\ s a -> s{_cwUpdateTime = a})
. mapping _DateTime
cwMultipleChoiceQuestion :: Lens' CourseWork (Maybe MultipleChoiceQuestion)
cwMultipleChoiceQuestion
= lens _cwMultipleChoiceQuestion
(\ s a -> s{_cwMultipleChoiceQuestion = a})
cwId :: Lens' CourseWork (Maybe Text)
cwId = lens _cwId (\ s a -> s{_cwId = a})
cwSubmissionModificationMode :: Lens' CourseWork (Maybe CourseWorkSubmissionModificationMode)
cwSubmissionModificationMode
= lens _cwSubmissionModificationMode
(\ s a -> s{_cwSubmissionModificationMode = a})
cwDueDate :: Lens' CourseWork (Maybe Date)
cwDueDate
= lens _cwDueDate (\ s a -> s{_cwDueDate = a})
cwCreatorUserId :: Lens' CourseWork (Maybe Text)
cwCreatorUserId
= lens _cwCreatorUserId
(\ s a -> s{_cwCreatorUserId = a})
cwTitle :: Lens' CourseWork (Maybe Text)
cwTitle = lens _cwTitle (\ s a -> s{_cwTitle = a})
cwAlternateLink :: Lens' CourseWork (Maybe Text)
cwAlternateLink
= lens _cwAlternateLink
(\ s a -> s{_cwAlternateLink = a})
cwAssignment :: Lens' CourseWork (Maybe Assignment)
cwAssignment
= lens _cwAssignment (\ s a -> s{_cwAssignment = a})
cwDescription :: Lens' CourseWork (Maybe Text)
cwDescription
= lens _cwDescription
(\ s a -> s{_cwDescription = a})
instance FromJSON CourseWork where
parseJSON
= withObject "CourseWork"
(\ o ->
CourseWork' <$>
(o .:? "creationTime") <*> (o .:? "scheduledTime")
<*> (o .:? "state")
<*> (o .:? "assigneeMode")
<*> (o .:? "materials" .!= mempty)
<*> (o .:? "courseId")
<*> (o .:? "individualStudentsOptions")
<*> (o .:? "maxPoints")
<*> (o .:? "workType")
<*> (o .:? "dueTime")
<*> (o .:? "associatedWithDeveloper")
<*> (o .:? "updateTime")
<*> (o .:? "multipleChoiceQuestion")
<*> (o .:? "id")
<*> (o .:? "submissionModificationMode")
<*> (o .:? "dueDate")
<*> (o .:? "creatorUserId")
<*> (o .:? "title")
<*> (o .:? "alternateLink")
<*> (o .:? "assignment")
<*> (o .:? "description"))
instance ToJSON CourseWork where
toJSON CourseWork'{..}
= object
(catMaybes
[("creationTime" .=) <$> _cwCreationTime,
("scheduledTime" .=) <$> _cwScheduledTime,
("state" .=) <$> _cwState,
("assigneeMode" .=) <$> _cwAssigneeMode,
("materials" .=) <$> _cwMaterials,
("courseId" .=) <$> _cwCourseId,
("individualStudentsOptions" .=) <$>
_cwIndividualStudentsOptions,
("maxPoints" .=) <$> _cwMaxPoints,
("workType" .=) <$> _cwWorkType,
("dueTime" .=) <$> _cwDueTime,
("associatedWithDeveloper" .=) <$>
_cwAssociatedWithDeveloper,
("updateTime" .=) <$> _cwUpdateTime,
("multipleChoiceQuestion" .=) <$>
_cwMultipleChoiceQuestion,
("id" .=) <$> _cwId,
("submissionModificationMode" .=) <$>
_cwSubmissionModificationMode,
("dueDate" .=) <$> _cwDueDate,
("creatorUserId" .=) <$> _cwCreatorUserId,
("title" .=) <$> _cwTitle,
("alternateLink" .=) <$> _cwAlternateLink,
("assignment" .=) <$> _cwAssignment,
("description" .=) <$> _cwDescription])
data GradeHistory = GradeHistory'
{ _ghGradeTimestamp :: !(Maybe DateTime')
, _ghMaxPoints :: !(Maybe (Textual Double))
, _ghPointsEarned :: !(Maybe (Textual Double))
, _ghActorUserId :: !(Maybe Text)
, _ghGradeChangeType :: !(Maybe GradeHistoryGradeChangeType)
} deriving (Eq,Show,Data,Typeable,Generic)
gradeHistory
:: GradeHistory
gradeHistory =
GradeHistory'
{ _ghGradeTimestamp = Nothing
, _ghMaxPoints = Nothing
, _ghPointsEarned = Nothing
, _ghActorUserId = Nothing
, _ghGradeChangeType = Nothing
}
ghGradeTimestamp :: Lens' GradeHistory (Maybe UTCTime)
ghGradeTimestamp
= lens _ghGradeTimestamp
(\ s a -> s{_ghGradeTimestamp = a})
. mapping _DateTime
ghMaxPoints :: Lens' GradeHistory (Maybe Double)
ghMaxPoints
= lens _ghMaxPoints (\ s a -> s{_ghMaxPoints = a}) .
mapping _Coerce
ghPointsEarned :: Lens' GradeHistory (Maybe Double)
ghPointsEarned
= lens _ghPointsEarned
(\ s a -> s{_ghPointsEarned = a})
. mapping _Coerce
ghActorUserId :: Lens' GradeHistory (Maybe Text)
ghActorUserId
= lens _ghActorUserId
(\ s a -> s{_ghActorUserId = a})
ghGradeChangeType :: Lens' GradeHistory (Maybe GradeHistoryGradeChangeType)
ghGradeChangeType
= lens _ghGradeChangeType
(\ s a -> s{_ghGradeChangeType = a})
instance FromJSON GradeHistory where
parseJSON
= withObject "GradeHistory"
(\ o ->
GradeHistory' <$>
(o .:? "gradeTimestamp") <*> (o .:? "maxPoints") <*>
(o .:? "pointsEarned")
<*> (o .:? "actorUserId")
<*> (o .:? "gradeChangeType"))
instance ToJSON GradeHistory where
toJSON GradeHistory'{..}
= object
(catMaybes
[("gradeTimestamp" .=) <$> _ghGradeTimestamp,
("maxPoints" .=) <$> _ghMaxPoints,
("pointsEarned" .=) <$> _ghPointsEarned,
("actorUserId" .=) <$> _ghActorUserId,
("gradeChangeType" .=) <$> _ghGradeChangeType])
newtype CourseWorkChangesInfo = CourseWorkChangesInfo'
{ _cwciCourseId :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
courseWorkChangesInfo
:: CourseWorkChangesInfo
courseWorkChangesInfo =
CourseWorkChangesInfo'
{ _cwciCourseId = Nothing
}
cwciCourseId :: Lens' CourseWorkChangesInfo (Maybe Text)
cwciCourseId
= lens _cwciCourseId (\ s a -> s{_cwciCourseId = a})
instance FromJSON CourseWorkChangesInfo where
parseJSON
= withObject "CourseWorkChangesInfo"
(\ o ->
CourseWorkChangesInfo' <$> (o .:? "courseId"))
instance ToJSON CourseWorkChangesInfo where
toJSON CourseWorkChangesInfo'{..}
= object
(catMaybes [("courseId" .=) <$> _cwciCourseId])
data ModifyCourseWorkAssigneesRequest = ModifyCourseWorkAssigneesRequest'
{ _mcwarAssigneeMode :: !(Maybe ModifyCourseWorkAssigneesRequestAssigneeMode)
, _mcwarModifyIndividualStudentsOptions :: !(Maybe ModifyIndividualStudentsOptions)
} deriving (Eq,Show,Data,Typeable,Generic)
modifyCourseWorkAssigneesRequest
:: ModifyCourseWorkAssigneesRequest
modifyCourseWorkAssigneesRequest =
ModifyCourseWorkAssigneesRequest'
{ _mcwarAssigneeMode = Nothing
, _mcwarModifyIndividualStudentsOptions = Nothing
}
mcwarAssigneeMode :: Lens' ModifyCourseWorkAssigneesRequest (Maybe ModifyCourseWorkAssigneesRequestAssigneeMode)
mcwarAssigneeMode
= lens _mcwarAssigneeMode
(\ s a -> s{_mcwarAssigneeMode = a})
mcwarModifyIndividualStudentsOptions :: Lens' ModifyCourseWorkAssigneesRequest (Maybe ModifyIndividualStudentsOptions)
mcwarModifyIndividualStudentsOptions
= lens _mcwarModifyIndividualStudentsOptions
(\ s a ->
s{_mcwarModifyIndividualStudentsOptions = a})
instance FromJSON ModifyCourseWorkAssigneesRequest
where
parseJSON
= withObject "ModifyCourseWorkAssigneesRequest"
(\ o ->
ModifyCourseWorkAssigneesRequest' <$>
(o .:? "assigneeMode") <*>
(o .:? "modifyIndividualStudentsOptions"))
instance ToJSON ModifyCourseWorkAssigneesRequest
where
toJSON ModifyCourseWorkAssigneesRequest'{..}
= object
(catMaybes
[("assigneeMode" .=) <$> _mcwarAssigneeMode,
("modifyIndividualStudentsOptions" .=) <$>
_mcwarModifyIndividualStudentsOptions])
data DriveFile = DriveFile'
{ _dfThumbnailURL :: !(Maybe Text)
, _dfId :: !(Maybe Text)
, _dfTitle :: !(Maybe Text)
, _dfAlternateLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
driveFile
:: DriveFile
driveFile =
DriveFile'
{ _dfThumbnailURL = Nothing
, _dfId = Nothing
, _dfTitle = Nothing
, _dfAlternateLink = Nothing
}
dfThumbnailURL :: Lens' DriveFile (Maybe Text)
dfThumbnailURL
= lens _dfThumbnailURL
(\ s a -> s{_dfThumbnailURL = a})
dfId :: Lens' DriveFile (Maybe Text)
dfId = lens _dfId (\ s a -> s{_dfId = a})
dfTitle :: Lens' DriveFile (Maybe Text)
dfTitle = lens _dfTitle (\ s a -> s{_dfTitle = a})
dfAlternateLink :: Lens' DriveFile (Maybe Text)
dfAlternateLink
= lens _dfAlternateLink
(\ s a -> s{_dfAlternateLink = a})
instance FromJSON DriveFile where
parseJSON
= withObject "DriveFile"
(\ o ->
DriveFile' <$>
(o .:? "thumbnailUrl") <*> (o .:? "id") <*>
(o .:? "title")
<*> (o .:? "alternateLink"))
instance ToJSON DriveFile where
toJSON DriveFile'{..}
= object
(catMaybes
[("thumbnailUrl" .=) <$> _dfThumbnailURL,
("id" .=) <$> _dfId, ("title" .=) <$> _dfTitle,
("alternateLink" .=) <$> _dfAlternateLink])
data GuardianInvitation = GuardianInvitation'
{ _giCreationTime :: !(Maybe DateTime')
, _giStudentId :: !(Maybe Text)
, _giState :: !(Maybe GuardianInvitationState)
, _giInvitationId :: !(Maybe Text)
, _giInvitedEmailAddress :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
guardianInvitation
:: GuardianInvitation
guardianInvitation =
GuardianInvitation'
{ _giCreationTime = Nothing
, _giStudentId = Nothing
, _giState = Nothing
, _giInvitationId = Nothing
, _giInvitedEmailAddress = Nothing
}
giCreationTime :: Lens' GuardianInvitation (Maybe UTCTime)
giCreationTime
= lens _giCreationTime
(\ s a -> s{_giCreationTime = a})
. mapping _DateTime
giStudentId :: Lens' GuardianInvitation (Maybe Text)
giStudentId
= lens _giStudentId (\ s a -> s{_giStudentId = a})
giState :: Lens' GuardianInvitation (Maybe GuardianInvitationState)
giState = lens _giState (\ s a -> s{_giState = a})
giInvitationId :: Lens' GuardianInvitation (Maybe Text)
giInvitationId
= lens _giInvitationId
(\ s a -> s{_giInvitationId = a})
giInvitedEmailAddress :: Lens' GuardianInvitation (Maybe Text)
giInvitedEmailAddress
= lens _giInvitedEmailAddress
(\ s a -> s{_giInvitedEmailAddress = a})
instance FromJSON GuardianInvitation where
parseJSON
= withObject "GuardianInvitation"
(\ o ->
GuardianInvitation' <$>
(o .:? "creationTime") <*> (o .:? "studentId") <*>
(o .:? "state")
<*> (o .:? "invitationId")
<*> (o .:? "invitedEmailAddress"))
instance ToJSON GuardianInvitation where
toJSON GuardianInvitation'{..}
= object
(catMaybes
[("creationTime" .=) <$> _giCreationTime,
("studentId" .=) <$> _giStudentId,
("state" .=) <$> _giState,
("invitationId" .=) <$> _giInvitationId,
("invitedEmailAddress" .=) <$>
_giInvitedEmailAddress])
data Feed = Feed'
{ _fCourseWorkChangesInfo :: !(Maybe CourseWorkChangesInfo)
, _fFeedType :: !(Maybe FeedFeedType)
, _fCourseRosterChangesInfo :: !(Maybe CourseRosterChangesInfo)
} deriving (Eq,Show,Data,Typeable,Generic)
feed
:: Feed
feed =
Feed'
{ _fCourseWorkChangesInfo = Nothing
, _fFeedType = Nothing
, _fCourseRosterChangesInfo = Nothing
}
fCourseWorkChangesInfo :: Lens' Feed (Maybe CourseWorkChangesInfo)
fCourseWorkChangesInfo
= lens _fCourseWorkChangesInfo
(\ s a -> s{_fCourseWorkChangesInfo = a})
fFeedType :: Lens' Feed (Maybe FeedFeedType)
fFeedType
= lens _fFeedType (\ s a -> s{_fFeedType = a})
fCourseRosterChangesInfo :: Lens' Feed (Maybe CourseRosterChangesInfo)
fCourseRosterChangesInfo
= lens _fCourseRosterChangesInfo
(\ s a -> s{_fCourseRosterChangesInfo = a})
instance FromJSON Feed where
parseJSON
= withObject "Feed"
(\ o ->
Feed' <$>
(o .:? "courseWorkChangesInfo") <*>
(o .:? "feedType")
<*> (o .:? "courseRosterChangesInfo"))
instance ToJSON Feed where
toJSON Feed'{..}
= object
(catMaybes
[("courseWorkChangesInfo" .=) <$>
_fCourseWorkChangesInfo,
("feedType" .=) <$> _fFeedType,
("courseRosterChangesInfo" .=) <$>
_fCourseRosterChangesInfo])
data ModifyAnnouncementAssigneesRequest = ModifyAnnouncementAssigneesRequest'
{ _maarAssigneeMode :: !(Maybe ModifyAnnouncementAssigneesRequestAssigneeMode)
, _maarModifyIndividualStudentsOptions :: !(Maybe ModifyIndividualStudentsOptions)
} deriving (Eq,Show,Data,Typeable,Generic)
modifyAnnouncementAssigneesRequest
:: ModifyAnnouncementAssigneesRequest
modifyAnnouncementAssigneesRequest =
ModifyAnnouncementAssigneesRequest'
{ _maarAssigneeMode = Nothing
, _maarModifyIndividualStudentsOptions = Nothing
}
maarAssigneeMode :: Lens' ModifyAnnouncementAssigneesRequest (Maybe ModifyAnnouncementAssigneesRequestAssigneeMode)
maarAssigneeMode
= lens _maarAssigneeMode
(\ s a -> s{_maarAssigneeMode = a})
maarModifyIndividualStudentsOptions :: Lens' ModifyAnnouncementAssigneesRequest (Maybe ModifyIndividualStudentsOptions)
maarModifyIndividualStudentsOptions
= lens _maarModifyIndividualStudentsOptions
(\ s a ->
s{_maarModifyIndividualStudentsOptions = a})
instance FromJSON ModifyAnnouncementAssigneesRequest
where
parseJSON
= withObject "ModifyAnnouncementAssigneesRequest"
(\ o ->
ModifyAnnouncementAssigneesRequest' <$>
(o .:? "assigneeMode") <*>
(o .:? "modifyIndividualStudentsOptions"))
instance ToJSON ModifyAnnouncementAssigneesRequest
where
toJSON ModifyAnnouncementAssigneesRequest'{..}
= object
(catMaybes
[("assigneeMode" .=) <$> _maarAssigneeMode,
("modifyIndividualStudentsOptions" .=) <$>
_maarModifyIndividualStudentsOptions])
data ReturnStudentSubmissionRequest =
ReturnStudentSubmissionRequest'
deriving (Eq,Show,Data,Typeable,Generic)
returnStudentSubmissionRequest
:: ReturnStudentSubmissionRequest
returnStudentSubmissionRequest = ReturnStudentSubmissionRequest'
instance FromJSON ReturnStudentSubmissionRequest
where
parseJSON
= withObject "ReturnStudentSubmissionRequest"
(\ o -> pure ReturnStudentSubmissionRequest')
instance ToJSON ReturnStudentSubmissionRequest where
toJSON = const emptyObject
data ReclaimStudentSubmissionRequest =
ReclaimStudentSubmissionRequest'
deriving (Eq,Show,Data,Typeable,Generic)
reclaimStudentSubmissionRequest
:: ReclaimStudentSubmissionRequest
reclaimStudentSubmissionRequest = ReclaimStudentSubmissionRequest'
instance FromJSON ReclaimStudentSubmissionRequest
where
parseJSON
= withObject "ReclaimStudentSubmissionRequest"
(\ o -> pure ReclaimStudentSubmissionRequest')
instance ToJSON ReclaimStudentSubmissionRequest where
toJSON = const emptyObject
data ListCourseWorkResponse = ListCourseWorkResponse'
{ _lcwrCourseWork :: !(Maybe [CourseWork])
, _lcwrNextPageToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
listCourseWorkResponse
:: ListCourseWorkResponse
listCourseWorkResponse =
ListCourseWorkResponse'
{ _lcwrCourseWork = Nothing
, _lcwrNextPageToken = Nothing
}
lcwrCourseWork :: Lens' ListCourseWorkResponse [CourseWork]
lcwrCourseWork
= lens _lcwrCourseWork
(\ s a -> s{_lcwrCourseWork = a})
. _Default
. _Coerce
lcwrNextPageToken :: Lens' ListCourseWorkResponse (Maybe Text)
lcwrNextPageToken
= lens _lcwrNextPageToken
(\ s a -> s{_lcwrNextPageToken = a})
instance FromJSON ListCourseWorkResponse where
parseJSON
= withObject "ListCourseWorkResponse"
(\ o ->
ListCourseWorkResponse' <$>
(o .:? "courseWork" .!= mempty) <*>
(o .:? "nextPageToken"))
instance ToJSON ListCourseWorkResponse where
toJSON ListCourseWorkResponse'{..}
= object
(catMaybes
[("courseWork" .=) <$> _lcwrCourseWork,
("nextPageToken" .=) <$> _lcwrNextPageToken])
data Empty =
Empty'
deriving (Eq,Show,Data,Typeable,Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
newtype GlobalPermission = GlobalPermission'
{ _gpPermission :: Maybe GlobalPermissionPermission
} deriving (Eq,Show,Data,Typeable,Generic)
globalPermission
:: GlobalPermission
globalPermission =
GlobalPermission'
{ _gpPermission = Nothing
}
gpPermission :: Lens' GlobalPermission (Maybe GlobalPermissionPermission)
gpPermission
= lens _gpPermission (\ s a -> s{_gpPermission = a})
instance FromJSON GlobalPermission where
parseJSON
= withObject "GlobalPermission"
(\ o -> GlobalPermission' <$> (o .:? "permission"))
instance ToJSON GlobalPermission where
toJSON GlobalPermission'{..}
= object
(catMaybes [("permission" .=) <$> _gpPermission])
data Link = Link'
{ _lThumbnailURL :: !(Maybe Text)
, _lURL :: !(Maybe Text)
, _lTitle :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
link
:: Link
link =
Link'
{ _lThumbnailURL = Nothing
, _lURL = Nothing
, _lTitle = Nothing
}
lThumbnailURL :: Lens' Link (Maybe Text)
lThumbnailURL
= lens _lThumbnailURL
(\ s a -> s{_lThumbnailURL = a})
lURL :: Lens' Link (Maybe Text)
lURL = lens _lURL (\ s a -> s{_lURL = a})
lTitle :: Lens' Link (Maybe Text)
lTitle = lens _lTitle (\ s a -> s{_lTitle = a})
instance FromJSON Link where
parseJSON
= withObject "Link"
(\ o ->
Link' <$>
(o .:? "thumbnailUrl") <*> (o .:? "url") <*>
(o .:? "title"))
instance ToJSON Link where
toJSON Link'{..}
= object
(catMaybes
[("thumbnailUrl" .=) <$> _lThumbnailURL,
("url" .=) <$> _lURL, ("title" .=) <$> _lTitle])
newtype IndividualStudentsOptions = IndividualStudentsOptions'
{ _isoStudentIds :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
individualStudentsOptions
:: IndividualStudentsOptions
individualStudentsOptions =
IndividualStudentsOptions'
{ _isoStudentIds = Nothing
}
isoStudentIds :: Lens' IndividualStudentsOptions [Text]
isoStudentIds
= lens _isoStudentIds
(\ s a -> s{_isoStudentIds = a})
. _Default
. _Coerce
instance FromJSON IndividualStudentsOptions where
parseJSON
= withObject "IndividualStudentsOptions"
(\ o ->
IndividualStudentsOptions' <$>
(o .:? "studentIds" .!= mempty))
instance ToJSON IndividualStudentsOptions where
toJSON IndividualStudentsOptions'{..}
= object
(catMaybes [("studentIds" .=) <$> _isoStudentIds])
newtype AssignmentSubmission = AssignmentSubmission'
{ _asAttachments :: Maybe [Attachment]
} deriving (Eq,Show,Data,Typeable,Generic)
assignmentSubmission
:: AssignmentSubmission
assignmentSubmission =
AssignmentSubmission'
{ _asAttachments = Nothing
}
asAttachments :: Lens' AssignmentSubmission [Attachment]
asAttachments
= lens _asAttachments
(\ s a -> s{_asAttachments = a})
. _Default
. _Coerce
instance FromJSON AssignmentSubmission where
parseJSON
= withObject "AssignmentSubmission"
(\ o ->
AssignmentSubmission' <$>
(o .:? "attachments" .!= mempty))
instance ToJSON AssignmentSubmission where
toJSON AssignmentSubmission'{..}
= object
(catMaybes [("attachments" .=) <$> _asAttachments])
newtype ModifyAttachmentsRequest = ModifyAttachmentsRequest'
{ _marAddAttachments :: Maybe [Attachment]
} deriving (Eq,Show,Data,Typeable,Generic)
modifyAttachmentsRequest
:: ModifyAttachmentsRequest
modifyAttachmentsRequest =
ModifyAttachmentsRequest'
{ _marAddAttachments = Nothing
}
marAddAttachments :: Lens' ModifyAttachmentsRequest [Attachment]
marAddAttachments
= lens _marAddAttachments
(\ s a -> s{_marAddAttachments = a})
. _Default
. _Coerce
instance FromJSON ModifyAttachmentsRequest where
parseJSON
= withObject "ModifyAttachmentsRequest"
(\ o ->
ModifyAttachmentsRequest' <$>
(o .:? "addAttachments" .!= mempty))
instance ToJSON ModifyAttachmentsRequest where
toJSON ModifyAttachmentsRequest'{..}
= object
(catMaybes
[("addAttachments" .=) <$> _marAddAttachments])
data ListAnnouncementsResponse = ListAnnouncementsResponse'
{ _larNextPageToken :: !(Maybe Text)
, _larAnnouncements :: !(Maybe [Announcement])
} deriving (Eq,Show,Data,Typeable,Generic)
listAnnouncementsResponse
:: ListAnnouncementsResponse
listAnnouncementsResponse =
ListAnnouncementsResponse'
{ _larNextPageToken = Nothing
, _larAnnouncements = Nothing
}
larNextPageToken :: Lens' ListAnnouncementsResponse (Maybe Text)
larNextPageToken
= lens _larNextPageToken
(\ s a -> s{_larNextPageToken = a})
larAnnouncements :: Lens' ListAnnouncementsResponse [Announcement]
larAnnouncements
= lens _larAnnouncements
(\ s a -> s{_larAnnouncements = a})
. _Default
. _Coerce
instance FromJSON ListAnnouncementsResponse where
parseJSON
= withObject "ListAnnouncementsResponse"
(\ o ->
ListAnnouncementsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "announcements" .!= mempty))
instance ToJSON ListAnnouncementsResponse where
toJSON ListAnnouncementsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _larNextPageToken,
("announcements" .=) <$> _larAnnouncements])
data ListStudentSubmissionsResponse = ListStudentSubmissionsResponse'
{ _lssrNextPageToken :: !(Maybe Text)
, _lssrStudentSubmissions :: !(Maybe [StudentSubmission])
} deriving (Eq,Show,Data,Typeable,Generic)
listStudentSubmissionsResponse
:: ListStudentSubmissionsResponse
listStudentSubmissionsResponse =
ListStudentSubmissionsResponse'
{ _lssrNextPageToken = Nothing
, _lssrStudentSubmissions = Nothing
}
lssrNextPageToken :: Lens' ListStudentSubmissionsResponse (Maybe Text)
lssrNextPageToken
= lens _lssrNextPageToken
(\ s a -> s{_lssrNextPageToken = a})
lssrStudentSubmissions :: Lens' ListStudentSubmissionsResponse [StudentSubmission]
lssrStudentSubmissions
= lens _lssrStudentSubmissions
(\ s a -> s{_lssrStudentSubmissions = a})
. _Default
. _Coerce
instance FromJSON ListStudentSubmissionsResponse
where
parseJSON
= withObject "ListStudentSubmissionsResponse"
(\ o ->
ListStudentSubmissionsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "studentSubmissions" .!= mempty))
instance ToJSON ListStudentSubmissionsResponse where
toJSON ListStudentSubmissionsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lssrNextPageToken,
("studentSubmissions" .=) <$>
_lssrStudentSubmissions])
data Material = Material'
{ _mDriveFile :: !(Maybe SharedDriveFile)
, _mLink :: !(Maybe Link)
, _mYouTubeVideo :: !(Maybe YouTubeVideo)
, _mForm :: !(Maybe Form)
} deriving (Eq,Show,Data,Typeable,Generic)
material
:: Material
material =
Material'
{ _mDriveFile = Nothing
, _mLink = Nothing
, _mYouTubeVideo = Nothing
, _mForm = Nothing
}
mDriveFile :: Lens' Material (Maybe SharedDriveFile)
mDriveFile
= lens _mDriveFile (\ s a -> s{_mDriveFile = a})
mLink :: Lens' Material (Maybe Link)
mLink = lens _mLink (\ s a -> s{_mLink = a})
mYouTubeVideo :: Lens' Material (Maybe YouTubeVideo)
mYouTubeVideo
= lens _mYouTubeVideo
(\ s a -> s{_mYouTubeVideo = a})
mForm :: Lens' Material (Maybe Form)
mForm = lens _mForm (\ s a -> s{_mForm = a})
instance FromJSON Material where
parseJSON
= withObject "Material"
(\ o ->
Material' <$>
(o .:? "driveFile") <*> (o .:? "link") <*>
(o .:? "youtubeVideo")
<*> (o .:? "form"))
instance ToJSON Material where
toJSON Material'{..}
= object
(catMaybes
[("driveFile" .=) <$> _mDriveFile,
("link" .=) <$> _mLink,
("youtubeVideo" .=) <$> _mYouTubeVideo,
("form" .=) <$> _mForm])
newtype MultipleChoiceSubmission = MultipleChoiceSubmission'
{ _mcsAnswer :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
multipleChoiceSubmission
:: MultipleChoiceSubmission
multipleChoiceSubmission =
MultipleChoiceSubmission'
{ _mcsAnswer = Nothing
}
mcsAnswer :: Lens' MultipleChoiceSubmission (Maybe Text)
mcsAnswer
= lens _mcsAnswer (\ s a -> s{_mcsAnswer = a})
instance FromJSON MultipleChoiceSubmission where
parseJSON
= withObject "MultipleChoiceSubmission"
(\ o ->
MultipleChoiceSubmission' <$> (o .:? "answer"))
instance ToJSON MultipleChoiceSubmission where
toJSON MultipleChoiceSubmission'{..}
= object (catMaybes [("answer" .=) <$> _mcsAnswer])
data ListInvitationsResponse = ListInvitationsResponse'
{ _lirNextPageToken :: !(Maybe Text)
, _lirInvitations :: !(Maybe [Invitation])
} deriving (Eq,Show,Data,Typeable,Generic)
listInvitationsResponse
:: ListInvitationsResponse
listInvitationsResponse =
ListInvitationsResponse'
{ _lirNextPageToken = Nothing
, _lirInvitations = Nothing
}
lirNextPageToken :: Lens' ListInvitationsResponse (Maybe Text)
lirNextPageToken
= lens _lirNextPageToken
(\ s a -> s{_lirNextPageToken = a})
lirInvitations :: Lens' ListInvitationsResponse [Invitation]
lirInvitations
= lens _lirInvitations
(\ s a -> s{_lirInvitations = a})
. _Default
. _Coerce
instance FromJSON ListInvitationsResponse where
parseJSON
= withObject "ListInvitationsResponse"
(\ o ->
ListInvitationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "invitations" .!= mempty))
instance ToJSON ListInvitationsResponse where
toJSON ListInvitationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lirNextPageToken,
("invitations" .=) <$> _lirInvitations])
data Guardian = Guardian'
{ _gStudentId :: !(Maybe Text)
, _gGuardianId :: !(Maybe Text)
, _gInvitedEmailAddress :: !(Maybe Text)
, _gGuardianProFile :: !(Maybe UserProFile)
} deriving (Eq,Show,Data,Typeable,Generic)
guardian
:: Guardian
guardian =
Guardian'
{ _gStudentId = Nothing
, _gGuardianId = Nothing
, _gInvitedEmailAddress = Nothing
, _gGuardianProFile = Nothing
}
gStudentId :: Lens' Guardian (Maybe Text)
gStudentId
= lens _gStudentId (\ s a -> s{_gStudentId = a})
gGuardianId :: Lens' Guardian (Maybe Text)
gGuardianId
= lens _gGuardianId (\ s a -> s{_gGuardianId = a})
gInvitedEmailAddress :: Lens' Guardian (Maybe Text)
gInvitedEmailAddress
= lens _gInvitedEmailAddress
(\ s a -> s{_gInvitedEmailAddress = a})
gGuardianProFile :: Lens' Guardian (Maybe UserProFile)
gGuardianProFile
= lens _gGuardianProFile
(\ s a -> s{_gGuardianProFile = a})
instance FromJSON Guardian where
parseJSON
= withObject "Guardian"
(\ o ->
Guardian' <$>
(o .:? "studentId") <*> (o .:? "guardianId") <*>
(o .:? "invitedEmailAddress")
<*> (o .:? "guardianProfile"))
instance ToJSON Guardian where
toJSON Guardian'{..}
= object
(catMaybes
[("studentId" .=) <$> _gStudentId,
("guardianId" .=) <$> _gGuardianId,
("invitedEmailAddress" .=) <$> _gInvitedEmailAddress,
("guardianProfile" .=) <$> _gGuardianProFile])
data CourseMaterial = CourseMaterial'
{ _cmDriveFile :: !(Maybe DriveFile)
, _cmLink :: !(Maybe Link)
, _cmYouTubeVideo :: !(Maybe YouTubeVideo)
, _cmForm :: !(Maybe Form)
} deriving (Eq,Show,Data,Typeable,Generic)
courseMaterial
:: CourseMaterial
courseMaterial =
CourseMaterial'
{ _cmDriveFile = Nothing
, _cmLink = Nothing
, _cmYouTubeVideo = Nothing
, _cmForm = Nothing
}
cmDriveFile :: Lens' CourseMaterial (Maybe DriveFile)
cmDriveFile
= lens _cmDriveFile (\ s a -> s{_cmDriveFile = a})
cmLink :: Lens' CourseMaterial (Maybe Link)
cmLink = lens _cmLink (\ s a -> s{_cmLink = a})
cmYouTubeVideo :: Lens' CourseMaterial (Maybe YouTubeVideo)
cmYouTubeVideo
= lens _cmYouTubeVideo
(\ s a -> s{_cmYouTubeVideo = a})
cmForm :: Lens' CourseMaterial (Maybe Form)
cmForm = lens _cmForm (\ s a -> s{_cmForm = a})
instance FromJSON CourseMaterial where
parseJSON
= withObject "CourseMaterial"
(\ o ->
CourseMaterial' <$>
(o .:? "driveFile") <*> (o .:? "link") <*>
(o .:? "youTubeVideo")
<*> (o .:? "form"))
instance ToJSON CourseMaterial where
toJSON CourseMaterial'{..}
= object
(catMaybes
[("driveFile" .=) <$> _cmDriveFile,
("link" .=) <$> _cmLink,
("youTubeVideo" .=) <$> _cmYouTubeVideo,
("form" .=) <$> _cmForm])
newtype ShortAnswerSubmission = ShortAnswerSubmission'
{ _sasAnswer :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
shortAnswerSubmission
:: ShortAnswerSubmission
shortAnswerSubmission =
ShortAnswerSubmission'
{ _sasAnswer = Nothing
}
sasAnswer :: Lens' ShortAnswerSubmission (Maybe Text)
sasAnswer
= lens _sasAnswer (\ s a -> s{_sasAnswer = a})
instance FromJSON ShortAnswerSubmission where
parseJSON
= withObject "ShortAnswerSubmission"
(\ o -> ShortAnswerSubmission' <$> (o .:? "answer"))
instance ToJSON ShortAnswerSubmission where
toJSON ShortAnswerSubmission'{..}
= object (catMaybes [("answer" .=) <$> _sasAnswer])
data Invitation = Invitation'
{ _iCourseId :: !(Maybe Text)
, _iUserId :: !(Maybe Text)
, _iRole :: !(Maybe InvitationRole)
, _iId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
invitation
:: Invitation
invitation =
Invitation'
{ _iCourseId = Nothing
, _iUserId = Nothing
, _iRole = Nothing
, _iId = Nothing
}
iCourseId :: Lens' Invitation (Maybe Text)
iCourseId
= lens _iCourseId (\ s a -> s{_iCourseId = a})
iUserId :: Lens' Invitation (Maybe Text)
iUserId = lens _iUserId (\ s a -> s{_iUserId = a})
iRole :: Lens' Invitation (Maybe InvitationRole)
iRole = lens _iRole (\ s a -> s{_iRole = a})
iId :: Lens' Invitation (Maybe Text)
iId = lens _iId (\ s a -> s{_iId = a})
instance FromJSON Invitation where
parseJSON
= withObject "Invitation"
(\ o ->
Invitation' <$>
(o .:? "courseId") <*> (o .:? "userId") <*>
(o .:? "role")
<*> (o .:? "id"))
instance ToJSON Invitation where
toJSON Invitation'{..}
= object
(catMaybes
[("courseId" .=) <$> _iCourseId,
("userId" .=) <$> _iUserId, ("role" .=) <$> _iRole,
("id" .=) <$> _iId])
data Attachment = Attachment'
{ _aDriveFile :: !(Maybe DriveFile)
, _aLink :: !(Maybe Link)
, _aYouTubeVideo :: !(Maybe YouTubeVideo)
, _aForm :: !(Maybe Form)
} deriving (Eq,Show,Data,Typeable,Generic)
attachment
:: Attachment
attachment =
Attachment'
{ _aDriveFile = Nothing
, _aLink = Nothing
, _aYouTubeVideo = Nothing
, _aForm = Nothing
}
aDriveFile :: Lens' Attachment (Maybe DriveFile)
aDriveFile
= lens _aDriveFile (\ s a -> s{_aDriveFile = a})
aLink :: Lens' Attachment (Maybe Link)
aLink = lens _aLink (\ s a -> s{_aLink = a})
aYouTubeVideo :: Lens' Attachment (Maybe YouTubeVideo)
aYouTubeVideo
= lens _aYouTubeVideo
(\ s a -> s{_aYouTubeVideo = a})
aForm :: Lens' Attachment (Maybe Form)
aForm = lens _aForm (\ s a -> s{_aForm = a})
instance FromJSON Attachment where
parseJSON
= withObject "Attachment"
(\ o ->
Attachment' <$>
(o .:? "driveFile") <*> (o .:? "link") <*>
(o .:? "youTubeVideo")
<*> (o .:? "form"))
instance ToJSON Attachment where
toJSON Attachment'{..}
= object
(catMaybes
[("driveFile" .=) <$> _aDriveFile,
("link" .=) <$> _aLink,
("youTubeVideo" .=) <$> _aYouTubeVideo,
("form" .=) <$> _aForm])
data Announcement = Announcement'
{ _aCreationTime :: !(Maybe DateTime')
, _aScheduledTime :: !(Maybe DateTime')
, _aState :: !(Maybe AnnouncementState)
, _aAssigneeMode :: !(Maybe AnnouncementAssigneeMode)
, _aText :: !(Maybe Text)
, _aMaterials :: !(Maybe [Material])
, _aCourseId :: !(Maybe Text)
, _aIndividualStudentsOptions :: !(Maybe IndividualStudentsOptions)
, _aUpdateTime :: !(Maybe DateTime')
, _aId :: !(Maybe Text)
, _aCreatorUserId :: !(Maybe Text)
, _aAlternateLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
announcement
:: Announcement
announcement =
Announcement'
{ _aCreationTime = Nothing
, _aScheduledTime = Nothing
, _aState = Nothing
, _aAssigneeMode = Nothing
, _aText = Nothing
, _aMaterials = Nothing
, _aCourseId = Nothing
, _aIndividualStudentsOptions = Nothing
, _aUpdateTime = Nothing
, _aId = Nothing
, _aCreatorUserId = Nothing
, _aAlternateLink = Nothing
}
aCreationTime :: Lens' Announcement (Maybe UTCTime)
aCreationTime
= lens _aCreationTime
(\ s a -> s{_aCreationTime = a})
. mapping _DateTime
aScheduledTime :: Lens' Announcement (Maybe UTCTime)
aScheduledTime
= lens _aScheduledTime
(\ s a -> s{_aScheduledTime = a})
. mapping _DateTime
aState :: Lens' Announcement (Maybe AnnouncementState)
aState = lens _aState (\ s a -> s{_aState = a})
aAssigneeMode :: Lens' Announcement (Maybe AnnouncementAssigneeMode)
aAssigneeMode
= lens _aAssigneeMode
(\ s a -> s{_aAssigneeMode = a})
aText :: Lens' Announcement (Maybe Text)
aText = lens _aText (\ s a -> s{_aText = a})
aMaterials :: Lens' Announcement [Material]
aMaterials
= lens _aMaterials (\ s a -> s{_aMaterials = a}) .
_Default
. _Coerce
aCourseId :: Lens' Announcement (Maybe Text)
aCourseId
= lens _aCourseId (\ s a -> s{_aCourseId = a})
aIndividualStudentsOptions :: Lens' Announcement (Maybe IndividualStudentsOptions)
aIndividualStudentsOptions
= lens _aIndividualStudentsOptions
(\ s a -> s{_aIndividualStudentsOptions = a})
aUpdateTime :: Lens' Announcement (Maybe UTCTime)
aUpdateTime
= lens _aUpdateTime (\ s a -> s{_aUpdateTime = a}) .
mapping _DateTime
aId :: Lens' Announcement (Maybe Text)
aId = lens _aId (\ s a -> s{_aId = a})
aCreatorUserId :: Lens' Announcement (Maybe Text)
aCreatorUserId
= lens _aCreatorUserId
(\ s a -> s{_aCreatorUserId = a})
aAlternateLink :: Lens' Announcement (Maybe Text)
aAlternateLink
= lens _aAlternateLink
(\ s a -> s{_aAlternateLink = a})
instance FromJSON Announcement where
parseJSON
= withObject "Announcement"
(\ o ->
Announcement' <$>
(o .:? "creationTime") <*> (o .:? "scheduledTime")
<*> (o .:? "state")
<*> (o .:? "assigneeMode")
<*> (o .:? "text")
<*> (o .:? "materials" .!= mempty)
<*> (o .:? "courseId")
<*> (o .:? "individualStudentsOptions")
<*> (o .:? "updateTime")
<*> (o .:? "id")
<*> (o .:? "creatorUserId")
<*> (o .:? "alternateLink"))
instance ToJSON Announcement where
toJSON Announcement'{..}
= object
(catMaybes
[("creationTime" .=) <$> _aCreationTime,
("scheduledTime" .=) <$> _aScheduledTime,
("state" .=) <$> _aState,
("assigneeMode" .=) <$> _aAssigneeMode,
("text" .=) <$> _aText,
("materials" .=) <$> _aMaterials,
("courseId" .=) <$> _aCourseId,
("individualStudentsOptions" .=) <$>
_aIndividualStudentsOptions,
("updateTime" .=) <$> _aUpdateTime,
("id" .=) <$> _aId,
("creatorUserId" .=) <$> _aCreatorUserId,
("alternateLink" .=) <$> _aAlternateLink])
data StudentSubmission = StudentSubmission'
{ _ssCreationTime :: !(Maybe DateTime')
, _ssLate :: !(Maybe Bool)
, _ssState :: !(Maybe StudentSubmissionState)
, _ssCourseId :: !(Maybe Text)
, _ssMultipleChoiceSubmission :: !(Maybe MultipleChoiceSubmission)
, _ssAssignmentSubmission :: !(Maybe AssignmentSubmission)
, _ssShortAnswerSubmission :: !(Maybe ShortAnswerSubmission)
, _ssAssociatedWithDeveloper :: !(Maybe Bool)
, _ssUserId :: !(Maybe Text)
, _ssUpdateTime :: !(Maybe DateTime')
, _ssCourseWorkType :: !(Maybe StudentSubmissionCourseWorkType)
, _ssSubmissionHistory :: !(Maybe [SubmissionHistory])
, _ssAssignedGrade :: !(Maybe (Textual Double))
, _ssId :: !(Maybe Text)
, _ssDraftGrade :: !(Maybe (Textual Double))
, _ssAlternateLink :: !(Maybe Text)
, _ssCourseWorkId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
studentSubmission
:: StudentSubmission
studentSubmission =
StudentSubmission'
{ _ssCreationTime = Nothing
, _ssLate = Nothing
, _ssState = Nothing
, _ssCourseId = Nothing
, _ssMultipleChoiceSubmission = Nothing
, _ssAssignmentSubmission = Nothing
, _ssShortAnswerSubmission = Nothing
, _ssAssociatedWithDeveloper = Nothing
, _ssUserId = Nothing
, _ssUpdateTime = Nothing
, _ssCourseWorkType = Nothing
, _ssSubmissionHistory = Nothing
, _ssAssignedGrade = Nothing
, _ssId = Nothing
, _ssDraftGrade = Nothing
, _ssAlternateLink = Nothing
, _ssCourseWorkId = Nothing
}
ssCreationTime :: Lens' StudentSubmission (Maybe UTCTime)
ssCreationTime
= lens _ssCreationTime
(\ s a -> s{_ssCreationTime = a})
. mapping _DateTime
ssLate :: Lens' StudentSubmission (Maybe Bool)
ssLate = lens _ssLate (\ s a -> s{_ssLate = a})
ssState :: Lens' StudentSubmission (Maybe StudentSubmissionState)
ssState = lens _ssState (\ s a -> s{_ssState = a})
ssCourseId :: Lens' StudentSubmission (Maybe Text)
ssCourseId
= lens _ssCourseId (\ s a -> s{_ssCourseId = a})
ssMultipleChoiceSubmission :: Lens' StudentSubmission (Maybe MultipleChoiceSubmission)
ssMultipleChoiceSubmission
= lens _ssMultipleChoiceSubmission
(\ s a -> s{_ssMultipleChoiceSubmission = a})
ssAssignmentSubmission :: Lens' StudentSubmission (Maybe AssignmentSubmission)
ssAssignmentSubmission
= lens _ssAssignmentSubmission
(\ s a -> s{_ssAssignmentSubmission = a})
ssShortAnswerSubmission :: Lens' StudentSubmission (Maybe ShortAnswerSubmission)
ssShortAnswerSubmission
= lens _ssShortAnswerSubmission
(\ s a -> s{_ssShortAnswerSubmission = a})
ssAssociatedWithDeveloper :: Lens' StudentSubmission (Maybe Bool)
ssAssociatedWithDeveloper
= lens _ssAssociatedWithDeveloper
(\ s a -> s{_ssAssociatedWithDeveloper = a})
ssUserId :: Lens' StudentSubmission (Maybe Text)
ssUserId = lens _ssUserId (\ s a -> s{_ssUserId = a})
ssUpdateTime :: Lens' StudentSubmission (Maybe UTCTime)
ssUpdateTime
= lens _ssUpdateTime (\ s a -> s{_ssUpdateTime = a})
. mapping _DateTime
ssCourseWorkType :: Lens' StudentSubmission (Maybe StudentSubmissionCourseWorkType)
ssCourseWorkType
= lens _ssCourseWorkType
(\ s a -> s{_ssCourseWorkType = a})
ssSubmissionHistory :: Lens' StudentSubmission [SubmissionHistory]
ssSubmissionHistory
= lens _ssSubmissionHistory
(\ s a -> s{_ssSubmissionHistory = a})
. _Default
. _Coerce
ssAssignedGrade :: Lens' StudentSubmission (Maybe Double)
ssAssignedGrade
= lens _ssAssignedGrade
(\ s a -> s{_ssAssignedGrade = a})
. mapping _Coerce
ssId :: Lens' StudentSubmission (Maybe Text)
ssId = lens _ssId (\ s a -> s{_ssId = a})
ssDraftGrade :: Lens' StudentSubmission (Maybe Double)
ssDraftGrade
= lens _ssDraftGrade (\ s a -> s{_ssDraftGrade = a})
. mapping _Coerce
ssAlternateLink :: Lens' StudentSubmission (Maybe Text)
ssAlternateLink
= lens _ssAlternateLink
(\ s a -> s{_ssAlternateLink = a})
ssCourseWorkId :: Lens' StudentSubmission (Maybe Text)
ssCourseWorkId
= lens _ssCourseWorkId
(\ s a -> s{_ssCourseWorkId = a})
instance FromJSON StudentSubmission where
parseJSON
= withObject "StudentSubmission"
(\ o ->
StudentSubmission' <$>
(o .:? "creationTime") <*> (o .:? "late") <*>
(o .:? "state")
<*> (o .:? "courseId")
<*> (o .:? "multipleChoiceSubmission")
<*> (o .:? "assignmentSubmission")
<*> (o .:? "shortAnswerSubmission")
<*> (o .:? "associatedWithDeveloper")
<*> (o .:? "userId")
<*> (o .:? "updateTime")
<*> (o .:? "courseWorkType")
<*> (o .:? "submissionHistory" .!= mempty)
<*> (o .:? "assignedGrade")
<*> (o .:? "id")
<*> (o .:? "draftGrade")
<*> (o .:? "alternateLink")
<*> (o .:? "courseWorkId"))
instance ToJSON StudentSubmission where
toJSON StudentSubmission'{..}
= object
(catMaybes
[("creationTime" .=) <$> _ssCreationTime,
("late" .=) <$> _ssLate, ("state" .=) <$> _ssState,
("courseId" .=) <$> _ssCourseId,
("multipleChoiceSubmission" .=) <$>
_ssMultipleChoiceSubmission,
("assignmentSubmission" .=) <$>
_ssAssignmentSubmission,
("shortAnswerSubmission" .=) <$>
_ssShortAnswerSubmission,
("associatedWithDeveloper" .=) <$>
_ssAssociatedWithDeveloper,
("userId" .=) <$> _ssUserId,
("updateTime" .=) <$> _ssUpdateTime,
("courseWorkType" .=) <$> _ssCourseWorkType,
("submissionHistory" .=) <$> _ssSubmissionHistory,
("assignedGrade" .=) <$> _ssAssignedGrade,
("id" .=) <$> _ssId,
("draftGrade" .=) <$> _ssDraftGrade,
("alternateLink" .=) <$> _ssAlternateLink,
("courseWorkId" .=) <$> _ssCourseWorkId])
data ListGuardiansResponse = ListGuardiansResponse'
{ _lgrNextPageToken :: !(Maybe Text)
, _lgrGuardians :: !(Maybe [Guardian])
} deriving (Eq,Show,Data,Typeable,Generic)
listGuardiansResponse
:: ListGuardiansResponse
listGuardiansResponse =
ListGuardiansResponse'
{ _lgrNextPageToken = Nothing
, _lgrGuardians = Nothing
}
lgrNextPageToken :: Lens' ListGuardiansResponse (Maybe Text)
lgrNextPageToken
= lens _lgrNextPageToken
(\ s a -> s{_lgrNextPageToken = a})
lgrGuardians :: Lens' ListGuardiansResponse [Guardian]
lgrGuardians
= lens _lgrGuardians (\ s a -> s{_lgrGuardians = a})
. _Default
. _Coerce
instance FromJSON ListGuardiansResponse where
parseJSON
= withObject "ListGuardiansResponse"
(\ o ->
ListGuardiansResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "guardians" .!= mempty))
instance ToJSON ListGuardiansResponse where
toJSON ListGuardiansResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lgrNextPageToken,
("guardians" .=) <$> _lgrGuardians])
data Date = Date'
{ _dDay :: !(Maybe (Textual Int32))
, _dYear :: !(Maybe (Textual Int32))
, _dMonth :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
date
:: Date
date =
Date'
{ _dDay = Nothing
, _dYear = Nothing
, _dMonth = Nothing
}
dDay :: Lens' Date (Maybe Int32)
dDay
= lens _dDay (\ s a -> s{_dDay = a}) .
mapping _Coerce
dYear :: Lens' Date (Maybe Int32)
dYear
= lens _dYear (\ s a -> s{_dYear = a}) .
mapping _Coerce
dMonth :: Lens' Date (Maybe Int32)
dMonth
= lens _dMonth (\ s a -> s{_dMonth = a}) .
mapping _Coerce
instance FromJSON Date where
parseJSON
= withObject "Date"
(\ o ->
Date' <$>
(o .:? "day") <*> (o .:? "year") <*> (o .:? "month"))
instance ToJSON Date where
toJSON Date'{..}
= object
(catMaybes
[("day" .=) <$> _dDay, ("year" .=) <$> _dYear,
("month" .=) <$> _dMonth])
data YouTubeVideo = YouTubeVideo'
{ _ytvThumbnailURL :: !(Maybe Text)
, _ytvId :: !(Maybe Text)
, _ytvTitle :: !(Maybe Text)
, _ytvAlternateLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
youTubeVideo
:: YouTubeVideo
youTubeVideo =
YouTubeVideo'
{ _ytvThumbnailURL = Nothing
, _ytvId = Nothing
, _ytvTitle = Nothing
, _ytvAlternateLink = Nothing
}
ytvThumbnailURL :: Lens' YouTubeVideo (Maybe Text)
ytvThumbnailURL
= lens _ytvThumbnailURL
(\ s a -> s{_ytvThumbnailURL = a})
ytvId :: Lens' YouTubeVideo (Maybe Text)
ytvId = lens _ytvId (\ s a -> s{_ytvId = a})
ytvTitle :: Lens' YouTubeVideo (Maybe Text)
ytvTitle = lens _ytvTitle (\ s a -> s{_ytvTitle = a})
ytvAlternateLink :: Lens' YouTubeVideo (Maybe Text)
ytvAlternateLink
= lens _ytvAlternateLink
(\ s a -> s{_ytvAlternateLink = a})
instance FromJSON YouTubeVideo where
parseJSON
= withObject "YouTubeVideo"
(\ o ->
YouTubeVideo' <$>
(o .:? "thumbnailUrl") <*> (o .:? "id") <*>
(o .:? "title")
<*> (o .:? "alternateLink"))
instance ToJSON YouTubeVideo where
toJSON YouTubeVideo'{..}
= object
(catMaybes
[("thumbnailUrl" .=) <$> _ytvThumbnailURL,
("id" .=) <$> _ytvId, ("title" .=) <$> _ytvTitle,
("alternateLink" .=) <$> _ytvAlternateLink])
data Teacher = Teacher'
{ _tCourseId :: !(Maybe Text)
, _tProFile :: !(Maybe UserProFile)
, _tUserId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
teacher
:: Teacher
teacher =
Teacher'
{ _tCourseId = Nothing
, _tProFile = Nothing
, _tUserId = Nothing
}
tCourseId :: Lens' Teacher (Maybe Text)
tCourseId
= lens _tCourseId (\ s a -> s{_tCourseId = a})
tProFile :: Lens' Teacher (Maybe UserProFile)
tProFile = lens _tProFile (\ s a -> s{_tProFile = a})
tUserId :: Lens' Teacher (Maybe Text)
tUserId = lens _tUserId (\ s a -> s{_tUserId = a})
instance FromJSON Teacher where
parseJSON
= withObject "Teacher"
(\ o ->
Teacher' <$>
(o .:? "courseId") <*> (o .:? "profile") <*>
(o .:? "userId"))
instance ToJSON Teacher where
toJSON Teacher'{..}
= object
(catMaybes
[("courseId" .=) <$> _tCourseId,
("profile" .=) <$> _tProFile,
("userId" .=) <$> _tUserId])
data CourseMaterialSet = CourseMaterialSet'
{ _cmsMaterials :: !(Maybe [CourseMaterial])
, _cmsTitle :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
courseMaterialSet
:: CourseMaterialSet
courseMaterialSet =
CourseMaterialSet'
{ _cmsMaterials = Nothing
, _cmsTitle = Nothing
}
cmsMaterials :: Lens' CourseMaterialSet [CourseMaterial]
cmsMaterials
= lens _cmsMaterials (\ s a -> s{_cmsMaterials = a})
. _Default
. _Coerce
cmsTitle :: Lens' CourseMaterialSet (Maybe Text)
cmsTitle = lens _cmsTitle (\ s a -> s{_cmsTitle = a})
instance FromJSON CourseMaterialSet where
parseJSON
= withObject "CourseMaterialSet"
(\ o ->
CourseMaterialSet' <$>
(o .:? "materials" .!= mempty) <*> (o .:? "title"))
instance ToJSON CourseMaterialSet where
toJSON CourseMaterialSet'{..}
= object
(catMaybes
[("materials" .=) <$> _cmsMaterials,
("title" .=) <$> _cmsTitle])
data Name = Name'
{ _nGivenName :: !(Maybe Text)
, _nFullName :: !(Maybe Text)
, _nFamilyName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
name
:: Name
name =
Name'
{ _nGivenName = Nothing
, _nFullName = Nothing
, _nFamilyName = Nothing
}
nGivenName :: Lens' Name (Maybe Text)
nGivenName
= lens _nGivenName (\ s a -> s{_nGivenName = a})
nFullName :: Lens' Name (Maybe Text)
nFullName
= lens _nFullName (\ s a -> s{_nFullName = a})
nFamilyName :: Lens' Name (Maybe Text)
nFamilyName
= lens _nFamilyName (\ s a -> s{_nFamilyName = a})
instance FromJSON Name where
parseJSON
= withObject "Name"
(\ o ->
Name' <$>
(o .:? "givenName") <*> (o .:? "fullName") <*>
(o .:? "familyName"))
instance ToJSON Name where
toJSON Name'{..}
= object
(catMaybes
[("givenName" .=) <$> _nGivenName,
("fullName" .=) <$> _nFullName,
("familyName" .=) <$> _nFamilyName])
data ListCoursesResponse = ListCoursesResponse'
{ _lcrNextPageToken :: !(Maybe Text)
, _lcrCourses :: !(Maybe [Course])
} deriving (Eq,Show,Data,Typeable,Generic)
listCoursesResponse
:: ListCoursesResponse
listCoursesResponse =
ListCoursesResponse'
{ _lcrNextPageToken = Nothing
, _lcrCourses = Nothing
}
lcrNextPageToken :: Lens' ListCoursesResponse (Maybe Text)
lcrNextPageToken
= lens _lcrNextPageToken
(\ s a -> s{_lcrNextPageToken = a})
lcrCourses :: Lens' ListCoursesResponse [Course]
lcrCourses
= lens _lcrCourses (\ s a -> s{_lcrCourses = a}) .
_Default
. _Coerce
instance FromJSON ListCoursesResponse where
parseJSON
= withObject "ListCoursesResponse"
(\ o ->
ListCoursesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "courses" .!= mempty))
instance ToJSON ListCoursesResponse where
toJSON ListCoursesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lcrNextPageToken,
("courses" .=) <$> _lcrCourses])
data TurnInStudentSubmissionRequest =
TurnInStudentSubmissionRequest'
deriving (Eq,Show,Data,Typeable,Generic)
turnInStudentSubmissionRequest
:: TurnInStudentSubmissionRequest
turnInStudentSubmissionRequest = TurnInStudentSubmissionRequest'
instance FromJSON TurnInStudentSubmissionRequest
where
parseJSON
= withObject "TurnInStudentSubmissionRequest"
(\ o -> pure TurnInStudentSubmissionRequest')
instance ToJSON TurnInStudentSubmissionRequest where
toJSON = const emptyObject
data UserProFile = UserProFile'
{ _upfPhotoURL :: !(Maybe Text)
, _upfVerifiedTeacher :: !(Maybe Bool)
, _upfName :: !(Maybe Name)
, _upfEmailAddress :: !(Maybe Text)
, _upfId :: !(Maybe Text)
, _upfPermissions :: !(Maybe [GlobalPermission])
} deriving (Eq,Show,Data,Typeable,Generic)
userProFile
:: UserProFile
userProFile =
UserProFile'
{ _upfPhotoURL = Nothing
, _upfVerifiedTeacher = Nothing
, _upfName = Nothing
, _upfEmailAddress = Nothing
, _upfId = Nothing
, _upfPermissions = Nothing
}
upfPhotoURL :: Lens' UserProFile (Maybe Text)
upfPhotoURL
= lens _upfPhotoURL (\ s a -> s{_upfPhotoURL = a})
upfVerifiedTeacher :: Lens' UserProFile (Maybe Bool)
upfVerifiedTeacher
= lens _upfVerifiedTeacher
(\ s a -> s{_upfVerifiedTeacher = a})
upfName :: Lens' UserProFile (Maybe Name)
upfName = lens _upfName (\ s a -> s{_upfName = a})
upfEmailAddress :: Lens' UserProFile (Maybe Text)
upfEmailAddress
= lens _upfEmailAddress
(\ s a -> s{_upfEmailAddress = a})
upfId :: Lens' UserProFile (Maybe Text)
upfId = lens _upfId (\ s a -> s{_upfId = a})
upfPermissions :: Lens' UserProFile [GlobalPermission]
upfPermissions
= lens _upfPermissions
(\ s a -> s{_upfPermissions = a})
. _Default
. _Coerce
instance FromJSON UserProFile where
parseJSON
= withObject "UserProFile"
(\ o ->
UserProFile' <$>
(o .:? "photoUrl") <*> (o .:? "verifiedTeacher") <*>
(o .:? "name")
<*> (o .:? "emailAddress")
<*> (o .:? "id")
<*> (o .:? "permissions" .!= mempty))
instance ToJSON UserProFile where
toJSON UserProFile'{..}
= object
(catMaybes
[("photoUrl" .=) <$> _upfPhotoURL,
("verifiedTeacher" .=) <$> _upfVerifiedTeacher,
("name" .=) <$> _upfName,
("emailAddress" .=) <$> _upfEmailAddress,
("id" .=) <$> _upfId,
("permissions" .=) <$> _upfPermissions])
data DriveFolder = DriveFolder'
{ _dId :: !(Maybe Text)
, _dTitle :: !(Maybe Text)
, _dAlternateLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
driveFolder
:: DriveFolder
driveFolder =
DriveFolder'
{ _dId = Nothing
, _dTitle = Nothing
, _dAlternateLink = Nothing
}
dId :: Lens' DriveFolder (Maybe Text)
dId = lens _dId (\ s a -> s{_dId = a})
dTitle :: Lens' DriveFolder (Maybe Text)
dTitle = lens _dTitle (\ s a -> s{_dTitle = a})
dAlternateLink :: Lens' DriveFolder (Maybe Text)
dAlternateLink
= lens _dAlternateLink
(\ s a -> s{_dAlternateLink = a})
instance FromJSON DriveFolder where
parseJSON
= withObject "DriveFolder"
(\ o ->
DriveFolder' <$>
(o .:? "id") <*> (o .:? "title") <*>
(o .:? "alternateLink"))
instance ToJSON DriveFolder where
toJSON DriveFolder'{..}
= object
(catMaybes
[("id" .=) <$> _dId, ("title" .=) <$> _dTitle,
("alternateLink" .=) <$> _dAlternateLink])
data SubmissionHistory = SubmissionHistory'
{ _shGradeHistory :: !(Maybe GradeHistory)
, _shStateHistory :: !(Maybe StateHistory)
} deriving (Eq,Show,Data,Typeable,Generic)
submissionHistory
:: SubmissionHistory
submissionHistory =
SubmissionHistory'
{ _shGradeHistory = Nothing
, _shStateHistory = Nothing
}
shGradeHistory :: Lens' SubmissionHistory (Maybe GradeHistory)
shGradeHistory
= lens _shGradeHistory
(\ s a -> s{_shGradeHistory = a})
shStateHistory :: Lens' SubmissionHistory (Maybe StateHistory)
shStateHistory
= lens _shStateHistory
(\ s a -> s{_shStateHistory = a})
instance FromJSON SubmissionHistory where
parseJSON
= withObject "SubmissionHistory"
(\ o ->
SubmissionHistory' <$>
(o .:? "gradeHistory") <*> (o .:? "stateHistory"))
instance ToJSON SubmissionHistory where
toJSON SubmissionHistory'{..}
= object
(catMaybes
[("gradeHistory" .=) <$> _shGradeHistory,
("stateHistory" .=) <$> _shStateHistory])
data StateHistory = StateHistory'
{ _shState :: !(Maybe StateHistoryState)
, _shActorUserId :: !(Maybe Text)
, _shStateTimestamp :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
stateHistory
:: StateHistory
stateHistory =
StateHistory'
{ _shState = Nothing
, _shActorUserId = Nothing
, _shStateTimestamp = Nothing
}
shState :: Lens' StateHistory (Maybe StateHistoryState)
shState = lens _shState (\ s a -> s{_shState = a})
shActorUserId :: Lens' StateHistory (Maybe Text)
shActorUserId
= lens _shActorUserId
(\ s a -> s{_shActorUserId = a})
shStateTimestamp :: Lens' StateHistory (Maybe UTCTime)
shStateTimestamp
= lens _shStateTimestamp
(\ s a -> s{_shStateTimestamp = a})
. mapping _DateTime
instance FromJSON StateHistory where
parseJSON
= withObject "StateHistory"
(\ o ->
StateHistory' <$>
(o .:? "state") <*> (o .:? "actorUserId") <*>
(o .:? "stateTimestamp"))
instance ToJSON StateHistory where
toJSON StateHistory'{..}
= object
(catMaybes
[("state" .=) <$> _shState,
("actorUserId" .=) <$> _shActorUserId,
("stateTimestamp" .=) <$> _shStateTimestamp])
newtype MultipleChoiceQuestion = MultipleChoiceQuestion'
{ _mcqChoices :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
multipleChoiceQuestion
:: MultipleChoiceQuestion
multipleChoiceQuestion =
MultipleChoiceQuestion'
{ _mcqChoices = Nothing
}
mcqChoices :: Lens' MultipleChoiceQuestion [Text]
mcqChoices
= lens _mcqChoices (\ s a -> s{_mcqChoices = a}) .
_Default
. _Coerce
instance FromJSON MultipleChoiceQuestion where
parseJSON
= withObject "MultipleChoiceQuestion"
(\ o ->
MultipleChoiceQuestion' <$>
(o .:? "choices" .!= mempty))
instance ToJSON MultipleChoiceQuestion where
toJSON MultipleChoiceQuestion'{..}
= object (catMaybes [("choices" .=) <$> _mcqChoices])
data Course = Course'
{ _couCreationTime :: !(Maybe DateTime')
, _couRoom :: !(Maybe Text)
, _couCourseMaterialSets :: !(Maybe [CourseMaterialSet])
, _couCalendarId :: !(Maybe Text)
, _couTeacherGroupEmail :: !(Maybe Text)
, _couTeacherFolder :: !(Maybe DriveFolder)
, _couCourseState :: !(Maybe CourseCourseState)
, _couGuardiansEnabled :: !(Maybe Bool)
, _couEnrollmentCode :: !(Maybe Text)
, _couUpdateTime :: !(Maybe DateTime')
, _couOwnerId :: !(Maybe Text)
, _couName :: !(Maybe Text)
, _couId :: !(Maybe Text)
, _couAlternateLink :: !(Maybe Text)
, _couCourseGroupEmail :: !(Maybe Text)
, _couDescription :: !(Maybe Text)
, _couDescriptionHeading :: !(Maybe Text)
, _couSection :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
course
:: Course
course =
Course'
{ _couCreationTime = Nothing
, _couRoom = Nothing
, _couCourseMaterialSets = Nothing
, _couCalendarId = Nothing
, _couTeacherGroupEmail = Nothing
, _couTeacherFolder = Nothing
, _couCourseState = Nothing
, _couGuardiansEnabled = Nothing
, _couEnrollmentCode = Nothing
, _couUpdateTime = Nothing
, _couOwnerId = Nothing
, _couName = Nothing
, _couId = Nothing
, _couAlternateLink = Nothing
, _couCourseGroupEmail = Nothing
, _couDescription = Nothing
, _couDescriptionHeading = Nothing
, _couSection = Nothing
}
couCreationTime :: Lens' Course (Maybe UTCTime)
couCreationTime
= lens _couCreationTime
(\ s a -> s{_couCreationTime = a})
. mapping _DateTime
couRoom :: Lens' Course (Maybe Text)
couRoom = lens _couRoom (\ s a -> s{_couRoom = a})
couCourseMaterialSets :: Lens' Course [CourseMaterialSet]
couCourseMaterialSets
= lens _couCourseMaterialSets
(\ s a -> s{_couCourseMaterialSets = a})
. _Default
. _Coerce
couCalendarId :: Lens' Course (Maybe Text)
couCalendarId
= lens _couCalendarId
(\ s a -> s{_couCalendarId = a})
couTeacherGroupEmail :: Lens' Course (Maybe Text)
couTeacherGroupEmail
= lens _couTeacherGroupEmail
(\ s a -> s{_couTeacherGroupEmail = a})
couTeacherFolder :: Lens' Course (Maybe DriveFolder)
couTeacherFolder
= lens _couTeacherFolder
(\ s a -> s{_couTeacherFolder = a})
couCourseState :: Lens' Course (Maybe CourseCourseState)
couCourseState
= lens _couCourseState
(\ s a -> s{_couCourseState = a})
couGuardiansEnabled :: Lens' Course (Maybe Bool)
couGuardiansEnabled
= lens _couGuardiansEnabled
(\ s a -> s{_couGuardiansEnabled = a})
couEnrollmentCode :: Lens' Course (Maybe Text)
couEnrollmentCode
= lens _couEnrollmentCode
(\ s a -> s{_couEnrollmentCode = a})
couUpdateTime :: Lens' Course (Maybe UTCTime)
couUpdateTime
= lens _couUpdateTime
(\ s a -> s{_couUpdateTime = a})
. mapping _DateTime
couOwnerId :: Lens' Course (Maybe Text)
couOwnerId
= lens _couOwnerId (\ s a -> s{_couOwnerId = a})
couName :: Lens' Course (Maybe Text)
couName = lens _couName (\ s a -> s{_couName = a})
couId :: Lens' Course (Maybe Text)
couId = lens _couId (\ s a -> s{_couId = a})
couAlternateLink :: Lens' Course (Maybe Text)
couAlternateLink
= lens _couAlternateLink
(\ s a -> s{_couAlternateLink = a})
couCourseGroupEmail :: Lens' Course (Maybe Text)
couCourseGroupEmail
= lens _couCourseGroupEmail
(\ s a -> s{_couCourseGroupEmail = a})
couDescription :: Lens' Course (Maybe Text)
couDescription
= lens _couDescription
(\ s a -> s{_couDescription = a})
couDescriptionHeading :: Lens' Course (Maybe Text)
couDescriptionHeading
= lens _couDescriptionHeading
(\ s a -> s{_couDescriptionHeading = a})
couSection :: Lens' Course (Maybe Text)
couSection
= lens _couSection (\ s a -> s{_couSection = a})
instance FromJSON Course where
parseJSON
= withObject "Course"
(\ o ->
Course' <$>
(o .:? "creationTime") <*> (o .:? "room") <*>
(o .:? "courseMaterialSets" .!= mempty)
<*> (o .:? "calendarId")
<*> (o .:? "teacherGroupEmail")
<*> (o .:? "teacherFolder")
<*> (o .:? "courseState")
<*> (o .:? "guardiansEnabled")
<*> (o .:? "enrollmentCode")
<*> (o .:? "updateTime")
<*> (o .:? "ownerId")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "alternateLink")
<*> (o .:? "courseGroupEmail")
<*> (o .:? "description")
<*> (o .:? "descriptionHeading")
<*> (o .:? "section"))
instance ToJSON Course where
toJSON Course'{..}
= object
(catMaybes
[("creationTime" .=) <$> _couCreationTime,
("room" .=) <$> _couRoom,
("courseMaterialSets" .=) <$> _couCourseMaterialSets,
("calendarId" .=) <$> _couCalendarId,
("teacherGroupEmail" .=) <$> _couTeacherGroupEmail,
("teacherFolder" .=) <$> _couTeacherFolder,
("courseState" .=) <$> _couCourseState,
("guardiansEnabled" .=) <$> _couGuardiansEnabled,
("enrollmentCode" .=) <$> _couEnrollmentCode,
("updateTime" .=) <$> _couUpdateTime,
("ownerId" .=) <$> _couOwnerId,
("name" .=) <$> _couName, ("id" .=) <$> _couId,
("alternateLink" .=) <$> _couAlternateLink,
("courseGroupEmail" .=) <$> _couCourseGroupEmail,
("description" .=) <$> _couDescription,
("descriptionHeading" .=) <$> _couDescriptionHeading,
("section" .=) <$> _couSection])
data TimeOfDay' = TimeOfDay''
{ _todNanos :: !(Maybe (Textual Int32))
, _todHours :: !(Maybe (Textual Int32))
, _todMinutes :: !(Maybe (Textual Int32))
, _todSeconds :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
timeOfDay
:: TimeOfDay'
timeOfDay =
TimeOfDay''
{ _todNanos = Nothing
, _todHours = Nothing
, _todMinutes = Nothing
, _todSeconds = Nothing
}
todNanos :: Lens' TimeOfDay' (Maybe Int32)
todNanos
= lens _todNanos (\ s a -> s{_todNanos = a}) .
mapping _Coerce
todHours :: Lens' TimeOfDay' (Maybe Int32)
todHours
= lens _todHours (\ s a -> s{_todHours = a}) .
mapping _Coerce
todMinutes :: Lens' TimeOfDay' (Maybe Int32)
todMinutes
= lens _todMinutes (\ s a -> s{_todMinutes = a}) .
mapping _Coerce
todSeconds :: Lens' TimeOfDay' (Maybe Int32)
todSeconds
= lens _todSeconds (\ s a -> s{_todSeconds = a}) .
mapping _Coerce
instance FromJSON TimeOfDay' where
parseJSON
= withObject "TimeOfDay"
(\ o ->
TimeOfDay'' <$>
(o .:? "nanos") <*> (o .:? "hours") <*>
(o .:? "minutes")
<*> (o .:? "seconds"))
instance ToJSON TimeOfDay' where
toJSON TimeOfDay''{..}
= object
(catMaybes
[("nanos" .=) <$> _todNanos,
("hours" .=) <$> _todHours,
("minutes" .=) <$> _todMinutes,
("seconds" .=) <$> _todSeconds])
data ListGuardianInvitationsResponse = ListGuardianInvitationsResponse'
{ _lgirNextPageToken :: !(Maybe Text)
, _lgirGuardianInvitations :: !(Maybe [GuardianInvitation])
} deriving (Eq,Show,Data,Typeable,Generic)
listGuardianInvitationsResponse
:: ListGuardianInvitationsResponse
listGuardianInvitationsResponse =
ListGuardianInvitationsResponse'
{ _lgirNextPageToken = Nothing
, _lgirGuardianInvitations = Nothing
}
lgirNextPageToken :: Lens' ListGuardianInvitationsResponse (Maybe Text)
lgirNextPageToken
= lens _lgirNextPageToken
(\ s a -> s{_lgirNextPageToken = a})
lgirGuardianInvitations :: Lens' ListGuardianInvitationsResponse [GuardianInvitation]
lgirGuardianInvitations
= lens _lgirGuardianInvitations
(\ s a -> s{_lgirGuardianInvitations = a})
. _Default
. _Coerce
instance FromJSON ListGuardianInvitationsResponse
where
parseJSON
= withObject "ListGuardianInvitationsResponse"
(\ o ->
ListGuardianInvitationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "guardianInvitations" .!= mempty))
instance ToJSON ListGuardianInvitationsResponse where
toJSON ListGuardianInvitationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lgirNextPageToken,
("guardianInvitations" .=) <$>
_lgirGuardianInvitations])
newtype Assignment = Assignment'
{ _aStudentWorkFolder :: Maybe DriveFolder
} deriving (Eq,Show,Data,Typeable,Generic)
assignment
:: Assignment
assignment =
Assignment'
{ _aStudentWorkFolder = Nothing
}
aStudentWorkFolder :: Lens' Assignment (Maybe DriveFolder)
aStudentWorkFolder
= lens _aStudentWorkFolder
(\ s a -> s{_aStudentWorkFolder = a})
instance FromJSON Assignment where
parseJSON
= withObject "Assignment"
(\ o -> Assignment' <$> (o .:? "studentWorkFolder"))
instance ToJSON Assignment where
toJSON Assignment'{..}
= object
(catMaybes
[("studentWorkFolder" .=) <$> _aStudentWorkFolder])
data ListStudentsResponse = ListStudentsResponse'
{ _lsrNextPageToken :: !(Maybe Text)
, _lsrStudents :: !(Maybe [Student])
} deriving (Eq,Show,Data,Typeable,Generic)
listStudentsResponse
:: ListStudentsResponse
listStudentsResponse =
ListStudentsResponse'
{ _lsrNextPageToken = Nothing
, _lsrStudents = Nothing
}
lsrNextPageToken :: Lens' ListStudentsResponse (Maybe Text)
lsrNextPageToken
= lens _lsrNextPageToken
(\ s a -> s{_lsrNextPageToken = a})
lsrStudents :: Lens' ListStudentsResponse [Student]
lsrStudents
= lens _lsrStudents (\ s a -> s{_lsrStudents = a}) .
_Default
. _Coerce
instance FromJSON ListStudentsResponse where
parseJSON
= withObject "ListStudentsResponse"
(\ o ->
ListStudentsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "students" .!= mempty))
instance ToJSON ListStudentsResponse where
toJSON ListStudentsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lsrNextPageToken,
("students" .=) <$> _lsrStudents])
data SharedDriveFile = SharedDriveFile'
{ _sdfDriveFile :: !(Maybe DriveFile)
, _sdfShareMode :: !(Maybe SharedDriveFileShareMode)
} deriving (Eq,Show,Data,Typeable,Generic)
sharedDriveFile
:: SharedDriveFile
sharedDriveFile =
SharedDriveFile'
{ _sdfDriveFile = Nothing
, _sdfShareMode = Nothing
}
sdfDriveFile :: Lens' SharedDriveFile (Maybe DriveFile)
sdfDriveFile
= lens _sdfDriveFile (\ s a -> s{_sdfDriveFile = a})
sdfShareMode :: Lens' SharedDriveFile (Maybe SharedDriveFileShareMode)
sdfShareMode
= lens _sdfShareMode (\ s a -> s{_sdfShareMode = a})
instance FromJSON SharedDriveFile where
parseJSON
= withObject "SharedDriveFile"
(\ o ->
SharedDriveFile' <$>
(o .:? "driveFile") <*> (o .:? "shareMode"))
instance ToJSON SharedDriveFile where
toJSON SharedDriveFile'{..}
= object
(catMaybes
[("driveFile" .=) <$> _sdfDriveFile,
("shareMode" .=) <$> _sdfShareMode])
newtype CourseAlias = CourseAlias'
{ _caAlias :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
courseAlias
:: CourseAlias
courseAlias =
CourseAlias'
{ _caAlias = Nothing
}
caAlias :: Lens' CourseAlias (Maybe Text)
caAlias = lens _caAlias (\ s a -> s{_caAlias = a})
instance FromJSON CourseAlias where
parseJSON
= withObject "CourseAlias"
(\ o -> CourseAlias' <$> (o .:? "alias"))
instance ToJSON CourseAlias where
toJSON CourseAlias'{..}
= object (catMaybes [("alias" .=) <$> _caAlias])
newtype CourseRosterChangesInfo = CourseRosterChangesInfo'
{ _crciCourseId :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
courseRosterChangesInfo
:: CourseRosterChangesInfo
courseRosterChangesInfo =
CourseRosterChangesInfo'
{ _crciCourseId = Nothing
}
crciCourseId :: Lens' CourseRosterChangesInfo (Maybe Text)
crciCourseId
= lens _crciCourseId (\ s a -> s{_crciCourseId = a})
instance FromJSON CourseRosterChangesInfo where
parseJSON
= withObject "CourseRosterChangesInfo"
(\ o ->
CourseRosterChangesInfo' <$> (o .:? "courseId"))
instance ToJSON CourseRosterChangesInfo where
toJSON CourseRosterChangesInfo'{..}
= object
(catMaybes [("courseId" .=) <$> _crciCourseId])
data ModifyIndividualStudentsOptions = ModifyIndividualStudentsOptions'
{ _misoAddStudentIds :: !(Maybe [Text])
, _misoRemoveStudentIds :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
modifyIndividualStudentsOptions
:: ModifyIndividualStudentsOptions
modifyIndividualStudentsOptions =
ModifyIndividualStudentsOptions'
{ _misoAddStudentIds = Nothing
, _misoRemoveStudentIds = Nothing
}
misoAddStudentIds :: Lens' ModifyIndividualStudentsOptions [Text]
misoAddStudentIds
= lens _misoAddStudentIds
(\ s a -> s{_misoAddStudentIds = a})
. _Default
. _Coerce
misoRemoveStudentIds :: Lens' ModifyIndividualStudentsOptions [Text]
misoRemoveStudentIds
= lens _misoRemoveStudentIds
(\ s a -> s{_misoRemoveStudentIds = a})
. _Default
. _Coerce
instance FromJSON ModifyIndividualStudentsOptions
where
parseJSON
= withObject "ModifyIndividualStudentsOptions"
(\ o ->
ModifyIndividualStudentsOptions' <$>
(o .:? "addStudentIds" .!= mempty) <*>
(o .:? "removeStudentIds" .!= mempty))
instance ToJSON ModifyIndividualStudentsOptions where
toJSON ModifyIndividualStudentsOptions'{..}
= object
(catMaybes
[("addStudentIds" .=) <$> _misoAddStudentIds,
("removeStudentIds" .=) <$> _misoRemoveStudentIds])
newtype CloudPubsubTopic = CloudPubsubTopic'
{ _cptTopicName :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
cloudPubsubTopic
:: CloudPubsubTopic
cloudPubsubTopic =
CloudPubsubTopic'
{ _cptTopicName = Nothing
}
cptTopicName :: Lens' CloudPubsubTopic (Maybe Text)
cptTopicName
= lens _cptTopicName (\ s a -> s{_cptTopicName = a})
instance FromJSON CloudPubsubTopic where
parseJSON
= withObject "CloudPubsubTopic"
(\ o -> CloudPubsubTopic' <$> (o .:? "topicName"))
instance ToJSON CloudPubsubTopic where
toJSON CloudPubsubTopic'{..}
= object
(catMaybes [("topicName" .=) <$> _cptTopicName])
data Form = Form'
{ _fThumbnailURL :: !(Maybe Text)
, _fFormURL :: !(Maybe Text)
, _fTitle :: !(Maybe Text)
, _fResponseURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
form
:: Form
form =
Form'
{ _fThumbnailURL = Nothing
, _fFormURL = Nothing
, _fTitle = Nothing
, _fResponseURL = Nothing
}
fThumbnailURL :: Lens' Form (Maybe Text)
fThumbnailURL
= lens _fThumbnailURL
(\ s a -> s{_fThumbnailURL = a})
fFormURL :: Lens' Form (Maybe Text)
fFormURL = lens _fFormURL (\ s a -> s{_fFormURL = a})
fTitle :: Lens' Form (Maybe Text)
fTitle = lens _fTitle (\ s a -> s{_fTitle = a})
fResponseURL :: Lens' Form (Maybe Text)
fResponseURL
= lens _fResponseURL (\ s a -> s{_fResponseURL = a})
instance FromJSON Form where
parseJSON
= withObject "Form"
(\ o ->
Form' <$>
(o .:? "thumbnailUrl") <*> (o .:? "formUrl") <*>
(o .:? "title")
<*> (o .:? "responseUrl"))
instance ToJSON Form where
toJSON Form'{..}
= object
(catMaybes
[("thumbnailUrl" .=) <$> _fThumbnailURL,
("formUrl" .=) <$> _fFormURL,
("title" .=) <$> _fTitle,
("responseUrl" .=) <$> _fResponseURL])
data ListTeachersResponse = ListTeachersResponse'
{ _ltrNextPageToken :: !(Maybe Text)
, _ltrTeachers :: !(Maybe [Teacher])
} deriving (Eq,Show,Data,Typeable,Generic)
listTeachersResponse
:: ListTeachersResponse
listTeachersResponse =
ListTeachersResponse'
{ _ltrNextPageToken = Nothing
, _ltrTeachers = Nothing
}
ltrNextPageToken :: Lens' ListTeachersResponse (Maybe Text)
ltrNextPageToken
= lens _ltrNextPageToken
(\ s a -> s{_ltrNextPageToken = a})
ltrTeachers :: Lens' ListTeachersResponse [Teacher]
ltrTeachers
= lens _ltrTeachers (\ s a -> s{_ltrTeachers = a}) .
_Default
. _Coerce
instance FromJSON ListTeachersResponse where
parseJSON
= withObject "ListTeachersResponse"
(\ o ->
ListTeachersResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "teachers" .!= mempty))
instance ToJSON ListTeachersResponse where
toJSON ListTeachersResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _ltrNextPageToken,
("teachers" .=) <$> _ltrTeachers])
data Student = Student'
{ _sCourseId :: !(Maybe Text)
, _sProFile :: !(Maybe UserProFile)
, _sStudentWorkFolder :: !(Maybe DriveFolder)
, _sUserId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
student
:: Student
student =
Student'
{ _sCourseId = Nothing
, _sProFile = Nothing
, _sStudentWorkFolder = Nothing
, _sUserId = Nothing
}
sCourseId :: Lens' Student (Maybe Text)
sCourseId
= lens _sCourseId (\ s a -> s{_sCourseId = a})
sProFile :: Lens' Student (Maybe UserProFile)
sProFile = lens _sProFile (\ s a -> s{_sProFile = a})
sStudentWorkFolder :: Lens' Student (Maybe DriveFolder)
sStudentWorkFolder
= lens _sStudentWorkFolder
(\ s a -> s{_sStudentWorkFolder = a})
sUserId :: Lens' Student (Maybe Text)
sUserId = lens _sUserId (\ s a -> s{_sUserId = a})
instance FromJSON Student where
parseJSON
= withObject "Student"
(\ o ->
Student' <$>
(o .:? "courseId") <*> (o .:? "profile") <*>
(o .:? "studentWorkFolder")
<*> (o .:? "userId"))
instance ToJSON Student where
toJSON Student'{..}
= object
(catMaybes
[("courseId" .=) <$> _sCourseId,
("profile" .=) <$> _sProFile,
("studentWorkFolder" .=) <$> _sStudentWorkFolder,
("userId" .=) <$> _sUserId])
data Registration = Registration'
{ _rRegistrationId :: !(Maybe Text)
, _rExpiryTime :: !(Maybe DateTime')
, _rFeed :: !(Maybe Feed)
, _rCloudPubsubTopic :: !(Maybe CloudPubsubTopic)
} deriving (Eq,Show,Data,Typeable,Generic)
registration
:: Registration
registration =
Registration'
{ _rRegistrationId = Nothing
, _rExpiryTime = Nothing
, _rFeed = Nothing
, _rCloudPubsubTopic = Nothing
}
rRegistrationId :: Lens' Registration (Maybe Text)
rRegistrationId
= lens _rRegistrationId
(\ s a -> s{_rRegistrationId = a})
rExpiryTime :: Lens' Registration (Maybe UTCTime)
rExpiryTime
= lens _rExpiryTime (\ s a -> s{_rExpiryTime = a}) .
mapping _DateTime
rFeed :: Lens' Registration (Maybe Feed)
rFeed = lens _rFeed (\ s a -> s{_rFeed = a})
rCloudPubsubTopic :: Lens' Registration (Maybe CloudPubsubTopic)
rCloudPubsubTopic
= lens _rCloudPubsubTopic
(\ s a -> s{_rCloudPubsubTopic = a})
instance FromJSON Registration where
parseJSON
= withObject "Registration"
(\ o ->
Registration' <$>
(o .:? "registrationId") <*> (o .:? "expiryTime") <*>
(o .:? "feed")
<*> (o .:? "cloudPubsubTopic"))
instance ToJSON Registration where
toJSON Registration'{..}
= object
(catMaybes
[("registrationId" .=) <$> _rRegistrationId,
("expiryTime" .=) <$> _rExpiryTime,
("feed" .=) <$> _rFeed,
("cloudPubsubTopic" .=) <$> _rCloudPubsubTopic])