Class AutomationDiagnostics.DiagnosticResult

java.lang.Object
neqsim.process.automation.AutomationDiagnostics.DiagnosticResult
All Implemented Interfaces:
Serializable
Enclosing class:
AutomationDiagnostics

public static class AutomationDiagnostics.DiagnosticResult extends Object implements Serializable
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 Details

  • 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 category
      originalInput - what the agent provided
      errorMessage - human-readable error description
      suggestions - ranked list of closest valid alternatives
      autoCorrection - the auto-corrected value (null if not possible)
      remediation - actionable fix instruction for the agent
      context - additional context information
  • Method Details

    • getCategory

      Gets the error category.
      Returns:
      the error category
    • getOriginalInput

      public String getOriginalInput()
      Gets the original input that caused the error.
      Returns:
      the original input string
    • getErrorMessage

      public String getErrorMessage()
      Gets the error message.
      Returns:
      human-readable error message
    • getSuggestions

      public List<String> getSuggestions()
      Gets the ranked suggestions for closest valid alternatives.
      Returns:
      list of suggestions, closest match first
    • getAutoCorrection

      public String getAutoCorrection()
      Gets the auto-corrected value, or null if auto-correction was not possible.
      Returns:
      the auto-corrected value, or null
    • getRemediation

      public String getRemediation()
      Gets the actionable remediation instruction.
      Returns:
      remediation instruction for the agent
    • getContext

      public Map<String,Object> getContext()
      Gets additional context about the error.
      Returns:
      context map
    • hasAutoCorrection

      public boolean hasAutoCorrection()
      Returns true if an auto-correction was found.
      Returns:
      true if autoCorrection is not null
    • toJson

      public String toJson()
      Serializes this diagnostic result to JSON.
      Returns:
      JSON string