/* Options: Date: 2024-05-14 01:32:24 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: HelloWithGenericInheritance.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data,dart:collection */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; import 'dart:collection'; class Poco implements IConvertible { String? name; Poco({this.name}); Poco.fromJson(Map json) { fromMap(json); } fromMap(Map json) { name = json['name']; return this; } Map toJson() => { 'name': name }; getTypeName() => "Poco"; TypeContext? context = _ctx; } abstract class HelloBase { List? items; List? counts; HelloBase({this.items,this.counts}); HelloBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { items = JsonConverters.fromJson(json['items'],'List<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!); counts = JsonConverters.fromJson(json['counts'],'List',context!); return this; } Map toJson() => { 'items': JsonConverters.toJson(items,'List',context!), 'counts': JsonConverters.toJson(counts,'List',context!) }; getTypeName() => "HelloBase<$T>"; TypeContext? context = _ctx; } class HelloWithGenericInheritance extends HelloBase implements IConvertible, IPost { String? result; HelloWithGenericInheritance({this.result}); HelloWithGenericInheritance.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); result = json['result']; return this; } Map toJson() => super.toJson()..addAll({ 'result': result }); getTypeName() => "HelloWithGenericInheritance"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: { 'Poco': TypeInfo(TypeOf.Class, create:() => Poco()), 'HelloBase': TypeInfo(TypeOf.AbstractClass), 'HelloWithGenericInheritance': TypeInfo(TypeOf.Class, create:() => HelloWithGenericInheritance()), });