/* Options: Date: 2024-05-16 01:43:28 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: HelloWithEnumList.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data,dart:collection */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; import 'dart:collection'; enum EnumType { Value1, Value2, Value3, } enum EnumWithValues { None, Value1, Value2, } // @flags() class EnumFlags { static const EnumFlags Value0 = const EnumFlags._(0); static const EnumFlags Value1 = const EnumFlags._(1); static const EnumFlags Value2 = const EnumFlags._(2); static const EnumFlags Value3 = const EnumFlags._(4); static const EnumFlags Value123 = const EnumFlags._(7); final int _value; const EnumFlags._(this._value); int get value => _value; static List get values => const [Value0,Value1,Value2,Value3,Value123]; } enum EnumStyle { lower, UPPER, PascalCase, camelCase, camelUPPER, PascalUPPER, } class HelloWithEnumList implements IConvertible, IPost { List? enumProp; List? enumWithValues; List? nullableEnumProp; List? enumFlags; List? enumStyle; HelloWithEnumList({this.enumProp,this.enumWithValues,this.nullableEnumProp,this.enumFlags,this.enumStyle}); HelloWithEnumList.fromJson(Map json) { fromMap(json); } fromMap(Map json) { enumProp = JsonConverters.fromJson(json['enumProp'],'List',context!); enumWithValues = JsonConverters.fromJson(json['enumWithValues'],'List',context!); nullableEnumProp = JsonConverters.fromJson(json['nullableEnumProp'],'List',context!); enumFlags = JsonConverters.fromJson(json['enumFlags'],'List',context!); enumStyle = JsonConverters.fromJson(json['enumStyle'],'List',context!); return this; } Map toJson() => { 'enumProp': JsonConverters.toJson(enumProp,'List',context!), 'enumWithValues': JsonConverters.toJson(enumWithValues,'List',context!), 'nullableEnumProp': JsonConverters.toJson(nullableEnumProp,'List',context!), 'enumFlags': JsonConverters.toJson(enumFlags,'List',context!), 'enumStyle': JsonConverters.toJson(enumStyle,'List',context!) }; getTypeName() => "HelloWithEnumList"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: { 'EnumType': TypeInfo(TypeOf.Enum, enumValues:EnumType.values), 'EnumWithValues': TypeInfo(TypeOf.Enum, enumValues:EnumWithValues.values), 'EnumFlags': TypeInfo(TypeOf.Enum, enumValues:EnumFlags.values), 'EnumStyle': TypeInfo(TypeOf.Enum, enumValues:EnumStyle.values), 'HelloWithEnumList': TypeInfo(TypeOf.Class, create:() => HelloWithEnumList()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), });