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 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 a ServiceSubscription record class.
      Parameters:
      pointId - the value for the pointId record component
      siren - the value for the siren record component
      start - the value for the start record component
      end - the value for the end record component
      serviceStates - the value for the serviceStates record component
      serviceType - the value for the serviceType record component
      measureTypes - the value for the measureTypes record component
      consumption - the value for the consumption record component
      injection - the value for the injection record component
      page - the value for the page record component
      count - the value for the count record component
      authorizationId - the value for the authorizationId record component
      authorization - the value for the authorization 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • pointId

      public @Nullable List<String> pointId()
      Returns the value of the pointId record component.
      Returns:
      the value of the pointId record component
    • siren

      public @Nullable List<String> siren()
      Returns the value of the siren record component.
      Returns:
      the value of the siren record component
    • start

      public @Nullable LocalDate start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • end

      public @Nullable LocalDate end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component
    • serviceStates

      public @Nullable List<ServiceState> serviceStates()
      Returns the value of the serviceStates record component.
      Returns:
      the value of the serviceStates record component
    • serviceType

      public @Nullable ServiceType serviceType()
      Returns the value of the serviceType record component.
      Returns:
      the value of the serviceType record component
    • measureTypes

      public @Nullable List<MeasureType> measureTypes()
      Returns the value of the measureTypes record component.
      Returns:
      the value of the measureTypes record component
    • consumption

      public @Nullable Boolean consumption()
      Returns the value of the consumption record component.
      Returns:
      the value of the consumption record component
    • injection

      public @Nullable Boolean injection()
      Returns the value of the injection record component.
      Returns:
      the value of the injection record component
    • page

      public @Nullable Integer page()
      Returns the value of the page record component.
      Returns:
      the value of the page record component
    • count

      public boolean count()
      Returns the value of the count record component.
      Returns:
      the value of the count record component
    • authorizationId

      public @Nullable Long authorizationId()
      Returns the value of the authorizationId record component.
      Returns:
      the value of the authorizationId record component
    • authorization

      public @Nullable Boolean authorization()
      Returns the value of the authorization record component.
      Returns:
      the value of the authorization record component