/* Options: Date: 2025-01-08 03:11:39 SwiftVersion: 6.0 Version: 8.53 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazordiffusion.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: QueryApiProviders.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack public class QueryApiProviders : QueryDb, IReturn { public typealias Return = QueryResponse public var name:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } } } public class ApiProvider : Codable { public var id:Int? public var name:String? public var apiBaseUrl:String? public var apiTypeId:Int? public var apiKeyVar:String? public var apiKey:String? public var apiKeyHeader:String? public var heartbeatUrl:String? public var concurrency:Int? public var priority:Int? public var enabled:Bool? public var offlineDate:Date? public var createdDate:Date? public var models:[ApiProviderModel] = [] public var apiType:ApiType? // @Ignore() public var selectedModels:[String] = [] required public init(){} } public class ApiType : Codable { public var id:Int? public var provider:AiProvider? public var name:String? public var website:String? public var apiBaseUrl:String? public var heartbeatUrl:String? public var icon:String? public var apiModels:[String:String] = [:] required public init(){} } public class ApiProviderModel : Codable { public var model:String? public var apiModel:String? required public init(){} } public enum AiProvider : String, Codable { case OpenAiProvider case GoogleAiProvider }