Package dev.shamoo.runtime.core
Record Class ResourceRegistration
java.lang.Object
java.lang.Record
dev.shamoo.runtime.core.ResourceRegistration
public record ResourceRegistration(UUID registrationId, PluginId owner, ResourceCategory category, String description, Instant registeredAt)
extends Record
Immutable view of a live plugin-owned resource.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceRegistration(UUID registrationId, PluginId owner, ResourceCategory category, String description, Instant registeredAt) Creates an instance of aResourceRegistrationrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.owner()Returns the value of theownerrecord component.Returns the value of theregisteredAtrecord component.Returns the value of theregistrationIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResourceRegistration
public ResourceRegistration(UUID registrationId, PluginId owner, ResourceCategory category, String description, Instant registeredAt) Creates an instance of aResourceRegistrationrecord class.- Parameters:
registrationId- the value for theregistrationIdrecord componentowner- the value for theownerrecord componentcategory- the value for thecategoryrecord componentdescription- the value for thedescriptionrecord componentregisteredAt- the value for theregisteredAtrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
registrationId
Returns the value of theregistrationIdrecord component.- Returns:
- the value of the
registrationIdrecord component
-
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
registeredAt
Returns the value of theregisteredAtrecord component.- Returns:
- the value of the
registeredAtrecord component
-