/* Options: Date: 2024-12-29 02:29:33 SwiftVersion: 5.0 Version: 8.22 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://data.regent-college.edu //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: InstitutionStudentsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/Academic/Institution/{institution_id}/Students", "POST") public class InstitutionStudentsRequest : IReturn, Codable { public typealias Return = InstitutionStudentsResponse public var institution_id:Int required public init(){} } public class InstitutionStudentsResponse : InstitutionResponse { public var student_transfer_credentials:[StudentTransferCredentialsResponse] = [] public var student_previous_degrees:[ExternalDegreesResponse] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case student_transfer_credentials case student_previous_degrees } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) student_transfer_credentials = try container.decodeIfPresent([StudentTransferCredentialsResponse].self, forKey: .student_transfer_credentials) ?? [] student_previous_degrees = try container.decodeIfPresent([ExternalDegreesResponse].self, forKey: .student_previous_degrees) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if student_transfer_credentials.count > 0 { try container.encode(student_transfer_credentials, forKey: .student_transfer_credentials) } if student_previous_degrees.count > 0 { try container.encode(student_previous_degrees, forKey: .student_previous_degrees) } } } public class InstitutionResponse : Codable { public var responseStatus:ResponseStatus public var institution_id:Int public var institution_name:String public var institution_previous_names:String public var institution_other_names:String public var institution_type:String public var accreditation_status:String public var accreditation_status_notes:String public var related_institutions:[String] = [] public var accreditation_status_changed_date:Date? public var gpa_conversion:String public var credit_hour_conversion:String public var addr1:String public var addr2:String public var city:String public var state:String public var country:String public var zip:String required public init(){} } public class StudentTransferCredentialsResponse : Codable { public var responseStatus:ResponseStatus public var regent_id:Int public var uuid:String public var studentTransferCredentialPackage:[StudentTransferCredentialPackageResponse] = [] required public init(){} } public class ExternalDegreesResponse : Codable { public var responseStatus:ResponseStatus public var person:PersonSimpleResponse public var gpa:Double? public var student_programs:[StudentProgramSimpleResponse] = [] public var degrees:[ExternalDegreeResponse] = [] public var valid_degrees:[ExternalDegreesAdminResponse] = [] required public init(){} }