Record Class ResponseConverter.MessageSendResult
java.lang.Object
java.lang.Record
com.google.adk.a2a.converters.ResponseConverter.MessageSendResult
- Enclosing class:
ResponseConverter
public static record ResponseConverter.MessageSendResult(@Nullable io.a2a.spec.Message message, @Nullable io.a2a.spec.Task task)
extends Record
Simple REST-friendly wrapper to carry either a message result or a task result.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageSendResult(@Nullable io.a2a.spec.Message message, @Nullable io.a2a.spec.Task task) Creates an instance of aMessageSendResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fromMessage(io.a2a.spec.Message message) fromTask(io.a2a.spec.Task task) final inthashCode()Returns a hash code value for this object.@Nullable io.a2a.spec.Messagemessage()Returns the value of themessagerecord component.@Nullable io.a2a.spec.Tasktask()Returns the value of thetaskrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessageSendResult
public MessageSendResult(@Nullable io.a2a.spec.Message message, @Nullable io.a2a.spec.Task task) Creates an instance of aMessageSendResultrecord class.- Parameters:
message- the value for themessagerecord componenttask- the value for thetaskrecord component
-
-
Method Details
-
fromMessage
-
fromTask
-
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). -
message
public @Nullable io.a2a.spec.Message message()Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
task
public @Nullable io.a2a.spec.Task task()Returns the value of thetaskrecord component.- Returns:
- the value of the
taskrecord component
-