import 'package:servicestack/servicestack.dart';
enum UpdateAction
{
doCheckVersion,
doNothing,
doUpdate,
doDowngrade,
sendVersionlist,
delete,
install,
execute,
copy,
move,
Error,
}
class ModulVersionsInfo implements IConvertible
{
String? Modul;
String? PruefAssembly;
bool? istTestVersion;
bool? istDisabled;
String? URL;
bool? willTestVersion;
int? Major;
int? Minor;
int? Build;
int? Revision;
ModulVersionsInfo({this.Modul,this.PruefAssembly,this.istTestVersion,this.istDisabled,this.URL,this.willTestVersion,this.Major,this.Minor,this.Build,this.Revision});
ModulVersionsInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Modul = json['Modul'];
PruefAssembly = json['PruefAssembly'];
istTestVersion = json['istTestVersion'];
istDisabled = json['istDisabled'];
URL = json['URL'];
willTestVersion = json['willTestVersion'];
Major = json['Major'];
Minor = json['Minor'];
Build = json['Build'];
Revision = json['Revision'];
return this;
}
Map<String, dynamic> toJson() => {
'Modul': Modul,
'PruefAssembly': PruefAssembly,
'istTestVersion': istTestVersion,
'istDisabled': istDisabled,
'URL': URL,
'willTestVersion': willTestVersion,
'Major': Major,
'Minor': Minor,
'Build': Build,
'Revision': Revision
};
getTypeName() => "ModulVersionsInfo";
TypeContext? context = _ctx;
}
class UpdateActionResponse implements IConvertible
{
UpdateAction? Answer;
String? AnswerInfo1;
String? AnswerInfo2;
Map<String,ModulVersionsInfo?>? ModulVersionen;
UpdateActionResponse({this.Answer,this.AnswerInfo1,this.AnswerInfo2,this.ModulVersionen});
UpdateActionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Answer = JsonConverters.fromJson(json['Answer'],'UpdateAction',context!);
AnswerInfo1 = json['AnswerInfo1'];
AnswerInfo2 = json['AnswerInfo2'];
ModulVersionen = JsonConverters.fromJson(json['ModulVersionen'],'Map<String,ModulVersionsInfo?>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Answer': JsonConverters.toJson(Answer,'UpdateAction',context!),
'AnswerInfo1': AnswerInfo1,
'AnswerInfo2': AnswerInfo2,
'ModulVersionen': JsonConverters.toJson(ModulVersionen,'Map<String,ModulVersionsInfo?>',context!)
};
getTypeName() => "UpdateActionResponse";
TypeContext? context = _ctx;
}
class UpdateActionRequest implements IConvertible
{
String? CryptedLicenseNr;
String? CryptedStamp;
UpdateAction? Action;
UpdateActionRequest({this.CryptedLicenseNr,this.CryptedStamp,this.Action});
UpdateActionRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CryptedLicenseNr = json['CryptedLicenseNr'];
CryptedStamp = json['CryptedStamp'];
Action = JsonConverters.fromJson(json['Action'],'UpdateAction',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CryptedLicenseNr': CryptedLicenseNr,
'CryptedStamp': CryptedStamp,
'Action': JsonConverters.toJson(Action,'UpdateAction',context!)
};
getTypeName() => "UpdateActionRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: '52.142.207.43', types: <String, TypeInfo> {
'UpdateAction': TypeInfo(TypeOf.Enum, enumValues:UpdateAction.values),
'ModulVersionsInfo': TypeInfo(TypeOf.Class, create:() => ModulVersionsInfo()),
'UpdateActionResponse': TypeInfo(TypeOf.Class, create:() => UpdateActionResponse()),
'Map<String,ModulVersionsInfo?>': TypeInfo(TypeOf.Class, create:() => Map<String,ModulVersionsInfo?>()),
'UpdateActionRequest': TypeInfo(TypeOf.Class, create:() => UpdateActionRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/UpdateActionRequest HTTP/1.1
Host: 52.142.207.43
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CryptedLicenseNr: String,
CryptedStamp: String,
Action: doCheckVersion
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Answer: doCheckVersion,
AnswerInfo1: String,
AnswerInfo2: String,
ModulVersionen:
{
String:
{
Modul: String,
PruefAssembly: String,
istTestVersion: False,
istDisabled: False,
URL: String,
willTestVersion: False,
Major: 0,
Minor: 0,
Build: 0,
Revision: 0
}
}
}