{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Classroom.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data GradeHistoryGradeChangeType
= UnknownGradeChangeType
| DraftGradePointsEarnedChange
| AssignedGradePointsEarnedChange
| MaxPointsChange
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GradeHistoryGradeChangeType
instance FromHttpApiData GradeHistoryGradeChangeType where
parseQueryParam = \case
"UNKNOWN_GRADE_CHANGE_TYPE" -> Right UnknownGradeChangeType
"DRAFT_GRADE_POINTS_EARNED_CHANGE" -> Right DraftGradePointsEarnedChange
"ASSIGNED_GRADE_POINTS_EARNED_CHANGE" -> Right AssignedGradePointsEarnedChange
"MAX_POINTS_CHANGE" -> Right MaxPointsChange
x -> Left ("Unable to parse GradeHistoryGradeChangeType from: " <> x)
instance ToHttpApiData GradeHistoryGradeChangeType where
toQueryParam = \case
UnknownGradeChangeType -> "UNKNOWN_GRADE_CHANGE_TYPE"
DraftGradePointsEarnedChange -> "DRAFT_GRADE_POINTS_EARNED_CHANGE"
AssignedGradePointsEarnedChange -> "ASSIGNED_GRADE_POINTS_EARNED_CHANGE"
MaxPointsChange -> "MAX_POINTS_CHANGE"
instance FromJSON GradeHistoryGradeChangeType where
parseJSON = parseJSONText "GradeHistoryGradeChangeType"
instance ToJSON GradeHistoryGradeChangeType where
toJSON = toJSONText
data CourseCourseState
= CourseStateUnspecified
| Active
| Archived
| Provisioned
| Declined
| Suspended
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CourseCourseState
instance FromHttpApiData CourseCourseState where
parseQueryParam = \case
"COURSE_STATE_UNSPECIFIED" -> Right CourseStateUnspecified
"ACTIVE" -> Right Active
"ARCHIVED" -> Right Archived
"PROVISIONED" -> Right Provisioned
"DECLINED" -> Right Declined
"SUSPENDED" -> Right Suspended
x -> Left ("Unable to parse CourseCourseState from: " <> x)
instance ToHttpApiData CourseCourseState where
toQueryParam = \case
CourseStateUnspecified -> "COURSE_STATE_UNSPECIFIED"
Active -> "ACTIVE"
Archived -> "ARCHIVED"
Provisioned -> "PROVISIONED"
Declined -> "DECLINED"
Suspended -> "SUSPENDED"
instance FromJSON CourseCourseState where
parseJSON = parseJSONText "CourseCourseState"
instance ToJSON CourseCourseState where
toJSON = toJSONText
data StateHistoryState
= StateUnspecified
| Created
| TurnedIn
| Returned
| ReclaimedByStudent
| StudentEditedAfterTurnIn
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable StateHistoryState
instance FromHttpApiData StateHistoryState where
parseQueryParam = \case
"STATE_UNSPECIFIED" -> Right StateUnspecified
"CREATED" -> Right Created
"TURNED_IN" -> Right TurnedIn
"RETURNED" -> Right Returned
"RECLAIMED_BY_STUDENT" -> Right ReclaimedByStudent
"STUDENT_EDITED_AFTER_TURN_IN" -> Right StudentEditedAfterTurnIn
x -> Left ("Unable to parse StateHistoryState from: " <> x)
instance ToHttpApiData StateHistoryState where
toQueryParam = \case
StateUnspecified -> "STATE_UNSPECIFIED"
Created -> "CREATED"
TurnedIn -> "TURNED_IN"
Returned -> "RETURNED"
ReclaimedByStudent -> "RECLAIMED_BY_STUDENT"
StudentEditedAfterTurnIn -> "STUDENT_EDITED_AFTER_TURN_IN"
instance FromJSON StateHistoryState where
parseJSON = parseJSONText "StateHistoryState"
instance ToJSON StateHistoryState where
toJSON = toJSONText
data CourseWorkWorkType
= CWWTCourseWorkTypeUnspecified
| CWWTAssignment
| CWWTShortAnswerQuestion
| CWWTMultipleChoiceQuestion
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CourseWorkWorkType
instance FromHttpApiData CourseWorkWorkType where
parseQueryParam = \case
"COURSE_WORK_TYPE_UNSPECIFIED" -> Right CWWTCourseWorkTypeUnspecified
"ASSIGNMENT" -> Right CWWTAssignment
"SHORT_ANSWER_QUESTION" -> Right CWWTShortAnswerQuestion
"MULTIPLE_CHOICE_QUESTION" -> Right CWWTMultipleChoiceQuestion
x -> Left ("Unable to parse CourseWorkWorkType from: " <> x)
instance ToHttpApiData CourseWorkWorkType where
toQueryParam = \case
CWWTCourseWorkTypeUnspecified -> "COURSE_WORK_TYPE_UNSPECIFIED"
CWWTAssignment -> "ASSIGNMENT"
CWWTShortAnswerQuestion -> "SHORT_ANSWER_QUESTION"
CWWTMultipleChoiceQuestion -> "MULTIPLE_CHOICE_QUESTION"
instance FromJSON CourseWorkWorkType where
parseJSON = parseJSONText "CourseWorkWorkType"
instance ToJSON CourseWorkWorkType where
toJSON = toJSONText
data ModifyCourseWorkAssigneesRequestAssigneeMode
= AssigneeModeUnspecified
| AllStudents
| IndividualStudents
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ModifyCourseWorkAssigneesRequestAssigneeMode
instance FromHttpApiData ModifyCourseWorkAssigneesRequestAssigneeMode where
parseQueryParam = \case
"ASSIGNEE_MODE_UNSPECIFIED" -> Right AssigneeModeUnspecified
"ALL_STUDENTS" -> Right AllStudents
"INDIVIDUAL_STUDENTS" -> Right IndividualStudents
x -> Left ("Unable to parse ModifyCourseWorkAssigneesRequestAssigneeMode from: " <> x)
instance ToHttpApiData ModifyCourseWorkAssigneesRequestAssigneeMode where
toQueryParam = \case
AssigneeModeUnspecified -> "ASSIGNEE_MODE_UNSPECIFIED"
AllStudents -> "ALL_STUDENTS"
IndividualStudents -> "INDIVIDUAL_STUDENTS"
instance FromJSON ModifyCourseWorkAssigneesRequestAssigneeMode where
parseJSON = parseJSONText "ModifyCourseWorkAssigneesRequestAssigneeMode"
instance ToJSON ModifyCourseWorkAssigneesRequestAssigneeMode where
toJSON = toJSONText
data GuardianInvitationState
= GuardianInvitationStateUnspecified
| Pending
| Complete
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GuardianInvitationState
instance FromHttpApiData GuardianInvitationState where
parseQueryParam = \case
"GUARDIAN_INVITATION_STATE_UNSPECIFIED" -> Right GuardianInvitationStateUnspecified
"PENDING" -> Right Pending
"COMPLETE" -> Right Complete
x -> Left ("Unable to parse GuardianInvitationState from: " <> x)
instance ToHttpApiData GuardianInvitationState where
toQueryParam = \case
GuardianInvitationStateUnspecified -> "GUARDIAN_INVITATION_STATE_UNSPECIFIED"
Pending -> "PENDING"
Complete -> "COMPLETE"
instance FromJSON GuardianInvitationState where
parseJSON = parseJSONText "GuardianInvitationState"
instance ToJSON GuardianInvitationState where
toJSON = toJSONText
data SharedDriveFileShareMode
= UnknownShareMode
| View
| Edit
| StudentCopy
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable SharedDriveFileShareMode
instance FromHttpApiData SharedDriveFileShareMode where
parseQueryParam = \case
"UNKNOWN_SHARE_MODE" -> Right UnknownShareMode
"VIEW" -> Right View
"EDIT" -> Right Edit
"STUDENT_COPY" -> Right StudentCopy
x -> Left ("Unable to parse SharedDriveFileShareMode from: " <> x)
instance ToHttpApiData SharedDriveFileShareMode where
toQueryParam = \case
UnknownShareMode -> "UNKNOWN_SHARE_MODE"
View -> "VIEW"
Edit -> "EDIT"
StudentCopy -> "STUDENT_COPY"
instance FromJSON SharedDriveFileShareMode where
parseJSON = parseJSONText "SharedDriveFileShareMode"
instance ToJSON SharedDriveFileShareMode where
toJSON = toJSONText
data ModifyAnnouncementAssigneesRequestAssigneeMode
= MAARAMAssigneeModeUnspecified
| MAARAMAllStudents
| MAARAMIndividualStudents
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ModifyAnnouncementAssigneesRequestAssigneeMode
instance FromHttpApiData ModifyAnnouncementAssigneesRequestAssigneeMode where
parseQueryParam = \case
"ASSIGNEE_MODE_UNSPECIFIED" -> Right MAARAMAssigneeModeUnspecified
"ALL_STUDENTS" -> Right MAARAMAllStudents
"INDIVIDUAL_STUDENTS" -> Right MAARAMIndividualStudents
x -> Left ("Unable to parse ModifyAnnouncementAssigneesRequestAssigneeMode from: " <> x)
instance ToHttpApiData ModifyAnnouncementAssigneesRequestAssigneeMode where
toQueryParam = \case
MAARAMAssigneeModeUnspecified -> "ASSIGNEE_MODE_UNSPECIFIED"
MAARAMAllStudents -> "ALL_STUDENTS"
MAARAMIndividualStudents -> "INDIVIDUAL_STUDENTS"
instance FromJSON ModifyAnnouncementAssigneesRequestAssigneeMode where
parseJSON = parseJSONText "ModifyAnnouncementAssigneesRequestAssigneeMode"
instance ToJSON ModifyAnnouncementAssigneesRequestAssigneeMode where
toJSON = toJSONText
data AnnouncementAssigneeMode
= AAMAssigneeModeUnspecified
| AAMAllStudents
| AAMIndividualStudents
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AnnouncementAssigneeMode
instance FromHttpApiData AnnouncementAssigneeMode where
parseQueryParam = \case
"ASSIGNEE_MODE_UNSPECIFIED" -> Right AAMAssigneeModeUnspecified
"ALL_STUDENTS" -> Right AAMAllStudents
"INDIVIDUAL_STUDENTS" -> Right AAMIndividualStudents
x -> Left ("Unable to parse AnnouncementAssigneeMode from: " <> x)
instance ToHttpApiData AnnouncementAssigneeMode where
toQueryParam = \case
AAMAssigneeModeUnspecified -> "ASSIGNEE_MODE_UNSPECIFIED"
AAMAllStudents -> "ALL_STUDENTS"
AAMIndividualStudents -> "INDIVIDUAL_STUDENTS"
instance FromJSON AnnouncementAssigneeMode where
parseJSON = parseJSONText "AnnouncementAssigneeMode"
instance ToJSON AnnouncementAssigneeMode where
toJSON = toJSONText
data CourseWorkState
= CourseWorkStateUnspecified
| Published
| Draft
| Deleted
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CourseWorkState
instance FromHttpApiData CourseWorkState where
parseQueryParam = \case
"COURSE_WORK_STATE_UNSPECIFIED" -> Right CourseWorkStateUnspecified
"PUBLISHED" -> Right Published
"DRAFT" -> Right Draft
"DELETED" -> Right Deleted
x -> Left ("Unable to parse CourseWorkState from: " <> x)
instance ToHttpApiData CourseWorkState where
toQueryParam = \case
CourseWorkStateUnspecified -> "COURSE_WORK_STATE_UNSPECIFIED"
Published -> "PUBLISHED"
Draft -> "DRAFT"
Deleted -> "DELETED"
instance FromJSON CourseWorkState where
parseJSON = parseJSONText "CourseWorkState"
instance ToJSON CourseWorkState where
toJSON = toJSONText
data StudentSubmissionState
= SSSSubmissionStateUnspecified
| SSSNew
| SSSCreated
| SSSTurnedIn
| SSSReturned
| SSSReclaimedByStudent
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable StudentSubmissionState
instance FromHttpApiData StudentSubmissionState where
parseQueryParam = \case
"SUBMISSION_STATE_UNSPECIFIED" -> Right SSSSubmissionStateUnspecified
"NEW" -> Right SSSNew
"CREATED" -> Right SSSCreated
"TURNED_IN" -> Right SSSTurnedIn
"RETURNED" -> Right SSSReturned
"RECLAIMED_BY_STUDENT" -> Right SSSReclaimedByStudent
x -> Left ("Unable to parse StudentSubmissionState from: " <> x)
instance ToHttpApiData StudentSubmissionState where
toQueryParam = \case
SSSSubmissionStateUnspecified -> "SUBMISSION_STATE_UNSPECIFIED"
SSSNew -> "NEW"
SSSCreated -> "CREATED"
SSSTurnedIn -> "TURNED_IN"
SSSReturned -> "RETURNED"
SSSReclaimedByStudent -> "RECLAIMED_BY_STUDENT"
instance FromJSON StudentSubmissionState where
parseJSON = parseJSONText "StudentSubmissionState"
instance ToJSON StudentSubmissionState where
toJSON = toJSONText
data AnnouncementState
= ASAnnouncementStateUnspecified
| ASPublished
| ASDraft
| ASDeleted
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AnnouncementState
instance FromHttpApiData AnnouncementState where
parseQueryParam = \case
"ANNOUNCEMENT_STATE_UNSPECIFIED" -> Right ASAnnouncementStateUnspecified
"PUBLISHED" -> Right ASPublished
"DRAFT" -> Right ASDraft
"DELETED" -> Right ASDeleted
x -> Left ("Unable to parse AnnouncementState from: " <> x)
instance ToHttpApiData AnnouncementState where
toQueryParam = \case
ASAnnouncementStateUnspecified -> "ANNOUNCEMENT_STATE_UNSPECIFIED"
ASPublished -> "PUBLISHED"
ASDraft -> "DRAFT"
ASDeleted -> "DELETED"
instance FromJSON AnnouncementState where
parseJSON = parseJSONText "AnnouncementState"
instance ToJSON AnnouncementState where
toJSON = toJSONText
data Xgafv
= X1
| X2
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable Xgafv
instance FromHttpApiData Xgafv where
parseQueryParam = \case
"1" -> Right X1
"2" -> Right X2
x -> Left ("Unable to parse Xgafv from: " <> x)
instance ToHttpApiData Xgafv where
toQueryParam = \case
X1 -> "1"
X2 -> "2"
instance FromJSON Xgafv where
parseJSON = parseJSONText "Xgafv"
instance ToJSON Xgafv where
toJSON = toJSONText
data InvitationRole
= IRCourseRoleUnspecified
| IRStudent
| IRTeacher
| IROwner
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable InvitationRole
instance FromHttpApiData InvitationRole where
parseQueryParam = \case
"COURSE_ROLE_UNSPECIFIED" -> Right IRCourseRoleUnspecified
"STUDENT" -> Right IRStudent
"TEACHER" -> Right IRTeacher
"OWNER" -> Right IROwner
x -> Left ("Unable to parse InvitationRole from: " <> x)
instance ToHttpApiData InvitationRole where
toQueryParam = \case
IRCourseRoleUnspecified -> "COURSE_ROLE_UNSPECIFIED"
IRStudent -> "STUDENT"
IRTeacher -> "TEACHER"
IROwner -> "OWNER"
instance FromJSON InvitationRole where
parseJSON = parseJSONText "InvitationRole"
instance ToJSON InvitationRole where
toJSON = toJSONText
data StudentSubmissionCourseWorkType
= SSCWTCourseWorkTypeUnspecified
| SSCWTAssignment
| SSCWTShortAnswerQuestion
| SSCWTMultipleChoiceQuestion
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable StudentSubmissionCourseWorkType
instance FromHttpApiData StudentSubmissionCourseWorkType where
parseQueryParam = \case
"COURSE_WORK_TYPE_UNSPECIFIED" -> Right SSCWTCourseWorkTypeUnspecified
"ASSIGNMENT" -> Right SSCWTAssignment
"SHORT_ANSWER_QUESTION" -> Right SSCWTShortAnswerQuestion
"MULTIPLE_CHOICE_QUESTION" -> Right SSCWTMultipleChoiceQuestion
x -> Left ("Unable to parse StudentSubmissionCourseWorkType from: " <> x)
instance ToHttpApiData StudentSubmissionCourseWorkType where
toQueryParam = \case
SSCWTCourseWorkTypeUnspecified -> "COURSE_WORK_TYPE_UNSPECIFIED"
SSCWTAssignment -> "ASSIGNMENT"
SSCWTShortAnswerQuestion -> "SHORT_ANSWER_QUESTION"
SSCWTMultipleChoiceQuestion -> "MULTIPLE_CHOICE_QUESTION"
instance FromJSON StudentSubmissionCourseWorkType where
parseJSON = parseJSONText "StudentSubmissionCourseWorkType"
instance ToJSON StudentSubmissionCourseWorkType where
toJSON = toJSONText
data FeedFeedType
= FeedTypeUnspecified
| DomainRosterChanges
| CourseRosterChanges
| CourseWorkChanges
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable FeedFeedType
instance FromHttpApiData FeedFeedType where
parseQueryParam = \case
"FEED_TYPE_UNSPECIFIED" -> Right FeedTypeUnspecified
"DOMAIN_ROSTER_CHANGES" -> Right DomainRosterChanges
"COURSE_ROSTER_CHANGES" -> Right CourseRosterChanges
"COURSE_WORK_CHANGES" -> Right CourseWorkChanges
x -> Left ("Unable to parse FeedFeedType from: " <> x)
instance ToHttpApiData FeedFeedType where
toQueryParam = \case
FeedTypeUnspecified -> "FEED_TYPE_UNSPECIFIED"
DomainRosterChanges -> "DOMAIN_ROSTER_CHANGES"
CourseRosterChanges -> "COURSE_ROSTER_CHANGES"
CourseWorkChanges -> "COURSE_WORK_CHANGES"
instance FromJSON FeedFeedType where
parseJSON = parseJSONText "FeedFeedType"
instance ToJSON FeedFeedType where
toJSON = toJSONText
data GlobalPermissionPermission
= PermissionUnspecified
| CreateCourse
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GlobalPermissionPermission
instance FromHttpApiData GlobalPermissionPermission where
parseQueryParam = \case
"PERMISSION_UNSPECIFIED" -> Right PermissionUnspecified
"CREATE_COURSE" -> Right CreateCourse
x -> Left ("Unable to parse GlobalPermissionPermission from: " <> x)
instance ToHttpApiData GlobalPermissionPermission where
toQueryParam = \case
PermissionUnspecified -> "PERMISSION_UNSPECIFIED"
CreateCourse -> "CREATE_COURSE"
instance FromJSON GlobalPermissionPermission where
parseJSON = parseJSONText "GlobalPermissionPermission"
instance ToJSON GlobalPermissionPermission where
toJSON = toJSONText
data CourseWorkAssigneeMode
= CWAMAssigneeModeUnspecified
| CWAMAllStudents
| CWAMIndividualStudents
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CourseWorkAssigneeMode
instance FromHttpApiData CourseWorkAssigneeMode where
parseQueryParam = \case
"ASSIGNEE_MODE_UNSPECIFIED" -> Right CWAMAssigneeModeUnspecified
"ALL_STUDENTS" -> Right CWAMAllStudents
"INDIVIDUAL_STUDENTS" -> Right CWAMIndividualStudents
x -> Left ("Unable to parse CourseWorkAssigneeMode from: " <> x)
instance ToHttpApiData CourseWorkAssigneeMode where
toQueryParam = \case
CWAMAssigneeModeUnspecified -> "ASSIGNEE_MODE_UNSPECIFIED"
CWAMAllStudents -> "ALL_STUDENTS"
CWAMIndividualStudents -> "INDIVIDUAL_STUDENTS"
instance FromJSON CourseWorkAssigneeMode where
parseJSON = parseJSONText "CourseWorkAssigneeMode"
instance ToJSON CourseWorkAssigneeMode where
toJSON = toJSONText
data CourseWorkSubmissionModificationMode
= SubmissionModificationModeUnspecified
| ModifiableUntilTurnedIn
| Modifiable
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CourseWorkSubmissionModificationMode
instance FromHttpApiData CourseWorkSubmissionModificationMode where
parseQueryParam = \case
"SUBMISSION_MODIFICATION_MODE_UNSPECIFIED" -> Right SubmissionModificationModeUnspecified
"MODIFIABLE_UNTIL_TURNED_IN" -> Right ModifiableUntilTurnedIn
"MODIFIABLE" -> Right Modifiable
x -> Left ("Unable to parse CourseWorkSubmissionModificationMode from: " <> x)
instance ToHttpApiData CourseWorkSubmissionModificationMode where
toQueryParam = \case
SubmissionModificationModeUnspecified -> "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED"
ModifiableUntilTurnedIn -> "MODIFIABLE_UNTIL_TURNED_IN"
Modifiable -> "MODIFIABLE"
instance FromJSON CourseWorkSubmissionModificationMode where
parseJSON = parseJSONText "CourseWorkSubmissionModificationMode"
instance ToJSON CourseWorkSubmissionModificationMode where
toJSON = toJSONText