/* Options: Date: 2026-01-27 18:54:43 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: GetJsonPicklistItems.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack public class GetJsonPicklistItems : JsonDto, IReturn { public typealias Return = JsonPicklistItemsResponse public var templateGuid:String public var guid:String public var answers:[String:String] = [:] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case templateGuid case guid case answers } 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) guid = try container.decodeIfPresent(String.self, forKey: .guid) answers = try container.decodeIfPresent([String:String].self, forKey: .answers) ?? [:] } 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 guid != nil { try container.encode(guid, forKey: .guid) } if answers.count > 0 { try container.encode(answers, forKey: .answers) } } } public class JsonPicklistItemsResponse : JsonDto { public var guid:String public var items:[JsonPicklistItem] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case guid case items } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) guid = try container.decodeIfPresent(String.self, forKey: .guid) items = try container.decodeIfPresent([JsonPicklistItem].self, forKey: .items) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if guid != nil { try container.encode(guid, forKey: .guid) } if items.count > 0 { try container.encode(items, forKey: .items) } } } public class JsonDto : Codable { required public init(){} }