Record Class Supply
java.lang.Object
java.lang.Record
energy.eddie.regionconnector.es.datadis.dtos.Supply
- Record Components:
address- The address of the supply.meteringPoint- Also called cups, the ID of the metering point.postalCode- The postal code of the supply.province- The province of the supply.municipality- The municipality of the supply.distributor- The distributor for the supply.validDateFrom- The start date from which the supply is valid.validDateTo- The end date to which the supply is valid. Might be null.pointType- is the type of the metering point. Values 1 and 2 support quarter hourly values and 3 - 5 support only hourly values.distributorCode- The code of the supply distributor.
public record Supply(String address, String meteringPoint, String postalCode, String province, String municipality, String distributor, LocalDate validDateFrom, @Nullable LocalDate validDateTo, Integer pointType, String distributorCode)
extends Record
This class represents the supply data returned by the Datadis API.
It contains information about supplies (metering points) associated to a NIF.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.Returns the value of thedistributorrecord component.Returns the value of thedistributorCoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themeteringPointrecord component.Returns the value of themunicipalityrecord component.Returns the value of thepointTyperecord component.Returns the value of thepostalCoderecord component.province()Returns the value of theprovincerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevalidDateFromrecord component.Returns the value of thevalidDateTorecord component.
-
Constructor Details
-
Supply
public Supply(String address, String meteringPoint, String postalCode, String province, String municipality, String distributor, LocalDate validDateFrom, @Nullable LocalDate validDateTo, Integer pointType, String distributorCode) Creates an instance of aSupplyrecord class.- Parameters:
address- the value for theaddressrecord componentmeteringPoint- the value for themeteringPointrecord componentpostalCode- the value for thepostalCoderecord componentprovince- the value for theprovincerecord componentmunicipality- the value for themunicipalityrecord componentdistributor- the value for thedistributorrecord componentvalidDateFrom- the value for thevalidDateFromrecord componentvalidDateTo- the value for thevalidDateTorecord componentpointType- the value for thepointTyperecord componentdistributorCode- the value for thedistributorCoderecord component
-
-
Method Details
-
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). -
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
meteringPoint
Returns the value of themeteringPointrecord component.- Returns:
- the value of the
meteringPointrecord component
-
postalCode
Returns the value of thepostalCoderecord component.- Returns:
- the value of the
postalCoderecord component
-
province
Returns the value of theprovincerecord component.- Returns:
- the value of the
provincerecord component
-
municipality
Returns the value of themunicipalityrecord component.- Returns:
- the value of the
municipalityrecord component
-
distributor
Returns the value of thedistributorrecord component.- Returns:
- the value of the
distributorrecord component
-
validDateFrom
Returns the value of thevalidDateFromrecord component.- Returns:
- the value of the
validDateFromrecord component
-
validDateTo
Returns the value of thevalidDateTorecord component.- Returns:
- the value of the
validDateTorecord component
-
pointType
Returns the value of thepointTyperecord component.- Returns:
- the value of the
pointTyperecord component
-
distributorCode
Returns the value of thedistributorCoderecord component.- Returns:
- the value of the
distributorCoderecord component
-