Package com.tnsai.channels.api
Record Class UnifiedResponse
java.lang.Object
java.lang.Record
com.tnsai.channels.api.UnifiedResponse
- Record Components:
channelId- target adapter idconversationId- target chat/channel/threadtext- response textattachments- files to send along with the responsehints- delivery hints (streaming, typing, message splitting)
public record UnifiedResponse(String channelId, String conversationId, String text, List<Attachment> attachments, ResponseHints hints)
extends Record
Platform-agnostic outbound response.
The gateway produces this after agent processing; the channel adapter
converts it into the native platform format.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionUnifiedResponse(String channelId, String conversationId, String text, List<Attachment> attachments, ResponseHints hints) Creates an instance of aUnifiedResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachmentsrecord component.static UnifiedResponse.Builderbuilder()Returns the value of thechannelIdrecord component.Returns the value of theconversationIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hints()Returns the value of thehintsrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UnifiedResponse
public UnifiedResponse(String channelId, String conversationId, String text, List<Attachment> attachments, ResponseHints hints) Creates an instance of aUnifiedResponserecord class.- Parameters:
channelId- the value for thechannelIdrecord componentconversationId- the value for theconversationIdrecord componenttext- the value for thetextrecord componentattachments- the value for theattachmentsrecord componenthints- the value for thehintsrecord component
-
-
Method Details
-
builder
-
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). -
channelId
Returns the value of thechannelIdrecord component.- Returns:
- the value of the
channelIdrecord component
-
conversationId
Returns the value of theconversationIdrecord component.- Returns:
- the value of the
conversationIdrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
attachments
Returns the value of theattachmentsrecord component.- Returns:
- the value of the
attachmentsrecord component
-
hints
Returns the value of thehintsrecord component.- Returns:
- the value of the
hintsrecord component
-