/* Options: Date: 2025-07-17 21:19:33 SwiftVersion: 5.0 Version: 6.40 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://hcbtas-q-albamfs-api.azurewebsites.net //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: ContentResolveReqUpdated.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/contentresolve/changelog", "POST") public class ContentResolveReqUpdated : IReturn, Codable { public typealias Return = ChangeLog public var changeLogs:[ChangeLog] = [] required public init(){} } public class ChangeLog : Entity { public var referenceId:String? public var country:String? public var language:String? public var section:String? public var itemCode:String? public var itemId:String? public var history:[ChangeHistory] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case referenceId case country case language case section case itemCode case itemId case history } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) referenceId = try container.decodeIfPresent(String.self, forKey: .referenceId) country = try container.decodeIfPresent(String.self, forKey: .country) language = try container.decodeIfPresent(String.self, forKey: .language) section = try container.decodeIfPresent(String.self, forKey: .section) itemCode = try container.decodeIfPresent(String.self, forKey: .itemCode) itemId = try container.decodeIfPresent(String.self, forKey: .itemId) history = try container.decodeIfPresent([ChangeHistory].self, forKey: .history) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if referenceId != nil { try container.encode(referenceId, forKey: .referenceId) } if country != nil { try container.encode(country, forKey: .country) } if language != nil { try container.encode(language, forKey: .language) } if section != nil { try container.encode(section, forKey: .section) } if itemCode != nil { try container.encode(itemCode, forKey: .itemCode) } if itemId != nil { try container.encode(itemId, forKey: .itemId) } if history.count > 0 { try container.encode(history, forKey: .history) } } } public class Entity : IEntity, Codable { public var id:String? required public init(){} } public class Entity : Codable { public var logoUri:String? public var name:String? public var contactDetails:ContactDetails? required public init(){} } public class ChangeHistory : Codable { public var updatedBy:String? public var dateCreated:Date? public var element:String? public var old:String? public var `new`:String? public var status:String? public var approvedBy:String? public var dateApproved:Date? required public init(){} }