/* Options: Date: 2026-01-27 18:42:44 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: GetScanSBC.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/{Brand}/scan", "POST") public class GetScanSBC : RequestBase, IReturn { public typealias Return = GetScanResponse 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 GetScanResponse : ResponseBase { public var doGetImage:Bool public var templateGuid:String public var fileNameGuid:String public var serverUrlRoot:String public var templateIcon:[UInt8] = [] public var templateName:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case doGetImage case templateGuid case fileNameGuid case serverUrlRoot case templateIcon case templateName } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) doGetImage = try container.decodeIfPresent(Bool.self, forKey: .doGetImage) templateGuid = try container.decodeIfPresent(String.self, forKey: .templateGuid) fileNameGuid = try container.decodeIfPresent(String.self, forKey: .fileNameGuid) serverUrlRoot = try container.decodeIfPresent(String.self, forKey: .serverUrlRoot) templateIcon = try container.decodeIfPresent([UInt8].self, forKey: .templateIcon) ?? [] templateName = try container.decodeIfPresent(String.self, forKey: .templateName) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if doGetImage != nil { try container.encode(doGetImage, forKey: .doGetImage) } if templateGuid != nil { try container.encode(templateGuid, forKey: .templateGuid) } if fileNameGuid != nil { try container.encode(fileNameGuid, forKey: .fileNameGuid) } if serverUrlRoot != nil { try container.encode(serverUrlRoot, forKey: .serverUrlRoot) } if templateIcon.count > 0 { try container.encode(templateIcon, forKey: .templateIcon) } if templateName != nil { try container.encode(templateName, forKey: .templateName) } } } 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(){} }