class RecordProperties {

    public static RecordProperties fromJson(JsonValue jsonProperties) {

        RecordProperties recordProperties = new RecordProperties();

        //Global values
        recordProperties.issueID = jsonProperties.get(RecordConstants.ISSUE_ID_LABEL).required().asLong();
        recordProperties.referenceID = jsonProperties.get(RecordConstants.REFERENCE_ID_LABEL).required().asString();
        if (!REFERENCE_ID_PATTERN.matcher(recordProperties.referenceID).matches()) {
            debug.message("{} format is incorrect. Format expected: {}. Value: '{}'",
                    RecordConstants.REFERENCE_ID_LABEL, REFERENCE_ID_REGEX, recordProperties.referenceID);
            throw new IllegalArgumentException(RecordConstants.REFERENCE_ID_LABEL +
                    " format is incorrect. Format expected: " + REFERENCE_ID_REGEX + " . Value: '"
                    + recordProperties.referenceID + "'");
        }
        recordProperties.description = jsonProperties.get(RecordConstants.DESCRIPTION_LABEL).required().asString();

        // Sub json
        fromThreadDumpJson(recordProperties, jsonProperties);
        fromConfigExportJson(recordProperties, jsonProperties);
        fromDebugLogsJson(recordProperties, jsonProperties);

        recordProperties.zipEnable = jsonProperties.get(RecordConstants.ZIP_ENABLE_LABEL).required().asBoolean();

        return recordProperties;
    }

    private  RecordProperties();

}