/* Options: Date: 2024-11-28 09:38:59 SwiftVersion: 5.0 Version: 6.40 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://digiofficeapigateway.deltares.nl/api //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: ViewsAndExplorers.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack public class ViewsAndExplorers : IReturn, Codable { public typealias Return = ViewsAndExplorers public var nodes:[ViewExplorerNode] = [] required public init(){} } public class ViewExplorerNode : Node { public var viewId:String? public var explorerId:String? public var childNodes:[ViewExplorerNode] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case viewId case explorerId case childNodes } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) viewId = try container.decodeIfPresent(String.self, forKey: .viewId) explorerId = try container.decodeIfPresent(String.self, forKey: .explorerId) childNodes = try container.decodeIfPresent([ViewExplorerNode].self, forKey: .childNodes) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if viewId != nil { try container.encode(viewId, forKey: .viewId) } if explorerId != nil { try container.encode(explorerId, forKey: .explorerId) } if childNodes.count > 0 { try container.encode(childNodes, forKey: .childNodes) } } } public class Node : Codable { public var entityName:String? public var id:String? public var parentID:String? public var title:String? public var count:Int? public var imageKey:String? public var expanded:Bool? public var selected:Bool? public var displayPath:String? public var childNodes:[Node] = [] public var registrationPathElement:String? public var queryPathElement:String? public var path:String? public var isHierarchy:Bool? required public init(){} }