/* Options: Date: 2024-12-22 21:44:55 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateProfile.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; enum PlayerRole { Leader, Player, NonPlayer, } enum PlayerRegion { Africa, Americas, Asia, Australasia, Europe, } class Profile extends AuditBase implements IConvertible { int? id; PlayerRole? role; PlayerRegion? region; String? username; int? highScore; int? gamesPlayed; int? energy; String? profileUrl; String? coverUrl; Map? meta; Profile({this.id,this.role,this.region,this.username,this.highScore,this.gamesPlayed,this.energy,this.profileUrl,this.coverUrl,this.meta}); Profile.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; role = JsonConverters.fromJson(json['role'],'PlayerRole',context!); region = JsonConverters.fromJson(json['region'],'PlayerRegion',context!); username = json['username']; highScore = json['highScore']; gamesPlayed = json['gamesPlayed']; energy = json['energy']; profileUrl = json['profileUrl']; coverUrl = json['coverUrl']; meta = JsonConverters.toStringMap(json['meta']); return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'role': JsonConverters.toJson(role,'PlayerRole',context!), 'region': JsonConverters.toJson(region,'PlayerRegion',context!), 'username': username, 'highScore': highScore, 'gamesPlayed': gamesPlayed, 'energy': energy, 'profileUrl': profileUrl, 'coverUrl': coverUrl, 'meta': meta }); getTypeName() => "Profile"; TypeContext? context = _ctx; } class UpdateProfile implements IReturn, IPatchDb, IConvertible, IPatch { int? id; PlayerRole? role; PlayerRegion? region; String? username; int? highScore; int? gamesPlayed; // @Validate(Validator="InclusiveBetween(0,100)") int? energy; String? profileUrl; String? coverUrl; UpdateProfile({this.id,this.role,this.region,this.username,this.highScore,this.gamesPlayed,this.energy,this.profileUrl,this.coverUrl}); UpdateProfile.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; role = JsonConverters.fromJson(json['role'],'PlayerRole',context!); region = JsonConverters.fromJson(json['region'],'PlayerRegion',context!); username = json['username']; highScore = json['highScore']; gamesPlayed = json['gamesPlayed']; energy = json['energy']; profileUrl = json['profileUrl']; coverUrl = json['coverUrl']; return this; } Map toJson() => { 'id': id, 'role': JsonConverters.toJson(role,'PlayerRole',context!), 'region': JsonConverters.toJson(region,'PlayerRegion',context!), 'username': username, 'highScore': highScore, 'gamesPlayed': gamesPlayed, 'energy': energy, 'profileUrl': profileUrl, 'coverUrl': coverUrl }; createResponse() => IdResponse(); getResponseTypeName() => "IdResponse"; getTypeName() => "UpdateProfile"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'PlayerRole': TypeInfo(TypeOf.Enum, enumValues:PlayerRole.values), 'PlayerRegion': TypeInfo(TypeOf.Enum, enumValues:PlayerRegion.values), 'Profile': TypeInfo(TypeOf.Class, create:() => Profile()), 'UpdateProfile': TypeInfo(TypeOf.Class, create:() => UpdateProfile()), });