""" Options: Date: 2026-01-12 04:43:17 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: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ import datetime import decimal from marshmallow.fields import * from servicestack import * from typing import * from dataclasses import dataclass, field from dataclasses_json import dataclass_json, LetterCase, Undefined, config from enum import Enum, IntEnum class Filter(str, Enum): NONE = 'None' HOUR = 'Hour' DAY = 'Day' LAST_DAY_ONLY = 'LastDayOnly' MONTH = 'Month' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class Generic: # @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") api_key: Optional[str] = None """ Api-key. Used to provide credentials to the api. Can also be provided through the request headers with key: X-API-KEY """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class P4ReadingDay: ean: Optional[str] = None meter_id: Optional[str] = None query_date: datetime.datetime = datetime.datetime(1, 1, 1) measure_unit: Optional[str] = None r180: Optional[Decimal] = None r181: Optional[Decimal] = None r182: Optional[Decimal] = None r280: Optional[Decimal] = None r281: Optional[Decimal] = None r282: Optional[Decimal] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class P4ReadingIntervalItem: date_time_offset: datetime.datetime = datetime.datetime(1, 1, 1) r180: Decimal = decimal.Decimal(0) r280: Optional[Decimal] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class P4ReadingInterval: ean: Optional[str] = None meter_id: Optional[str] = None query_date: datetime.datetime = datetime.datetime(1, 1, 1) measure_unit: Optional[str] = None items: Optional[List[P4ReadingIntervalItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class P4Rejection: ean: Optional[str] = None query_date: datetime.datetime = datetime.datetime(1, 1, 1) query_reason: Optional[str] = None rejection_code: Optional[str] = None rejection_text: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class P4ReadingsBulk: message: Optional[str] = None time_stamp: Optional[str] = None day_object_count: Optional[int] = None interval_object_count: Optional[int] = None rejection_object_count: Optional[int] = None day_objects: Optional[List[P4ReadingDay]] = None interval_objects: Optional[List[P4ReadingInterval]] = None rejection_objects: Optional[List[P4Rejection]] = None # @Route("/v8/readings-bulk", "GET") # @Route("/v8/readings-bulk/{from}", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ReadingsBulk(Generic, IReturn[P4ReadingsBulk], IGet): # @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") from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ 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="Boolean, default: true", Description="Include received interval objects in the result", Name="IncludeIntervalObjects") include_interval_objects: bool = False """ Include received interval objects in the result """ # @ApiMember(DataType="Boolean, default: false", Description="Include received day objects in the result", Name="IncludeDayObjects") include_day_objects: bool = False """ Include received day objects in the result """ # @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") object_filter: Optional[Filter] = None """ Gives option to filter return objects, for example to get always only hour records or day records """