<back to all web services

ConversionRequestDto

The following routes are available for this service:
GET/RestApi/sitefinity/data-intelligence/conversion
import 'package:servicestack/servicestack.dart';

class ConversionRequestDto implements IConvertible
{
    String? Filter;

    ConversionRequestDto({this.Filter});
    ConversionRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Filter': Filter
    };

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

enum CalculationState
{
    Inactive,
    Initializing,
    Active,
    ToBeDeleted,
    Error,
    Pending,
    Expired,
}

enum MatchingOperator
{
    ExactMatch,
    Contains,
    StartsWith,
    EndsWith,
    UrlStrippedMatch,
}

class ConditionPart implements IConvertible
{
    int? Id;
    String? Predicate;
    bool? IsNegated;
    MatchingOperator? PredicateOperator;
    MatchingOperator? ObjectOperator;
    List<String>? Objects;
    String? ClientAttribute;
    String? ContactPropertyId;
    Map<String,String?>? ObjectMetadata;
    Map<String,String?>? UrlParameters;

    ConditionPart({this.Id,this.Predicate,this.IsNegated,this.PredicateOperator,this.ObjectOperator,this.Objects,this.ClientAttribute,this.ContactPropertyId,this.ObjectMetadata,this.UrlParameters});
    ConditionPart.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Predicate = json['Predicate'];
        IsNegated = json['IsNegated'];
        PredicateOperator = JsonConverters.fromJson(json['PredicateOperator'],'MatchingOperator',context!);
        ObjectOperator = JsonConverters.fromJson(json['ObjectOperator'],'MatchingOperator',context!);
        Objects = JsonConverters.fromJson(json['Objects'],'List<String>',context!);
        ClientAttribute = json['ClientAttribute'];
        ContactPropertyId = json['ContactPropertyId'];
        ObjectMetadata = JsonConverters.toStringMap(json['ObjectMetadata']);
        UrlParameters = JsonConverters.toStringMap(json['UrlParameters']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Predicate': Predicate,
        'IsNegated': IsNegated,
        'PredicateOperator': JsonConverters.toJson(PredicateOperator,'MatchingOperator',context!),
        'ObjectOperator': JsonConverters.toJson(ObjectOperator,'MatchingOperator',context!),
        'Objects': JsonConverters.toJson(Objects,'List<String>',context!),
        'ClientAttribute': ClientAttribute,
        'ContactPropertyId': ContactPropertyId,
        'ObjectMetadata': ObjectMetadata,
        'UrlParameters': UrlParameters
    };

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

class ConditionExpression implements IConvertible
{
    String? Relation;
    List<ConditionPart>? Parts;

    ConditionExpression({this.Relation,this.Parts});
    ConditionExpression.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Relation = json['Relation'];
        Parts = JsonConverters.fromJson(json['Parts'],'List<ConditionPart>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Relation': Relation,
        'Parts': JsonConverters.toJson(Parts,'List<ConditionPart>',context!)
    };

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

class Conversion implements IConvertible
{
    int? Id;
    String? Name;
    CalculationState? State;
    int? InputDays;
    DateTime? CreatedOn;
    DateTime? ModifiedOn;
    String? CreatedByUserId;
    String? ModifiedByUserId;
    ConditionExpression? Definition;
    ConditionExpression? ClientFilter;
    bool? CanBeModified;
    bool? CanBeDeleted;
    bool? ContentRecommendationsEnabled;
    DateTime? AttributionCalculatedOn;
    int? DecisionTreeId;

    Conversion({this.Id,this.Name,this.State,this.InputDays,this.CreatedOn,this.ModifiedOn,this.CreatedByUserId,this.ModifiedByUserId,this.Definition,this.ClientFilter,this.CanBeModified,this.CanBeDeleted,this.ContentRecommendationsEnabled,this.AttributionCalculatedOn,this.DecisionTreeId});
    Conversion.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        State = JsonConverters.fromJson(json['State'],'CalculationState',context!);
        InputDays = json['InputDays'];
        CreatedOn = JsonConverters.fromJson(json['CreatedOn'],'DateTime',context!);
        ModifiedOn = JsonConverters.fromJson(json['ModifiedOn'],'DateTime',context!);
        CreatedByUserId = json['CreatedByUserId'];
        ModifiedByUserId = json['ModifiedByUserId'];
        Definition = JsonConverters.fromJson(json['Definition'],'ConditionExpression',context!);
        ClientFilter = JsonConverters.fromJson(json['ClientFilter'],'ConditionExpression',context!);
        CanBeModified = json['CanBeModified'];
        CanBeDeleted = json['CanBeDeleted'];
        ContentRecommendationsEnabled = json['ContentRecommendationsEnabled'];
        AttributionCalculatedOn = JsonConverters.fromJson(json['AttributionCalculatedOn'],'DateTime',context!);
        DecisionTreeId = json['DecisionTreeId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'State': JsonConverters.toJson(State,'CalculationState',context!),
        'InputDays': InputDays,
        'CreatedOn': JsonConverters.toJson(CreatedOn,'DateTime',context!),
        'ModifiedOn': JsonConverters.toJson(ModifiedOn,'DateTime',context!),
        'CreatedByUserId': CreatedByUserId,
        'ModifiedByUserId': ModifiedByUserId,
        'Definition': JsonConverters.toJson(Definition,'ConditionExpression',context!),
        'ClientFilter': JsonConverters.toJson(ClientFilter,'ConditionExpression',context!),
        'CanBeModified': CanBeModified,
        'CanBeDeleted': CanBeDeleted,
        'ContentRecommendationsEnabled': ContentRecommendationsEnabled,
        'AttributionCalculatedOn': JsonConverters.toJson(AttributionCalculatedOn,'DateTime',context!),
        'DecisionTreeId': DecisionTreeId
    };

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

class ConversionsViewModel implements IConvertible
{
    List<Conversion>? Conversions;

    ConversionsViewModel({this.Conversions});
    ConversionsViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Conversions = JsonConverters.fromJson(json['Conversions'],'List<Conversion>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Conversions': JsonConverters.toJson(Conversions,'List<Conversion>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'ConversionRequestDto': TypeInfo(TypeOf.Class, create:() => ConversionRequestDto()),
    'CalculationState': TypeInfo(TypeOf.Enum, enumValues:CalculationState.values),
    'MatchingOperator': TypeInfo(TypeOf.Enum, enumValues:MatchingOperator.values),
    'ConditionPart': TypeInfo(TypeOf.Class, create:() => ConditionPart()),
    'ConditionExpression': TypeInfo(TypeOf.Class, create:() => ConditionExpression()),
    'List<ConditionPart>': TypeInfo(TypeOf.Class, create:() => <ConditionPart>[]),
    'Conversion': TypeInfo(TypeOf.Class, create:() => Conversion()),
    'ConversionsViewModel': TypeInfo(TypeOf.Class, create:() => ConversionsViewModel()),
    'List<Conversion>': TypeInfo(TypeOf.Class, create:() => <Conversion>[]),
});

Dart ConversionRequestDto DTOs

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

HTTP + JSV

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

GET /RestApi/sitefinity/data-intelligence/conversion HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	
}