import 'package:servicestack/servicestack.dart';
class ERAS2ClientNotification implements IConvertible
{
int? noteID;
String? infotext;
DateTime? valid_from;
DateTime? valid_to;
String? valid_version;
String? license;
ERAS2ClientNotification({this.noteID,this.infotext,this.valid_from,this.valid_to,this.valid_version,this.license});
ERAS2ClientNotification.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
noteID = json['noteID'];
infotext = json['infotext'];
valid_from = JsonConverters.fromJson(json['valid_from'],'DateTime',context!);
valid_to = JsonConverters.fromJson(json['valid_to'],'DateTime',context!);
valid_version = json['valid_version'];
license = json['license'];
return this;
}
Map<String, dynamic> toJson() => {
'noteID': noteID,
'infotext': infotext,
'valid_from': JsonConverters.toJson(valid_from,'DateTime',context!),
'valid_to': JsonConverters.toJson(valid_to,'DateTime',context!),
'valid_version': valid_version,
'license': license
};
getTypeName() => "ERAS2ClientNotification";
TypeContext? context = _ctx;
}
class ERAS2ClientNotificationResponse implements IConvertible
{
List<ERAS2ClientNotification>? notifications;
ERAS2ClientNotificationResponse({this.notifications});
ERAS2ClientNotificationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
notifications = JsonConverters.fromJson(json['notifications'],'List<ERAS2ClientNotification>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'notifications': JsonConverters.toJson(notifications,'List<ERAS2ClientNotification>',context!)
};
getTypeName() => "ERAS2ClientNotificationResponse";
TypeContext? context = _ctx;
}
class ERAS2ClientNotificationRequest implements IConvertible
{
String? eras2_version;
String? eras2_license;
String? CallingOS;
String? CallingOSArchitecture;
String? LocalIP;
String? CallingHost;
String? CallingUser;
String? CallingDomain;
ERAS2ClientNotificationRequest({this.eras2_version,this.eras2_license,this.CallingOS,this.CallingOSArchitecture,this.LocalIP,this.CallingHost,this.CallingUser,this.CallingDomain});
ERAS2ClientNotificationRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
eras2_version = json['eras2_version'];
eras2_license = json['eras2_license'];
CallingOS = json['CallingOS'];
CallingOSArchitecture = json['CallingOSArchitecture'];
LocalIP = json['LocalIP'];
CallingHost = json['CallingHost'];
CallingUser = json['CallingUser'];
CallingDomain = json['CallingDomain'];
return this;
}
Map<String, dynamic> toJson() => {
'eras2_version': eras2_version,
'eras2_license': eras2_license,
'CallingOS': CallingOS,
'CallingOSArchitecture': CallingOSArchitecture,
'LocalIP': LocalIP,
'CallingHost': CallingHost,
'CallingUser': CallingUser,
'CallingDomain': CallingDomain
};
getTypeName() => "ERAS2ClientNotificationRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: '52.142.207.43', types: <String, TypeInfo> {
'ERAS2ClientNotification': TypeInfo(TypeOf.Class, create:() => ERAS2ClientNotification()),
'ERAS2ClientNotificationResponse': TypeInfo(TypeOf.Class, create:() => ERAS2ClientNotificationResponse()),
'List<ERAS2ClientNotification>': TypeInfo(TypeOf.Class, create:() => <ERAS2ClientNotification>[]),
'ERAS2ClientNotificationRequest': TypeInfo(TypeOf.Class, create:() => ERAS2ClientNotificationRequest()),
});
Dart ERAS2ClientNotificationRequest DTOs
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/ERAS2ClientNotificationRequest HTTP/1.1
Host: 52.142.207.43
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
eras2_version: String,
eras2_license: String,
CallingOS: String,
CallingOSArchitecture: String,
LocalIP: String,
CallingHost: String,
CallingUser: String,
CallingDomain: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
notifications:
[
{
noteID: 0,
infotext: String,
valid_from: 0001-01-01,
valid_to: 0001-01-01,
valid_version: String,
license: String
}
]
}