/* Options: Date: 2025-01-08 03:04:44 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: CreateCreativeModifier.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Artist extends AuditBase implements IConvertible { int? id; String? firstName; String? lastName; int? yearDied; List? type; int? score; int? rank; Artist({this.id,this.firstName,this.lastName,this.yearDied,this.type,this.score,this.rank}); Artist.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; firstName = json['firstName']; lastName = json['lastName']; yearDied = json['yearDied']; type = JsonConverters.fromJson(json['type'],'List',context!); score = json['score']; rank = json['rank']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'firstName': firstName, 'lastName': lastName, 'yearDied': yearDied, 'type': JsonConverters.toJson(type,'List',context!), 'score': score, 'rank': rank }); getTypeName() => "Artist"; TypeContext? context = _ctx; } // @ValidateRequest(Validator="HasRole(`Moderator`)") class CreativeArtist implements IConvertible { int? id; // @References(typeof(Creative)) int? creativeId; // @References(typeof(Artist)) int? artistId; Artist? artist; CreativeArtist({this.id,this.creativeId,this.artistId,this.artist}); CreativeArtist.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; creativeId = json['creativeId']; artistId = json['artistId']; artist = JsonConverters.fromJson(json['artist'],'Artist',context!); return this; } Map toJson() => { 'id': id, 'creativeId': creativeId, 'artistId': artistId, 'artist': JsonConverters.toJson(artist,'Artist',context!) }; getTypeName() => "CreativeArtist"; TypeContext? context = _ctx; } class Modifier extends AuditBase implements IConvertible { int? id; String? name; String? category; String? description; int? score; int? rank; Modifier({this.id,this.name,this.category,this.description,this.score,this.rank}); Modifier.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; name = json['name']; category = json['category']; description = json['description']; score = json['score']; rank = json['rank']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'name': name, 'category': category, 'description': description, 'score': score, 'rank': rank }); getTypeName() => "Modifier"; TypeContext? context = _ctx; } class CreativeModifier implements IConvertible { int? id; // @References(typeof(Creative)) int? creativeId; // @References(typeof(Modifier)) int? modifierId; Modifier? modifier; CreativeModifier({this.id,this.creativeId,this.modifierId,this.modifier}); CreativeModifier.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; creativeId = json['creativeId']; modifierId = json['modifierId']; modifier = JsonConverters.fromJson(json['modifier'],'Modifier',context!); return this; } Map toJson() => { 'id': id, 'creativeId': creativeId, 'modifierId': modifierId, 'modifier': JsonConverters.toJson(modifier,'Modifier',context!) }; getTypeName() => "CreativeModifier"; TypeContext? context = _ctx; } class Artifact extends AuditBase implements IConvertible { int? id; // @References(typeof(Creative)) int? creativeId; String? fileName; String? filePath; String? contentType; int? contentLength; int? width; int? height; int? seed; String? prompt; bool? nsfw; int? averageHash; int? perceptualHash; int? differenceHash; String? background; String? lqip; int? quality; int? likesCount; int? albumsCount; int? downloadsCount; int? searchCount; int? temporalScore; int? score; int? rank; String? refId; Map? versions = {}; Artifact({this.id,this.creativeId,this.fileName,this.filePath,this.contentType,this.contentLength,this.width,this.height,this.seed,this.prompt,this.nsfw,this.averageHash,this.perceptualHash,this.differenceHash,this.background,this.lqip,this.quality,this.likesCount,this.albumsCount,this.downloadsCount,this.searchCount,this.temporalScore,this.score,this.rank,this.refId,this.versions}); Artifact.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; creativeId = json['creativeId']; fileName = json['fileName']; filePath = json['filePath']; contentType = json['contentType']; contentLength = json['contentLength']; width = json['width']; height = json['height']; seed = json['seed']; prompt = json['prompt']; nsfw = json['nsfw']; averageHash = json['averageHash']; perceptualHash = json['perceptualHash']; differenceHash = json['differenceHash']; background = json['background']; lqip = json['lqip']; quality = json['quality']; likesCount = json['likesCount']; albumsCount = json['albumsCount']; downloadsCount = json['downloadsCount']; searchCount = json['searchCount']; temporalScore = json['temporalScore']; score = json['score']; rank = json['rank']; refId = json['refId']; versions = JsonConverters.toStringMap(json['versions']); return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'creativeId': creativeId, 'fileName': fileName, 'filePath': filePath, 'contentType': contentType, 'contentLength': contentLength, 'width': width, 'height': height, 'seed': seed, 'prompt': prompt, 'nsfw': nsfw, 'averageHash': averageHash, 'perceptualHash': perceptualHash, 'differenceHash': differenceHash, 'background': background, 'lqip': lqip, 'quality': quality, 'likesCount': likesCount, 'albumsCount': albumsCount, 'downloadsCount': downloadsCount, 'searchCount': searchCount, 'temporalScore': temporalScore, 'score': score, 'rank': rank, 'refId': refId, 'versions': versions }); getTypeName() => "Artifact"; TypeContext? context = _ctx; } class Creative extends AuditBase implements IConvertible { int? id; String? userPrompt; String? prompt; int? images; int? width; int? height; int? steps; int? curatedArtifactId; int? primaryArtifactId; List? artistNames = []; List? modifierNames = []; List? artists = []; List? modifiers = []; List? artifacts = []; String? error; int? ownerId; String? ownerRef; String? key; bool? curated; int? rating; bool? private; int? score; int? rank; String? refId; String? requestId; String? engineId; Creative({this.id,this.userPrompt,this.prompt,this.images,this.width,this.height,this.steps,this.curatedArtifactId,this.primaryArtifactId,this.artistNames,this.modifierNames,this.artists,this.modifiers,this.artifacts,this.error,this.ownerId,this.ownerRef,this.key,this.curated,this.rating,this.private,this.score,this.rank,this.refId,this.requestId,this.engineId}); Creative.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; userPrompt = json['userPrompt']; prompt = json['prompt']; images = json['images']; width = json['width']; height = json['height']; steps = json['steps']; curatedArtifactId = json['curatedArtifactId']; primaryArtifactId = json['primaryArtifactId']; artistNames = JsonConverters.fromJson(json['artistNames'],'List',context!); modifierNames = JsonConverters.fromJson(json['modifierNames'],'List',context!); artists = JsonConverters.fromJson(json['artists'],'List',context!); modifiers = JsonConverters.fromJson(json['modifiers'],'List',context!); artifacts = JsonConverters.fromJson(json['artifacts'],'List',context!); error = json['error']; ownerId = json['ownerId']; ownerRef = json['ownerRef']; key = json['key']; curated = json['curated']; rating = json['rating']; private = json['private']; score = json['score']; rank = json['rank']; refId = json['refId']; requestId = json['requestId']; engineId = json['engineId']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'userPrompt': userPrompt, 'prompt': prompt, 'images': images, 'width': width, 'height': height, 'steps': steps, 'curatedArtifactId': curatedArtifactId, 'primaryArtifactId': primaryArtifactId, 'artistNames': JsonConverters.toJson(artistNames,'List',context!), 'modifierNames': JsonConverters.toJson(modifierNames,'List',context!), 'artists': JsonConverters.toJson(artists,'List',context!), 'modifiers': JsonConverters.toJson(modifiers,'List',context!), 'artifacts': JsonConverters.toJson(artifacts,'List',context!), 'error': error, 'ownerId': ownerId, 'ownerRef': ownerRef, 'key': key, 'curated': curated, 'rating': rating, 'private': private, 'score': score, 'rank': rank, 'refId': refId, 'requestId': requestId, 'engineId': engineId }); getTypeName() => "Creative"; TypeContext? context = _ctx; } // @ValidateRequest(Validator="HasRole(`Moderator`)") class CreateCreativeModifier implements IReturn, ICreateDb, IConvertible, IPost { // @Validate(Validator="GreaterThan(0)") int? creativeId; // @Validate(Validator="GreaterThan(0)") int? modifierId; CreateCreativeModifier({this.creativeId,this.modifierId}); CreateCreativeModifier.fromJson(Map json) { fromMap(json); } fromMap(Map json) { creativeId = json['creativeId']; modifierId = json['modifierId']; return this; } Map toJson() => { 'creativeId': creativeId, 'modifierId': modifierId }; createResponse() => CreativeModifier(); getResponseTypeName() => "CreativeModifier"; getTypeName() => "CreateCreativeModifier"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazordiffusion.com', types: { 'Artist': TypeInfo(TypeOf.Class, create:() => Artist()), 'CreativeArtist': TypeInfo(TypeOf.Class, create:() => CreativeArtist()), 'Modifier': TypeInfo(TypeOf.Class, create:() => Modifier()), 'CreativeModifier': TypeInfo(TypeOf.Class, create:() => CreativeModifier()), 'Artifact': TypeInfo(TypeOf.Class, create:() => Artifact()), 'Creative': TypeInfo(TypeOf.Class, create:() => Creative()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CreateCreativeModifier': TypeInfo(TypeOf.Class, create:() => CreateCreativeModifier()), });