Currently , CFDiagnostic store fields in Diagnostic and it is strange to set Kind and fileUri to String in the constructor convert back to Enum and Object type in the getter.
A proper way to handle this would be Store a reference of Diagnostic and make all queries go to the reference.
This issue is discussed in #238.