PUT | /RestApi/sitefinity/scheduling/scheduled-tasks |
---|
import 'package:servicestack/servicestack.dart';
enum SchedulingTaskCommand
{
Restart,
Stop,
Resume,
Delete,
Start,
}
class ManageScheduleTask implements IConvertible
{
String? TaskId;
SchedulingTaskCommand? Operation;
String? Hash;
ManageScheduleTask({this.TaskId,this.Operation,this.Hash});
ManageScheduleTask.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TaskId = json['TaskId'];
Operation = JsonConverters.fromJson(json['Operation'],'SchedulingTaskCommand',context!);
Hash = json['Hash'];
return this;
}
Map<String, dynamic> toJson() => {
'TaskId': TaskId,
'Operation': JsonConverters.toJson(Operation,'SchedulingTaskCommand',context!),
'Hash': Hash
};
getTypeName() => "ManageScheduleTask";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
'SchedulingTaskCommand': TypeInfo(TypeOf.Enum, enumValues:SchedulingTaskCommand.values),
'ManageScheduleTask': TypeInfo(TypeOf.Class, create:() => ManageScheduleTask()),
});
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /RestApi/sitefinity/scheduling/scheduled-tasks HTTP/1.1
Host: www.asg.com.au
Accept: application/json
Content-Type: application/json
Content-Length: length
{"TaskId":"String","Operation":"Restart","Hash":"String"}