Record Class MeterReading

java.lang.Object
java.lang.Record
energy.eddie.regionconnector.fr.enedis.dto.readings.MeterReading

public record MeterReading(String usagePointId, MeterReading.ReadingType meterReadingType, MeterReading.Period period, Optional<String> valueType, MeterReading.CalculationMode calculationMode, Optional<Duration> granularity, List<MeterReading.Reading> readings, @Nullable List<Object> context) extends Record
  • Constructor Details

    • MeterReading

      public MeterReading(String usagePointId, MeterReading.ReadingType meterReadingType, MeterReading.Period period, Optional<String> valueType, MeterReading.CalculationMode calculationMode, Optional<Duration> granularity, List<MeterReading.Reading> readings, @Nullable List<Object> context)
      Creates an instance of a MeterReading record class.
      Parameters:
      usagePointId - the value for the usagePointId record component
      meterReadingType - the value for the meterReadingType record component
      period - the value for the period record component
      valueType - the value for the valueType record component
      calculationMode - the value for the calculationMode record component
      granularity - the value for the granularity record component
      readings - the value for the readings record component
      context - the value for the context 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.
    • usagePointId

      public String usagePointId()
      Returns the value of the usagePointId record component.
      Returns:
      the value of the usagePointId record component
    • meterReadingType

      public MeterReading.ReadingType meterReadingType()
      Returns the value of the meterReadingType record component.
      Returns:
      the value of the meterReadingType record component
    • period

      public MeterReading.Period period()
      Returns the value of the period record component.
      Returns:
      the value of the period record component
    • valueType

      public Optional<String> valueType()
      Returns the value of the valueType record component.
      Returns:
      the value of the valueType record component
    • calculationMode

      public MeterReading.CalculationMode calculationMode()
      Returns the value of the calculationMode record component.
      Returns:
      the value of the calculationMode record component
    • granularity

      public Optional<Duration> granularity()
      Returns the value of the granularity record component.
      Returns:
      the value of the granularity record component
    • readings

      public List<MeterReading.Reading> readings()
      Returns the value of the readings record component.
      Returns:
      the value of the readings record component
    • context

      public @Nullable List<Object> context()
      Returns the value of the context record component.
      Returns:
      the value of the context record component