/* Options: Date: 2025-01-08 03:16:27 Version: 8.53 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazordiffusion.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: QueryGenerationApiProviders.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class ApiProviderBase implements IConvertible { int? id; String? name; String? apiKeyVar; String? apiKey; String? apiKeyHeader; String? apiBaseUrl; String? heartbeatUrl; int? concurrency; int? priority; bool? enabled; DateTime? offlineDate; DateTime? createdDate; ApiProviderBase({this.id,this.name,this.apiKeyVar,this.apiKey,this.apiKeyHeader,this.apiBaseUrl,this.heartbeatUrl,this.concurrency,this.priority,this.enabled,this.offlineDate,this.createdDate}); ApiProviderBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; apiKeyVar = json['apiKeyVar']; apiKey = json['apiKey']; apiKeyHeader = json['apiKeyHeader']; apiBaseUrl = json['apiBaseUrl']; heartbeatUrl = json['heartbeatUrl']; concurrency = json['concurrency']; priority = json['priority']; enabled = json['enabled']; offlineDate = JsonConverters.fromJson(json['offlineDate'],'DateTime',context!); createdDate = JsonConverters.fromJson(json['createdDate'],'DateTime',context!); return this; } Map toJson() => { 'id': id, 'name': name, 'apiKeyVar': apiKeyVar, 'apiKey': apiKey, 'apiKeyHeader': apiKeyHeader, 'apiBaseUrl': apiBaseUrl, 'heartbeatUrl': heartbeatUrl, 'concurrency': concurrency, 'priority': priority, 'enabled': enabled, 'offlineDate': JsonConverters.toJson(offlineDate,'DateTime',context!), 'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!) }; getTypeName() => "ApiProviderBase"; TypeContext? context = _ctx; } class AiProviderBase extends ApiProviderBase implements IConvertible { List? models = []; AiProviderBase({this.models}); AiProviderBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); models = JsonConverters.fromJson(json['models'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'models': JsonConverters.toJson(models,'List',context!) }); getTypeName() => "AiProviderBase"; TypeContext? context = _ctx; } enum AiServiceProvider { Replicate, Comfy, OpenAi, } class ApiTypeBase implements IConvertible { int? id; String? apiBaseUrl; String? apiKeyHeader; String? name; String? website; String? icon; Map? apiModels = {}; AiServiceProvider? provider; ApiTypeBase({this.id,this.apiBaseUrl,this.apiKeyHeader,this.name,this.website,this.icon,this.apiModels,this.provider}); ApiTypeBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; apiBaseUrl = json['apiBaseUrl']; apiKeyHeader = json['apiKeyHeader']; name = json['name']; website = json['website']; icon = json['icon']; apiModels = JsonConverters.toStringMap(json['apiModels']); provider = JsonConverters.fromJson(json['provider'],'AiServiceProvider',context!); return this; } Map toJson() => { 'id': id, 'apiBaseUrl': apiBaseUrl, 'apiKeyHeader': apiKeyHeader, 'name': name, 'website': website, 'icon': icon, 'apiModels': apiModels, 'provider': JsonConverters.toJson(provider,'AiServiceProvider',context!) }; getTypeName() => "ApiTypeBase"; TypeContext? context = _ctx; } class GenerationApiType extends ApiTypeBase implements IConvertible { GenerationApiType(); GenerationApiType.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "GenerationApiType"; TypeContext? context = _ctx; } class GenerationApiProvider extends AiProviderBase implements IConvertible { // @References(typeof(GenerationApiType)) int? generationApiTypeId; GenerationApiType? type; GenerationApiProvider({this.generationApiTypeId,this.type}); GenerationApiProvider.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); generationApiTypeId = json['generationApiTypeId']; type = JsonConverters.fromJson(json['type'],'GenerationApiType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'generationApiTypeId': generationApiTypeId, 'type': JsonConverters.toJson(type,'GenerationApiType',context!) }); getTypeName() => "GenerationApiProvider"; TypeContext? context = _ctx; } class QueryGenerationApiProviders extends QueryDb implements IReturn>, IConvertible, IGet { int? id; String? name; QueryGenerationApiProviders({this.id,this.name}); QueryGenerationApiProviders.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; name = json['name']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'name': name }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "QueryGenerationApiProviders"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazordiffusion.com', types: { 'ApiProviderBase': TypeInfo(TypeOf.Class, create:() => ApiProviderBase()), 'AiProviderBase': TypeInfo(TypeOf.Class, create:() => AiProviderBase()), 'AiServiceProvider': TypeInfo(TypeOf.Enum, enumValues:AiServiceProvider.values), 'ApiTypeBase': TypeInfo(TypeOf.Class, create:() => ApiTypeBase()), 'GenerationApiType': TypeInfo(TypeOf.Class, create:() => GenerationApiType()), 'GenerationApiProvider': TypeInfo(TypeOf.Class, create:() => GenerationApiProvider()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'QueryGenerationApiProviders': TypeInfo(TypeOf.Class, create:() => QueryGenerationApiProviders()), 'List': TypeInfo(TypeOf.Class, create:() => []), });