/* Options: Date: 2026-06-22 21:52:24 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: ConfigureRecentWins.* //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 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("/cmd/configure/recent-wins", "POST") class ConfigureRecentWins implements IReturn, IConvertible, IPost { String? id; RecentWinsConfiguration? configuration; ConfigureRecentWins({this.id,this.configuration}); ConfigureRecentWins.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; configuration = JsonConverters.fromJson(json['configuration'],'RecentWinsConfiguration',context!); return this; } Map toJson() => { 'id': id, 'configuration': JsonConverters.toJson(configuration,'RecentWinsConfiguration',context!) }; createResponse() => ResponseStatus(); getResponseTypeName() => "ResponseStatus"; getTypeName() => "ConfigureRecentWins"; 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()), 'ConfigureRecentWins': TypeInfo(TypeOf.Class, create:() => ConfigureRecentWins()), });