Record Class ToolSearchResponse
java.lang.Object
java.lang.Record
org.springframework.ai.tool.toolsearch.ToolSearchResponse
public record ToolSearchResponse(List<ToolReference> toolReferences, @Nullable Integer totalMatches, @Nullable ToolSearchResponse.SearchMetadata searchMetadata)
extends Record
Response containing a list of ToolReferences matching the search criteria, total
matches, and search metadata.
- Since:
- 2.0.0
- Author:
- Christian Tzolov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final recordMetadata about how a search was performed. -
Constructor Summary
ConstructorsConstructorDescriptionToolSearchResponse(List<ToolReference> toolReferences, @Nullable Integer totalMatches, @Nullable ToolSearchResponse.SearchMetadata searchMetadata) Creates an instance of aToolSearchResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolSearchResponse.Builderbuilder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable ToolSearchResponse.SearchMetadataReturns the value of thesearchMetadatarecord component.Returns the value of thetoolReferencesrecord component.final StringtoString()Returns a string representation of this record class.@Nullable IntegerReturns the value of thetotalMatchesrecord component.
-
Constructor Details
-
ToolSearchResponse
public ToolSearchResponse(List<ToolReference> toolReferences, @Nullable Integer totalMatches, @Nullable ToolSearchResponse.SearchMetadata searchMetadata) Creates an instance of aToolSearchResponserecord class.- Parameters:
toolReferences- the value for thetoolReferencesrecord componenttotalMatches- the value for thetotalMatchesrecord componentsearchMetadata- the value for thesearchMetadatarecord component
-
-
Method Details
-
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). -
toolReferences
Returns the value of thetoolReferencesrecord component.- Returns:
- the value of the
toolReferencesrecord component
-
totalMatches
Returns the value of thetotalMatchesrecord component.- Returns:
- the value of the
totalMatchesrecord component
-
searchMetadata
Returns the value of thesearchMetadatarecord component.- Returns:
- the value of the
searchMetadatarecord component
-