<commit_before>package io.dialob.api.form.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.immutables.gson.Gson;
import org.immutables.value.Value;

import java.io.Serializable;
import java.util.Optional;

@Value.Immutable
@JsonSerialize(as = ImmutableFormValidationError.class)
@JsonDeserialize(as = ImmutableFormValidationError.class)
@Gson.TypeAdapters
@JsonInclude(content = JsonInclude.Include.NON_NULL, value = JsonInclude.Include.NON_EMPTY)
@Value.Style(validationMethod = Value.Style.ValidationMethod.NONE, jdkOnly = true)
public interface FormValidationError extends Serializable {

  enum Level {
    INFO,
    WARNING,
    ERROR,
    FATAL
  }

  enum Type {
    VISIBILITY,
    VALIDATION,
    REQUIREMENT,
    VARIABLE,
    GENERAL
  }

  String getItemId();

  String getMessage();

  @Value.Default
  default Level getLevel() {
    return Level.ERROR;
  }

  Type getType();

  Optional<String> getExpression();

  Optional<Integer> getStartIndex();

  Optional<Integer> getEndIndex();

  Optional<Integer> getIndex();

}<commit_msg>new validation types<commit_after>package io.dialob.api.form.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.immutables.gson.Gson;
import org.immutables.value.Value;

import java.io.Serializable;
import java.util.Optional;

@Value.Immutable
@JsonSerialize(as = ImmutableFormValidationError.class)
@JsonDeserialize(as = ImmutableFormValidationError.class)
@Gson.TypeAdapters
@JsonInclude(content = JsonInclude.Include.NON_NULL, value = JsonInclude.Include.NON_EMPTY)
@Value.Style(validationMethod = Value.Style.ValidationMethod.NONE, jdkOnly = true)
public interface FormValidationError extends Serializable {

  enum Level {
    INFO,
    WARNING,
    ERROR,
    FATAL
  }

  enum Type {
    VISIBILITY,
    VALIDATION,
    REQUIREMENT,
    VARIABLE,
    GENERAL,
    CLASSNAME,
    VALUE_ENTRY
  }

  String getItemId();

  String getMessage();

  @Value.Default
  default Level getLevel() {
    return Level.ERROR;
  }

  Type getType();

  Optional<String> getExpression();

  Optional<Integer> getStartIndex();

  Optional<Integer> getEndIndex();

  Optional<Integer> getIndex();

}
{'fraction_non_alphanumeric': 0.10159770585825481, 'fraction_numerical': 0.0, 'mean_word_length': 4.773049645390071, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5327542', 'n_tokens_mistral': 798, 'n_tokens_neox': 738, 'n_words': 140}