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

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
var id: String?
Link copied to clipboard

Functions

Link copied to clipboard

Builds a SendStreamingMessageResponse instance with the configured parameters.

Link copied to clipboard

Sets the error for the response.

Link copied to clipboard

Sets the ID of the response.

Link copied to clipboard

Sets the result task update event.

Link copied to clipboard

Configures a task artifact update event using a Java-friendly Consumer.

Configures a task artifact update event using a lambda with receiver.

Link copied to clipboard

Configures a task status update event using a Java-friendly Consumer.

Configures a task status update event using a lambda with receiver.