Package com.redis.vl.extensions.router
Class Route
java.lang.Object
com.redis.vl.extensions.router.Route
Model representing a routing path with associated metadata and thresholds.
Ported from Python: redisvl/extensions/router/schema.py:12
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Custom builder to ensure references list is mutable. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Route
public Route()
-
-
Method Details
-
validate
public void validate()Validate the route configuration.- Throws:
IllegalArgumentException
- if validation fails
-
toDict
Convert route to a map for JSON serialization. Ported from Python: model_to_dict(route)- Returns:
- Map representation of the route
-
toJson
Convert route to JSON string.- Returns:
- JSON representation of the route
-
fromDict
Create route from map representation. Ported from Python: Route(**dict)- Parameters:
dict
- Map containing route data- Returns:
- Route instance
-
fromJson
Create route from JSON string.- Parameters:
json
- JSON string- Returns:
- Route instance
-