Record Class GetEnergyResponseModel
java.lang.Object
java.lang.Record
energy.eddie.regionconnector.be.fluvius.client.model.GetEnergyResponseModel
public record GetEnergyResponseModel(@Nullable ZonedDateTime fetchTime, @Nullable List<GasMeterResponseModel> gasMeters, @Nullable List<ElectricityMeterResponseModel> electricityMeters)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionGetEnergyResponseModel(ZonedDateTime fetchTime, List<GasMeterResponseModel> gasMeters, List<ElectricityMeterResponseModel> electricityMeters) Creates an instance of aGetEnergyResponseModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theelectricityMetersrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefetchTimerecord component.Returns the value of thegasMetersrecord component.getMeterFor(EnergyType energyType) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GetEnergyResponseModel
public GetEnergyResponseModel(@Nullable ZonedDateTime fetchTime, @Nullable List<GasMeterResponseModel> gasMeters, @Nullable List<ElectricityMeterResponseModel> electricityMeters) Creates an instance of aGetEnergyResponseModelrecord class.- Parameters:
fetchTime- the value for thefetchTimerecord componentgasMeters- the value for thegasMetersrecord componentelectricityMeters- the value for theelectricityMetersrecord component
-
-
Method Details
-
getMeterFor
-
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). -
fetchTime
Returns the value of thefetchTimerecord component.- Returns:
- the value of the
fetchTimerecord component
-
gasMeters
Returns the value of thegasMetersrecord component.- Returns:
- the value of the
gasMetersrecord component
-
electricityMeters
Returns the value of theelectricityMetersrecord component.- Returns:
- the value of the
electricityMetersrecord component
-