Record Class Message_v0_3
java.lang.Object
java.lang.Record
org.a2aproject.sdk.compat03.spec.Message_v0_3
- All Implemented Interfaces:
Event_v0_3, EventKind_v0_3, StreamingEventKind_v0_3
public record Message_v0_3(Message_v0_3.Role role, List<Part_v0_3<?>> parts, @Nullable String messageId, @Nullable String contextId, @Nullable String taskId, @Nullable List<String> referenceTaskIds, @Nullable Map<String,Object> metadata, @Nullable List<String> extensions, String kind)
extends Record
implements EventKind_v0_3, StreamingEventKind_v0_3
Represents a single message in the conversation between a user and an agent.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessage_v0_3(Message_v0_3.Role role, List<Part_v0_3<?>> parts, @Nullable String messageId, @Nullable String contextId, @Nullable String taskId, @Nullable List<String> referenceTaskIds, @Nullable Map<String, Object> metadata, @Nullable List<String> extensions) Message_v0_3(Message_v0_3.Role role, List<Part_v0_3<?>> parts, @Nullable String messageId, @Nullable String contextId, @Nullable String taskId, @Nullable List<String> referenceTaskIds, @Nullable Map<String, Object> metadata, @Nullable List<String> extensions, String kind) Creates an instance of aMessage_v0_3record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of thecontextIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextensionsrecord component.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.@Nullable StringReturns the value of themessageIdrecord component.metadata()Returns the value of themetadatarecord component.parts()Returns the value of thepartsrecord component.Returns the value of thereferenceTaskIdsrecord component.role()Returns the value of therolerecord component.@Nullable StringtaskId()Returns the value of thetaskIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
KIND
- See Also:
-
-
Constructor Details
-
Message_v0_3
public Message_v0_3(Message_v0_3.Role role, List<Part_v0_3<?>> parts, @Nullable String messageId, @Nullable String contextId, @Nullable String taskId, @Nullable List<String> referenceTaskIds, @Nullable Map<String, Object> metadata, @Nullable List<String> extensions, String kind) Creates an instance of aMessage_v0_3record class.- Parameters:
role- the value for therolerecord componentparts- the value for thepartsrecord componentmessageId- the value for themessageIdrecord componentcontextId- the value for thecontextIdrecord componenttaskId- the value for thetaskIdrecord componentreferenceTaskIds- the value for thereferenceTaskIdsrecord componentmetadata- the value for themetadatarecord componentextensions- the value for theextensionsrecord componentkind- the value for thekindrecord component
-
Message_v0_3
-
-
Method Details
-
toString
-
hashCode
-
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). -
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
parts
-
messageId
Returns the value of themessageIdrecord component.- Returns:
- the value of the
messageIdrecord component
-
contextId
Returns the value of thecontextIdrecord component.- Returns:
- the value of the
contextIdrecord component
-
taskId
Returns the value of thetaskIdrecord component.- Returns:
- the value of the
taskIdrecord component
-
referenceTaskIds
-
metadata
-
extensions
-
kind
Returns the value of thekindrecord component.- Specified by:
kindin interfaceEventKind_v0_3- Specified by:
kindin interfaceStreamingEventKind_v0_3- Returns:
- the value of the
kindrecord component
-