Package org.a2aproject.sdk.spec
Record Class TaskQueryParams
java.lang.Object
java.lang.Record
org.a2aproject.sdk.spec.TaskQueryParams
- Record Components:
id- the ID for the task to be queriedhistoryLength- the maximum number of items of history for the task to include in the responsetenant- optional tenant, provided as a path parameter.
public record TaskQueryParams(String id, @Nullable Integer historyLength, @Nullable String tenant)
extends Record
Defines parameters for querying a task, with an option to limit history length.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructing instances. -
Constructor Summary
ConstructorsConstructorDescriptionConvenience constructor with defaults for tenant and historyLength.TaskQueryParams(String id, @Nullable Integer historyLength) Convenience constructor with default tenant.TaskQueryParams(String id, @Nullable Integer historyLength, @Nullable String tenant) Compact constructor for validation. -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskQueryParams.Builderbuilder()Create a new Builderfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable IntegerReturns the value of thehistoryLengthrecord component.id()Returns the value of theidrecord component.@Nullable Stringtenant()Returns the value of thetenantrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TaskQueryParams
Compact constructor for validation. Validates that required parameters are not null and historyLength is non-negative if provided.- Parameters:
id- the task identifierhistoryLength- maximum number of history itemstenant- the tenant identifier- Throws:
IllegalArgumentException- if historyLength is negative
-
TaskQueryParams
Convenience constructor with default tenant.- Parameters:
id- the task identifier (required)historyLength- maximum number of history items to include (optional)
-
TaskQueryParams
Convenience constructor with defaults for tenant and historyLength.- Parameters:
id- the task identifier (required)
-
-
Method Details
-
builder
Create a new Builder- Returns:
- the builder
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
historyLength
Returns the value of thehistoryLengthrecord component.- Returns:
- the value of the
historyLengthrecord component
-
tenant
Returns the value of thetenantrecord component.- Returns:
- the value of the
tenantrecord component
-