/* Options: Date: 2024-12-22 21:41:46 SwiftVersion: 6.0 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: QueryPlaylists.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/playlists", "GET") // @Route("/playlists/{PlaylistId}", "GET") public class QueryPlaylists : QueryDb, IReturn, IGet { public typealias Return = QueryResponse public var playlistId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case playlistId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) playlistId = try container.decodeIfPresent(Int.self, forKey: .playlistId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if playlistId != nil { try container.encode(playlistId, forKey: .playlistId) } } } public class Playlists : Codable { public var playlistId:Int? public var name:String? required public init(){} }