public FeatureTypeV2 parseFeatureType()

in src/main/java/com/amazonaws/services/neptune/profiles/neptune_ml/v2/parsing/ParseFeatureTypeV2.java [32:42]


    public FeatureTypeV2 parseFeatureType() {
        if (json.has("type") && json.get("type").isTextual()) {
            String type = json.get("type").textValue();
            if (type.equals("numerical") || type.equals("category") || type.equals("auto") || type.equals("none")) {
                return FeatureTypeV2.valueOf(type);
            } else {
                throw ErrorMessageHelper.invalidFieldValue("type", type, context, Arrays.asList("numerical", "category", "auto", "none"));
            }
        }
        throw ErrorMessageHelper.errorParsingField("type", context, "one of the following values: 'numerical', 'category', 'auto', 'none'");
    }