/* Options: Date: 2025-08-04 04:27:16 SwiftVersion: 5.0 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://szallitoiportal-be.veolia.hu //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: BrowseSupplierFile.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/supplier/{supplierid}/file/{supplierfileid}", "GET") public class BrowseSupplierFile : IReturn, IGet, Codable { public typealias Return = BrowseSupplierFileResponse public var supplierId:Int public var supplierFileId:Int required public init(){} } public class BrowseSupplierFileResponse : ResponseBase { public var supplierFile:SupplierFileDetails required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case supplierFile } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) supplierFile = try container.decodeIfPresent(SupplierFileDetails.self, forKey: .supplierFile) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if supplierFile != nil { try container.encode(supplierFile, forKey: .supplierFile) } } } public enum SupplierDocumentType : Int, Codable { case RegistrationForm = 0 case SpecimenSignature = 1 } public class ResponseBase : Codable { public var responseStatus:ResponseStatus required public init(){} } public class SupplierFileDetails : BrowseFileResponseBase { public var supplierId:Int public var documentType:SupplierDocumentType required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case supplierId case documentType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) supplierId = try container.decodeIfPresent(Int.self, forKey: .supplierId) documentType = try container.decodeIfPresent(SupplierDocumentType.self, forKey: .documentType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if supplierId != nil { try container.encode(supplierId, forKey: .supplierId) } if documentType != nil { try container.encode(documentType, forKey: .documentType) } } } public class BrowseFileResponseBase : Codable { public var id:Int public var fileContentId:Int public var fileName:String public var size:Int required public init(){} }