/* Options: Date: 2026-01-27 18:43:05 SwiftVersion: 5.0 Version: 8.40 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://buildmax.org //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: UploadedRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/{Brand}/uploaded/{TemplateGuid}/", "GET") // @Route("/{Brand}/uploaded/{TemplateGuid}/{FileNameGuid}", "GET") public class UploadedRequest : RequestBase, IReturn { public typealias Return = UploadResponse public var templateGuid:String public var fileNameGuid:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case templateGuid case fileNameGuid } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) templateGuid = try container.decodeIfPresent(String.self, forKey: .templateGuid) fileNameGuid = try container.decodeIfPresent(String.self, forKey: .fileNameGuid) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if templateGuid != nil { try container.encode(templateGuid, forKey: .templateGuid) } if fileNameGuid != nil { try container.encode(fileNameGuid, forKey: .fileNameGuid) } } } public class UploadResponse : ResponseBase { public var inError:Bool public var errorMessage:String public var templateGuid:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case inError case errorMessage case templateGuid } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) inError = try container.decodeIfPresent(Bool.self, forKey: .inError) errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage) templateGuid = try container.decodeIfPresent(String.self, forKey: .templateGuid) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if inError != nil { try container.encode(inError, forKey: .inError) } if errorMessage != nil { try container.encode(errorMessage, forKey: .errorMessage) } if templateGuid != nil { try container.encode(templateGuid, forKey: .templateGuid) } } } public enum Brand : String, Codable { case Desktop case Hp case Kyocera case NeaScan case Samsung case FujiXerox case Ta case Utax case Epson case ScanFront400 case Sharp case Ricoh case FujiFilm } public class RequestBase : DtoBase { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class ResponseBase : DtoBase { public var selectedUiLanguage:String public var svSession:String public var title:String public var pageTip:String public var newBrowser:Bool public var scanFront400TA:Bool public var scanFront400UTAX:Bool required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case selectedUiLanguage case svSession case title case pageTip case newBrowser case scanFront400TA case scanFront400UTAX } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) selectedUiLanguage = try container.decodeIfPresent(String.self, forKey: .selectedUiLanguage) svSession = try container.decodeIfPresent(String.self, forKey: .svSession) title = try container.decodeIfPresent(String.self, forKey: .title) pageTip = try container.decodeIfPresent(String.self, forKey: .pageTip) newBrowser = try container.decodeIfPresent(Bool.self, forKey: .newBrowser) scanFront400TA = try container.decodeIfPresent(Bool.self, forKey: .scanFront400TA) scanFront400UTAX = try container.decodeIfPresent(Bool.self, forKey: .scanFront400UTAX) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if selectedUiLanguage != nil { try container.encode(selectedUiLanguage, forKey: .selectedUiLanguage) } if svSession != nil { try container.encode(svSession, forKey: .svSession) } if title != nil { try container.encode(title, forKey: .title) } if pageTip != nil { try container.encode(pageTip, forKey: .pageTip) } if newBrowser != nil { try container.encode(newBrowser, forKey: .newBrowser) } if scanFront400TA != nil { try container.encode(scanFront400TA, forKey: .scanFront400TA) } if scanFront400UTAX != nil { try container.encode(scanFront400UTAX, forKey: .scanFront400UTAX) } } } public class DtoBase : Codable { public var brand:Brand required public init(){} }