SendStreamingMessageResponseBuilder
Builder class for creating SendStreamingMessageResponse instances.
This builder provides a fluent API for creating SendStreamingMessageResponse objects, making it easier to configure streaming message responses according to the A2A protocol.
The result field accepts polymorphic TaskUpdateEvent instances (TaskStatusUpdateEvent or TaskArtifactUpdateEvent).
Example usage:
val response = sendStreamingMessageResponse {
id = "request-789"
taskStatusUpdate {
id("task-streaming-123")
status {
state = TaskState.working
timestamp = System.currentTimeMillis()
}
final = false
}
}See also
Functions
Builds a SendStreamingMessageResponse instance with the configured parameters.
Sets the error for the response.
Sets the ID of the response.
Sets the result task update event.
Configures a task artifact update event using a Java-friendly Consumer.
Configures a task artifact update event using a lambda with receiver.
Configures a task status update event using a Java-friendly Consumer.
Configures a task status update event using a lambda with receiver.