/* Options: Date: 2025-12-06 06:28:27 Version: 8.70 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.sbbet.ath.cx //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: InstallProductInstance.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Money implements IConvertible { double? amount; String? currency; Money({this.amount,this.currency}); Money.fromJson(Map json) { fromMap(json); } fromMap(Map json) { amount = JsonConverters.toDouble(json['amount']); currency = json['currency']; return this; } Map toJson() => { 'amount': amount, 'currency': currency }; getTypeName() => "Money"; TypeContext? context = _ctx; } class PayinConstraintType { static const PayinConstraintType SingleBet = const PayinConstraintType._(0); static const PayinConstraintType MultiBet = const PayinConstraintType._(1); static const PayinConstraintType SystemBet = const PayinConstraintType._(2); final int _value; const PayinConstraintType._(this._value); int get value => _value; static List get values => const [SingleBet,MultiBet,SystemBet]; } class PayinConstraint implements IConvertible { PayinConstraintType? type; Money? min; Money? Default; Money? warningThreshold; Money? max; PayinConstraint({this.type,this.min,this.Default,this.warningThreshold,this.max}); PayinConstraint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { type = JsonConverters.fromJson(json['type'],'PayinConstraintType',context!); min = JsonConverters.fromJson(json['min'],'Money',context!); Default = JsonConverters.fromJson(json['default'],'Money',context!); warningThreshold = JsonConverters.fromJson(json['warningThreshold'],'Money',context!); max = JsonConverters.fromJson(json['max'],'Money',context!); return this; } Map toJson() => { 'type': JsonConverters.toJson(type,'PayinConstraintType',context!), 'min': JsonConverters.toJson(min,'Money',context!), 'default': JsonConverters.toJson(Default,'Money',context!), 'warningThreshold': JsonConverters.toJson(warningThreshold,'Money',context!), 'max': JsonConverters.toJson(max,'Money',context!) }; getTypeName() => "PayinConstraint"; TypeContext? context = _ctx; } class WinningsCapType { static const WinningsCapType SingleBet = const WinningsCapType._(0); static const WinningsCapType MultiBet = const WinningsCapType._(1); static const WinningsCapType SystemBet = const WinningsCapType._(2); final int _value; const WinningsCapType._(this._value); int get value => _value; static List get values => const [SingleBet,MultiBet,SystemBet]; } class WinningsCap implements IConvertible { WinningsCapType? type; Money? cap; WinningsCap({this.type,this.cap}); WinningsCap.fromJson(Map json) { fromMap(json); } fromMap(Map json) { type = JsonConverters.fromJson(json['type'],'WinningsCapType',context!); cap = JsonConverters.fromJson(json['cap'],'Money',context!); return this; } Map toJson() => { 'type': JsonConverters.toJson(type,'WinningsCapType',context!), 'cap': JsonConverters.toJson(cap,'Money',context!) }; getTypeName() => "WinningsCap"; TypeContext? context = _ctx; } class BettingPolicies implements IConvertible { RecordList? payinConstraints; String? payinTaxationPolicyId; RecordList? winningsCaps; String? winningsTaxationPolicyId; BettingPolicies({this.payinConstraints,this.payinTaxationPolicyId,this.winningsCaps,this.winningsTaxationPolicyId}); BettingPolicies.fromJson(Map json) { fromMap(json); } fromMap(Map json) { payinConstraints = JsonConverters.fromJson(json['payinConstraints'],'RecordList',context!); payinTaxationPolicyId = json['payinTaxationPolicyId']; winningsCaps = JsonConverters.fromJson(json['winningsCaps'],'RecordList',context!); winningsTaxationPolicyId = json['winningsTaxationPolicyId']; return this; } Map toJson() => { 'payinConstraints': JsonConverters.toJson(payinConstraints,'RecordList',context!), 'payinTaxationPolicyId': payinTaxationPolicyId, 'winningsCaps': JsonConverters.toJson(winningsCaps,'RecordList',context!), 'winningsTaxationPolicyId': winningsTaxationPolicyId }; getTypeName() => "BettingPolicies"; TypeContext? context = _ctx; } 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 ProductReference implements IConvertible { String? id; String? value; String? category; Ref? productProvider; ProductReference({this.id,this.value,this.category,this.productProvider}); ProductReference.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; value = json['value']; category = json['category']; productProvider = JsonConverters.fromJson(json['productProvider'],'Ref',context!); return this; } Map toJson() => { 'id': id, 'value': value, 'category': category, 'productProvider': JsonConverters.toJson(productProvider,'Ref',context!) }; getTypeName() => "ProductReference"; 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/products/instances", "POST") class InstallProductInstance implements IReturn, IConvertible, IPost { String? id; String? name; String? title; ProductReference? product; Ref? currency; BettingPolicies? bettingPolicies; String? apiUrl; String? backOfficeUrl; String? instanceUrl; String? feedPlayerUrl; InstallProductInstance({this.id,this.name,this.title,this.product,this.currency,this.bettingPolicies,this.apiUrl,this.backOfficeUrl,this.instanceUrl,this.feedPlayerUrl}); InstallProductInstance.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; title = json['title']; product = JsonConverters.fromJson(json['product'],'ProductReference',context!); currency = JsonConverters.fromJson(json['currency'],'Ref',context!); bettingPolicies = JsonConverters.fromJson(json['bettingPolicies'],'BettingPolicies',context!); apiUrl = json['apiUrl']; backOfficeUrl = json['backOfficeUrl']; instanceUrl = json['instanceUrl']; feedPlayerUrl = json['feedPlayerUrl']; return this; } Map toJson() => { 'id': id, 'name': name, 'title': title, 'product': JsonConverters.toJson(product,'ProductReference',context!), 'currency': JsonConverters.toJson(currency,'Ref',context!), 'bettingPolicies': JsonConverters.toJson(bettingPolicies,'BettingPolicies',context!), 'apiUrl': apiUrl, 'backOfficeUrl': backOfficeUrl, 'instanceUrl': instanceUrl, 'feedPlayerUrl': feedPlayerUrl }; createResponse() => ResponseStatus(); getResponseTypeName() => "ResponseStatus"; getTypeName() => "InstallProductInstance"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.sbbet.ath.cx', types: { 'Money': TypeInfo(TypeOf.Class, create:() => Money()), 'PayinConstraintType': TypeInfo(TypeOf.Enum, enumValues:PayinConstraintType.values), 'PayinConstraint': TypeInfo(TypeOf.Class, create:() => PayinConstraint()), 'WinningsCapType': TypeInfo(TypeOf.Enum, enumValues:WinningsCapType.values), 'WinningsCap': TypeInfo(TypeOf.Class, create:() => WinningsCap()), 'BettingPolicies': TypeInfo(TypeOf.Class, create:() => BettingPolicies()), 'RecordList': TypeInfo(TypeOf.Class, create:() => RecordList()), 'RecordList': TypeInfo(TypeOf.Class, create:() => RecordList()), 'Ref': TypeInfo(TypeOf.Class, create:() => Ref()), 'ProductReference': TypeInfo(TypeOf.Class, create:() => ProductReference()), 'RecordList': TypeInfo(TypeOf.GenericDef,create:() => RecordList()), 'InstallProductInstance': TypeInfo(TypeOf.Class, create:() => InstallProductInstance()), });