/* Options: Date: 2024-11-21 04:00:39 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: SubTopicsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/subtopicItems", "GET") public class SubTopicsRequest : BasicResourceLibraryRequest, IReturn { public typealias Return = SubTopicsResponse public var includeCompletionStatus:Bool? /** * Set it to true if the subtopics being requested belogs to digital fitness. Don't set it if unsure. */ // @ApiMember(Description="Set it to true if the subtopics being requested belogs to digital fitness. Don't set it if unsure.") public var digitalFitness:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case includeCompletionStatus case digitalFitness } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) includeCompletionStatus = try container.decodeIfPresent(Bool.self, forKey: .includeCompletionStatus) digitalFitness = try container.decodeIfPresent(Bool.self, forKey: .digitalFitness) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if includeCompletionStatus != nil { try container.encode(includeCompletionStatus, forKey: .includeCompletionStatus) } if digitalFitness != nil { try container.encode(digitalFitness, forKey: .digitalFitness) } } } public class SubTopicsResponse : Codable { public var subTopics:[SubTopic] = [] required public init(){} } public class BasicResourceLibraryRequest : Codable { public var resourceLibraryMemberId:Int? required public init(){} } public class SubTopic : Codable { public var id:String? public var title:String? public var resourceCount:Int? public var resourceItems:[ResourceItem] = [] required public init(){} }