/* Options: Date: 2026-06-22 21:35:09 Version: 10.06 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://s4w2.api.bettor.cc //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetRecentWinsConfig.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class RecentWinsDisplayMode { static const RecentWinsDisplayMode Queue = const RecentWinsDisplayMode._(0); static const RecentWinsDisplayMode Intervals = const RecentWinsDisplayMode._(1); final int _value; const RecentWinsDisplayMode._(this._value); int get value => _value; static List get values => const [Queue,Intervals]; } class WinInterval implements IConvertible { double start = 0; double end = 0; Duration duration; WinInterval({this.start,this.end,this.duration}); WinInterval.fromJson(Map json) { fromMap(json); } fromMap(Map json) { start = JsonConverters.toDouble(json['start']); end = JsonConverters.toDouble(json['end']); duration = JsonConverters.fromJson(json['duration'],'Duration',context!); return this; } Map toJson() => { 'start': start, 'end': end, 'duration': JsonConverters.toJson(duration,'Duration',context!) }; getTypeName() => "WinInterval"; TypeContext? context = _ctx; } class RecentWinsConfiguration extends RecentWinsConfiguration implements IConvertible { String? id; RecentWinsConfiguration({this.id}); RecentWinsConfiguration.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id }); getTypeName() => "RecentWinsConfiguration"; TypeContext? context = _ctx; } class RecentWinsConfiguration implements IConvertible { RecentWinsDisplayMode displayMode; double threshold = 0; int maxSize = 0; RecordList? winIntervals; RecentWinsConfiguration({this.displayMode,this.threshold,this.maxSize,this.winIntervals}); RecentWinsConfiguration.fromJson(Map json) { fromMap(json); } fromMap(Map json) { displayMode = JsonConverters.fromJson(json['displayMode'],'RecentWinsDisplayMode',context!); threshold = JsonConverters.toDouble(json['threshold']); maxSize = json['maxSize']; winIntervals = JsonConverters.fromJson(json['winIntervals'],'RecordList',context!); return this; } Map toJson() => { 'displayMode': JsonConverters.toJson(displayMode,'RecentWinsDisplayMode',context!), 'threshold': threshold, 'maxSize': maxSize, 'winIntervals': JsonConverters.toJson(winIntervals,'RecordList',context!) }; getTypeName() => "RecentWinsConfiguration"; TypeContext? context = _ctx; } class RecordList extends ListBase implements IConvertible { final List l = []; set length(int newLength) { l.length = newLength; } int get length => l.length; T operator [](int index) => l[index]; void operator []=(int index, T value) { l[index] = value; } RecordList(); RecordList.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "RecordList<$T>"; TypeContext? context = _ctx; } // @Route("/qry/config/recent-wins") class GetRecentWinsConfig implements IReturn, IConvertible, IPost { GetRecentWinsConfig(); GetRecentWinsConfig.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; createResponse() => RecentWinsConfiguration(); getResponseTypeName() => "RecentWinsConfiguration"; getTypeName() => "GetRecentWinsConfig"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: { 'RecentWinsDisplayMode': TypeInfo(TypeOf.Enum, enumValues:RecentWinsDisplayMode.values), 'WinInterval': TypeInfo(TypeOf.Class, create:() => WinInterval()), 'RecentWinsConfiguration': TypeInfo(TypeOf.Class, create:() => RecentWinsConfiguration()), 'RecordList': TypeInfo(TypeOf.Class, create:() => RecordList()), 'RecordList': TypeInfo(TypeOf.GenericDef,create:() => RecordList()), 'GetRecentWinsConfig': TypeInfo(TypeOf.Class, create:() => GetRecentWinsConfig()), });