Record Class PermissionDto

java.lang.Object
java.lang.Record
energy.eddie.aiida.dtos.permission.PermissionDto

public record PermissionDto(UUID permissionId, UUID eddieId, PermissionStatus status, @Nullable ConnectionStatus connectionStatus, @Nullable String serviceName, @Nullable String displayName, @Nullable Instant startTime, @Nullable Instant expirationTime, @Nullable Instant grantTime, @Nullable Instant revokeTime, @Nullable String meterId, @Nullable BigDecimal minLimitKw, @Nullable BigDecimal maxLimitKw, @Nullable UUID monitoringDataSourceId, @Nullable MqttStreamingConfig mqttStreamingConfig, @Nullable AiidaLocalDataNeed dataNeed, UUID userId, @Nullable DataSource dataSource, @Nullable InboundMessageFormat inboundMessageFormat, boolean transmissionEnabled, @Nullable org.springframework.scheduling.support.CronExpression effectiveTransmissionSchedule, boolean supportsConnectionLimits) extends Record
Representation of a persisted permission returned by the REST API.
  • Constructor Details

    • PermissionDto

      public PermissionDto(UUID permissionId, UUID eddieId, PermissionStatus status, @Nullable ConnectionStatus connectionStatus, @Nullable String serviceName, @Nullable String displayName, @Nullable Instant startTime, @Nullable Instant expirationTime, @Nullable Instant grantTime, @Nullable Instant revokeTime, @Nullable String meterId, @Nullable BigDecimal minLimitKw, @Nullable BigDecimal maxLimitKw, @Nullable UUID monitoringDataSourceId, @Nullable MqttStreamingConfig mqttStreamingConfig, @Nullable AiidaLocalDataNeed dataNeed, UUID userId, @Nullable DataSource dataSource, @Nullable InboundMessageFormat inboundMessageFormat, boolean transmissionEnabled, @Nullable org.springframework.scheduling.support.CronExpression effectiveTransmissionSchedule, boolean supportsConnectionLimits)
      Creates an instance of a PermissionDto record class.
      Parameters:
      permissionId - the value for the permissionId record component
      eddieId - the value for the eddieId record component
      status - the value for the status record component
      connectionStatus - the value for the connectionStatus record component
      serviceName - the value for the serviceName record component
      displayName - the value for the displayName record component
      startTime - the value for the startTime record component
      expirationTime - the value for the expirationTime record component
      grantTime - the value for the grantTime record component
      revokeTime - the value for the revokeTime record component
      meterId - the value for the meterId record component
      minLimitKw - the value for the minLimitKw record component
      maxLimitKw - the value for the maxLimitKw record component
      monitoringDataSourceId - the value for the monitoringDataSourceId record component
      mqttStreamingConfig - the value for the mqttStreamingConfig record component
      dataNeed - the value for the dataNeed record component
      userId - the value for the userId record component
      dataSource - the value for the dataSource record component
      inboundMessageFormat - the value for the inboundMessageFormat record component
      transmissionEnabled - the value for the transmissionEnabled record component
      effectiveTransmissionSchedule - the value for the effectiveTransmissionSchedule record component
      supportsConnectionLimits - the value for the supportsConnectionLimits record component
  • Method Details

    • from

      public static PermissionDto from(Permission permission, @Nullable ConnectionStatus connectionStatus)
      Creates the representation of the passed permission.
      Parameters:
      permission - The persisted permission.
      connectionStatus - The connection status derived at runtime, or null if the permission is not accepted.
    • 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.
    • permissionId

      public UUID permissionId()
      Returns the value of the permissionId record component.
      Returns:
      the value of the permissionId record component
    • eddieId

      public UUID eddieId()
      Returns the value of the eddieId record component.
      Returns:
      the value of the eddieId record component
    • status

      public PermissionStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • connectionStatus

      @Nullable public ConnectionStatus connectionStatus()
      Returns the value of the connectionStatus record component.
      Returns:
      the value of the connectionStatus record component
    • serviceName

      @Nullable public String serviceName()
      Returns the value of the serviceName record component.
      Returns:
      the value of the serviceName record component
    • displayName

      @Nullable public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • startTime

      @Nullable public Instant startTime()
      Returns the value of the startTime record component.
      Returns:
      the value of the startTime record component
    • expirationTime

      @Nullable public Instant expirationTime()
      Returns the value of the expirationTime record component.
      Returns:
      the value of the expirationTime record component
    • grantTime

      @Nullable public Instant grantTime()
      Returns the value of the grantTime record component.
      Returns:
      the value of the grantTime record component
    • revokeTime

      @Nullable public Instant revokeTime()
      Returns the value of the revokeTime record component.
      Returns:
      the value of the revokeTime record component
    • meterId

      @Nullable public String meterId()
      Returns the value of the meterId record component.
      Returns:
      the value of the meterId record component
    • minLimitKw

      @Nullable public BigDecimal minLimitKw()
      Returns the value of the minLimitKw record component.
      Returns:
      the value of the minLimitKw record component
    • maxLimitKw

      @Nullable public BigDecimal maxLimitKw()
      Returns the value of the maxLimitKw record component.
      Returns:
      the value of the maxLimitKw record component
    • monitoringDataSourceId

      @Nullable public UUID monitoringDataSourceId()
      Returns the value of the monitoringDataSourceId record component.
      Returns:
      the value of the monitoringDataSourceId record component
    • mqttStreamingConfig

      @Nullable public MqttStreamingConfig mqttStreamingConfig()
      Returns the value of the mqttStreamingConfig record component.
      Returns:
      the value of the mqttStreamingConfig record component
    • dataNeed

      @Nullable public AiidaLocalDataNeed dataNeed()
      Returns the value of the dataNeed record component.
      Returns:
      the value of the dataNeed record component
    • userId

      public UUID userId()
      Returns the value of the userId record component.
      Returns:
      the value of the userId record component
    • dataSource

      @Nullable public DataSource dataSource()
      Returns the value of the dataSource record component.
      Returns:
      the value of the dataSource record component
    • inboundMessageFormat

      @Nullable public InboundMessageFormat inboundMessageFormat()
      Returns the value of the inboundMessageFormat record component.
      Returns:
      the value of the inboundMessageFormat record component
    • transmissionEnabled

      public boolean transmissionEnabled()
      Returns the value of the transmissionEnabled record component.
      Returns:
      the value of the transmissionEnabled record component
    • effectiveTransmissionSchedule

      @Nullable public org.springframework.scheduling.support.CronExpression effectiveTransmissionSchedule()
      Returns the value of the effectiveTransmissionSchedule record component.
      Returns:
      the value of the effectiveTransmissionSchedule record component
    • supportsConnectionLimits

      public boolean supportsConnectionLimits()
      Returns the value of the supportsConnectionLimits record component.
      Returns:
      the value of the supportsConnectionLimits record component