Package com.tnsai.learning
Record Class Feedback
java.lang.Object
java.lang.Record
com.tnsai.learning.Feedback
public record Feedback(String id, FeedbackType type, String content, String sessionId, Instant timestamp, Map<String,Object> metadata)
extends Record
Represents user or system feedback on agent output.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.static Feedbackcorrection(String correction) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.metadata()Returns the value of themetadatarecord component.static Feedbackpreference(String preference) Returns the value of thesessionIdrecord component.static FeedbackthumbsDown(String comment) static FeedbackReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.withSessionId(String sessionId)
-
Constructor Details
-
Feedback
public Feedback(String id, FeedbackType type, String content, String sessionId, Instant timestamp, Map<String, Object> metadata) Creates an instance of aFeedbackrecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componentcontent- the value for thecontentrecord componentsessionId- the value for thesessionIdrecord componenttimestamp- the value for thetimestamprecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
thumbsUp
-
thumbsDown
-
correction
-
preference
-
withSessionId
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-