Record Class ServiceSubscription
java.lang.Object
java.lang.Record
energy.eddie.regionconnector.fr.enedis.dto.subscription.ServiceSubscription
public record ServiceSubscription(@Nullable List<String> pointId, @Nullable List<String> siren, @Nullable LocalDate start, @Nullable LocalDate end, @Nullable List<ServiceState> serviceStates, @Nullable ServiceType serviceType, @Nullable List<MeasureType> measureTypes, @Nullable Boolean consumption, @Nullable Boolean injection, @Nullable Integer page, boolean count, @Nullable Long authorizationId, @Nullable Boolean authorization)
extends Record
Request body of the subscribed services API (
POST /subscribed_services/v1).-
Constructor Summary
ConstructorsConstructorDescriptionServiceSubscription(long authorizationId) Creates the minimal query used by the Data Connect flow to resolve the usage point ids of an authorization.ServiceSubscription(@Nullable List<String> pointId, @Nullable List<String> siren, @Nullable LocalDate start, @Nullable LocalDate end, @Nullable List<ServiceState> serviceStates, @Nullable ServiceType serviceType, @Nullable List<MeasureType> measureTypes, @Nullable Boolean consumption, @Nullable Boolean injection, @Nullable Integer page, boolean count, @Nullable Long authorizationId, @Nullable Boolean authorization) Creates an instance of aServiceSubscriptionrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the value of theauthorizationrecord component.@Nullable LongReturns the value of theauthorizationIdrecord component.@Nullable BooleanReturns the value of theconsumptionrecord component.booleancount()Returns the value of thecountrecord component.@Nullable LocalDateend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable BooleanReturns the value of theinjectionrecord component.@Nullable List<MeasureType> Returns the value of themeasureTypesrecord component.@Nullable Integerpage()Returns the value of thepagerecord component.pointId()Returns the value of thepointIdrecord component.@Nullable List<ServiceState> Returns the value of theserviceStatesrecord component.@Nullable ServiceTypeReturns the value of theserviceTyperecord component.siren()Returns the value of thesirenrecord component.@Nullable LocalDatestart()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ServiceSubscription
public ServiceSubscription(long authorizationId) Creates the minimal query used by the Data Connect flow to resolve the usage point ids of an authorization.- Parameters:
authorizationId- Identifier of the authorization given in the consent callback.
-
ServiceSubscription
public ServiceSubscription(@Nullable List<String> pointId, @Nullable List<String> siren, @Nullable LocalDate start, @Nullable LocalDate end, @Nullable List<ServiceState> serviceStates, @Nullable ServiceType serviceType, @Nullable List<MeasureType> measureTypes, @Nullable Boolean consumption, @Nullable Boolean injection, @Nullable Integer page, boolean count, @Nullable Long authorizationId, @Nullable Boolean authorization) Creates an instance of aServiceSubscriptionrecord class.- Parameters:
pointId- the value for thepointIdrecord componentsiren- the value for thesirenrecord componentstart- the value for thestartrecord componentend- the value for theendrecord componentserviceStates- the value for theserviceStatesrecord componentserviceType- the value for theserviceTyperecord componentmeasureTypes- the value for themeasureTypesrecord componentconsumption- the value for theconsumptionrecord componentinjection- the value for theinjectionrecord componentpage- the value for thepagerecord componentcount- the value for thecountrecord componentauthorizationId- the value for theauthorizationIdrecord componentauthorization- the value for theauthorizationrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
pointId
Returns the value of thepointIdrecord component.- Returns:
- the value of the
pointIdrecord component
-
siren
Returns the value of thesirenrecord component.- Returns:
- the value of the
sirenrecord component
-
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
serviceStates
Returns the value of theserviceStatesrecord component.- Returns:
- the value of the
serviceStatesrecord component
-
serviceType
Returns the value of theserviceTyperecord component.- Returns:
- the value of the
serviceTyperecord component
-
measureTypes
Returns the value of themeasureTypesrecord component.- Returns:
- the value of the
measureTypesrecord component
-
consumption
Returns the value of theconsumptionrecord component.- Returns:
- the value of the
consumptionrecord component
-
injection
Returns the value of theinjectionrecord component.- Returns:
- the value of the
injectionrecord component
-
page
Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
count
public boolean count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
authorizationId
Returns the value of theauthorizationIdrecord component.- Returns:
- the value of the
authorizationIdrecord component
-
authorization
Returns the value of theauthorizationrecord component.- Returns:
- the value of the
authorizationrecord component
-