/* Options: Date: 2025-08-05 02:43:36 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://www.asg.com.au/RestApi //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetABTestsCount.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class VariationViewModel implements IConvertible { String? Id; String? Name; int? Distribution; bool? IsOriginal; int? Ordinal; String? PageDataId; bool? IsWinner; VariationViewModel({this.Id,this.Name,this.Distribution,this.IsOriginal,this.Ordinal,this.PageDataId,this.IsWinner}); VariationViewModel.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Distribution = json['Distribution']; IsOriginal = json['IsOriginal']; Ordinal = json['Ordinal']; PageDataId = json['PageDataId']; IsWinner = json['IsWinner']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Distribution': Distribution, 'IsOriginal': IsOriginal, 'Ordinal': Ordinal, 'PageDataId': PageDataId, 'IsWinner': IsWinner }; getTypeName() => "VariationViewModel"; TypeContext? context = _ctx; } enum GoalType { NextPageView, FormSubmission, DecConversion, } class GoalViewModel implements IConvertible { String? Id; GoalType? GoalType; String? GoalNameResourceKey; String? PredicateOperator; String? ObjectId; String? ObjectName; String? ObjectCulture; bool? IsPrimary; int? Ordinal; GoalViewModel({this.Id,this.GoalType,this.GoalNameResourceKey,this.PredicateOperator,this.ObjectId,this.ObjectName,this.ObjectCulture,this.IsPrimary,this.Ordinal}); GoalViewModel.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; GoalType = JsonConverters.fromJson(json['GoalType'],'GoalType',context!); GoalNameResourceKey = json['GoalNameResourceKey']; PredicateOperator = json['PredicateOperator']; ObjectId = json['ObjectId']; ObjectName = json['ObjectName']; ObjectCulture = json['ObjectCulture']; IsPrimary = json['IsPrimary']; Ordinal = json['Ordinal']; return this; } Map toJson() => { 'Id': Id, 'GoalType': JsonConverters.toJson(GoalType,'GoalType',context!), 'GoalNameResourceKey': GoalNameResourceKey, 'PredicateOperator': PredicateOperator, 'ObjectId': ObjectId, 'ObjectName': ObjectName, 'ObjectCulture': ObjectCulture, 'IsPrimary': IsPrimary, 'Ordinal': Ordinal }; getTypeName() => "GoalViewModel"; TypeContext? context = _ctx; } enum ABTestStatus { NotStarted, Scheduled, Active, Stopped, Ended, } abstract class IABTestsFilter { String? SearchText; ABTestStatus? Status; bool? MyTests; } // @Route("/ab-testing", "PUT") class ABTestViewModel implements IReturn, IConvertible, IPut { String? Id; String? Title; String? Description; DateTime? StartDate; DateTime? StopDate; String? Page; String? SiteId; String? Culture; List? Variations; List? Goals; String? ReportUrl; DateTime? LastModified; ABTestStatus? Status; String? Owner; String? WinnerVariationId; String? SelectedVariationId; String? PageNodeErrorMessage; String? WarningMessage; String? ApiKey; String? UserSegmentId; ABTestViewModel({this.Id,this.Title,this.Description,this.StartDate,this.StopDate,this.Page,this.SiteId,this.Culture,this.Variations,this.Goals,this.ReportUrl,this.LastModified,this.Status,this.Owner,this.WinnerVariationId,this.SelectedVariationId,this.PageNodeErrorMessage,this.WarningMessage,this.ApiKey,this.UserSegmentId}); ABTestViewModel.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Title = json['Title']; Description = json['Description']; StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!); StopDate = JsonConverters.fromJson(json['StopDate'],'DateTime',context!); Page = json['Page']; SiteId = json['SiteId']; Culture = json['Culture']; Variations = JsonConverters.fromJson(json['Variations'],'List',context!); Goals = JsonConverters.fromJson(json['Goals'],'List',context!); ReportUrl = json['ReportUrl']; LastModified = JsonConverters.fromJson(json['LastModified'],'DateTime',context!); Status = JsonConverters.fromJson(json['Status'],'ABTestStatus',context!); Owner = json['Owner']; WinnerVariationId = json['WinnerVariationId']; SelectedVariationId = json['SelectedVariationId']; PageNodeErrorMessage = json['PageNodeErrorMessage']; WarningMessage = json['WarningMessage']; ApiKey = json['ApiKey']; UserSegmentId = json['UserSegmentId']; return this; } Map toJson() => { 'Id': Id, 'Title': Title, 'Description': Description, 'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!), 'StopDate': JsonConverters.toJson(StopDate,'DateTime',context!), 'Page': Page, 'SiteId': SiteId, 'Culture': Culture, 'Variations': JsonConverters.toJson(Variations,'List',context!), 'Goals': JsonConverters.toJson(Goals,'List',context!), 'ReportUrl': ReportUrl, 'LastModified': JsonConverters.toJson(LastModified,'DateTime',context!), 'Status': JsonConverters.toJson(Status,'ABTestStatus',context!), 'Owner': Owner, 'WinnerVariationId': WinnerVariationId, 'SelectedVariationId': SelectedVariationId, 'PageNodeErrorMessage': PageNodeErrorMessage, 'WarningMessage': WarningMessage, 'ApiKey': ApiKey, 'UserSegmentId': UserSegmentId }; createResponse() => ABTestViewModel(); getResponseTypeName() => "ABTestViewModel"; getTypeName() => "ABTestViewModel"; TypeContext? context = _ctx; } // @Route("/ab-testing/tests/count", "GET") class GetABTestsCount implements IReturn>, IABTestsFilter, IConvertible, IGet { String? SearchText; ABTestStatus? Status; bool? MyTests; GetABTestsCount({this.SearchText,this.Status,this.MyTests}); GetABTestsCount.fromJson(Map json) { fromMap(json); } fromMap(Map json) { SearchText = json['SearchText']; Status = JsonConverters.fromJson(json['Status'],'ABTestStatus',context!); MyTests = json['MyTests']; return this; } Map toJson() => { 'SearchText': SearchText, 'Status': JsonConverters.toJson(Status,'ABTestStatus',context!), 'MyTests': MyTests }; createResponse() => []; getResponseTypeName() => "List"; getTypeName() => "GetABTestsCount"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: { 'VariationViewModel': TypeInfo(TypeOf.Class, create:() => VariationViewModel()), 'GoalType': TypeInfo(TypeOf.Enum, enumValues:GoalType.values), 'GoalViewModel': TypeInfo(TypeOf.Class, create:() => GoalViewModel()), 'ABTestStatus': TypeInfo(TypeOf.Enum, enumValues:ABTestStatus.values), 'IABTestsFilter': TypeInfo(TypeOf.Interface), 'ABTestViewModel': TypeInfo(TypeOf.Class, create:() => ABTestViewModel()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetABTestsCount': TypeInfo(TypeOf.Class, create:() => GetABTestsCount()), });