<back to all web services

SitemapSettingsMessage

The following routes are available for this service:
All Verbs/RestApi/sitefinity/sitemap/settings
All Verbs/RestApi/sitefinity/sitemap/settings/{Id}
import 'package:servicestack/servicestack.dart';

enum SitemapGenerationCondition
{
    Daily,
    Weekly,
    Manual,
}

class SitemapSettings implements IConvertible
{
    bool? IsEnabled;
    int? UrlLimit;
    bool? Compress;
    SitemapGenerationCondition? Condition;
    int? DayToStart;
    DateTime? TimeToStart;
    String? SiteId;
    String? LastExecutionTime;
    String? LastError;
    bool? PingGoogle;

    SitemapSettings({this.IsEnabled,this.UrlLimit,this.Compress,this.Condition,this.DayToStart,this.TimeToStart,this.SiteId,this.LastExecutionTime,this.LastError,this.PingGoogle});
    SitemapSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        IsEnabled = json['IsEnabled'];
        UrlLimit = json['UrlLimit'];
        Compress = json['Compress'];
        Condition = JsonConverters.fromJson(json['Condition'],'SitemapGenerationCondition',context!);
        DayToStart = json['DayToStart'];
        TimeToStart = JsonConverters.fromJson(json['TimeToStart'],'DateTime',context!);
        SiteId = json['SiteId'];
        LastExecutionTime = json['LastExecutionTime'];
        LastError = json['LastError'];
        PingGoogle = json['PingGoogle'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'IsEnabled': IsEnabled,
        'UrlLimit': UrlLimit,
        'Compress': Compress,
        'Condition': JsonConverters.toJson(Condition,'SitemapGenerationCondition',context!),
        'DayToStart': DayToStart,
        'TimeToStart': JsonConverters.toJson(TimeToStart,'DateTime',context!),
        'SiteId': SiteId,
        'LastExecutionTime': LastExecutionTime,
        'LastError': LastError,
        'PingGoogle': PingGoogle
    };

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

class SitemapSettingsMessage implements IConvertible
{
    String? Id;
    SitemapSettings? Item;

    SitemapSettingsMessage({this.Id,this.Item});
    SitemapSettingsMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Item': JsonConverters.toJson(Item,'SitemapSettings',context!)
    };

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

class SitemapSettingsContext implements IConvertible
{
    SitemapSettings? Item;

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

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

    Map<String, dynamic> toJson() => {
        'Item': JsonConverters.toJson(Item,'SitemapSettings',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'SitemapGenerationCondition': TypeInfo(TypeOf.Enum, enumValues:SitemapGenerationCondition.values),
    'SitemapSettings': TypeInfo(TypeOf.Class, create:() => SitemapSettings()),
    'SitemapSettingsMessage': TypeInfo(TypeOf.Class, create:() => SitemapSettingsMessage()),
    'SitemapSettingsContext': TypeInfo(TypeOf.Class, create:() => SitemapSettingsContext()),
});

Dart SitemapSettingsMessage 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.

POST /RestApi/sitefinity/sitemap/settings HTTP/1.1 
Host: www.asg.com.au 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Item":{"IsEnabled":false,"UrlLimit":0,"Compress":false,"Condition":"Daily","DayToStart":0,"TimeToStart":"\/Date(-62135596800000-0000)\/","LastExecutionTime":"String","LastError":"String","PingGoogle":false}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Item":{"IsEnabled":false,"UrlLimit":0,"Compress":false,"Condition":"Daily","DayToStart":0,"TimeToStart":"\/Date(-62135596800000-0000)\/","LastExecutionTime":"String","LastError":"String","PingGoogle":false}}