/* Options: Date: 2026-01-27 19:02:20 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: ResetScanSettingsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/{Brand}/resetscansettings/{TemplateGuid}", "POST") public class ResetScanSettingsRequest : RequestBase, IReturn { public typealias Return = GetScanSettingsResponse public var templateGuid:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case templateGuid } 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) } 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) } } } public class GetScanSettingsResponse : GetTemplateResponse { //scanSettings:IScanSettings ignored. Swift doesn't support interface properties public var colourLabel:String public var orientationLabel:String public var resolutionLabel:String public var sidesLabel:String public var sizeLabel:String public var sourceLabel:String public var typeLabel:String public var scanContinuouslyLabel:String public var mixedSizesLabel:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case scanSettings case colourLabel case orientationLabel case resolutionLabel case sidesLabel case sizeLabel case sourceLabel case typeLabel case scanContinuouslyLabel case mixedSizesLabel } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) scanSettings = try container.decodeIfPresent(IScanSettings.self, forKey: .scanSettings) colourLabel = try container.decodeIfPresent(String.self, forKey: .colourLabel) orientationLabel = try container.decodeIfPresent(String.self, forKey: .orientationLabel) resolutionLabel = try container.decodeIfPresent(String.self, forKey: .resolutionLabel) sidesLabel = try container.decodeIfPresent(String.self, forKey: .sidesLabel) sizeLabel = try container.decodeIfPresent(String.self, forKey: .sizeLabel) sourceLabel = try container.decodeIfPresent(String.self, forKey: .sourceLabel) typeLabel = try container.decodeIfPresent(String.self, forKey: .typeLabel) scanContinuouslyLabel = try container.decodeIfPresent(String.self, forKey: .scanContinuouslyLabel) mixedSizesLabel = try container.decodeIfPresent(String.self, forKey: .mixedSizesLabel) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if scanSettings != nil { try container.encode(scanSettings, forKey: .scanSettings) } if colourLabel != nil { try container.encode(colourLabel, forKey: .colourLabel) } if orientationLabel != nil { try container.encode(orientationLabel, forKey: .orientationLabel) } if resolutionLabel != nil { try container.encode(resolutionLabel, forKey: .resolutionLabel) } if sidesLabel != nil { try container.encode(sidesLabel, forKey: .sidesLabel) } if sizeLabel != nil { try container.encode(sizeLabel, forKey: .sizeLabel) } if sourceLabel != nil { try container.encode(sourceLabel, forKey: .sourceLabel) } if typeLabel != nil { try container.encode(typeLabel, forKey: .typeLabel) } if scanContinuouslyLabel != nil { try container.encode(scanContinuouslyLabel, forKey: .scanContinuouslyLabel) } if mixedSizesLabel != nil { try container.encode(mixedSizesLabel, forKey: .mixedSizesLabel) } } } 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 enum ScanColour : String, Codable { case BlackAndWhite case Greyscale case Colour case Auto } public enum ScanOrientation : String, Codable { case Portrait case Landscape } public enum ScanResolution : String, Codable { case Dpi100 case Dpi200 case Dpi300 case Dpi400 case Dpi600 } public enum ScanSide : String, Codable { case Simplex case Duplex } public enum ScanSize : String, Codable { case Auto case A3 case A4 case A5 case B4 case B5 case Letter case Legal case Executive case Folio case AutoLong case A4R case A5R case A6R case B6R } public enum ScanSource : String, Codable { case Adf case Glass case Auto } public enum ScanType : String, Codable { case Text case Photo case TextAndPhoto } public enum BoolSetting : String, Codable { case True case False } public protocol IScanSettings { //colour:IScanSetting ignored. Swift doesn't support interface properties //orientation:IScanSetting ignored. Swift doesn't support interface properties //resolution:IScanSetting ignored. Swift doesn't support interface properties //sides:IScanSetting ignored. Swift doesn't support interface properties //size:IScanSetting ignored. Swift doesn't support interface properties //source:IScanSetting ignored. Swift doesn't support interface properties //type:IScanSetting ignored. Swift doesn't support interface properties //scanContinuously:IScanSetting ignored. Swift doesn't support interface properties //mixedSizes:IScanSetting ignored. Swift doesn't support interface properties } public class DtoBase : Codable { public var brand:Brand required public init(){} } public protocol IScanSetting { associatedtype T var isLocked:Bool { get set } var items:IList> { get set } var selectedItem:String { get set } } public class GetTemplateResponse : ScanResponseBase { public var serverAddress:String public var serverPort:Int required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case serverAddress case serverPort } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) serverAddress = try container.decodeIfPresent(String.self, forKey: .serverAddress) serverPort = try container.decodeIfPresent(Int.self, forKey: .serverPort) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if serverAddress != nil { try container.encode(serverAddress, forKey: .serverAddress) } if serverPort != nil { try container.encode(serverPort, forKey: .serverPort) } } }