All Verbs | /alerts/getbyuser |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class CoreRS implements IConvertible
{
String? Code;
String? ErrorMessage;
String? ErrorStackTrace;
CoreRS({this.Code,this.ErrorMessage,this.ErrorStackTrace});
CoreRS.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Code = json['Code'];
ErrorMessage = json['ErrorMessage'];
ErrorStackTrace = json['ErrorStackTrace'];
return this;
}
Map<String, dynamic> toJson() => {
'Code': Code,
'ErrorMessage': ErrorMessage,
'ErrorStackTrace': ErrorStackTrace
};
getTypeName() => "CoreRS";
TypeContext? context = _ctx;
}
class SystemAlert implements IConvertible
{
int? GenerationType;
String? GenerationTypeDesc;
int? AlertOrigin;
String? AlertOriginDesc;
String? Message;
double? Longitude;
double? Latitude;
String? ModifiedUser;
DateTime? ModifiedDate;
String? ModifiedDateDesc;
String? Notes;
String? Fullinfo;
int? Status;
String? StatusDesc;
SystemAlert({this.GenerationType,this.GenerationTypeDesc,this.AlertOrigin,this.AlertOriginDesc,this.Message,this.Longitude,this.Latitude,this.ModifiedUser,this.ModifiedDate,this.ModifiedDateDesc,this.Notes,this.Fullinfo,this.Status,this.StatusDesc});
SystemAlert.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
GenerationType = json['GenerationType'];
GenerationTypeDesc = json['GenerationTypeDesc'];
AlertOrigin = json['AlertOrigin'];
AlertOriginDesc = json['AlertOriginDesc'];
Message = json['Message'];
Longitude = JsonConverters.toDouble(json['Longitude']);
Latitude = JsonConverters.toDouble(json['Latitude']);
ModifiedUser = json['ModifiedUser'];
ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!);
ModifiedDateDesc = json['ModifiedDateDesc'];
Notes = json['Notes'];
Fullinfo = json['Fullinfo'];
Status = json['Status'];
StatusDesc = json['StatusDesc'];
return this;
}
Map<String, dynamic> toJson() => {
'GenerationType': GenerationType,
'GenerationTypeDesc': GenerationTypeDesc,
'AlertOrigin': AlertOrigin,
'AlertOriginDesc': AlertOriginDesc,
'Message': Message,
'Longitude': Longitude,
'Latitude': Latitude,
'ModifiedUser': ModifiedUser,
'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!),
'ModifiedDateDesc': ModifiedDateDesc,
'Notes': Notes,
'Fullinfo': Fullinfo,
'Status': Status,
'StatusDesc': StatusDesc
};
getTypeName() => "SystemAlert";
TypeContext? context = _ctx;
}
class GetAlertsByUserRS extends CoreRS implements IConvertible
{
List<SystemAlert>? Data;
GetAlertsByUserRS({this.Data});
GetAlertsByUserRS.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Data = JsonConverters.fromJson(json['Data'],'List<SystemAlert>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Data': JsonConverters.toJson(Data,'List<SystemAlert>',context!)
});
getTypeName() => "GetAlertsByUserRS";
TypeContext? context = _ctx;
}
class GetAlertsByUserRQ implements IConvertible
{
String? User;
int? Status;
GetAlertsByUserRQ({this.User,this.Status});
GetAlertsByUserRQ.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
User = json['User'];
Status = json['Status'];
return this;
}
Map<String, dynamic> toJson() => {
'User': User,
'Status': Status
};
getTypeName() => "GetAlertsByUserRQ";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'ws.jimsnwa.com', types: <String, TypeInfo> {
'CoreRS': TypeInfo(TypeOf.Class, create:() => CoreRS()),
'SystemAlert': TypeInfo(TypeOf.Class, create:() => SystemAlert()),
'GetAlertsByUserRS': TypeInfo(TypeOf.Class, create:() => GetAlertsByUserRS()),
'List<SystemAlert>': TypeInfo(TypeOf.Class, create:() => <SystemAlert>[]),
'GetAlertsByUserRQ': TypeInfo(TypeOf.Class, create:() => GetAlertsByUserRQ()),
});
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 /alerts/getbyuser HTTP/1.1
Host: ws.jimsnwa.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
User: String,
Status: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Data: [ { GenerationType: 0, GenerationTypeDesc: String, AlertOrigin: 0, AlertOriginDesc: String, Message: String, Longitude: 0, Latitude: 0, ModifiedUser: String, ModifiedDate: 0001-01-01, ModifiedDateDesc: String, Notes: String, Fullinfo: String, Status: 0, StatusDesc: String } ], Code: String, ErrorMessage: String, ErrorStackTrace: String }