/* Options: Date: 2025-11-08 11:14:23 Version: 8.80 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: GetRecentWins.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Ref implements IConvertible { String? id; String? val; Ref({this.id,this.val}); Ref.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; val = json['val']; return this; } Map toJson() => { 'id': id, 'val': val }; getTypeName() => "Ref"; TypeContext? context = _ctx; } class BettingApp implements IConvertible { String? name; String? version; BettingApp({this.name,this.version}); BettingApp.fromJson(Map json) { fromMap(json); } fromMap(Map json) { name = json['name']; version = json['version']; return this; } Map toJson() => { 'name': name, 'version': version }; getTypeName() => "BettingApp"; TypeContext? context = _ctx; } class RefEx extends Ref implements IConvertible { RecordDictionary? data; RefEx({this.data}); RefEx.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); data = JsonConverters.fromJson(json['data'],'RecordDictionary',context!); return this; } Map toJson() => super.toJson()..addAll({ 'data': JsonConverters.toJson(data,'RecordDictionary',context!) }); getTypeName() => "RefEx"; TypeContext? context = _ctx; } class Origin implements IConvertible { BettingApp? application; String? ip; RefEx? organization; Ref? region; Ref? locationGroup; RefEx? location; RefEx? device; Ref? clerk; Origin({this.application,this.ip,this.organization,this.region,this.locationGroup,this.location,this.device,this.clerk}); Origin.fromJson(Map json) { fromMap(json); } fromMap(Map json) { application = JsonConverters.fromJson(json['application'],'BettingApp',context!); ip = json['ip']; organization = JsonConverters.fromJson(json['organization'],'RefEx',context!); region = JsonConverters.fromJson(json['region'],'Ref',context!); locationGroup = JsonConverters.fromJson(json['locationGroup'],'Ref',context!); location = JsonConverters.fromJson(json['location'],'RefEx',context!); device = JsonConverters.fromJson(json['device'],'RefEx',context!); clerk = JsonConverters.fromJson(json['clerk'],'Ref',context!); return this; } Map toJson() => { 'application': JsonConverters.toJson(application,'BettingApp',context!), 'ip': ip, 'organization': JsonConverters.toJson(organization,'RefEx',context!), 'region': JsonConverters.toJson(region,'Ref',context!), 'locationGroup': JsonConverters.toJson(locationGroup,'Ref',context!), 'location': JsonConverters.toJson(location,'RefEx',context!), 'device': JsonConverters.toJson(device,'RefEx',context!), 'clerk': JsonConverters.toJson(clerk,'Ref',context!) }; getTypeName() => "Origin"; TypeContext? context = _ctx; } class BetOutcome { static const BetOutcome Unknown = const BetOutcome._(0); static const BetOutcome Lost = const BetOutcome._(1); static const BetOutcome Won = const BetOutcome._(2); static const BetOutcome Void = const BetOutcome._(3); final int _value; const BetOutcome._(this._value); int get value => _value; static List get values => const [Unknown,Lost,Won,Void]; } class BetProcessingStatus { static const BetProcessingStatus Open = const BetProcessingStatus._(0); static const BetProcessingStatus Closed = const BetProcessingStatus._(1); final int _value; const BetProcessingStatus._(this._value); int get value => _value; static List get values => const [Open,Closed]; } class BetValidity { static const BetValidity Valid = const BetValidity._(0); static const BetValidity Canceled = const BetValidity._(1); static const BetValidity Void = const BetValidity._(2); static const BetValidity Reverted = const BetValidity._(3); final int _value; const BetValidity._(this._value); int get value => _value; static List get values => const [Valid,Canceled,Void,Reverted]; } class Win implements IConvertible { int? id; int? sId; Ref? bettor; Origin? origin; DateTime? placedAt; int? roundId; String? content; double? stake; BetOutcome? outcome; double? amount; BetProcessingStatus? processingStatus; BetValidity? validity; Map? results; Map? payload; Win({this.id,this.sId,this.bettor,this.origin,this.placedAt,this.roundId,this.content,this.stake,this.outcome,this.amount,this.processingStatus,this.validity,this.results,this.payload}); Win.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; sId = json['sId']; bettor = JsonConverters.fromJson(json['bettor'],'Ref',context!); origin = JsonConverters.fromJson(json['origin'],'Origin',context!); placedAt = JsonConverters.fromJson(json['placedAt'],'DateTime',context!); roundId = json['roundId']; content = json['content']; stake = JsonConverters.toDouble(json['stake']); outcome = JsonConverters.fromJson(json['outcome'],'BetOutcome',context!); amount = JsonConverters.toDouble(json['amount']); processingStatus = JsonConverters.fromJson(json['processingStatus'],'BetProcessingStatus',context!); validity = JsonConverters.fromJson(json['validity'],'BetValidity',context!); results = JsonConverters.toStringMap(json['results']); payload = JsonConverters.toStringMap(json['payload']); return this; } Map toJson() => { 'id': id, 'sId': sId, 'bettor': JsonConverters.toJson(bettor,'Ref',context!), 'origin': JsonConverters.toJson(origin,'Origin',context!), 'placedAt': JsonConverters.toJson(placedAt,'DateTime',context!), 'roundId': roundId, 'content': content, 'stake': stake, 'outcome': JsonConverters.toJson(outcome,'BetOutcome',context!), 'amount': amount, 'processingStatus': JsonConverters.toJson(processingStatus,'BetProcessingStatus',context!), 'validity': JsonConverters.toJson(validity,'BetValidity',context!), 'results': results, 'payload': payload }; getTypeName() => "Win"; TypeContext? context = _ctx; } class RecordDictionary extends Map implements IConvertible { RecordDictionary(); RecordDictionary.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "RecordDictionary<$TKey,$TVal>"; TypeContext? context = _ctx; } class RecentWins implements IConvertible { String? id; List? wins; int? maxSize; double? threshold; RecentWins({this.id,this.wins,this.maxSize,this.threshold}); RecentWins.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; wins = JsonConverters.fromJson(json['wins'],'List',context!); maxSize = json['maxSize']; threshold = JsonConverters.toDouble(json['threshold']); return this; } Map toJson() => { 'id': id, 'wins': JsonConverters.toJson(wins,'List',context!), 'maxSize': maxSize, 'threshold': threshold }; getTypeName() => "RecentWins"; TypeContext? context = _ctx; } // @Route("/qry/wins/recent") class GetRecentWins implements IReturn, IConvertible, IPost { GetRecentWins(); GetRecentWins.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; createResponse() => RecentWins(); getResponseTypeName() => "RecentWins"; getTypeName() => "GetRecentWins"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: { 'Ref': TypeInfo(TypeOf.Class, create:() => Ref()), 'BettingApp': TypeInfo(TypeOf.Class, create:() => BettingApp()), 'RefEx': TypeInfo(TypeOf.Class, create:() => RefEx()), 'RecordDictionary': TypeInfo(TypeOf.Class, create:() => RecordDictionary()), 'Origin': TypeInfo(TypeOf.Class, create:() => Origin()), 'BetOutcome': TypeInfo(TypeOf.Enum, enumValues:BetOutcome.values), 'BetProcessingStatus': TypeInfo(TypeOf.Enum, enumValues:BetProcessingStatus.values), 'BetValidity': TypeInfo(TypeOf.Enum, enumValues:BetValidity.values), 'Win': TypeInfo(TypeOf.Class, create:() => Win()), 'RecordDictionary': TypeInfo(TypeOf.GenericDef,create:() => RecordDictionary()), 'RecentWins': TypeInfo(TypeOf.Class, create:() => RecentWins()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetRecentWins': TypeInfo(TypeOf.Class, create:() => GetRecentWins()), });