/* Options: Date: 2026-01-12 04:58:29 Version: 8.52 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://p4.smartdatasolutions.eu //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: ReadingsBulk.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum Filter { None, Hour, Day, LastDayOnly, Month, } class Generic implements IConvertible { /** * Api-key. Used to provide credentials to the api. Can also be provided through the request headers with key: X-API-KEY */ // @ApiMember(DataType="String", Description="Api-key. Used to provide credentials to the api. Can also be provided through the request headers with key: X-API-KEY", IsRequired=true, Name="ApiKey") String? apiKey; Generic({this.apiKey}); Generic.fromJson(Map json) { fromMap(json); } fromMap(Map json) { apiKey = json['apiKey']; return this; } Map toJson() => { 'apiKey': apiKey }; getTypeName() => "Generic"; TypeContext? context = _ctx; } class P4ReadingDay implements IConvertible { String? ean; String? meterId; DateTime? queryDate; String? measureUnit; double? r180; double? r181; double? r182; double? r280; double? r281; double? r282; P4ReadingDay({this.ean,this.meterId,this.queryDate,this.measureUnit,this.r180,this.r181,this.r182,this.r280,this.r281,this.r282}); P4ReadingDay.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ean = json['ean']; meterId = json['meterId']; queryDate = JsonConverters.fromJson(json['queryDate'],'DateTime',context!); measureUnit = json['measureUnit']; r180 = JsonConverters.toDouble(json['r180']); r181 = JsonConverters.toDouble(json['r181']); r182 = JsonConverters.toDouble(json['r182']); r280 = JsonConverters.toDouble(json['r280']); r281 = JsonConverters.toDouble(json['r281']); r282 = JsonConverters.toDouble(json['r282']); return this; } Map toJson() => { 'ean': ean, 'meterId': meterId, 'queryDate': JsonConverters.toJson(queryDate,'DateTime',context!), 'measureUnit': measureUnit, 'r180': r180, 'r181': r181, 'r182': r182, 'r280': r280, 'r281': r281, 'r282': r282 }; getTypeName() => "P4ReadingDay"; TypeContext? context = _ctx; } class P4ReadingIntervalItem implements IConvertible { DateTime? dateTimeOffset; double? r180; double? r280; P4ReadingIntervalItem({this.dateTimeOffset,this.r180,this.r280}); P4ReadingIntervalItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { dateTimeOffset = JsonConverters.fromJson(json['dateTimeOffset'],'DateTime',context!); r180 = JsonConverters.toDouble(json['r180']); r280 = JsonConverters.toDouble(json['r280']); return this; } Map toJson() => { 'dateTimeOffset': JsonConverters.toJson(dateTimeOffset,'DateTime',context!), 'r180': r180, 'r280': r280 }; getTypeName() => "P4ReadingIntervalItem"; TypeContext? context = _ctx; } class P4ReadingInterval implements IConvertible { String? ean; String? meterId; DateTime? queryDate; String? measureUnit; List? items; P4ReadingInterval({this.ean,this.meterId,this.queryDate,this.measureUnit,this.items}); P4ReadingInterval.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ean = json['ean']; meterId = json['meterId']; queryDate = JsonConverters.fromJson(json['queryDate'],'DateTime',context!); measureUnit = json['measureUnit']; items = JsonConverters.fromJson(json['items'],'List',context!); return this; } Map toJson() => { 'ean': ean, 'meterId': meterId, 'queryDate': JsonConverters.toJson(queryDate,'DateTime',context!), 'measureUnit': measureUnit, 'items': JsonConverters.toJson(items,'List',context!) }; getTypeName() => "P4ReadingInterval"; TypeContext? context = _ctx; } class P4Rejection implements IConvertible { String? ean; DateTime? queryDate; String? queryReason; String? rejectionCode; String? rejectionText; P4Rejection({this.ean,this.queryDate,this.queryReason,this.rejectionCode,this.rejectionText}); P4Rejection.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ean = json['ean']; queryDate = JsonConverters.fromJson(json['queryDate'],'DateTime',context!); queryReason = json['queryReason']; rejectionCode = json['rejectionCode']; rejectionText = json['rejectionText']; return this; } Map toJson() => { 'ean': ean, 'queryDate': JsonConverters.toJson(queryDate,'DateTime',context!), 'queryReason': queryReason, 'rejectionCode': rejectionCode, 'rejectionText': rejectionText }; getTypeName() => "P4Rejection"; TypeContext? context = _ctx; } class P4ReadingsBulk implements IConvertible { String? message; String? timeStamp; int? dayObjectCount; int? intervalObjectCount; int? rejectionObjectCount; List? dayObjects; List? intervalObjects; List? rejectionObjects; P4ReadingsBulk({this.message,this.timeStamp,this.dayObjectCount,this.intervalObjectCount,this.rejectionObjectCount,this.dayObjects,this.intervalObjects,this.rejectionObjects}); P4ReadingsBulk.fromJson(Map json) { fromMap(json); } fromMap(Map json) { message = json['message']; timeStamp = json['timeStamp']; dayObjectCount = json['dayObjectCount']; intervalObjectCount = json['intervalObjectCount']; rejectionObjectCount = json['rejectionObjectCount']; dayObjects = JsonConverters.fromJson(json['dayObjects'],'List',context!); intervalObjects = JsonConverters.fromJson(json['intervalObjects'],'List',context!); rejectionObjects = JsonConverters.fromJson(json['rejectionObjects'],'List',context!); return this; } Map toJson() => { 'message': message, 'timeStamp': timeStamp, 'dayObjectCount': dayObjectCount, 'intervalObjectCount': intervalObjectCount, 'rejectionObjectCount': rejectionObjectCount, 'dayObjects': JsonConverters.toJson(dayObjects,'List',context!), 'intervalObjects': JsonConverters.toJson(intervalObjects,'List',context!), 'rejectionObjects': JsonConverters.toJson(rejectionObjects,'List',context!) }; getTypeName() => "P4ReadingsBulk"; TypeContext? context = _ctx; } // @Route("/v8/readings-bulk", "GET") // @Route("/v8/readings-bulk/{from}", "GET") class ReadingsBulk extends Generic implements IReturn, IGet, IConvertible { /** * If not given, the first object is given after the last request, otherwise gives the first ... data objects received from EDSN/Grid operator received after the given time stamp. Keep in mind, the time stamp is related to when SDS received the data from EDSN, not the date of the data itself! */ // @ApiMember(DataType="Time stamp with format: yyyyMMdd-HHmmss-ffffff", Description="If not given, the first object is given after the last request, otherwise gives the first ... data objects received from EDSN/Grid operator received after the given time stamp. Keep in mind, the time stamp is related to when SDS received the data from EDSN, not the date of the data itself!", Name="From") String? from; /** * Include received interval objects in the result */ // @ApiMember(DataType="Boolean, default: true", Description="Include received interval objects in the result", Name="IncludeIntervalObjects") bool? includeIntervalObjects; /** * Include received day objects in the result */ // @ApiMember(DataType="Boolean, default: false", Description="Include received day objects in the result", Name="IncludeDayObjects") bool? includeDayObjects; /** * Gives option to filter return objects, for example to get always only hour records or day records */ // @ApiMember(DataType="Enum: None, Hour, Day, LastDayOnly, Month", Description="Gives option to filter return objects, for example to get always only hour records or day records", Name="ObjectFilter") Filter? objectFilter; ReadingsBulk({this.from,this.includeIntervalObjects,this.includeDayObjects,this.objectFilter}); ReadingsBulk.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); from = json['from']; includeIntervalObjects = json['includeIntervalObjects']; includeDayObjects = json['includeDayObjects']; objectFilter = JsonConverters.fromJson(json['objectFilter'],'Filter',context!); return this; } Map toJson() => super.toJson()..addAll({ 'from': from, 'includeIntervalObjects': includeIntervalObjects, 'includeDayObjects': includeDayObjects, 'objectFilter': JsonConverters.toJson(objectFilter,'Filter',context!) }); createResponse() => P4ReadingsBulk(); getResponseTypeName() => "P4ReadingsBulk"; getTypeName() => "ReadingsBulk"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'p4.smartdatasolutions.eu', types: { 'Filter': TypeInfo(TypeOf.Enum, enumValues:Filter.values), 'Generic': TypeInfo(TypeOf.Class, create:() => Generic()), 'P4ReadingDay': TypeInfo(TypeOf.Class, create:() => P4ReadingDay()), 'P4ReadingIntervalItem': TypeInfo(TypeOf.Class, create:() => P4ReadingIntervalItem()), 'P4ReadingInterval': TypeInfo(TypeOf.Class, create:() => P4ReadingInterval()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'P4Rejection': TypeInfo(TypeOf.Class, create:() => P4Rejection()), 'P4ReadingsBulk': TypeInfo(TypeOf.Class, create:() => P4ReadingsBulk()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ReadingsBulk': TypeInfo(TypeOf.Class, create:() => ReadingsBulk()), });