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 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 a Supply record class.
      Parameters:
      address - the value for the address record component
      meteringPoint - the value for the meteringPoint record component
      postalCode - the value for the postalCode record component
      province - the value for the province record component
      municipality - the value for the municipality record component
      distributor - the value for the distributor record component
      validDateFrom - the value for the validDateFrom record component
      validDateTo - the value for the validDateTo record component
      pointType - the value for the pointType record component
      distributorCode - the value for the distributorCode record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • address

      public String address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • meteringPoint

      public String meteringPoint()
      Returns the value of the meteringPoint record component.
      Returns:
      the value of the meteringPoint record component
    • postalCode

      public String postalCode()
      Returns the value of the postalCode record component.
      Returns:
      the value of the postalCode record component
    • province

      public String province()
      Returns the value of the province record component.
      Returns:
      the value of the province record component
    • municipality

      public String municipality()
      Returns the value of the municipality record component.
      Returns:
      the value of the municipality record component
    • distributor

      public String distributor()
      Returns the value of the distributor record component.
      Returns:
      the value of the distributor record component
    • validDateFrom

      public LocalDate validDateFrom()
      Returns the value of the validDateFrom record component.
      Returns:
      the value of the validDateFrom record component
    • validDateTo

      @Nullable public LocalDate validDateTo()
      Returns the value of the validDateTo record component.
      Returns:
      the value of the validDateTo record component
    • pointType

      public Integer pointType()
      Returns the value of the pointType record component.
      Returns:
      the value of the pointType record component
    • distributorCode

      public String distributorCode()
      Returns the value of the distributorCode record component.
      Returns:
      the value of the distributorCode record component