class CheckSpec implements JsonObjectConvertible {

    public static CheckSpec fromJson(final @NotNull JsonObject json) {
        final JsonKeys keys = keys();
        final CheckSpec checkSpec = new CheckSpec();
        if (hasNonNull(json, keys.impl())) {
            checkSpec.setImpl(json.getString(keys.impl()));
        }
        if (hasNonNull(json, keys.inlineScript())) {
            checkSpec.setInlineScript(json.getString(keys.inlineScript()));
        }
        if (hasNonNull(json, keys.inlineEngine())) {
            checkSpec.setInlineEngine(json.getString(keys.inlineEngine()));
        }
        if (hasNonNull(json, keys.name())) {
            checkSpec.setName(json.getString(keys.name()));
        }
        if (hasNonNull(json, keys.template())) {
            checkSpec.setTemplate(json.getString(keys.template()));
        }
        if (hasNonNull(json, keys.skip())) {
            checkSpec.setSkip(json.getBoolean(keys.skip()));
        }
        if (hasNonNull(json, keys.config())) {
            checkSpec.setConfig(json.getJsonObject(keys.config()));
        }

        return checkSpec;
    }

}