| POST | /App/{UserId}/HkEvaluate |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
@DataContract
public static class EvaluateHkRadiators extends Eras2AppServiceModelBase
{
@DataMember(Name="RadiatorGroupId")
@SerializedName("RadiatorGroupId")
public Integer radiatorGroupId = null;
@DataMember(Name="Parameters")
@SerializedName("Parameters")
public IList<HkEvaluateParameter> parameters = null;
@DataMember(Name="Attributes")
@SerializedName("Attributes")
public IList<HkEvaluateAttribute> attributes = null;
@DataMember(Name="DeviceTypeIdentifier")
@SerializedName("DeviceTypeIdentifier")
public String deviceTypeIdentifier = null;
@DataMember(Name="MountingPoint")
@SerializedName("MountingPoint")
public String mountingPoint = null;
@DataMember(Name="MaxResultSize")
@SerializedName("MaxResultSize")
public Integer maxResultSize = null;
public Integer getRadiatorGroupId() { return radiatorGroupId; }
public EvaluateHkRadiators setRadiatorGroupId(Integer value) { this.radiatorGroupId = value; return this; }
public IList<HkEvaluateParameter> getParameters() { return parameters; }
public EvaluateHkRadiators setParameters(IList<HkEvaluateParameter> value) { this.parameters = value; return this; }
public IList<HkEvaluateAttribute> getAttributes() { return attributes; }
public EvaluateHkRadiators setAttributes(IList<HkEvaluateAttribute> value) { this.attributes = value; return this; }
public String getDeviceTypeIdentifier() { return deviceTypeIdentifier; }
public EvaluateHkRadiators setDeviceTypeIdentifier(String value) { this.deviceTypeIdentifier = value; return this; }
public String getMountingPoint() { return mountingPoint; }
public EvaluateHkRadiators setMountingPoint(String value) { this.mountingPoint = value; return this; }
public Integer getMaxResultSize() { return maxResultSize; }
public EvaluateHkRadiators setMaxResultSize(Integer value) { this.maxResultSize = value; return this; }
}
@DataContract
public static class Eras2AppServiceModelBase
{
@DataMember(Name="UserId")
@SerializedName("UserId")
public UUID userId = null;
public UUID getUserId() { return userId; }
public Eras2AppServiceModelBase setUserId(UUID value) { this.userId = value; return this; }
}
@DataContract
public static class HkEvaluateParameter
{
@DataMember(Name="RadiatisId")
@SerializedName("RadiatisId")
public Integer radiatisId = null;
@DataMember(Name="Value")
@SerializedName("Value")
public String value = null;
public Integer getRadiatisId() { return radiatisId; }
public HkEvaluateParameter setRadiatisId(Integer value) { this.radiatisId = value; return this; }
public String getValue() { return value; }
public HkEvaluateParameter setValue(String value) { this.value = value; return this; }
}
@DataContract
public static class HkEvaluateAttribute
{
@DataMember(Name="RadiatisId")
@SerializedName("RadiatisId")
public Integer radiatisId = null;
@DataMember(Name="Value")
@SerializedName("Value")
public Integer value = null;
public Integer getRadiatisId() { return radiatisId; }
public HkEvaluateAttribute setRadiatisId(Integer value) { this.radiatisId = value; return this; }
public Integer getValue() { return value; }
public HkEvaluateAttribute setValue(Integer value) { this.value = value; return this; }
}
@DataContract
public static class EvaluateHkRadiatorsResponse
{
@DataMember(Name="Radiators")
@SerializedName("Radiators")
public IList<HkRadiatorMatch> radiators = null;
@DataMember(Name="ResponseStatus")
@SerializedName("ResponseStatus")
public ResponseStatus responseStatus = null;
public IList<HkRadiatorMatch> getRadiators() { return radiators; }
public EvaluateHkRadiatorsResponse setRadiators(IList<HkRadiatorMatch> value) { this.radiators = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public EvaluateHkRadiatorsResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class HkRadiatorMatch
{
@DataMember(Name="Match")
@SerializedName("Match")
public Integer match = null;
@DataMember(Name="RadiatisRadiatorId")
@SerializedName("RadiatisRadiatorId")
public Integer radiatisRadiatorId = null;
@DataMember(Name="Producer")
@SerializedName("Producer")
public String producer = null;
@DataMember(Name="Model")
@SerializedName("Model")
public String model = null;
@DataMember(Name="ModelNoteReference")
@SerializedName("ModelNoteReference")
public String modelNoteReference = null;
@DataMember(Name="KcValue")
@SerializedName("KcValue")
public BigDecimal kcValue = null;
@DataMember(Name="KqValue")
@SerializedName("KqValue")
public BigDecimal kqValue = null;
@DataMember(Name="KtValue")
@SerializedName("KtValue")
public BigDecimal ktValue = null;
@DataMember(Name="Differences")
@SerializedName("Differences")
public IList<HkMatchDifference> differences = null;
public Integer getMatch() { return match; }
public HkRadiatorMatch setMatch(Integer value) { this.match = value; return this; }
public Integer getRadiatisRadiatorId() { return radiatisRadiatorId; }
public HkRadiatorMatch setRadiatisRadiatorId(Integer value) { this.radiatisRadiatorId = value; return this; }
public String getProducer() { return producer; }
public HkRadiatorMatch setProducer(String value) { this.producer = value; return this; }
public String getModel() { return model; }
public HkRadiatorMatch setModel(String value) { this.model = value; return this; }
public String getModelNoteReference() { return modelNoteReference; }
public HkRadiatorMatch setModelNoteReference(String value) { this.modelNoteReference = value; return this; }
public BigDecimal getKcValue() { return kcValue; }
public HkRadiatorMatch setKcValue(BigDecimal value) { this.kcValue = value; return this; }
public BigDecimal getKqValue() { return kqValue; }
public HkRadiatorMatch setKqValue(BigDecimal value) { this.kqValue = value; return this; }
public BigDecimal getKtValue() { return ktValue; }
public HkRadiatorMatch setKtValue(BigDecimal value) { this.ktValue = value; return this; }
public IList<HkMatchDifference> getDifferences() { return differences; }
public HkRadiatorMatch setDifferences(IList<HkMatchDifference> value) { this.differences = value; return this; }
}
@DataContract
public static class HkMatchDifference
{
@DataMember(Name="Code")
@SerializedName("Code")
public String code = null;
@DataMember(Name="Name")
@SerializedName("Name")
public String name = null;
@DataMember(Name="Value")
@SerializedName("Value")
public String value = null;
public String getCode() { return code; }
public HkMatchDifference setCode(String value) { this.code = value; return this; }
public String getName() { return name; }
public HkMatchDifference setName(String value) { this.name = value; return this; }
public String getValue() { return value; }
public HkMatchDifference setValue(String value) { this.value = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /App/{UserId}/HkEvaluate HTTP/1.1
Host: calotec-portal-servamw.eras-online.de
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<EvaluateHkRadiators xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Amw.Service.Server.ServiceModel.Eras2App.Get">
<UserId xmlns="http://schemas.datacontract.org/2004/07/Eras2Amw.Service.Server.ServiceModel.Eras2App">00000000-0000-0000-0000-000000000000</UserId>
<Attributes xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Amw.Service.Server.ServiceModel.Common" i:nil="true" />
<DeviceTypeIdentifier>String</DeviceTypeIdentifier>
<MaxResultSize>0</MaxResultSize>
<MountingPoint>String</MountingPoint>
<Parameters xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Amw.Service.Server.ServiceModel.Common" i:nil="true" />
<RadiatorGroupId>0</RadiatorGroupId>
</EvaluateHkRadiators>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<EvaluateHkRadiatorsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Amw.Service.Server.ServiceModel.Eras2App.Get">
<Radiators xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Amw.Service.Server.ServiceModel.Common" i:nil="true" />
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</EvaluateHkRadiatorsResponse>