Server

<back to all web services

GetLobaroKromerDeviceParsedData

External
Requires Authentication
The following routes are available for this service:
POST/api/v1/external/kromer
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class GetLobaroKromerDeviceParsedDataResponse implements IConvertible
{
    ResponseStatus? responseStatus;

    GetLobaroKromerDeviceParsedDataResponse({this.responseStatus});
    GetLobaroKromerDeviceParsedDataResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "GetLobaroKromerDeviceParsedDataResponse";
    TypeContext? context = _ctx;
}

class Pagination implements IConvertible
{
    int? limit;
    int? total;
    int? offset;

    Pagination({this.limit,this.total,this.offset});
    Pagination.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        limit = json['limit'];
        total = json['total'];
        offset = json['offset'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'limit': limit,
        'total': total,
        'offset': offset
    };

    getTypeName() => "Pagination";
    TypeContext? context = _ctx;
}

class History implements IConvertible
{
    String? time;
    String? value;

    History({this.time,this.value});
    History.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        time = json['time'];
        value = json['value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'time': time,
        'value': value
    };

    getTypeName() => "History";
    TypeContext? context = _ctx;
}

class CompactProfile implements IConvertible
{
    List<History>? history;

    CompactProfile({this.history});
    CompactProfile.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        history = JsonConverters.fromJson(json['history'],'List<History>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'history': JsonConverters.toJson(history,'List<History>',context!)
    };

    getTypeName() => "CompactProfile";
    TypeContext? context = _ctx;
}

class MbusBodyDataRecords implements IConvertible
{
    String? vifUnit;
    String? vifQuantity;
    double? valueScaled;
    String? vifExponent;
    String? valueString;
    String? value;
    String? difFunctionString;
    String? storageNo;
    CompactProfile? compactProfile;

    MbusBodyDataRecords({this.vifUnit,this.vifQuantity,this.valueScaled,this.vifExponent,this.valueString,this.value,this.difFunctionString,this.storageNo,this.compactProfile});
    MbusBodyDataRecords.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        vifUnit = json['vifUnit'];
        vifQuantity = json['vifQuantity'];
        valueScaled = JsonConverters.toDouble(json['valueScaled']);
        vifExponent = json['vifExponent'];
        valueString = json['valueString'];
        value = json['value'];
        difFunctionString = json['difFunctionString'];
        storageNo = json['storageNo'];
        compactProfile = JsonConverters.fromJson(json['compactProfile'],'CompactProfile',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'vifUnit': vifUnit,
        'vifQuantity': vifQuantity,
        'valueScaled': valueScaled,
        'vifExponent': vifExponent,
        'valueString': valueString,
        'value': value,
        'difFunctionString': difFunctionString,
        'storageNo': storageNo,
        'compactProfile': JsonConverters.toJson(compactProfile,'CompactProfile',context!)
    };

    getTypeName() => "MbusBodyDataRecords";
    TypeContext? context = _ctx;
}

class MbusBody implements IConvertible
{
    List<MbusBodyDataRecords>? dataRecords;

    MbusBody({this.dataRecords});
    MbusBody.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        dataRecords = JsonConverters.fromJson(json['dataRecords'],'List<MbusBodyDataRecords>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'dataRecords': JsonConverters.toJson(dataRecords,'List<MbusBodyDataRecords>',context!)
    };

    getTypeName() => "MbusBody";
    TypeContext? context = _ctx;
}

class Header implements IConvertible
{
    int? idString;
    String? deviceString;

    Header({this.idString,this.deviceString});
    Header.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        idString = json['idString'];
        deviceString = json['deviceString'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'idString': idString,
        'deviceString': deviceString
    };

    getTypeName() => "Header";
    TypeContext? context = _ctx;
}

class DeviceMbusData implements IConvertible
{
    int? idString;
    String? deviceString;
    MbusBody? body;
    Header? header;

    DeviceMbusData({this.idString,this.deviceString,this.body,this.header});
    DeviceMbusData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        idString = json['idString'];
        deviceString = json['deviceString'];
        body = JsonConverters.fromJson(json['body'],'MbusBody',context!);
        header = JsonConverters.fromJson(json['header'],'Header',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'idString': idString,
        'deviceString': deviceString,
        'body': JsonConverters.toJson(body,'MbusBody',context!),
        'header': JsonConverters.toJson(header,'Header',context!)
    };

    getTypeName() => "DeviceMbusData";
    TypeContext? context = _ctx;
}

class DeviceData implements IConvertible
{
    DeviceMbusData? mbus;

    DeviceData({this.mbus});
    DeviceData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        mbus = JsonConverters.fromJson(json['mbus'],'DeviceMbusData',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'mbus': JsonConverters.toJson(mbus,'DeviceMbusData',context!)
    };

    getTypeName() => "DeviceData";
    TypeContext? context = _ctx;
}

class LobaroData implements IConvertible
{
    int? id;
    int? deviceId;
    DateTime? createdAt;
    DateTime? updatedAt;
    DeviceData? data;

    LobaroData({this.id,this.deviceId,this.createdAt,this.updatedAt,this.data});
    LobaroData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        deviceId = json['deviceId'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!);
        data = JsonConverters.fromJson(json['data'],'DeviceData',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'deviceId': deviceId,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!),
        'data': JsonConverters.toJson(data,'DeviceData',context!)
    };

    getTypeName() => "LobaroData";
    TypeContext? context = _ctx;
}

class GetLobaroKromerDeviceParsedData implements IConvertible
{
    // @ApiMember(IsRequired=true, ParameterType="body")
    Pagination? pagination;

    // @ApiMember(IsRequired=true, ParameterType="body")
    List<LobaroData>? data;

    GetLobaroKromerDeviceParsedData({this.pagination,this.data});
    GetLobaroKromerDeviceParsedData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        pagination = JsonConverters.fromJson(json['pagination'],'Pagination',context!);
        data = JsonConverters.fromJson(json['data'],'List<LobaroData>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'pagination': JsonConverters.toJson(pagination,'Pagination',context!),
        'data': JsonConverters.toJson(data,'List<LobaroData>',context!)
    };

    getTypeName() => "GetLobaroKromerDeviceParsedData";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'mar_rr_servdesk.eras_online.de', types: <String, TypeInfo> {
    'GetLobaroKromerDeviceParsedDataResponse': TypeInfo(TypeOf.Class, create:() => GetLobaroKromerDeviceParsedDataResponse()),
    'Pagination': TypeInfo(TypeOf.Class, create:() => Pagination()),
    'History': TypeInfo(TypeOf.Class, create:() => History()),
    'CompactProfile': TypeInfo(TypeOf.Class, create:() => CompactProfile()),
    'List<History>': TypeInfo(TypeOf.Class, create:() => <History>[]),
    'MbusBodyDataRecords': TypeInfo(TypeOf.Class, create:() => MbusBodyDataRecords()),
    'MbusBody': TypeInfo(TypeOf.Class, create:() => MbusBody()),
    'List<MbusBodyDataRecords>': TypeInfo(TypeOf.Class, create:() => <MbusBodyDataRecords>[]),
    'Header': TypeInfo(TypeOf.Class, create:() => Header()),
    'DeviceMbusData': TypeInfo(TypeOf.Class, create:() => DeviceMbusData()),
    'DeviceData': TypeInfo(TypeOf.Class, create:() => DeviceData()),
    'LobaroData': TypeInfo(TypeOf.Class, create:() => LobaroData()),
    'GetLobaroKromerDeviceParsedData': TypeInfo(TypeOf.Class, create:() => GetLobaroKromerDeviceParsedData()),
    'List<LobaroData>': TypeInfo(TypeOf.Class, create:() => <LobaroData>[]),
});

Dart GetLobaroKromerDeviceParsedData DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/v1/external/kromer HTTP/1.1 
Host: mar-rr-servdesk.eras-online.de 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetLobaroKromerDeviceParsedData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Lobaro">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Lobaro.LobaroModels">
    <d2p1:LobaroData>
      <d2p1:CreatedAt>0001-01-01T00:00:00</d2p1:CreatedAt>
      <d2p1:Data>
        <d2p1:Mbus>
          <d2p1:Body>
            <d2p1:DataRecords>
              <d2p1:MbusBodyDataRecords>
                <d2p1:CompactProfile>
                  <d2p1:History>
                    <d2p1:History>
                      <d2p1:Time>String</d2p1:Time>
                      <d2p1:Value>String</d2p1:Value>
                    </d2p1:History>
                  </d2p1:History>
                </d2p1:CompactProfile>
                <d2p1:DifFunctionString>String</d2p1:DifFunctionString>
                <d2p1:StorageNo>String</d2p1:StorageNo>
                <d2p1:Value>String</d2p1:Value>
                <d2p1:ValueScaled>0</d2p1:ValueScaled>
                <d2p1:ValueString>String</d2p1:ValueString>
                <d2p1:VifExponent>String</d2p1:VifExponent>
                <d2p1:VifQuantity>String</d2p1:VifQuantity>
                <d2p1:VifUnit>String</d2p1:VifUnit>
              </d2p1:MbusBodyDataRecords>
            </d2p1:DataRecords>
          </d2p1:Body>
          <d2p1:DeviceString>String</d2p1:DeviceString>
          <d2p1:Header>
            <d2p1:DeviceString>String</d2p1:DeviceString>
            <d2p1:IdString>0</d2p1:IdString>
          </d2p1:Header>
          <d2p1:IdString>0</d2p1:IdString>
        </d2p1:Mbus>
      </d2p1:Data>
      <d2p1:DeviceId>0</d2p1:DeviceId>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:UpdatedAt>0001-01-01T00:00:00</d2p1:UpdatedAt>
    </d2p1:LobaroData>
  </Data>
  <Pagination xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Lobaro.LobaroModels">
    <d2p1:Limit>0</d2p1:Limit>
    <d2p1:Offset>0</d2p1:Offset>
    <d2p1:Total>0</d2p1:Total>
  </Pagination>
</GetLobaroKromerDeviceParsedData>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetLobaroKromerDeviceParsedDataResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Lobaro">
  <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>
</GetLobaroKromerDeviceParsedDataResponse>