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

@@ -1,57 +1,55 @@
namespace CanvasModel.SisImports;
public class SisImportCountsModel
{
namespace Model.SisImports {
[JsonPropertyName("accounts")]
public ulong Accounts { get; set; }
public class SisImportCountsModel {
[JsonPropertyName("accounts")]
public ulong Accounts { get; set; }
[JsonPropertyName("terms")]
public ulong Terms { get; set; }
[JsonPropertyName("abstract_courses")]
public ulong AbstractCourses { get; set; }
[JsonPropertyName("courses")]
public ulong Courses { get; set; }
[JsonPropertyName("sections")]
public ulong Sections { get; set; }
[JsonPropertyName("xlists")]
public ulong CrossLists { get; set; }
[JsonPropertyName("users")]
public ulong Users { get; set; }
[JsonPropertyName("enrollments")]
public ulong Enrollments { get; set; }
[JsonPropertyName("groups")]
public ulong Groups { get; set; }
[JsonPropertyName("group_memberships")]
public ulong GroupMemberships { get; set; }
[JsonPropertyName("grade_publishing_results")]
public ulong GradePublishingResults { get; set; }
// the following three specific fields are null when 0, unlike the other ones which are 0 when 0
[JsonPropertyName("batch_courses_deleted")]
public ulong? BatchCoursesDeleted { get; set; }
[JsonPropertyName("batch_sections_deleted")]
public ulong? BatchSectionsDeleted { get; set; }
[JsonPropertyName("batch_enrollments_deleted")]
public ulong? BatchEnrollmentsDeleted { get; set; }
[JsonPropertyName("error_count")]
public ulong Errors { get; set; }
[JsonPropertyName("warning_count")]
public ulong Warnings { get; set; }
}
[JsonPropertyName("terms")]
public ulong Terms { get; set; }
[JsonPropertyName("abstract_courses")]
public ulong AbstractCourses { get; set; }
[JsonPropertyName("courses")]
public ulong Courses { get; set; }
[JsonPropertyName("sections")]
public ulong Sections { get; set; }
[JsonPropertyName("xlists")]
public ulong CrossLists { get; set; }
[JsonPropertyName("users")]
public ulong Users { get; set; }
[JsonPropertyName("enrollments")]
public ulong Enrollments { get; set; }
[JsonPropertyName("groups")]
public ulong Groups { get; set; }
[JsonPropertyName("group_memberships")]
public ulong GroupMemberships { get; set; }
[JsonPropertyName("grade_publishing_results")]
public ulong GradePublishingResults { get; set; }
// the following three specific fields are null when 0, unlike the other ones which are 0 when 0
[JsonPropertyName("batch_courses_deleted")]
public ulong? BatchCoursesDeleted { get; set; }
[JsonPropertyName("batch_sections_deleted")]
public ulong? BatchSectionsDeleted { get; set; }
[JsonPropertyName("batch_enrollments_deleted")]
public ulong? BatchEnrollmentsDeleted { get; set; }
[JsonPropertyName("error_count")]
public ulong Errors { get; set; }
[JsonPropertyName("warning_count")]
public ulong Warnings { get; set; }
}

View File

@@ -1,18 +1,14 @@
using System.Collections.Generic;
namespace CanvasModel.SisImports;
public class SisImportDataModel
{
[JsonPropertyName("import_type")]
public string ImportType { get; set; }
namespace Model.SisImports {
[JsonPropertyName("supplied_batches")]
public IEnumerable<string> SuppliedBatches { get; set; }
public class SisImportDataModel {
[JsonPropertyName("import_type")]
public string ImportType { get; set; }
[JsonPropertyName("supplied_batches")]
public IEnumerable<string> SuppliedBatches { get; set; }
[JsonPropertyName("counts")]
public SisImportCountsModel? Counts { get; set; }
}
[JsonPropertyName("counts")]
public SisImportCountsModel? Counts { get; set; }
}

View File

@@ -1,78 +1,74 @@
using System;
using System.Collections.Generic;
using CanvasModel.Users;
using Model.Users;
namespace CanvasModel.SisImports;
public class SisImportModel
{
namespace Model.SisImports {
[JsonPropertyName("id")]
public ulong Id { get; set; }
public class SisImportModel {
[JsonPropertyName("id")]
public ulong Id { get; set; }
[JsonPropertyName("created_at")]
public DateTime? CreatedAt { get; set; }
[JsonPropertyName("ended_at")]
public DateTime? EndedAt { get; set; }
[JsonPropertyName("updated_at")]
public DateTime? UpdatedAt { get; set; }
[JsonPropertyName("workflow_state")]
public string WorkflowState { get; set; }
[JsonPropertyName("data")]
public SisImportDataModel Data { get; set; }
[JsonPropertyName("statistics")]
public object? Statistics { get; set; }
// public SisImportStatisticsModel Statistics { get; set; }
[JsonPropertyName("progress")]
public long? Progress { get; set; }
[JsonPropertyName("errors_attachment")]
public object ErrorsAttachment { get; set; }
[JsonPropertyName("user")]
public UserModel? User { get; set; }
[JsonPropertyName("processing_warnings")]
public IEnumerable<IEnumerable<string>>? ProcessingWarnings { get; set; }
[JsonPropertyName("processing_errors")]
public IEnumerable<IEnumerable<string>>? ProcessingErrors { get; set; }
[JsonPropertyName("batch_mode")]
public bool? BatchMode { get; set; }
[JsonPropertyName("batch_mode_term_id")]
public long? BatchModeTermId { get; set; }
[JsonPropertyName("multi_term_batch_mode")]
public bool? MultiTermBatchMode { get; set; }
[JsonPropertyName("created_at")]
public DateTime? CreatedAt { get; set; }
[JsonPropertyName("skip_deletes")]
public bool? SkipDeletes { get; set; }
[JsonPropertyName("override_sis_stickiness")]
public bool? OverrideSisStickiness { get; set; }
[JsonPropertyName("add_sis_stickiness")]
public bool? AddSisStickiness { get; set; }
[JsonPropertyName("clear_sis_stickiness")]
public bool? ClearSisStickiness { get; set; }
[JsonPropertyName("diffing_data_set_identifier")]
public string DiffingDataSetIdentifier { get; set; }
[JsonPropertyName("diffed_against_import_id")]
public ulong? DiffedAgainstImportId { get; set; }
[JsonPropertyName("ended_at")]
public DateTime? EndedAt { get; set; }
[JsonPropertyName("csv_attachments")]
public IEnumerable<object> CsvAttachments { get; set; }
}
[JsonPropertyName("updated_at")]
public DateTime? UpdatedAt { get; set; }
[JsonPropertyName("workflow_state")]
public string WorkflowState { get; set; }
[JsonPropertyName("data")]
public SisImportDataModel Data { get; set; }
[JsonPropertyName("statistics")]
public object? Statistics { get; set; }
// public SisImportStatisticsModel Statistics { get; set; }
[JsonPropertyName("progress")]
public long? Progress { get; set; }
[JsonPropertyName("errors_attachment")]
public object ErrorsAttachment { get; set; }
[JsonPropertyName("user")]
public UserModel? User { get; set; }
[JsonPropertyName("processing_warnings")]
public IEnumerable<IEnumerable<string>>? ProcessingWarnings { get; set; }
[JsonPropertyName("processing_errors")]
public IEnumerable<IEnumerable<string>>? ProcessingErrors { get; set; }
[JsonPropertyName("batch_mode")]
public bool? BatchMode { get; set; }
[JsonPropertyName("batch_mode_term_id")]
public long? BatchModeTermId { get; set; }
[JsonPropertyName("multi_term_batch_mode")]
public bool? MultiTermBatchMode { get; set; }
[JsonPropertyName("skip_deletes")]
public bool? SkipDeletes { get; set; }
[JsonPropertyName("override_sis_stickiness")]
public bool? OverrideSisStickiness { get; set; }
[JsonPropertyName("add_sis_stickiness")]
public bool? AddSisStickiness { get; set; }
[JsonPropertyName("clear_sis_stickiness")]
public bool? ClearSisStickiness { get; set; }
[JsonPropertyName("diffing_data_set_identifier")]
public string DiffingDataSetIdentifier { get; set; }
[JsonPropertyName("diffed_against_import_id")]
public ulong? DiffedAgainstImportId { get; set; }
[JsonPropertyName("csv_attachments")]
public IEnumerable<object> CsvAttachments { get; set; }
}

View File

@@ -1,22 +1,21 @@
namespace Model.SisImports {
public class SisImportStatisticModel {
[JsonPropertyName("created")]
public ulong? Created { get; set; }
[JsonPropertyName("concluded")]
public ulong? Concluded { get; set; }
[JsonPropertyName("deactivated")]
public ulong? Deactivated { get; set; }
[JsonPropertyName("restored")]
public ulong? Restored { get; set; }
[JsonPropertyName("deleted")]
public ulong? Deleted { get; set; }
}
namespace CanvasModel.SisImports;
public class SisImportStatisticModel
{
[JsonPropertyName("created")]
public ulong? Created { get; set; }
[JsonPropertyName("concluded")]
public ulong? Concluded { get; set; }
[JsonPropertyName("deactivated")]
public ulong? Deactivated { get; set; }
[JsonPropertyName("restored")]
public ulong? Restored { get; set; }
[JsonPropertyName("deleted")]
public ulong? Deleted { get; set; }
}

View File

@@ -1,50 +1,49 @@
// namespace Model.SisImports {
// namespace CanvasModel.SisImports;
// public class SisImportStatisticsModel
// {
// public class SisImportStatisticsModel {
// [JsonPropertyName("total_state_changes")]
// public ulong TotalStateChanges { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Account { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? EnrollmentTerm { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? CommunicationChannel { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? AbstractCourse { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Course { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? CourseSection { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Enrollment { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? GroupCategory { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Group { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? GroupMembership { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Pseudonym { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? UserObserver { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? AccountUser { get; set; }
// }
// [JsonPropertyName("total_state_changes")]
// public ulong TotalStateChanges { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Account { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? EnrollmentTerm { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? CommunicationChannel { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? AbstractCourse { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Course { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? CourseSection { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Enrollment { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? GroupCategory { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Group { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? GroupMembership { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? Pseudonym { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? UserObserver { get; set; }
// [JsonPropertyName]
// public SisImportStatisticModel? AccountUser { get; set; }
// }