Record Class MeteringDataRequest
java.lang.Object
java.lang.Record
energy.eddie.regionconnector.es.datadis.dtos.MeteringDataRequest
- Record Components:
- NIF of the user for which the data is requestedmeteringPoint- Metering point for which the data is requested (from Supply request)distributorCode- Distributor code for associated with the metering point (from Supply request)startDate- Start date of the period for which the data is requested (inclusive, only year and month are used)endDate- End date of the period for which the data is requested (inclusive, only year and month are used)measurementType- Type of measurement (hourly or quarter-hourly)pointType- Type of metering point (from Supply request)
public record MeteringDataRequest(String authorizedNif, String meteringPoint, String distributorCode, LocalDate startDate, LocalDate endDate, MeasurementType measurementType, String pointType)
extends Record
Represents all the data needed to request metering data from Datadis.
-
Constructor Summary
ConstructorsConstructorDescriptionMeteringDataRequest(String authorizedNif, String meteringPoint, String distributorCode, LocalDate startDate, LocalDate endDate, MeasurementType measurementType, String pointType) Creates an instance of aMeteringDataRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theauthorizedNifrecord component.Returns the value of thedistributorCoderecord component.endDate()Returns the value of theendDaterecord component.final booleanIndicates whether some other object is "equal to" this one.static MeteringDataRequestfromPermissionRequest(EsPermissionRequest permissionRequest, LocalDate startDate, LocalDate endDate) final inthashCode()Returns a hash code value for this object.Returns the value of themeasurementTyperecord component.Returns the value of themeteringPointrecord component.minusMonths(int months) Returns the value of thepointTyperecord component.Returns the value of thestartDaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MeteringDataRequest
public MeteringDataRequest(String authorizedNif, String meteringPoint, String distributorCode, LocalDate startDate, LocalDate endDate, MeasurementType measurementType, String pointType) Creates an instance of aMeteringDataRequestrecord class.- Parameters:
authorizedNif- the value for theauthorizedNifrecord componentmeteringPoint- the value for themeteringPointrecord componentdistributorCode- the value for thedistributorCoderecord componentstartDate- the value for thestartDaterecord componentendDate- the value for theendDaterecord componentmeasurementType- the value for themeasurementTyperecord componentpointType- the value for thepointTyperecord component
-
-
Method Details
-
fromPermissionRequest
public static MeteringDataRequest fromPermissionRequest(EsPermissionRequest permissionRequest, LocalDate startDate, LocalDate endDate) -
minusMonths
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
authorizedNif
Returns the value of theauthorizedNifrecord component.- Returns:
- the value of the
authorizedNifrecord component
-
meteringPoint
Returns the value of themeteringPointrecord component.- Returns:
- the value of the
meteringPointrecord component
-
distributorCode
Returns the value of thedistributorCoderecord component.- Returns:
- the value of the
distributorCoderecord component
-
startDate
Returns the value of thestartDaterecord component.- Returns:
- the value of the
startDaterecord component
-
endDate
Returns the value of theendDaterecord component.- Returns:
- the value of the
endDaterecord component
-
measurementType
Returns the value of themeasurementTyperecord component.- Returns:
- the value of the
measurementTyperecord component
-
pointType
Returns the value of thepointTyperecord component.- Returns:
- the value of the
pointTyperecord component
-