Package com.tnsai.agents.validation
Record Class ValidationIssue
java.lang.Object
java.lang.Record
com.tnsai.agents.validation.ValidationIssue
- Record Components:
severity-Severity.ERRORfails the build; WARNING is logged; INFO silentcode- stable identifier of the formAGENT-V001; used by alert rulesmessage- human-readable descriptionlocation- where in the agent config the problem was detectedfix- actionable suggestion (e.g."add .llm(...) to AgentBuilder")context- validator-specific extra fields (low-cardinality)
public record ValidationIssue(Severity severity, String code, String message, Location location, Optional<String> fix, Map<String,Object> context)
extends Record
One detected configuration problem from
Validator run during
AgentBuilder.build() (issue #85).- Since:
- 0.5.0 (issue #85)
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.context()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.static ValidationIssue.Builderfix()Returns the value of thefixrecord component.final inthashCode()Returns a hash code value for this object.static ValidationIssue.Builderlocation()Returns the value of thelocationrecord component.message()Returns the value of themessagerecord component.severity()Returns the value of theseverityrecord component.final StringtoString()Returns a string representation of this record class.static ValidationIssue.Builder
-
Constructor Details
-
ValidationIssue
public ValidationIssue(Severity severity, String code, String message, Location location, Optional<String> fix, Map<String, Object> context) Creates an instance of aValidationIssuerecord class.- Parameters:
severity- the value for theseverityrecord componentcode- the value for thecoderecord componentmessage- the value for themessagerecord componentlocation- the value for thelocationrecord componentfix- the value for thefixrecord componentcontext- the value for thecontextrecord component
-
-
Method Details
-
error
-
warning
-
info
-
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). -
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
fix
Returns the value of thefixrecord component.- Returns:
- the value of the
fixrecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-