/* Options: Date: 2025-01-08 03:20:01 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: CreateApiProvider.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class ApiProviderModel implements IConvertible { String? model; String? apiModel; ApiProviderModel({this.model,this.apiModel}); ApiProviderModel.fromJson(Map json) { fromMap(json); } fromMap(Map json) { model = json['model']; apiModel = json['apiModel']; return this; } Map toJson() => { 'model': model, 'apiModel': apiModel }; getTypeName() => "ApiProviderModel"; TypeContext? context = _ctx; } class ApiProvider implements IConvertible { int? id; String? name; String? apiBaseUrl; int? apiTypeId; String? apiKeyVar; String? apiKey; String? apiKeyHeader; String? heartbeatUrl; int? concurrency; int? priority; bool? enabled; DateTime? offlineDate; DateTime? createdDate; List? models = []; ApiType? apiType; // @ignore() List? selectedModels = []; ApiProvider({this.id,this.name,this.apiBaseUrl,this.apiTypeId,this.apiKeyVar,this.apiKey,this.apiKeyHeader,this.heartbeatUrl,this.concurrency,this.priority,this.enabled,this.offlineDate,this.createdDate,this.models,this.apiType,this.selectedModels}); ApiProvider.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; apiBaseUrl = json['apiBaseUrl']; apiTypeId = json['apiTypeId']; apiKeyVar = json['apiKeyVar']; apiKey = json['apiKey']; apiKeyHeader = json['apiKeyHeader']; 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!); models = JsonConverters.fromJson(json['models'],'List',context!); apiType = JsonConverters.fromJson(json['apiType'],'ApiType',context!); selectedModels = JsonConverters.fromJson(json['selectedModels'],'List',context!); return this; } Map toJson() => { 'id': id, 'name': name, 'apiBaseUrl': apiBaseUrl, 'apiTypeId': apiTypeId, 'apiKeyVar': apiKeyVar, 'apiKey': apiKey, 'apiKeyHeader': apiKeyHeader, 'heartbeatUrl': heartbeatUrl, 'concurrency': concurrency, 'priority': priority, 'enabled': enabled, 'offlineDate': JsonConverters.toJson(offlineDate,'DateTime',context!), 'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!), 'models': JsonConverters.toJson(models,'List',context!), 'apiType': JsonConverters.toJson(apiType,'ApiType',context!), 'selectedModels': JsonConverters.toJson(selectedModels,'List',context!) }; getTypeName() => "ApiProvider"; TypeContext? context = _ctx; } enum TaskType { OpenAiChat, Comfy, } class CreateApiProvider implements IReturn, ICreateDb, IConvertible, IPost { // @Validate(Validator="GreaterThan(0)") int? apiTypeId; String? apiBaseUrl; // @Validate(Validator="NotEmpty") String? name; String? apiKeyVar; String? apiKey; String? apiKeyHeader; String? heartbeatUrl; Map? taskPaths; int? concurrency; int? priority; bool? enabled; List? models; List? selectedModels; CreateApiProvider({this.apiTypeId,this.apiBaseUrl,this.name,this.apiKeyVar,this.apiKey,this.apiKeyHeader,this.heartbeatUrl,this.taskPaths,this.concurrency,this.priority,this.enabled,this.models,this.selectedModels}); CreateApiProvider.fromJson(Map json) { fromMap(json); } fromMap(Map json) { apiTypeId = json['apiTypeId']; apiBaseUrl = json['apiBaseUrl']; name = json['name']; apiKeyVar = json['apiKeyVar']; apiKey = json['apiKey']; apiKeyHeader = json['apiKeyHeader']; heartbeatUrl = json['heartbeatUrl']; taskPaths = JsonConverters.fromJson(json['taskPaths'],'Map',context!); concurrency = json['concurrency']; priority = json['priority']; enabled = json['enabled']; models = JsonConverters.fromJson(json['models'],'List',context!); selectedModels = JsonConverters.fromJson(json['selectedModels'],'List',context!); return this; } Map toJson() => { 'apiTypeId': apiTypeId, 'apiBaseUrl': apiBaseUrl, 'name': name, 'apiKeyVar': apiKeyVar, 'apiKey': apiKey, 'apiKeyHeader': apiKeyHeader, 'heartbeatUrl': heartbeatUrl, 'taskPaths': JsonConverters.toJson(taskPaths,'Map',context!), 'concurrency': concurrency, 'priority': priority, 'enabled': enabled, 'models': JsonConverters.toJson(models,'List',context!), 'selectedModels': JsonConverters.toJson(selectedModels,'List',context!) }; createResponse() => IdResponse(); getResponseTypeName() => "IdResponse"; getTypeName() => "CreateApiProvider"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazordiffusion.com', types: { 'ApiProviderModel': TypeInfo(TypeOf.Class, create:() => ApiProviderModel()), 'ApiProvider': TypeInfo(TypeOf.Class, create:() => ApiProvider()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ApiType': TypeInfo(TypeOf.Class, create:() => ApiType()), 'TaskType': TypeInfo(TypeOf.Enum, enumValues:TaskType.values), 'CreateApiProvider': TypeInfo(TypeOf.Class, create:() => CreateApiProvider()), 'Map': TypeInfo(TypeOf.Class, create:() => Map()), });