<back to all web services

GetABTestEditPageSelector

The following routes are available for this service:
GET/RestApi/ab-testing/edit-page-selector
import 'package:servicestack/servicestack.dart';

class GetABTestEditPageSelector implements IHasConnectionError, IConvertible
{
    String? PageNodeId;
    String? Culture;
    bool? HasConnectionConfigurationError;

    GetABTestEditPageSelector({this.PageNodeId,this.Culture,this.HasConnectionConfigurationError});
    GetABTestEditPageSelector.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PageNodeId = json['PageNodeId'];
        Culture = json['Culture'];
        HasConnectionConfigurationError = json['HasConnectionConfigurationError'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PageNodeId': PageNodeId,
        'Culture': Culture,
        'HasConnectionConfigurationError': HasConnectionConfigurationError
    };

    getTypeName() => "GetABTestEditPageSelector";
    TypeContext? context = _ctx;
}

enum ABTestStatus
{
    NotStarted,
    Scheduled,
    Active,
    Stopped,
    Ended,
}

class ABTestVariationViewModel implements IConvertible
{
    String? VariatonId;
    String? VariationName;
    String? VariationLink;
    bool? IsWinner;
    int? Ordinal;

    ABTestVariationViewModel({this.VariatonId,this.VariationName,this.VariationLink,this.IsWinner,this.Ordinal});
    ABTestVariationViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        VariatonId = json['VariatonId'];
        VariationName = json['VariationName'];
        VariationLink = json['VariationLink'];
        IsWinner = json['IsWinner'];
        Ordinal = json['Ordinal'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'VariatonId': VariatonId,
        'VariationName': VariationName,
        'VariationLink': VariationLink,
        'IsWinner': IsWinner,
        'Ordinal': Ordinal
    };

    getTypeName() => "ABTestVariationViewModel";
    TypeContext? context = _ctx;
}

class ABTestEditPageSelectorViewModel implements IConvertible
{
    String? Id;
    ABTestStatus? Status;
    List<ABTestVariationViewModel>? Variations;
    String? PreviewLink;
    bool? AbTestingApiServerHasConnection;
    bool? HasConnectionConfigurationError;
    String? WarningMessage;
    bool? ApiKeyChanged;

    ABTestEditPageSelectorViewModel({this.Id,this.Status,this.Variations,this.PreviewLink,this.AbTestingApiServerHasConnection,this.HasConnectionConfigurationError,this.WarningMessage,this.ApiKeyChanged});
    ABTestEditPageSelectorViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Status = JsonConverters.fromJson(json['Status'],'ABTestStatus',context!);
        Variations = JsonConverters.fromJson(json['Variations'],'List<ABTestVariationViewModel>',context!);
        PreviewLink = json['PreviewLink'];
        AbTestingApiServerHasConnection = json['AbTestingApiServerHasConnection'];
        HasConnectionConfigurationError = json['HasConnectionConfigurationError'];
        WarningMessage = json['WarningMessage'];
        ApiKeyChanged = json['ApiKeyChanged'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Status': JsonConverters.toJson(Status,'ABTestStatus',context!),
        'Variations': JsonConverters.toJson(Variations,'List<ABTestVariationViewModel>',context!),
        'PreviewLink': PreviewLink,
        'AbTestingApiServerHasConnection': AbTestingApiServerHasConnection,
        'HasConnectionConfigurationError': HasConnectionConfigurationError,
        'WarningMessage': WarningMessage,
        'ApiKeyChanged': ApiKeyChanged
    };

    getTypeName() => "ABTestEditPageSelectorViewModel";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'GetABTestEditPageSelector': TypeInfo(TypeOf.Class, create:() => GetABTestEditPageSelector()),
    'ABTestStatus': TypeInfo(TypeOf.Enum, enumValues:ABTestStatus.values),
    'ABTestVariationViewModel': TypeInfo(TypeOf.Class, create:() => ABTestVariationViewModel()),
    'ABTestEditPageSelectorViewModel': TypeInfo(TypeOf.Class, create:() => ABTestEditPageSelectorViewModel()),
    'List<ABTestVariationViewModel>': TypeInfo(TypeOf.Class, create:() => <ABTestVariationViewModel>[]),
});

Dart GetABTestEditPageSelector DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /RestApi/ab-testing/edit-page-selector HTTP/1.1 
Host: www.asg.com.au 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Status":"NotStarted","PreviewLink":"String","AbTestingApiServerHasConnection":false,"HasConnectionConfigurationError":false,"WarningMessage":"String","ApiKeyChanged":false}