Record Class AcceptedPermission
java.lang.Object
java.lang.Record
energy.eddie.aiida.models.permission.AcceptedPermission
- Record Components:
id- The ID of the permission.eddieId- The ID of the EDDIE application that created the permission.userId- The ID of the user that owns the permission.connectionId- The connection ID that is sent along with each message to the EP.startTime- The UTC timestamp when the data sharing starts.expirationTime- The UTC timestamp when the data sharing stops.dataNeed- The data need of the permission.dataSource- The data source of the permission.mqttStreamingConfig- The MQTT configuration used to stream data to the EP.transmissionSchedule- The schedule that is used to stream data, seePermission.effectiveTransmissionSchedule().transmissionEnabled- Whether data transmission is enabled.
public record AcceptedPermission(UUID id, UUID eddieId, UUID userId, String connectionId, Instant startTime, Instant expirationTime, AiidaLocalDataNeed dataNeed, DataSource dataSource, MqttStreamingConfig mqttStreamingConfig, org.springframework.scheduling.support.CronExpression transmissionSchedule, boolean transmissionEnabled)
extends Record
Immutable snapshot of an
PermissionStatus.ACCEPTED permission with all fields that are required to stream
data. In contrast to Permission, none of the fields are nullable.-
Constructor Summary
ConstructorsConstructorDescriptionAcceptedPermission(UUID id, UUID eddieId, UUID userId, String connectionId, Instant startTime, Instant expirationTime, AiidaLocalDataNeed dataNeed, DataSource dataSource, MqttStreamingConfig mqttStreamingConfig, org.springframework.scheduling.support.CronExpression transmissionSchedule, boolean transmissionEnabled) Creates an instance of aAcceptedPermissionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectionIdrecord component.dataNeed()Returns the value of thedataNeedrecord component.Returns the value of thedataSourcerecord component.eddieId()Returns the value of theeddieIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpirationTimerecord component.static AcceptedPermissionfrom(Permission permission) Creates a snapshot of the passed permission.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of themqttStreamingConfigrecord component.Returns the value of thestartTimerecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thetransmissionEnabledrecord component.org.springframework.scheduling.support.CronExpressionReturns the value of thetransmissionSchedulerecord component.userId()Returns the value of theuserIdrecord component.
-
Constructor Details
-
AcceptedPermission
public AcceptedPermission(UUID id, UUID eddieId, UUID userId, String connectionId, Instant startTime, Instant expirationTime, AiidaLocalDataNeed dataNeed, DataSource dataSource, MqttStreamingConfig mqttStreamingConfig, org.springframework.scheduling.support.CronExpression transmissionSchedule, boolean transmissionEnabled) Creates an instance of aAcceptedPermissionrecord class.- Parameters:
id- the value for theidrecord componenteddieId- the value for theeddieIdrecord componentuserId- the value for theuserIdrecord componentconnectionId- the value for theconnectionIdrecord componentstartTime- the value for thestartTimerecord componentexpirationTime- the value for theexpirationTimerecord componentdataNeed- the value for thedataNeedrecord componentdataSource- the value for thedataSourcerecord componentmqttStreamingConfig- the value for themqttStreamingConfigrecord componenttransmissionSchedule- the value for thetransmissionSchedulerecord componenttransmissionEnabled- the value for thetransmissionEnabledrecord component
-
-
Method Details
-
from
Creates a snapshot of the passed permission.- Throws:
IllegalStateException- If the permission is notPermissionStatus.ACCEPTEDor a field required for streaming is missing.
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
eddieId
Returns the value of theeddieIdrecord component.- Returns:
- the value of the
eddieIdrecord component
-
userId
Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
connectionId
Returns the value of theconnectionIdrecord component.- Returns:
- the value of the
connectionIdrecord 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
-
dataNeed
Returns the value of thedataNeedrecord component.- Returns:
- the value of the
dataNeedrecord component
-
dataSource
Returns the value of thedataSourcerecord component.- Returns:
- the value of the
dataSourcerecord component
-
mqttStreamingConfig
Returns the value of themqttStreamingConfigrecord component.- Returns:
- the value of the
mqttStreamingConfigrecord component
-
transmissionSchedule
public org.springframework.scheduling.support.CronExpression transmissionSchedule()Returns the value of thetransmissionSchedulerecord component.- Returns:
- the value of the
transmissionSchedulerecord component
-
transmissionEnabled
public boolean transmissionEnabled()Returns the value of thetransmissionEnabledrecord component.- Returns:
- the value of the
transmissionEnabledrecord component
-