<back to all web services

PersonaRequestDto

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

class PersonaRequestDto implements IConvertible
{
    String? Filter;

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

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

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

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

enum PersonaState
{
    Inactive,
    Active,
    ToBeDeleted,
}

class Persona implements IConvertible
{
    int? Id;
    String? Name;
    String? Description;
    String? PhotoUrl;
    PersonaState? State;
    int? Threshold;
    DateTime? CreatedOn;
    String? CreatedByUserId;
    DateTime? ModifiedOn;
    String? ModifiedByUserId;
    DateTime? ToBeReinitializedAt;

    Persona({this.Id,this.Name,this.Description,this.PhotoUrl,this.State,this.Threshold,this.CreatedOn,this.CreatedByUserId,this.ModifiedOn,this.ModifiedByUserId,this.ToBeReinitializedAt});
    Persona.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        PhotoUrl = json['PhotoUrl'];
        State = JsonConverters.fromJson(json['State'],'PersonaState',context!);
        Threshold = json['Threshold'];
        CreatedOn = JsonConverters.fromJson(json['CreatedOn'],'DateTime',context!);
        CreatedByUserId = json['CreatedByUserId'];
        ModifiedOn = JsonConverters.fromJson(json['ModifiedOn'],'DateTime',context!);
        ModifiedByUserId = json['ModifiedByUserId'];
        ToBeReinitializedAt = JsonConverters.fromJson(json['ToBeReinitializedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'PhotoUrl': PhotoUrl,
        'State': JsonConverters.toJson(State,'PersonaState',context!),
        'Threshold': Threshold,
        'CreatedOn': JsonConverters.toJson(CreatedOn,'DateTime',context!),
        'CreatedByUserId': CreatedByUserId,
        'ModifiedOn': JsonConverters.toJson(ModifiedOn,'DateTime',context!),
        'ModifiedByUserId': ModifiedByUserId,
        'ToBeReinitializedAt': JsonConverters.toJson(ToBeReinitializedAt,'DateTime',context!)
    };

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

class PersonaListViewModel implements IConvertible
{
    List<Persona>? Personаs;
    String? DecAppUrl;

    PersonaListViewModel({this.Personаs,this.DecAppUrl});
    PersonaListViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Personаs = JsonConverters.fromJson(json['Personаs'],'List<Persona>',context!);
        DecAppUrl = json['DecAppUrl'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Personаs': JsonConverters.toJson(Personаs,'List<Persona>',context!),
        'DecAppUrl': DecAppUrl
    };

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

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'PersonaRequestDto': TypeInfo(TypeOf.Class, create:() => PersonaRequestDto()),
    'PersonaState': TypeInfo(TypeOf.Enum, enumValues:PersonaState.values),
    'Persona': TypeInfo(TypeOf.Class, create:() => Persona()),
    'PersonaListViewModel': TypeInfo(TypeOf.Class, create:() => PersonaListViewModel()),
    'List<Persona>': TypeInfo(TypeOf.Class, create:() => <Persona>[]),
});

Dart PersonaRequestDto 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/sitefinity/data-intelligence/persona HTTP/1.1 
Host: www.asg.com.au 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"DecAppUrl":"String"}