| GET | /App/{UserId}/HkEvaluations |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
// @DataContract
abstract class Eras2AppServiceModelBase
{
// @DataMember(Name="UserId")
String? UserId;
Eras2AppServiceModelBase({this.UserId});
Eras2AppServiceModelBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['userId'];
return this;
}
Map<String, dynamic> toJson() => {
'userId': UserId
};
getTypeName() => "Eras2AppServiceModelBase";
TypeContext? context = _ctx;
}
// @DataContract
class HkEvaluationParameter implements IConvertible
{
// @DataMember(Name="RadiatisId")
int? RadiatisId;
// @DataMember(Name="Code")
String? Code;
// @DataMember(Name="Value")
String? Value;
HkEvaluationParameter({this.RadiatisId,this.Code,this.Value});
HkEvaluationParameter.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RadiatisId = json['radiatisId'];
Code = json['code'];
Value = json['value'];
return this;
}
Map<String, dynamic> toJson() => {
'radiatisId': RadiatisId,
'code': Code,
'value': Value
};
getTypeName() => "HkEvaluationParameter";
TypeContext? context = _ctx;
}
// @DataContract
class HkEvaluationAttribute implements IConvertible
{
// @DataMember(Name="RadiatisId")
int? RadiatisId;
// @DataMember(Name="Code")
String? Code;
// @DataMember(Name="Value")
int? Value;
HkEvaluationAttribute({this.RadiatisId,this.Code,this.Value});
HkEvaluationAttribute.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RadiatisId = json['radiatisId'];
Code = json['code'];
Value = json['value'];
return this;
}
Map<String, dynamic> toJson() => {
'radiatisId': RadiatisId,
'code': Code,
'value': Value
};
getTypeName() => "HkEvaluationAttribute";
TypeContext? context = _ctx;
}
// @DataContract
class HkEvaluation implements IConvertible
{
// @DataMember(Name="Guid")
String? Guid;
// @DataMember(Name="DeviceGuid")
String? DeviceGuid;
// @DataMember(Name="DeviceNumber")
String? DeviceNumber;
// @DataMember(Name="NutzeinheitNumber")
String? NutzeinheitNumber;
// @DataMember(Name="NutzeinheitAddress")
String? NutzeinheitAddress;
// @DataMember(Name="HkveModel")
String? HkveModel;
// @DataMember(Name="HkveModelCustom")
String? HkveModelCustom;
// @DataMember(Name="MountingPoint")
String? MountingPoint;
// @DataMember(Name="MountingPointCustom")
String? MountingPointCustom;
// @DataMember(Name="GroupId")
int? GroupId;
// @DataMember(Name="GroupName")
String? GroupName;
// @DataMember(Name="TopMatch")
String? TopMatch;
// @DataMember(Name="RadiatisRadiatorId")
int? RadiatisRadiatorId;
// @DataMember(Name="ModelNoteReference")
String? ModelNoteReference;
// @DataMember(Name="Match")
int? Match;
// @DataMember(Name="KcValue")
double? KcValue;
// @DataMember(Name="KqValue")
double? KqValue;
// @DataMember(Name="Created")
DateTime? Created;
// @DataMember(Name="LastModified")
DateTime? LastModified;
// @DataMember(Name="TechnicianUserId")
String? TechnicianUserId;
// @DataMember(Name="ReceivedAt")
DateTime? ReceivedAt;
// @DataMember(Name="Parameters")
List<HkEvaluationParameter>? Parameters;
// @DataMember(Name="Attributes")
List<HkEvaluationAttribute>? Attributes;
HkEvaluation({this.Guid,this.DeviceGuid,this.DeviceNumber,this.NutzeinheitNumber,this.NutzeinheitAddress,this.HkveModel,this.HkveModelCustom,this.MountingPoint,this.MountingPointCustom,this.GroupId,this.GroupName,this.TopMatch,this.RadiatisRadiatorId,this.ModelNoteReference,this.Match,this.KcValue,this.KqValue,this.Created,this.LastModified,this.TechnicianUserId,this.ReceivedAt,this.Parameters,this.Attributes});
HkEvaluation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Guid = json['guid'];
DeviceGuid = json['deviceGuid'];
DeviceNumber = json['deviceNumber'];
NutzeinheitNumber = json['nutzeinheitNumber'];
NutzeinheitAddress = json['nutzeinheitAddress'];
HkveModel = json['hkveModel'];
HkveModelCustom = json['hkveModelCustom'];
MountingPoint = json['mountingPoint'];
MountingPointCustom = json['mountingPointCustom'];
GroupId = json['groupId'];
GroupName = json['groupName'];
TopMatch = json['topMatch'];
RadiatisRadiatorId = json['radiatisRadiatorId'];
ModelNoteReference = json['modelNoteReference'];
Match = json['match'];
KcValue = JsonConverters.toDouble(json['kcValue']);
KqValue = JsonConverters.toDouble(json['kqValue']);
Created = JsonConverters.fromJson(json['created'],'DateTime',context!);
LastModified = JsonConverters.fromJson(json['lastModified'],'DateTime',context!);
TechnicianUserId = json['technicianUserId'];
ReceivedAt = JsonConverters.fromJson(json['receivedAt'],'DateTime',context!);
Parameters = JsonConverters.fromJson(json['parameters'],'List<HkEvaluationParameter>',context!);
Attributes = JsonConverters.fromJson(json['attributes'],'List<HkEvaluationAttribute>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'guid': Guid,
'deviceGuid': DeviceGuid,
'deviceNumber': DeviceNumber,
'nutzeinheitNumber': NutzeinheitNumber,
'nutzeinheitAddress': NutzeinheitAddress,
'hkveModel': HkveModel,
'hkveModelCustom': HkveModelCustom,
'mountingPoint': MountingPoint,
'mountingPointCustom': MountingPointCustom,
'groupId': GroupId,
'groupName': GroupName,
'topMatch': TopMatch,
'radiatisRadiatorId': RadiatisRadiatorId,
'modelNoteReference': ModelNoteReference,
'match': Match,
'kcValue': KcValue,
'kqValue': KqValue,
'created': JsonConverters.toJson(Created,'DateTime',context!),
'lastModified': JsonConverters.toJson(LastModified,'DateTime',context!),
'technicianUserId': TechnicianUserId,
'receivedAt': JsonConverters.toJson(ReceivedAt,'DateTime',context!),
'parameters': JsonConverters.toJson(Parameters,'List<HkEvaluationParameter>',context!),
'attributes': JsonConverters.toJson(Attributes,'List<HkEvaluationAttribute>',context!)
};
getTypeName() => "HkEvaluation";
TypeContext? context = _ctx;
}
// @DataContract
class GetHkEvaluationsResponse implements IConvertible
{
// @DataMember(Name="Evaluations")
List<HkEvaluation>? Evaluations;
// @DataMember(Name="ResponseStatus")
ResponseStatus? ResponseStatus;
GetHkEvaluationsResponse({this.Evaluations,this.ResponseStatus});
GetHkEvaluationsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Evaluations = JsonConverters.fromJson(json['evaluations'],'List<HkEvaluation>',context!);
ResponseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'evaluations': JsonConverters.toJson(Evaluations,'List<HkEvaluation>',context!),
'responseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetHkEvaluationsResponse";
TypeContext? context = _ctx;
}
// @DataContract
class GetHkEvaluations extends Eras2AppServiceModelBase implements IConvertible
{
// @DataMember(Name="DeviceGuids")
List<String>? DeviceGuids;
// @DataMember(Name="ReceivedSince")
DateTime? ReceivedSince;
// @DataMember(Name="LatestPerDeviceOnly")
bool? LatestPerDeviceOnly;
GetHkEvaluations({this.DeviceGuids,this.ReceivedSince,this.LatestPerDeviceOnly});
GetHkEvaluations.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
DeviceGuids = JsonConverters.fromJson(json['deviceGuids'],'List<String>',context!);
ReceivedSince = JsonConverters.fromJson(json['receivedSince'],'DateTime',context!);
LatestPerDeviceOnly = json['latestPerDeviceOnly'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'deviceGuids': JsonConverters.toJson(DeviceGuids,'List<String>',context!),
'receivedSince': JsonConverters.toJson(ReceivedSince,'DateTime',context!),
'latestPerDeviceOnly': LatestPerDeviceOnly
});
getTypeName() => "GetHkEvaluations";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'calotec_portal_servamw.eras_online.de', types: <String, TypeInfo> {
'Eras2AppServiceModelBase': TypeInfo(TypeOf.AbstractClass),
'HkEvaluationParameter': TypeInfo(TypeOf.Class, create:() => HkEvaluationParameter()),
'HkEvaluationAttribute': TypeInfo(TypeOf.Class, create:() => HkEvaluationAttribute()),
'HkEvaluation': TypeInfo(TypeOf.Class, create:() => HkEvaluation()),
'List<HkEvaluationParameter>': TypeInfo(TypeOf.Class, create:() => <HkEvaluationParameter>[]),
'List<HkEvaluationAttribute>': TypeInfo(TypeOf.Class, create:() => <HkEvaluationAttribute>[]),
'GetHkEvaluationsResponse': TypeInfo(TypeOf.Class, create:() => GetHkEvaluationsResponse()),
'List<HkEvaluation>': TypeInfo(TypeOf.Class, create:() => <HkEvaluation>[]),
'GetHkEvaluations': TypeInfo(TypeOf.Class, create:() => GetHkEvaluations()),
});
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.
GET /App/{UserId}/HkEvaluations HTTP/1.1
Host: calotec-portal-servamw.eras-online.de
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}