Package akka.javasdk.agent.task
Record Class TaskAttachment
public record TaskAttachment(String type, URI uri, String text, String detailLevel, String mimeType)
extends Record
A serializable reference to content attached to a task. Stores type metadata and either a URI or
inline text so that content references survive event sourcing. Reconstructed to
MessageContent at execution time.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedetailLevelrecord component.final booleanIndicates whether some other object is "equal to" this one.static TaskAttachmentfromMessageContent(MessageContent content) Convert aMessageContentto a serializableTaskAttachment.final inthashCode()Returns a hash code value for this object.mimeType()Returns the value of themimeTyperecord component.text()Returns the value of thetextrecord component.Reconstruct theMessageContentfrom this reference.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.uri()Returns the value of theurirecord component.
-
Constructor Details
-
TaskAttachment
Creates an instance of aTaskAttachmentrecord class.- Parameters:
type- the value for thetyperecord componenturi- the value for theurirecord componenttext- the value for thetextrecord componentdetailLevel- the value for thedetailLevelrecord componentmimeType- the value for themimeTyperecord component
-
-
Method Details
-
fromMessageContent
Convert aMessageContentto a serializableTaskAttachment. -
toMessageContent
Reconstruct theMessageContentfrom this reference. -
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
uri
Returns the value of theurirecord component.- Returns:
- the value of the
urirecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
detailLevel
Returns the value of thedetailLevelrecord component.- Returns:
- the value of the
detailLevelrecord component
-
mimeType
Returns the value of themimeTyperecord component.- Returns:
- the value of the
mimeTyperecord component
-