/* Options: Date: 2024-12-03 09:40:09 SwiftVersion: 5.0 Version: 6.00 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://resourcelibrary.api.ashcompanies.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: ResourceLookAheadRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/lookaheadResults", "GET") public class ResourceLookAheadRequest : BasicResourceLibraryRequest, IReturn { public typealias Return = ResourceLookAheadResponse public var text:String? /** * Set it to true if requesting resources only from digital library */ // @ApiMember(Description="Set it to true if requesting resources only from digital library") public var digitalFitness:Bool? /** * Set it to true if requesting resources only from health library */ // @ApiMember(Description="Set it to true if requesting resources only from health library") public var healthLibrary:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case text case digitalFitness case healthLibrary } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) text = try container.decodeIfPresent(String.self, forKey: .text) digitalFitness = try container.decodeIfPresent(Bool.self, forKey: .digitalFitness) healthLibrary = try container.decodeIfPresent(Bool.self, forKey: .healthLibrary) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if text != nil { try container.encode(text, forKey: .text) } if digitalFitness != nil { try container.encode(digitalFitness, forKey: .digitalFitness) } if healthLibrary != nil { try container.encode(healthLibrary, forKey: .healthLibrary) } } } public class ResourceLookAheadResponse : Codable { public var lookaheadResult:LookaheadResult? required public init(){} } public class BasicResourceLibraryRequest : Codable { public var resourceLibraryMemberId:Int? required public init(){} } public class LookaheadResult : Codable { public var id:String? public var lookaheadTitles:[LookaheadTitle] = [] public var lookaheadTags:[LookaheadTag] = [] required public init(){} } public class LookaheadTitle : Codable { public var id:String? public var title:String? public var subtitle:String? required public init(){} } public class LookaheadTag : Codable { public var id:String? public var title:String? required public init(){} }