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 Summary
ConstructorsConstructorDescriptionPermissionDto(UUID permissionId, UUID eddieId, PermissionStatus status, ConnectionStatus connectionStatus, String serviceName, String displayName, Instant startTime, Instant expirationTime, Instant grantTime, Instant revokeTime, String meterId, BigDecimal minLimitKw, BigDecimal maxLimitKw, UUID monitoringDataSourceId, MqttStreamingConfig mqttStreamingConfig, AiidaLocalDataNeed dataNeed, UUID userId, DataSource dataSource, InboundMessageFormat inboundMessageFormat, boolean transmissionEnabled, org.springframework.scheduling.support.CronExpression effectiveTransmissionSchedule, boolean supportsConnectionLimits) Creates an instance of aPermissionDtorecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectionStatusrecord component.dataNeed()Returns the value of thedataNeedrecord component.Returns the value of thedataSourcerecord component.Returns the value of thedisplayNamerecord component.eddieId()Returns the value of theeddieIdrecord component.org.springframework.scheduling.support.CronExpressionReturns the value of theeffectiveTransmissionSchedulerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpirationTimerecord component.static PermissionDtofrom(Permission permission, ConnectionStatus connectionStatus) Creates the representation of the passed permission.Returns the value of thegrantTimerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinboundMessageFormatrecord component.Returns the value of themaxLimitKwrecord component.meterId()Returns the value of themeterIdrecord component.Returns the value of theminLimitKwrecord component.Returns the value of themonitoringDataSourceIdrecord component.Returns the value of themqttStreamingConfigrecord component.Returns the value of thepermissionIdrecord component.Returns the value of therevokeTimerecord component.Returns the value of theserviceNamerecord component.Returns the value of thestartTimerecord component.status()Returns the value of thestatusrecord component.booleanReturns the value of thesupportsConnectionLimitsrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thetransmissionEnabledrecord component.userId()Returns the value of theuserIdrecord component.
-
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 aPermissionDtorecord class.- Parameters:
permissionId- the value for thepermissionIdrecord componenteddieId- the value for theeddieIdrecord componentstatus- the value for thestatusrecord componentconnectionStatus- the value for theconnectionStatusrecord componentserviceName- the value for theserviceNamerecord componentdisplayName- the value for thedisplayNamerecord componentstartTime- the value for thestartTimerecord componentexpirationTime- the value for theexpirationTimerecord componentgrantTime- the value for thegrantTimerecord componentrevokeTime- the value for therevokeTimerecord componentmeterId- the value for themeterIdrecord componentminLimitKw- the value for theminLimitKwrecord componentmaxLimitKw- the value for themaxLimitKwrecord componentmonitoringDataSourceId- the value for themonitoringDataSourceIdrecord componentmqttStreamingConfig- the value for themqttStreamingConfigrecord componentdataNeed- the value for thedataNeedrecord componentuserId- the value for theuserIdrecord componentdataSource- the value for thedataSourcerecord componentinboundMessageFormat- the value for theinboundMessageFormatrecord componenttransmissionEnabled- the value for thetransmissionEnabledrecord componenteffectiveTransmissionSchedule- the value for theeffectiveTransmissionSchedulerecord componentsupportsConnectionLimits- the value for thesupportsConnectionLimitsrecord 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, ornullif the permission is not accepted.
-
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 '=='. -
permissionId
Returns the value of thepermissionIdrecord component.- Returns:
- the value of the
permissionIdrecord component
-
eddieId
Returns the value of theeddieIdrecord component.- Returns:
- the value of the
eddieIdrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
connectionStatus
Returns the value of theconnectionStatusrecord component.- Returns:
- the value of the
connectionStatusrecord component
-
serviceName
Returns the value of theserviceNamerecord component.- Returns:
- the value of the
serviceNamerecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
startTime
Returns the value of thestartTimerecord component.- Returns:
- the value of the
startTimerecord component
-
expirationTime
Returns the value of theexpirationTimerecord component.- Returns:
- the value of the
expirationTimerecord component
-
grantTime
Returns the value of thegrantTimerecord component.- Returns:
- the value of the
grantTimerecord component
-
revokeTime
Returns the value of therevokeTimerecord component.- Returns:
- the value of the
revokeTimerecord component
-
meterId
Returns the value of themeterIdrecord component.- Returns:
- the value of the
meterIdrecord component
-
minLimitKw
Returns the value of theminLimitKwrecord component.- Returns:
- the value of the
minLimitKwrecord component
-
maxLimitKw
Returns the value of themaxLimitKwrecord component.- Returns:
- the value of the
maxLimitKwrecord component
-
monitoringDataSourceId
Returns the value of themonitoringDataSourceIdrecord component.- Returns:
- the value of the
monitoringDataSourceIdrecord component
-
mqttStreamingConfig
Returns the value of themqttStreamingConfigrecord component.- Returns:
- the value of the
mqttStreamingConfigrecord component
-
dataNeed
Returns the value of thedataNeedrecord component.- Returns:
- the value of the
dataNeedrecord component
-
userId
Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
dataSource
Returns the value of thedataSourcerecord component.- Returns:
- the value of the
dataSourcerecord component
-
inboundMessageFormat
Returns the value of theinboundMessageFormatrecord component.- Returns:
- the value of the
inboundMessageFormatrecord component
-
transmissionEnabled
public boolean transmissionEnabled()Returns the value of thetransmissionEnabledrecord component.- Returns:
- the value of the
transmissionEnabledrecord component
-
effectiveTransmissionSchedule
@Nullable public org.springframework.scheduling.support.CronExpression effectiveTransmissionSchedule()Returns the value of theeffectiveTransmissionSchedulerecord component.- Returns:
- the value of the
effectiveTransmissionSchedulerecord component
-
supportsConnectionLimits
public boolean supportsConnectionLimits()Returns the value of thesupportsConnectionLimitsrecord component.- Returns:
- the value of the
supportsConnectionLimitsrecord component
-