/* Options: Date: 2026-01-20 17:59:21 SwiftVersion: 5.0 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://galaxymobile.api.client.prod.86degrees.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: UserLoginRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/user/login", "POST") public class UserLoginRequest : ApiServiceRequest, IReturn { public typealias Return = UserLoginResponse /** * ID Number of the user to log in. */ // @ApiMember(Description="ID Number of the user to log in.", IsRequired=true) public var idNumber:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case idNumber } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) idNumber = try container.decodeIfPresent(String.self, forKey: .idNumber) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if idNumber != nil { try container.encode(idNumber, forKey: .idNumber) } } } public class UserLoginResponse : ApiServiceResponse { /** * List of products the user has access to. */ // @ApiMember(Description="List of products the user has access to.") public var userProductInformation:[UserProductData] = [] /** * List of all dependents linked to this user. */ // @ApiMember(Description="List of all dependents linked to this user.") public var dependents:[DependentData] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case userProductInformation case dependents } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) userProductInformation = try container.decodeIfPresent([UserProductData].self, forKey: .userProductInformation) ?? [] dependents = try container.decodeIfPresent([DependentData].self, forKey: .dependents) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if userProductInformation.count > 0 { try container.encode(userProductInformation, forKey: .userProductInformation) } if dependents.count > 0 { try container.encode(dependents, forKey: .dependents) } } } public class ApiServiceRequest : IServiceRequest, IHasApiKey, Codable { /** * The API Key required for authentication */ // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true) public var apiKey:String required public init(){} } public protocol IServiceRequest { } public protocol IHasApiKey { var apiKey:String { get set } } public class DependentData : Codable { /** * Dependent's Galaxy Id used for referring to or deleting. */ // @ApiMember(Description="Dependent's Galaxy Id used for referring to or deleting.", IsRequired=true) public var dependentId:Int /** * Dependent's first name. */ // @ApiMember(Description="Dependent's first name.", IsRequired=true) public var firstName:String /** * Dependent's surname. */ // @ApiMember(Description="Dependent's surname.", IsRequired=true) public var surname:String /** * Dependent's mobile contact number. */ // @ApiMember(Description="Dependent's mobile contact number.", IsRequired=true) public var mobileNumber:String /** * Dependent's email address. */ // @ApiMember(Description="Dependent's email address.", IsRequired=true) public var email:String /** * Depdendent's ID number. */ // @ApiMember(Description="Depdendent's ID number.", IsRequired=true) public var idNumber:String required public init(){} } public class UserProductData : Codable { public var integrationType:IntegrationProviderType public var productId:Int public var name:String public var nameAfrikaans:String public var dashImageUrl:String public var actionUrl:String public var attachments:[UserProductAttachmentData] = [] public var descriptionEng:String public var summaryEng:String public var descriptionAfr:String public var summaryAfr:String required public init(){} } public enum IntegrationProviderType : Int, Codable { case None = 0 case EA = 1 case IlluminaHubProtectMe = 2 case MyLegalHand = 3 case AccidentAngels = 4 case EmergencyServices = 5 case MightyMobile = 6 case Pulsit = 7 case Bolt = 8 } public class UserProductAttachmentData : Codable { public var fileName:String public var mainFileUrl:String public var thumbnailUrl:String public var isVideo:Bool public var isImage:Bool public var isPdf:Bool required public init(){} } public class ApiServiceResponse : IServiceResponse, Codable { public var Description:String public var heading:String public var wasSuccessful:Bool //modelState:Object ignored. Type could not be extended in Swift required public init(){} }