import 'package:servicestack/servicestack.dart';
// @DataContract
class Translation implements ITranslation, IConvertible
{
// @DataMember
String? Key;
// @DataMember
String? NL;
// @DataMember
String? EN;
// @DataMember
String? DE;
// @DataMember
String? FR;
// @DataMember
String? C1;
// @DataMember
String? C2;
// @DataMember
String? C3;
// @DataMember
String? C4;
// @DataMember
String? C5;
// @DataMember
String? C6;
Translation({this.Key,this.NL,this.EN,this.DE,this.FR,this.C1,this.C2,this.C3,this.C4,this.C5,this.C6});
Translation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
NL = json['NL'];
EN = json['EN'];
DE = json['DE'];
FR = json['FR'];
C1 = json['C1'];
C2 = json['C2'];
C3 = json['C3'];
C4 = json['C4'];
C5 = json['C5'];
C6 = json['C6'];
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'NL': NL,
'EN': EN,
'DE': DE,
'FR': FR,
'C1': C1,
'C2': C2,
'C3': C3,
'C4': C4,
'C5': C5,
'C6': C6
};
getTypeName() => "Translation";
TypeContext? context = _ctx;
}
// @DataContract
class GetTranslationsResponse implements IConvertible
{
// @DataMember
List<Translation>? Translations;
// @DataMember
String? PreferredLanguage;
// @DataMember
String? PreferredLanguageShort;
GetTranslationsResponse({this.Translations,this.PreferredLanguage,this.PreferredLanguageShort});
GetTranslationsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Translations = JsonConverters.fromJson(json['Translations'],'List<Translation>',context!);
PreferredLanguage = json['PreferredLanguage'];
PreferredLanguageShort = json['PreferredLanguageShort'];
return this;
}
Map<String, dynamic> toJson() => {
'Translations': JsonConverters.toJson(Translations,'List<Translation>',context!),
'PreferredLanguage': PreferredLanguage,
'PreferredLanguageShort': PreferredLanguageShort
};
getTypeName() => "GetTranslationsResponse";
TypeContext? context = _ctx;
}
class GetTranslations implements IConvertible
{
List<String>? TranslateKeys;
GetTranslations({this.TranslateKeys});
GetTranslations.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TranslateKeys = JsonConverters.fromJson(json['TranslateKeys'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'TranslateKeys': JsonConverters.toJson(TranslateKeys,'List<String>',context!)
};
getTypeName() => "GetTranslations";
TypeContext? context = _ctx;
}
class GetUserTranslations extends GetTranslations implements IConvertible
{
GetUserTranslations();
GetUserTranslations.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "GetUserTranslations";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
'Translation': TypeInfo(TypeOf.Class, create:() => Translation()),
'GetTranslationsResponse': TypeInfo(TypeOf.Class, create:() => GetTranslationsResponse()),
'List<Translation>': TypeInfo(TypeOf.Class, create:() => <Translation>[]),
'GetTranslations': TypeInfo(TypeOf.Class, create:() => GetTranslations()),
'GetUserTranslations': TypeInfo(TypeOf.Class, create:() => GetUserTranslations()),
});
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.
POST /json/reply/GetUserTranslations HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: application/json
Content-Type: application/json
Content-Length: length
{"TranslateKeys":["String"]}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Translations":[{"Key":"String","NL":"String","EN":"String","DE":"String","FR":"String","C1":"String","C2":"String","C3":"String","C4":"String","C5":"String","C6":"String"}],"PreferredLanguage":"String","PreferredLanguageShort":"String"}