<commit_before>package org.talend.dataprep.helper.api;

import java.util.Arrays;

import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * {@link Enum} representation of {@link Action} parameters types.
 */
public enum ActionParamEnum {
    FROM_PATTERN_MODE("fromPatternMode", "from_pattern_mode"),
    NEW_PATTERN("newPattern", "new_pattern"),
    SCOPE("scope", "scope"),
    COLUMN_NAME("columnName", "column_name"),
    COLUMN_ID("columnId", "column_id"),
    ROW_ID("rowId", "row_id"),
    LIMIT("limit", "limit"),
    SEPARATOR("separator", "separator"),
    MANUAL_SEPARATOR_STRING("manualSeparatorString", "manual_separator_string"),
    MANUAL_SEPARATOR_REGEX("manualSeparatorRegex", "manual_separator_regex"),
    FILTER("filter", "filter"),
    REGION_CODE("regionCode","region_code"),
    MODE("mode","mode"),
    FORMAT_TYPE("formatType","format_type"),
    OPERATOR("operator","operator"),
    OPERAND("operand","operand"),
    NEW_DOMAIN_ID("new_domain_id","new_domain_id"),
    CREATE_NEW_COLUMN("createNewColumn","create_new_column");

    private String name;

    private String jsonName;

    ActionParamEnum(String pName, String pJsonName) {
        name = pName;
        jsonName = pJsonName;
    }

    /**
     * Get a corresponding {@link ActionParamEnum} from a {@link String}.
     *
     * @param pName the {@link ActionParamEnum#name}.
     * @return the corresponding {@link ActionParamEnum} or <code>null</code> if there isn't.
     */
    @Nullable
    public static ActionParamEnum getActionParamEnum(@NotNull String pName) {
        return Arrays.stream(ActionParamEnum.values()) //
                .filter(e -> e.name.equalsIgnoreCase(pName)) //
                .findFirst() //
                .orElse(null);
    }

    public String getName() {
        return name;
    }

    @JsonValue
    public String getJsonName() {
        return jsonName;<commit_msg>chore: fix integration tests<commit_after>package org.talend.dataprep.helper.api;

import java.util.Arrays;
import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * {@link Enum} representation of {@link Action} parameters types.
 */
public enum ActionParamEnum {
    FROM_PATTERN_MODE("fromPatternMode", "from_pattern_mode"),
    NEW_PATTERN("newPattern", "new_pattern"),
    SCOPE("scope", "scope"),
    COLUMN_NAME("columnName", "column_name"),
    COLUMN_ID("columnId", "column_id"),
    ROW_ID("rowId", "row_id"),
    LIMIT("limit", "limit"),
    SEPARATOR("separator", "separator"),
    MANUAL_SEPARATOR_STRING("manualSeparatorString", "manual_separator_string"),
    MANUAL_SEPARATOR_REGEX("manualSeparatorRegex", "manual_separator_regex"),
    FILTER("filter", "filter"),
    REGION_CODE("regionCode","region_code"),
    MODE("mode","mode"),
    FORMAT_TYPE("formatType","format_type"),
    OPERATOR("operator","operator"),
    OPERAND("operand","operand"),
    NEW_DOMAIN_LABEL,
    NEW_DOMAIN_FREQUENCY,
    NEW_DOMAIN_ID,
    SELECTED_COLUMN,
    MODE_NEW_COLUMN,
    CREATE_NEW_COLUMN_NAME,
    ORIGINAL_VALUE,
    NEW_VALUE,
    PADDING_CHARACTER,
    CUSTOM_PADDING_CHARACTER,
    MATCH_THRESHOLD,
    CREATE_NEW_COLUMN("createNewColumn","create_new_column");

    private String name;

    private String jsonName;

    ActionParamEnum(String pName, String pJsonName) {
        name = pName;
        jsonName = pJsonName;
    }

    ActionParamEnum(){
        name = jsonName = name().toLowerCase();
    }

    /**
     * Get a corresponding {@link ActionParamEnum} from a {@link String}.
     *
     * @param pName the {@link ActionParamEnum#name}.
     * @return the corresponding {@link ActionParamEnum} or <code>null</code> if there isn't.
     */
    @Nullable
    public static ActionParamEnum getActionParamEnum(@NotNull String pName) {
        return Arrays.stream(ActionParamEnum.values()) //
                .filter(e -> e.name.equalsIgnoreCase(pName)) //
                .findFirst() //
                .orElse(null);
    }

    public String getName() {
        return name;
    }

    @JsonValue
    public String getJsonName() {
        return jsonName;
{'fraction_non_alphanumeric': 0.13066037735849056, 'fraction_numerical': 0.0, 'mean_word_length': 3.650219298245614, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2656582', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1283, 'n_words': 240}