/* Options: Date: 2024-12-22 21:50:36 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: CreatePlayer.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; enum PhoneKind { Home, Mobile, Work, } class Phone implements IConvertible { PhoneKind? kind; String? number; String? ext; Phone({this.kind,this.number,this.ext}); Phone.fromJson(Map json) { fromMap(json); } fromMap(Map json) { kind = JsonConverters.fromJson(json['kind'],'PhoneKind',context!); number = json['number']; ext = json['ext']; return this; } Map toJson() => { 'kind': JsonConverters.toJson(kind,'PhoneKind',context!), 'number': number, 'ext': ext }; getTypeName() => "Phone"; TypeContext? context = _ctx; } class Player extends AuditBase implements IConvertible { int? id; // @required() String? firstName; String? lastName; String? email; List? phoneNumbers = []; List? gameItems = []; Profile? profile; int? profileId; String? savedLevelId; int? rowVersion; Player({this.id,this.firstName,this.lastName,this.email,this.phoneNumbers,this.gameItems,this.profile,this.profileId,this.savedLevelId,this.rowVersion}); Player.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; firstName = json['firstName']; lastName = json['lastName']; email = json['email']; phoneNumbers = JsonConverters.fromJson(json['phoneNumbers'],'List',context!); gameItems = JsonConverters.fromJson(json['gameItems'],'List',context!); profile = JsonConverters.fromJson(json['profile'],'Profile',context!); profileId = json['profileId']; savedLevelId = json['savedLevelId']; rowVersion = json['rowVersion']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'firstName': firstName, 'lastName': lastName, 'email': email, 'phoneNumbers': JsonConverters.toJson(phoneNumbers,'List',context!), 'gameItems': JsonConverters.toJson(gameItems,'List',context!), 'profile': JsonConverters.toJson(profile,'Profile',context!), 'profileId': profileId, 'savedLevelId': savedLevelId, 'rowVersion': rowVersion }); getTypeName() => "Player"; TypeContext? context = _ctx; } class CreatePlayer implements IReturn, ICreateDb, IConvertible, IPost { // @Validate(Validator="NotEmpty") String? firstName; String? lastName; String? email; List? phoneNumbers; // @Validate(Validator="NotNull") int? profileId; String? savedLevelId; CreatePlayer({this.firstName,this.lastName,this.email,this.phoneNumbers,this.profileId,this.savedLevelId}); CreatePlayer.fromJson(Map json) { fromMap(json); } fromMap(Map json) { firstName = json['firstName']; lastName = json['lastName']; email = json['email']; phoneNumbers = JsonConverters.fromJson(json['phoneNumbers'],'List',context!); profileId = json['profileId']; savedLevelId = json['savedLevelId']; return this; } Map toJson() => { 'firstName': firstName, 'lastName': lastName, 'email': email, 'phoneNumbers': JsonConverters.toJson(phoneNumbers,'List',context!), 'profileId': profileId, 'savedLevelId': savedLevelId }; createResponse() => IdResponse(); getResponseTypeName() => "IdResponse"; getTypeName() => "CreatePlayer"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'PhoneKind': TypeInfo(TypeOf.Enum, enumValues:PhoneKind.values), 'Phone': TypeInfo(TypeOf.Class, create:() => Phone()), 'Player': TypeInfo(TypeOf.Class, create:() => Player()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'PlayerGameItem': TypeInfo(TypeOf.Class, create:() => PlayerGameItem()), 'Profile': TypeInfo(TypeOf.Class, create:() => Profile()), 'CreatePlayer': TypeInfo(TypeOf.Class, create:() => CreatePlayer()), });