@Override
    public Node toNode() {
        return Node.objectNodeBuilder()
                .withMember("id", Node.from(getId()))
                .withMember("severity", Node.from(getSeverity().toString()))
                .withOptionalMember("shapeId", getShapeId().map(Object::toString).map(Node::from))
                .withMember("message", Node.from(getMessage()))
                .withOptionalMember("suppressionReason", getSuppressionReason().map(Node::from))
                .withOptionalMember("hint", getHint().map(Node::from))
                .withMember("filename", Node.from(getSourceLocation().getFilename()))
                .withMember("line", Node.from(getSourceLocation().getLine()))
                .withMember("column", Node.from(getSourceLocation().getColumn()))
                .build();
    }
Creates a new ValidationEvent from a {@link SourceException}.

@param exception Exception to use to create the event.
@param prefix Prefix string to add to the message.
@param shapeId ShapeId to associate with the event.
@return Returns a created validation event with an ID of Model.
smithy-model/src/main/java/software/amazon/smithy/model/validation/ValidationEvent.java