Class DiagnosticIssue
java.lang.Object
neqsim.mcp.model.DiagnosticIssue
A diagnostic issue found during validation or simulation.
Unifies the issue format used by Validator.Issue and SimulationResult.ErrorDetail
into a single model for MCP responses. Each issue has a severity, machine-readable code,
human-readable message, and an optional remediation hint.
- Version:
- 1.0
- Author:
- Even Solbraa
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDiagnosticIssue(String severity, String code, String message, String remediation) Creates a diagnostic issue. -
Method Summary
Modifier and TypeMethodDescriptionstatic DiagnosticIssueCreates an error-level issue.getCode()Gets the machine-readable issue code.Gets the human-readable message.Gets the remediation hint.Gets the severity level.booleanisError()Returns true if this is an error-level issue.com.google.gson.JsonObjecttoJson()Converts this issue to a JsonObject.toString()static DiagnosticIssueCreates a warning-level issue.
-
Field Details
-
severity
-
code
-
message
-
remediation
-
-
Constructor Details
-
DiagnosticIssue
Creates a diagnostic issue.- Parameters:
severity- "error" or "warning"code- machine-readable issue code (e.g., "UNKNOWN_COMPONENT")message- human-readable descriptionremediation- how to fix the issue, or null
-
-
Method Details
-
error
Creates an error-level issue.- Parameters:
code- the issue codemessage- the descriptionremediation- how to fix- Returns:
- the issue
-
warning
Creates a warning-level issue.- Parameters:
code- the issue codemessage- the descriptionremediation- how to fix- Returns:
- the issue
-
getSeverity
-
getCode
-
getMessage
-
getRemediation
-
isError
public boolean isError()Returns true if this is an error-level issue.- Returns:
- true if severity is "error"
-
toJson
public com.google.gson.JsonObject toJson()Converts this issue to a JsonObject.- Returns:
- JSON representation
-
toString
-