/* Options: Date: 2024-05-09 16:45:41 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: HelloInterface.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; abstract class IPoco { String? name; } abstract class IEmptyInterface { } class EmptyClass implements IConvertible { EmptyClass(); EmptyClass.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "EmptyClass"; TypeContext? context = _ctx; } class HelloInterface implements IConvertible, IPost { IPoco? poco; IEmptyInterface? emptyInterface; EmptyClass? emptyClass; HelloInterface({this.poco,this.emptyInterface,this.emptyClass}); HelloInterface.fromJson(Map json) { fromMap(json); } fromMap(Map json) { poco = JsonConverters.fromJson(json['poco'],'IPoco',context!); emptyInterface = JsonConverters.fromJson(json['emptyInterface'],'IEmptyInterface',context!); emptyClass = JsonConverters.fromJson(json['emptyClass'],'EmptyClass',context!); return this; } Map toJson() => { 'poco': JsonConverters.toJson(poco,'IPoco',context!), 'emptyInterface': JsonConverters.toJson(emptyInterface,'IEmptyInterface',context!), 'emptyClass': JsonConverters.toJson(emptyClass,'EmptyClass',context!) }; getTypeName() => "HelloInterface"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: { 'IPoco': TypeInfo(TypeOf.Interface), 'IEmptyInterface': TypeInfo(TypeOf.Interface), 'EmptyClass': TypeInfo(TypeOf.Class, create:() => EmptyClass()), 'HelloInterface': TypeInfo(TypeOf.Class, create:() => HelloInterface()), });