/* Options: Date: 2024-05-17 04:18:30 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://test.servicestack.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateRockstarVersion.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data,dart:collection */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; import 'dart:collection'; enum LivingStatus { Alive, Dead, } abstract class RockstarBase { String? firstName; String? lastName; int? age; DateTime? dateOfBirth; DateTime? dateDied; LivingStatus? livingStatus; RockstarBase({this.firstName,this.lastName,this.age,this.dateOfBirth,this.dateDied,this.livingStatus}); RockstarBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { firstName = json['firstName']; lastName = json['lastName']; age = json['age']; dateOfBirth = JsonConverters.fromJson(json['dateOfBirth'],'DateTime',context!); dateDied = JsonConverters.fromJson(json['dateDied'],'DateTime',context!); livingStatus = JsonConverters.fromJson(json['livingStatus'],'LivingStatus',context!); return this; } Map toJson() => { 'firstName': firstName, 'lastName': lastName, 'age': age, 'dateOfBirth': JsonConverters.toJson(dateOfBirth,'DateTime',context!), 'dateDied': JsonConverters.toJson(dateDied,'DateTime',context!), 'livingStatus': JsonConverters.toJson(livingStatus,'LivingStatus',context!) }; getTypeName() => "RockstarBase"; TypeContext? context = _ctx; } class RockstarVersion extends RockstarBase implements IConvertible { int? id; int? rowVersion; RockstarVersion({this.id,this.rowVersion}); RockstarVersion.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; rowVersion = json['rowVersion']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'rowVersion': rowVersion }); getTypeName() => "RockstarVersion"; TypeContext? context = _ctx; } class RockstarWithIdAndRowVersionResponse implements IConvertible { int? id; int? rowVersion; ResponseStatus? responseStatus; RockstarWithIdAndRowVersionResponse({this.id,this.rowVersion,this.responseStatus}); RockstarWithIdAndRowVersionResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; rowVersion = json['rowVersion']; responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'id': id, 'rowVersion': rowVersion, 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "RockstarWithIdAndRowVersionResponse"; TypeContext? context = _ctx; } class CreateRockstarVersion extends RockstarBase implements IReturn, ICreateDb, IConvertible, IPost { CreateRockstarVersion(); CreateRockstarVersion.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); createResponse() => RockstarWithIdAndRowVersionResponse(); getResponseTypeName() => "RockstarWithIdAndRowVersionResponse"; getTypeName() => "CreateRockstarVersion"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: { 'LivingStatus': TypeInfo(TypeOf.Enum, enumValues:LivingStatus.values), 'RockstarBase': TypeInfo(TypeOf.AbstractClass), 'RockstarVersion': TypeInfo(TypeOf.Class, create:() => RockstarVersion()), 'RockstarWithIdAndRowVersionResponse': TypeInfo(TypeOf.Class, create:() => RockstarWithIdAndRowVersionResponse()), 'CreateRockstarVersion': TypeInfo(TypeOf.Class, create:() => CreateRockstarVersion()), });