Class AutomationDiagnostics.DiagnosticResult
java.lang.Object
neqsim.process.automation.AutomationDiagnostics.DiagnosticResult
- All Implemented Interfaces:
Serializable
- Enclosing class:
AutomationDiagnostics
A diagnostic result returned when an operation fails, containing the error analysis, closest
suggestions, and auto-correction attempt.
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final AutomationDiagnostics.ErrorCategoryprivate final Stringprivate final Stringprivate final Stringprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the auto-corrected value, or null if auto-correction was not possible.Gets the error category.Gets additional context about the error.Gets the error message.Gets the original input that caused the error.Gets the actionable remediation instruction.Gets the ranked suggestions for closest valid alternatives.booleanReturns true if an auto-correction was found.toJson()Serializes this diagnostic result to JSON.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
category
-
originalInput
-
errorMessage
-
suggestions
-
autoCorrection
-
remediation
-
context
-
-
Constructor Details
-
DiagnosticResult
public DiagnosticResult(AutomationDiagnostics.ErrorCategory category, String originalInput, String errorMessage, List<String> suggestions, String autoCorrection, String remediation, Map<String, Object> context) Creates a diagnostic result.- Parameters:
category- the error categoryoriginalInput- what the agent providederrorMessage- human-readable error descriptionsuggestions- ranked list of closest valid alternativesautoCorrection- the auto-corrected value (null if not possible)remediation- actionable fix instruction for the agentcontext- additional context information
-
-
Method Details
-
getCategory
Gets the error category.- Returns:
- the error category
-
getOriginalInput
Gets the original input that caused the error.- Returns:
- the original input string
-
getErrorMessage
-
getSuggestions
-
getAutoCorrection
Gets the auto-corrected value, or null if auto-correction was not possible.- Returns:
- the auto-corrected value, or null
-
getRemediation
Gets the actionable remediation instruction.- Returns:
- remediation instruction for the agent
-
getContext
-
hasAutoCorrection
public boolean hasAutoCorrection()Returns true if an auto-correction was found.- Returns:
- true if autoCorrection is not null
-
toJson
-