reformatted models

This commit is contained in:
2023-01-04 17:22:36 -07:00
parent c8175971b7
commit c28230691e
122 changed files with 3812 additions and 4005 deletions

View File

@@ -0,0 +1,10 @@
namespace Management.Test;
public class SemesterPlannerTests
{
[Test]
public void TestCanCreatePlannerFromCanvasSemester()
{
var
}
}

View File

@@ -0,0 +1,4 @@
public class SemesterPlanner
{
}

View File

@@ -1,9 +1,9 @@
namespace Model.Accounts {
public class AccountModel {
namespace CanvasModel.Accounts;
public class AccountModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -43,5 +43,4 @@ namespace Model.Accounts {
[JsonPropertyName("workflow_state")]
public string WorkflowState { get; set; }
}
}

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic;
namespace Model.Accounts {
public class HelpLinkModel {
namespace CanvasModel.Accounts;
public class HelpLinkModel
{
[JsonPropertyName("id")]
public string Id { get; set; }
@@ -19,5 +19,4 @@ namespace Model.Accounts {
[JsonPropertyName("available_to")]
public IEnumerable<string> AvailableTo { get; set; }
}
}

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic;
namespace Model.Accounts {
public class HelpLinksModel {
namespace CanvasModel.Accounts;
public class HelpLinksModel
{
[JsonPropertyName("help_link_name")]
public string HelpLinkName { get; set; }
@@ -16,5 +16,4 @@ namespace Model.Accounts {
[JsonPropertyName("default_help_links")]
public IEnumerable<HelpLinkModel> DefaultHelpLinks { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Accounts {
public class TermsOfServiceModel {
namespace CanvasModel.Accounts;
public class TermsOfServiceModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -18,5 +18,4 @@ namespace Model.Accounts {
[JsonPropertyName("content")]
public string Content { get; set; }
}
}

View File

@@ -1,9 +1,9 @@
using System;
namespace Model.Analytics {
public class CourseAssignmentSummaryModel {
namespace CanvasModel.Analytics;
public class CourseAssignmentSummaryModel
{
[JsonPropertyName("assignment_id")]
public ulong AssignmentId { get; set; }
@@ -43,5 +43,4 @@ namespace Model.Analytics {
[JsonPropertyName("tardiness_breakdown")]
public TardinessModel TardinessBreakdown { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Analytics {
public class CourseStudentSummaryModel {
namespace CanvasModel.Analytics;
public class CourseStudentSummaryModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -27,5 +27,4 @@ namespace Model.Analytics {
[JsonPropertyName("tardiness_breakdown")]
public TardinessModel TardinessBreakdown { get; set; }
}
}

View File

@@ -2,22 +2,23 @@ using System;
using System.Collections.Generic;
namespace Model.Analytics {
// The format of this model in the documentation is COMPLETELY WRONG. Each property is an array of objects, not an object,
// and each of those objects have some extra fields: {id, date, views, participations} in by_date and
// {id, category, views} in by_category. In both cases, id seems to be null 100% of the time, so I am omitting that one.
// The primary keys (date and category) are thankfully discrete, so we can trivially build the dictionary ourselves.
public class DepartmentParticipationModel {
namespace CanvasModel.Analytics;
// The format of this model in the documentation is COMPLETELY WRONG. Each property is an array of objects, not an object,
// and each of those objects have some extra fields: {id, date, views, participations} in by_date and
// {id, category, views} in by_category. In both cases, id seems to be null 100% of the time, so I am omitting that one.
// The primary keys (date and category) are thankfully discrete, so we can trivially build the dictionary ourselves.
public class DepartmentParticipationModel
{
[JsonPropertyName("by_date")]
public IEnumerable<DepartmentParticipationDateEntryModel> ByDate { get; set; }
[JsonPropertyName("by_category")]
public IEnumerable<DepartmentParticipationCategoryEntryModel> ByCategory { get; set; }
}
}
public class DepartmentParticipationDateEntryModel {
public class DepartmentParticipationDateEntryModel
{
[JsonPropertyName("date")]
public DateTime Date { get; set; }
@@ -27,14 +28,14 @@ namespace Model.Analytics {
[JsonPropertyName("participations")]
public ulong Participations { get; set; }
}
}
public class DepartmentParticipationCategoryEntryModel {
public class DepartmentParticipationCategoryEntryModel
{
[JsonPropertyName("category")]
public string Category { get; set; }
[JsonPropertyName("views")]
public ulong Views { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Analytics {
public class DepartmentStatisticsModel {
namespace CanvasModel.Analytics;
public class DepartmentStatisticsModel
{
[JsonPropertyName("courses")]
public ulong Courses { get; set; }
@@ -27,5 +27,4 @@ namespace Model.Analytics {
[JsonPropertyName("assignments")]
public ulong Assignments { get; set; }
}
}

View File

@@ -1,7 +1,8 @@
namespace Model.Analytics {
public class TardinessModel {
namespace CanvasModel.Analytics;
public class TardinessModel
{
[JsonPropertyName("missing")]
public decimal Missing { get; set; }
@@ -17,5 +18,4 @@ namespace Model.Analytics {
[JsonPropertyName("total")]
public decimal Total { get; set; }
}
}

View File

@@ -2,18 +2,19 @@ using System;
using System.Collections.Generic;
namespace Model.Analytics {
public struct UserAssignmentSubmissionDataModel {
namespace CanvasModel.Analytics;
public struct UserAssignmentSubmissionDataModel
{
[JsonPropertyName("submitted_at")]
public DateTime? SubmittedAt { get; set; }
[JsonPropertyName("score")]
public double? Score { get; set; }
}
}
public class UserAssignmentDataModel {
public class UserAssignmentDataModel
{
[JsonPropertyName("assignment_id")]
public ulong AssignmentId { get; set; }
@@ -53,5 +54,4 @@ namespace Model.Analytics {
[JsonPropertyName("submission")]
public UserAssignmentSubmissionDataModel? Submission { get; set; }
}
}

View File

@@ -2,23 +2,23 @@ using System;
using System.Collections.Generic;
namespace Model.Analytics {
public struct UserParticipationModel {
namespace CanvasModel.Analytics;
public struct UserParticipationModel
{
[JsonPropertyName("page_views")]
public Dictionary<DateTime, ulong> PageViews { get; set; }
[JsonPropertyName("participations")]
public IEnumerable<UserParticipationEventModel> Participations { get; set; }
}
}
public struct UserParticipationEventModel {
public struct UserParticipationEventModel
{
[JsonPropertyName("created_at")]
public DateTime CreatedAt { get; set; }
[JsonPropertyName("url")]
public string Url { get; set; }
}
}

View File

@@ -2,11 +2,12 @@ using System;
using System.Collections.Generic;
using Model.Calendar;
using CanvasModel.Calendar;
namespace Model.Appointments {
namespace CanvasModel.Appointments;
public class AppointmentGroupModel {
public class AppointmentGroupModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -82,5 +83,5 @@ namespace Model.Appointments {
[JsonPropertyName("updated_at")]
public DateTime UpdatedAt { get; set; }
}
}

View File

@@ -1,9 +1,10 @@
using System;
namespace Model.Appointments {
namespace CanvasModel.Appointments;
public class AppointmentModel {
public class AppointmentModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -13,5 +14,5 @@ namespace Model.Appointments {
[JsonPropertyName("end_at")]
public DateTime EndAt { get; set; }
}
}

View File

@@ -1,11 +1,10 @@
using System;
namespace Model.Assignments
{
namespace CanvasModel.Assignments;
public class AssignmentDateModel
{
public class AssignmentDateModel
{
[JsonPropertyName("id")]
public ulong? Id { get; set; }
@@ -24,5 +23,4 @@ namespace Model.Assignments
[JsonPropertyName("lock_at")]
public DateTime? LockAt { get; set; }
}
}

View File

@@ -2,12 +2,12 @@ using System;
using System.Collections.Generic;
using Model.Discussions;
using Model.Submissions;
using CanvasModel.Discussions;
using CanvasModel.Submissions;
namespace Model.Assignments {
public class AssignmentModel {
namespace CanvasModel.Assignments;
public class AssignmentModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -209,5 +209,4 @@ namespace Model.Assignments {
[JsonPropertyName("allowed_attempts")]
public int AllowedAttempts { get; set; }
}
}

View File

@@ -3,9 +3,9 @@ using System.Collections.Generic;
namespace Model.Assignments {
public class AssignmentOverrideModel {
namespace CanvasModel.Assignments;
public class AssignmentOverrideModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -39,5 +39,4 @@ namespace Model.Assignments {
[JsonPropertyName("lock_at")]
public DateTime? LockAt { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Assignments {
public class ExternalToolTagAttributesModel {
namespace CanvasModel.Assignments;
public class ExternalToolTagAttributesModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -12,5 +12,4 @@ namespace Model.Assignments {
[JsonPropertyName("resource_link_id")]
public string ResourceLinkId { get; set; }
}
}

View File

@@ -2,9 +2,9 @@ using System;
namespace Model.Assignments {
public class LockInfoModel {
namespace CanvasModel.Assignments;
public class LockInfoModel
{
[JsonPropertyName("asset_string")]
public string AssetString { get; set; }
@@ -20,5 +20,4 @@ namespace Model.Assignments {
[JsonPropertyName("manually_locked")]
public bool? ManuallyLocked { get; set; }
}
}

View File

@@ -1,13 +1,12 @@
namespace Model.Assignments {
public class NeedsGradingCountModel {
namespace CanvasModel.Assignments;
public class NeedsGradingCountModel
{
[JsonPropertyName("section_id")]
public string SectionId { get; set; }
[JsonPropertyName("needs_grading_count")]
public uint NeedsGradingCount { get; set; }
}
}

View File

@@ -2,11 +2,10 @@ using System.Collections.Generic;
namespace Model.Assignments
{
namespace CanvasModel.Assignments;
public class RubricCriteriaModel
{
public class RubricCriteriaModel
{
[JsonPropertyName("points")]
public double? Points { get; set; }
@@ -34,5 +33,4 @@ namespace Model.Assignments
[JsonPropertyName("ignore_for_scoring")]
public bool? IgnoreForScoring { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Assignments {
public class RubricRatingModel {
namespace CanvasModel.Assignments;
public class RubricRatingModel
{
[JsonPropertyName("points")]
public double Points { get; set; }
@@ -15,5 +15,4 @@ namespace Model.Assignments {
[JsonPropertyName("long_description")]
public string LongDescription { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Assignments {
public class TurnitinSettingsModel {
namespace CanvasModel.Assignments;
public class TurnitinSettingsModel
{
[JsonPropertyName("originality_report_visibility")]
public string OriginalityReportVisibility { get; set; }
@@ -27,5 +27,4 @@ namespace Model.Assignments {
[JsonPropertyName("exclude_small_matches_value")]
public uint? ExcludeSmallMatchesValue { get; set; }
}
}

View File

@@ -1,10 +1,10 @@
using System;
namespace Model.Authentications {
// NOTE: the api documentation for this model is incorrect
public class AuthenticationEventModel {
namespace CanvasModel.Authentications;
// NOTE: the api documentation for this model is incorrect
public class AuthenticationEventModel
{
[JsonPropertyName("id")]
public string Id { get; set; }
@@ -17,9 +17,10 @@ namespace Model.Authentications {
[JsonPropertyName("links")]
public AuthenticationEventLinksModel Links { get; set; }
}
}
public struct AuthenticationEventLinksModel {
public struct AuthenticationEventLinksModel
{
[JsonPropertyName("login")]
public ulong Login { get; set; }
@@ -32,5 +33,4 @@ namespace Model.Authentications {
[JsonPropertyName("page_view")]
public ulong? PageView { get; set; }
}
}

View File

@@ -1,11 +1,11 @@
using System.Collections.Generic;
namespace Model.Authentications {
public struct AuthenticationEventsResponseModel {
namespace CanvasModel.Authentications;
public struct AuthenticationEventsResponseModel
{
[JsonPropertyName("events")]
public IEnumerable<AuthenticationEventModel> Events { get; set; }
}
}

View File

@@ -1,54 +1,53 @@
namespace Model.Calendar
{
public record AssignmentEventModel
{
namespace CanvasModel.Calendar;
// // A synthetic ID for the assignment
// "id": "assignment_987",
public record AssignmentEventModel
{
// // A synthetic ID for the assignment
// "id": "assignment_987",
[JsonPropertyName("id")]
public string Id { get; set; }
// // The title of the assignment
// "title": "Essay",
// // The title of the assignment
// "title": "Essay",
[JsonPropertyName("title")]
public string Title { get; set; }
// // The due_at timestamp of the assignment
// "start_at": "2012-07-19T23:59:00-06:00",
// // The due_at timestamp of the assignment
// "start_at": "2012-07-19T23:59:00-06:00",
[JsonPropertyName("start_at")]
public DateTime StartAt { get; set; }
// // The due_at timestamp of the assignment
// "end_at": "2012-07-19T23:59:00-06:00",
// // The due_at timestamp of the assignment
// "end_at": "2012-07-19T23:59:00-06:00",
[JsonPropertyName("end_at")]
public DateTime EndAt { get; set; }
// // The HTML description of the assignment
// "description": "<b>Write an essay. Whatever you want.</b>",
// // The HTML description of the assignment
// "description": "<b>Write an essay. Whatever you want.</b>",
[JsonPropertyName("description")]
public string Description { get; set; }
// // the context code of the (course) calendar this assignment belongs to
// "context_code": "course_123",
// // Current state of the assignment ('published' or 'deleted')
// "workflow_state": "published",
// // URL for this assignment (note that updating/deleting should be done via the
// // Assignments API)
// "url": "https://example.com/api/v1/calendar_events/assignment_987",
// // URL for a user to view this assignment
// "html_url": "http://example.com/courses/123/assignments/987",
// // The due date of this assignment
// "all_day_date": "2012-07-19",
// // Boolean indicating whether this is an all-day event (e.g. assignment due at
// // midnight)
// "all_day": true,
// // When the assignment was created
// "created_at": "2012-07-12T10:55:20-06:00",
// // When the assignment was last updated
// "updated_at": "2012-07-12T10:55:20-06:00",
// // The full assignment JSON data (See the Assignments API)
// "assignment": null,
// // The list of AssignmentOverrides that apply to this event (See the Assignments
// // API). This information is useful for determining which students or sections
// // this assignment-due event applies to.
// "assignment_overrides": null,
// // Boolean indicating whether this has important dates.
// "important_dates": true
// // the context code of the (course) calendar this assignment belongs to
// "context_code": "course_123",
// // Current state of the assignment ('published' or 'deleted')
// "workflow_state": "published",
// // URL for this assignment (note that updating/deleting should be done via the
// // Assignments API)
// "url": "https://example.com/api/v1/calendar_events/assignment_987",
// // URL for a user to view this assignment
// "html_url": "http://example.com/courses/123/assignments/987",
// // The due date of this assignment
// "all_day_date": "2012-07-19",
// // Boolean indicating whether this is an all-day event (e.g. assignment due at
// // midnight)
// "all_day": true,
// // When the assignment was created
// "created_at": "2012-07-12T10:55:20-06:00",
// // When the assignment was last updated
// "updated_at": "2012-07-12T10:55:20-06:00",
// // The full assignment JSON data (See the Assignments API)
// "assignment": null,
// // The list of AssignmentOverrides that apply to this event (See the Assignments
// // API). This information is useful for determining which students or sections
// // this assignment-due event applies to.
// "assignment_overrides": null,
// // Boolean indicating whether this has important dates.
// "important_dates": true
}
}

View File

@@ -2,19 +2,19 @@ using System;
using System.Collections.Generic;
using Model.Assignments;
using Model.Groups;
using Model.Users;
using CanvasModel.Assignments;
using CanvasModel.Groups;
using CanvasModel.Users;
namespace Model.Calendar
{
namespace CanvasModel.Calendar;
/*
/*
* This class combines the fields of normal, reservation, time-slot, and assignment calendar events.
* Concrete structure classes will specialize to these types and inherit from a common base.
*/
public record CalendarEventModel {
public record CalendarEventModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -123,5 +123,4 @@ namespace Model.Calendar
[JsonPropertyName("participants_per_appointment")]
public uint? ParticipantsPerAppointment { get; set; }
}
}

View File

@@ -1,10 +1,9 @@
namespace Model.ContentShares {
public struct ContentExportIdModel {
namespace CanvasModel.ContentShares;
public struct ContentExportIdModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
}
}

View File

@@ -2,12 +2,12 @@ using System;
using System.Collections.Generic;
using Model.Courses;
using Model.Users;
using CanvasModel.Courses;
using CanvasModel.Users;
namespace Model.ContentShares {
public class ContentShareModel {
namespace CanvasModel.ContentShares;
public class ContentShareModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -41,5 +41,4 @@ namespace Model.ContentShares {
[JsonPropertyName("content_export")]
public ContentExportIdModel? ContentExport { get; set; }
}
}

View File

@@ -2,12 +2,12 @@ using System;
using System.Collections.Generic;
using Model.Discussions;
using Model.Submissions;
using CanvasModel.Discussions;
using CanvasModel.Submissions;
namespace Model.Conversations {
public class ConversationMessageModel {
namespace CanvasModel.Conversations;
public class ConversationMessageModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -32,5 +32,4 @@ namespace Model.Conversations {
[JsonPropertyName("attachments")]
public IEnumerable<FileAttachmentModel> Attachments { get; set; }
}
}

View File

@@ -3,9 +3,9 @@ using System.Collections.Generic;
namespace Model.Conversations {
public class ConversationModel {
namespace CanvasModel.Conversations;
public class ConversationModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -54,5 +54,4 @@ namespace Model.Conversations {
[JsonPropertyName("context_name")]
public string ContextName { get; set; }
}
}

View File

@@ -1,9 +1,9 @@
namespace Model.Conversations {
public class ConversationParticipantModel {
namespace CanvasModel.Conversations;
public class ConversationParticipantModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -16,5 +16,4 @@ namespace Model.Conversations {
[JsonPropertyName("avatar_url")]
public string? AvatarUrl { get; set; }
}
}

View File

@@ -1,12 +1,11 @@
using System.Collections.Generic;
namespace Model.Conversations {
public class DetailedConversationModel : ConversationModel {
namespace CanvasModel.Conversations;
public class DetailedConversationModel : ConversationModel
{
[JsonPropertyName("messages")]
public IEnumerable<ConversationMessageModel> Messages { get; set; }
}
}

View File

@@ -1,9 +1,8 @@
namespace Model.Courses {
public struct CalendarLinkModel {
namespace CanvasModel.Courses;
public struct CalendarLinkModel
{
[JsonPropertyName("ics")]
public string Ics { get; set; }
}
}

View File

@@ -2,11 +2,11 @@ using System;
using System.Collections.Generic;
using Model.Enrollments;
using CanvasModel.Enrollments;
namespace Model.Courses {
public class CourseModel {
namespace CanvasModel.Courses;
public class CourseModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -148,5 +148,4 @@ namespace Model.Courses {
[JsonPropertyName("blueprint_restrictions_by_object_type")]
public Dictionary<string, Dictionary<string, bool>>? BlueprintRestrictionsByObjectType { get; set; }
}
}

View File

@@ -2,9 +2,9 @@ using System;
namespace Model.Courses {
public class CourseProgressModel {
namespace CanvasModel.Courses;
public class CourseProgressModel
{
[JsonPropertyName("requirement_count")]
public uint? RequirementCount { get; set; }
@@ -17,5 +17,4 @@ namespace Model.Courses {
[JsonPropertyName("completed_at")]
public DateTime? CompletedAt { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Courses {
public class CourseSettingsModel {
namespace CanvasModel.Courses;
public class CourseSettingsModel
{
[JsonPropertyName("allow_final_grade_override")]
public bool AllowFinalGradeOverride { get; set; }
@@ -45,5 +45,4 @@ namespace Model.Courses {
[JsonPropertyName("home_page_announcements_limit")]
public long HomePageAnnouncementLimit { get; set; }
}
}

View File

@@ -1,13 +1,12 @@
namespace Model.Courses {
public class ShortCourseModel {
namespace CanvasModel.Courses;
public class ShortCourseModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
}
}

View File

@@ -1,9 +1,7 @@
using System;
namespace Model.Courses {
public class TermModel {
namespace CanvasModel.Courses;
public class TermModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -16,5 +14,4 @@ namespace Model.Courses {
[JsonPropertyName("end_at")]
public DateTime? EndAt { get; set; }
}
}

View File

@@ -1,13 +1,12 @@
namespace Model.CustomGradebookColumns {
public struct ColumnDatumModel {
namespace CanvasModel.CustomGradebookColumns;
public struct ColumnDatumModel
{
[JsonPropertyName("content")]
public string Content { get; set; }
[JsonPropertyName("user_id")]
public ulong UserId { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.CustomGradebookColumns {
public class CustomColumnModel {
namespace CanvasModel.CustomGradebookColumns;
public class CustomColumnModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -21,5 +21,4 @@ namespace Model.CustomGradebookColumns {
[JsonPropertyName("read_only")]
public bool? ReadOnly { get; set; }
}
}

View File

@@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using Model.Users;
using CanvasModel.Users;
namespace Model.Discussions {
public class DiscussionTopicModel {
namespace CanvasModel.Discussions;
public class DiscussionTopicModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -112,5 +112,4 @@ namespace Model.Discussions {
[JsonPropertyName("author")]
public UserDisplayModel Author { get; set; }
}
}

View File

@@ -1,9 +1,9 @@
namespace Model.Discussions {
public class FileAttachmentModel {
namespace CanvasModel.Discussions;
public class FileAttachmentModel
{
[JsonPropertyName("content_type")]
public string ContentType { get; set; }
@@ -18,5 +18,4 @@ namespace Model.Discussions {
public string DisplayName { get; set; }
}
}

View File

@@ -4,9 +4,9 @@ using System.Collections.Generic;
namespace Model.Discussions {
public class TopicEntryModel {
namespace CanvasModel.Discussions;
public class TopicEntryModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -45,5 +45,4 @@ namespace Model.Discussions {
public bool? HasMoreReplies { get; set; }
}
}

View File

@@ -2,9 +2,9 @@ using System;
namespace Model.Discussions {
public class TopicReplyModel {
namespace CanvasModel.Discussions;
public class TopicReplyModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -31,5 +31,4 @@ namespace Model.Discussions {
public DateTime CreatedAt { get; set; }
}
}

View File

@@ -2,8 +2,9 @@ using System;
using System.Collections.Generic;
namespace Model.EnrollmentTerms {
public class EnrollmentTermModel {
namespace CanvasModel.EnrollmentTerms;
public class EnrollmentTermModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -30,13 +31,13 @@ namespace Model.EnrollmentTerms {
[JsonPropertyName("overrides")]
public Dictionary<string, EnrollmentTermDateOverrideModel> Overrides { get; set; }
}
}
public struct EnrollmentTermDateOverrideModel {
public struct EnrollmentTermDateOverrideModel
{
[JsonPropertyName("start_at")]
public DateTime? StartAt { get; set; }
[JsonPropertyName("end_at")]
public DateTime? EndAt { get; set; }
}
}

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic;
namespace Model.EnrollmentTerms {
public struct RedundantEnrollmentTermsResponse {
namespace CanvasModel.EnrollmentTerms;
public struct RedundantEnrollmentTermsResponse
{
[JsonPropertyName("enrollment_terms")]
public IEnumerable<EnrollmentTermModel> EnrollmentTerms { get; set; }
}
}

View File

@@ -1,11 +1,8 @@
using System;
using CanvasModel.Users;
using Model.Users;
namespace Model.Enrollments {
public class EnrollmentModel {
namespace CanvasModel.Enrollments;
public class EnrollmentModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -135,5 +132,4 @@ namespace Model.Enrollments {
[JsonPropertyName("current_period_unposted_final_grade")]
public string? CurrentPeriodUnpostedFinalGrade { get; set; }
}
}

View File

@@ -1,9 +1,9 @@
namespace Model.Enrollments {
public class GradeModel {
namespace CanvasModel.Enrollments;
public class GradeModel
{
[JsonPropertyName("html_url")]
public string? HtmlUrl { get; set; }
@@ -31,5 +31,4 @@ namespace Model.Enrollments {
[JsonPropertyName("unposted_final_score")]
public string? UnpostedFinalScore { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class AccountNavigationModel {
namespace CanvasModel.ExternalTools;
public class AccountNavigationModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -21,5 +21,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("display_type")]
public string DisplayType { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class CourseHomeSubNavigationModel {
namespace CanvasModel.ExternalTools;
public class CourseHomeSubNavigationModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -15,5 +15,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("icon_url")]
public string IconUrl { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class CourseNavigationModel {
namespace CanvasModel.ExternalTools;
public class CourseNavigationModel
{
[JsonPropertyName("enabled")]
public bool? Enabled { get; set; }
@@ -21,5 +21,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("display_type")]
public string DisplayType { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class EditorButtonModel {
namespace CanvasModel.ExternalTools;
public class EditorButtonModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -21,5 +21,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("message_type")]
public string MessageType { get; set; }
}
}

View File

@@ -2,9 +2,9 @@ using System;
using System.Collections.Generic;
namespace Model.ExternalTools {
public class ExternalToolModel {
namespace CanvasModel.ExternalTools;
public class ExternalToolModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -71,5 +71,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("not_selectable")]
public bool? NotSelectable { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class HomeworkSubmissionModel {
namespace CanvasModel.ExternalTools;
public class HomeworkSubmissionModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -15,5 +15,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("message_type")]
public string MessageType { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class LinkSelectionModel {
namespace CanvasModel.ExternalTools;
public class LinkSelectionModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -15,5 +15,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("message_type")]
public string MessageType { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class MigrationSelectionModel {
namespace CanvasModel.ExternalTools;
public class MigrationSelectionModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -12,5 +12,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("message_type")]
public string MessageType { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class ResourceSelectionModel {
namespace CanvasModel.ExternalTools;
public class ResourceSelectionModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -18,5 +18,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("selection_height")]
public uint? SelectionHeight { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class ToolConfigurationModel {
namespace CanvasModel.ExternalTools;
public class ToolConfigurationModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -15,5 +15,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("prefer_sis_email")]
public bool? PreferSisEmail { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ExternalTools {
public class UserNavigationModel {
namespace CanvasModel.ExternalTools;
public class UserNavigationModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -15,5 +15,4 @@ namespace Model.ExternalTools {
[JsonPropertyName("visibility")]
public string Visibility { get; set; }
}
}

View File

@@ -1,8 +1,9 @@
using System;
namespace Model.Files {
public class CanvasFileModel {
namespace CanvasModel.Files;
public class CanvasFileModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -73,5 +74,4 @@ namespace Model.Files {
[JsonPropertyName("preview_url")]
public string PreviewUrl { get; set; }
}
}

View File

@@ -1,8 +1,9 @@
using System;
namespace Model.Files {
public class FolderModel {
namespace CanvasModel.Files;
public class FolderModel
{
[JsonPropertyName("context_type")]
public string ContextType { get; set; }
@@ -63,5 +64,4 @@ namespace Model.Files {
[JsonPropertyName("for_submissions")]
public bool? ForSubmissions { get; set; }
}
}

View File

@@ -1,7 +1,8 @@
namespace Model.Files {
public class LicenseModel {
namespace CanvasModel.Files;
public class LicenseModel
{
[JsonPropertyName("id")]
public string Id { get; set; }
@@ -11,5 +12,4 @@ namespace Model.Files {
[JsonPropertyName("url")]
public string Url { get; set; }
}
}

View File

@@ -1,8 +1,9 @@
using System.Collections.Generic;
namespace Model.Files {
public class UsageRightsModel {
namespace CanvasModel.Files;
public class UsageRightsModel
{
[JsonPropertyName("legal_copyright")]
public string LegalCopyright { get; set; }
@@ -21,5 +22,4 @@ namespace Model.Files {
[JsonPropertyName("file_ids")]
public IEnumerable<ulong> FileIds { get; set; }
}
}

View File

@@ -1,9 +1,7 @@
namespace Model.GradeChangelog {
public class GradeChangeEventLinksModel {
namespace CanvasModel.GradeChangelog;
public class GradeChangeEventLinksModel
{
[JsonPropertyName("assignment")]
public ulong Assignment { get; set; }
@@ -19,5 +17,4 @@ namespace Model.GradeChangelog {
[JsonPropertyName("page_view")]
public string? PageView { get; set; }
}
}

View File

@@ -1,10 +1,7 @@
using System;
namespace Model.GradeChangelog {
public class GradeChangeEventModel {
namespace CanvasModel.GradeChangelog;
public class GradeChangeEventModel
{
[JsonPropertyName("id")]
public string Id { get; set; }
@@ -38,5 +35,4 @@ namespace Model.GradeChangelog {
[JsonPropertyName("links")]
public GradeChangeEventLinksModel? Links { get; set; }
}
}

View File

@@ -1,11 +1,8 @@
using System.Collections.Generic;
namespace Model.GradeChangelog {
public class RedundantGradeChangeEventResponse {
namespace CanvasModel.GradeChangelog;
public class RedundantGradeChangeEventResponse
{
[JsonPropertyName("events")]
public IEnumerable<GradeChangeEventModel> Events { get; set; }
}
}

View File

@@ -1,15 +1,11 @@
using System;
using System.Collections.Generic;
namespace Model.Gradebook {
public class DayModel {
namespace CanvasModel.Gradebook;
public class DayModel
{
[JsonPropertyName("date")]
public DateTime Date { get; set; }
[JsonPropertyName("graders")]
public IEnumerable<GraderModel> Graders { get; set; }
}
}

View File

@@ -1,10 +1,9 @@
using System.Collections.Generic;
using Model.Assignments;
using CanvasModel.Assignments;
namespace Model.Gradebook {
public class GraderModel {
namespace CanvasModel.Gradebook;
public class GraderModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -15,5 +14,4 @@ namespace Model.Gradebook {
// the docs say this is a list of integers, but it isn't.
[JsonPropertyName("assignments")]
public IEnumerable<AssignmentModel> Assignments { get; set; }
}
}

View File

@@ -1,15 +1,11 @@
using System.Collections.Generic;
namespace Model.Gradebook {
public class SubmissionHistoryModel {
namespace CanvasModel.Gradebook;
public class SubmissionHistoryModel
{
[JsonPropertyName("submission_id")]
public ulong SubmissionId { get; set; }
[JsonPropertyName("versions")]
public IEnumerable<SubmissionVersionModel>? Versions { get; set; }
}
}

View File

@@ -1,10 +1,8 @@
using System;
using CanvasModel.Submissions;
using Model.Submissions;
namespace Model.Gradebook {
public class SubmissionVersionModel : SubmissionModel {
namespace CanvasModel.Gradebook;
public class SubmissionVersionModel : SubmissionModel
{
[JsonPropertyName("assignment_name")]
public string AssignmentName { get; set; }
@@ -35,5 +33,4 @@ namespace Model.Gradebook {
[JsonPropertyName("previous_grader")]
public string PreviousGrader { get; set; }
}
}

View File

@@ -1,8 +1,7 @@
using System;
namespace Model.GradingPeriods {
public class GradingPeriodModel {
namespace CanvasModel.GradingPeriods;
public class GradingPeriodModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -24,5 +23,4 @@ namespace Model.GradingPeriods {
[JsonPropertyName("is_closed")]
public bool? IsClosed { get; set; }
}
}

View File

@@ -1,9 +1,8 @@
using System.Collections.Generic;
namespace Model.GradingPeriods {
public class RedundantGradingPeriodResponse {
namespace CanvasModel.GradingPeriods;
public class RedundantGradingPeriodResponse
{
[JsonPropertyName("grading_periods")]
public IEnumerable<GradingPeriodModel> GradingPeriods { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Groups {
public class GroupMembershipModel {
namespace CanvasModel.Groups;
public class GroupMembershipModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -24,5 +24,4 @@ namespace Model.Groups {
[JsonPropertyName("sis_import_id")]
public ulong? SisImportId { get; set; }
}
}

View File

@@ -1,10 +1,7 @@
using System.Collections.Generic;
namespace Model.Groups {
public class GroupModel {
namespace CanvasModel.Groups;
public class GroupModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -56,5 +53,4 @@ namespace Model.Groups {
[JsonPropertyName("permissions")]
public Dictionary<string, bool> Permissions { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Modules {
public class CompletionRequirementModel {
namespace CanvasModel.Modules;
public class CompletionRequirementModel
{
[JsonPropertyName("type")]
public string Type { get; set; }
@@ -12,5 +12,4 @@ namespace Model.Modules {
[JsonPropertyName("completed")]
public bool? Completed { get; set; }
}
}

View File

@@ -1,10 +1,7 @@
using System;
namespace Model.Modules {
public class ContentDetailsModel {
namespace CanvasModel.Modules;
public class ContentDetailsModel
{
[JsonPropertyName("points_possible")]
public uint? PointsPossible { get; set; }
@@ -23,5 +20,4 @@ namespace Model.Modules {
[JsonPropertyName("lock_explanation")]
public string? LockExplanation { get; set; }
}
}

View File

@@ -1,10 +1,7 @@
namespace Model.Modules {
public class ModuleItemModel {
namespace CanvasModel.Modules;
public class ModuleItemModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -48,5 +45,4 @@ namespace Model.Modules {
[JsonPropertyName("published")]
public bool? Published { get; set; }
}
}

View File

@@ -1,11 +1,7 @@
using System.Collections.Generic;
namespace Model.Modules {
public class ModuleItemSequenceModel {
namespace CanvasModel.Modules;
public class ModuleItemSequenceModel
{
[JsonPropertyName("items")]
public IEnumerable<ModuleItemSequenceNodeModel> Items { get; set; }
}
}

View File

@@ -1,9 +1,7 @@
namespace Model.Modules {
public class ModuleItemSequenceNodeModel {
namespace CanvasModel.Modules;
public class ModuleItemSequenceNodeModel
{
[JsonPropertyName("prev")]
public ModuleItemModel? Prev { get; set; }
@@ -16,5 +14,4 @@ namespace Model.Modules {
[JsonPropertyName("mastery_path")]
public object? MasteryPath { get; set; } // todo concrete type?
}
}

View File

@@ -1,12 +1,7 @@
using System;
using System.Collections.Generic;
namespace Model.Modules {
public class ModuleModel {
namespace CanvasModel.Modules;
public class ModuleModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -52,5 +47,4 @@ namespace Model.Modules {
[JsonPropertyName("published")]
public bool? Published { get; set; }
}
}

View File

@@ -1,9 +1,7 @@
namespace Model.OutcomeResults {
public class OutcomeAlignmentModel {
namespace CanvasModel.OutcomeResults;
public class OutcomeAlignmentModel
{
[JsonPropertyName("id")]
public string Id { get; set; }
@@ -13,5 +11,4 @@ namespace Model.OutcomeResults {
[JsonPropertyName("html_url")]
public string? HtmlUrl { get; set; }
}
}

View File

@@ -1,15 +1,10 @@
using System.Collections.Generic;
namespace Model.OutcomeResults {
public struct OutcomePathModel {
namespace CanvasModel.OutcomeResults;
public struct OutcomePathModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
[JsonPropertyName("parts")]
public IEnumerable<OutcomePathPartModel>? Parts { get; set; }
}
}

View File

@@ -1,10 +1,9 @@
namespace Model.OutcomeResults {
public struct OutcomePathPartModel {
namespace CanvasModel.OutcomeResults;
public struct OutcomePathPartModel
{
[JsonPropertyName("name")]
public string Name { get; set; }
}
}

View File

@@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
namespace Model.OutcomeResults {
public class OutcomeResultModel {
namespace CanvasModel.OutcomeResults;
public class OutcomeResultModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -20,5 +18,4 @@ namespace Model.OutcomeResults {
[JsonPropertyName("percent")]
public decimal Percent { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.OutcomeResults {
public class OutcomeRollupLinksModel {
namespace CanvasModel.OutcomeResults;
public class OutcomeRollupLinksModel
{
[JsonPropertyName("course")]
public ulong? Course { get; set; }
@@ -12,5 +12,4 @@ namespace Model.OutcomeResults {
[JsonPropertyName("section")]
public ulong? Section { get; set; }
}
}

View File

@@ -1,10 +1,8 @@
using System.Collections.Generic;
namespace Model.OutcomeResults {
public class OutcomeRollupModel {
namespace CanvasModel.OutcomeResults;
public class OutcomeRollupModel
{
[JsonPropertyName("scores")]
public IEnumerable<OutcomeRollupScoreModel>? Scores { get; set; }
@@ -14,5 +12,4 @@ namespace Model.OutcomeResults {
[JsonPropertyName("links")]
public OutcomeRollupLinksModel Links { get; set; }
}
}

View File

@@ -1,10 +1,9 @@
namespace Model.OutcomeResults {
public class OutcomeRollupScoreLinksModel {
namespace CanvasModel.OutcomeResults;
public class OutcomeRollupScoreLinksModel
{
[JsonPropertyName("outcome")]
public ulong Outcome { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.OutcomeResults {
public class OutcomeRollupScoreModel {
namespace CanvasModel.OutcomeResults;
public class OutcomeRollupScoreModel
{
[JsonPropertyName("score")]
public double? Score { get; set; }
@@ -12,5 +12,4 @@ namespace Model.OutcomeResults {
[JsonPropertyName("links")]
public OutcomeRollupScoreLinksModel Links { get; set; }
}
}

View File

@@ -1,12 +1,9 @@
using System;
using CanvasModel.Assignments;
using CanvasModel.Users;
using Model.Assignments;
using Model.Users;
namespace Model.Pages {
public class PageModel {
namespace CanvasModel.Pages;
public class PageModel
{
[JsonPropertyName("url")]
public string Url { get; set; }
@@ -46,5 +43,4 @@ namespace Model.Pages {
[JsonPropertyName("page_id")]
public string PageId { get; set; }
}
}

View File

@@ -1,10 +1,8 @@
using System;
using CanvasModel.Users;
using Model.Users;
namespace Model.Pages {
public class PageRevisionModel {
namespace CanvasModel.Pages;
public class PageRevisionModel
{
[JsonPropertyName("revision_id")]
public ulong RevisionId { get; set; }
@@ -26,5 +24,4 @@ namespace Model.Pages {
[JsonPropertyName("body")]
public string? Body { get; set; }
}
}

View File

@@ -1,10 +1,7 @@
using System.Collections.Generic;
namespace Model.ProficiencyRatings {
public struct ProficiencyModel {
namespace CanvasModel.ProficiencyRatings;
public struct ProficiencyModel
{
[JsonPropertyName("ratings")]
public IEnumerable<ProficiencyRatingModel> Ratings { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.ProficiencyRatings {
public class ProficiencyRatingModel {
namespace CanvasModel.ProficiencyRatings;
public class ProficiencyRatingModel
{
[JsonPropertyName("description")]
public string Description { get; set; }
@@ -15,5 +15,4 @@ namespace Model.ProficiencyRatings {
[JsonPropertyName("color")]
public string Color { get; set; }
}
}

View File

@@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using CanvasModel.Assignments;
using Model.Assignments;
namespace Model.Quizzes {
public class QuizModel {
namespace CanvasModel.Quizzes;
public class QuizModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -124,5 +121,4 @@ namespace Model.Quizzes {
[JsonPropertyName("anonymous_submissions")]
public bool? AnonymousSubmissions { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
namespace Model.Quizzes {
public class QuizPermissionsModel {
namespace CanvasModel.Quizzes;
public class QuizPermissionsModel
{
[JsonPropertyName("read")]
public bool Read { get; set; }
@@ -24,5 +24,4 @@ namespace Model.Quizzes {
[JsonPropertyName("update")]
public bool Update { get; set; }
}
}

View File

@@ -1,12 +1,7 @@
using System.Collections.Generic;
namespace Model.Reports {
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable ClassNeverInstantiated.Global
public class ReportDescriptionModel {
namespace CanvasModel.Reports;
public class ReportDescriptionModel
{
[JsonPropertyName("report")]
public string Report { get; set; }
@@ -16,14 +11,14 @@ namespace Model.Reports {
[JsonPropertyName("parameters")]
public Dictionary<string, ReportParameterDescriptionModel>? Parameters { get; set; }
}
}
public class ReportParameterDescriptionModel {
public class ReportParameterDescriptionModel
{
[JsonPropertyName("description")]
public string Description { get; set; }
[JsonPropertyName("required")]
public bool Required { get; set; }
}
}

View File

@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using CanvasModel.Discussions;
using Model.Discussions;
namespace Model.Reports {
public class ReportModel {
namespace CanvasModel.Reports;
public class ReportModel
{
[JsonPropertyName("id")]
public ulong Id { get; set; }
@@ -43,5 +39,4 @@ namespace Model.Reports {
[JsonPropertyName("current_line")]
public ulong? CurrentLine { get; set; }
}
}

View File

@@ -1,8 +1,7 @@
namespace Model.Results {
public class ResultModel {
namespace CanvasModel.Results;
public class ResultModel
{
// yes indeed the docs say this model specifically uses camelCase properties
[JsonPropertyName("id")]
@@ -22,5 +21,4 @@ namespace Model.Results {
[JsonPropertyName("scoreOf")]
public string ScoreOf { get; set; }
}
}

View File

@@ -1,10 +1,9 @@
using System.Collections.Generic;
using Model.Accounts;
using CanvasModel.Accounts;
namespace Model.Roles {
public class RoleModel {
namespace CanvasModel.Roles;
public class RoleModel
{
[JsonPropertyName("label")]
public string Label { get; set; }
@@ -20,5 +19,4 @@ namespace Model.Roles {
[JsonPropertyName("permissions")]
public Dictionary<string, RolePermissionsModel> Permissions { get; set; }
}
}

Some files were not shown because too many files have changed in this diff Show More