<commit_before>package extension.chartboost;

/**
    Enum for whether the user has given their consent for usage of their personal data.
    Note this enum needs updating whenever the Chartboost SDK is updated/changes or adds new consent states, else there's no guarantee that the mapping here is correct.
**/
@:enum abstract ChartboostConsent(Int) from Int to Int
{
	/* Publisher hasn't implemented functionality or the user has the option to not answer. */
	var UNKNOWN = -1;
	/* User does not consent to targeting (Contextual ads). */
	var NO_BEHAVIORAL = 0;
	/* User consents (Behavioral and Contextual Ads). */
	var YES_BEHAVIORAL = 1;
}<commit_msg>Add method for converting Chartboost ad personalization preference to string<commit_after>package extension.chartboost;

/**
    Enum for whether the user has given their consent for usage of their personal data.
    Note this enum needs updating whenever the Chartboost SDK is updated/changes or adds new consent states, else there's no guarantee that the mapping here is correct.
**/
@:enum abstract ChartboostConsent(Int) from Int to Int
{
	/* Publisher hasn't implemented functionality or the user has the option to not answer. */
	var UNKNOWN = -1;
	/* User does not consent to targeting (Contextual ads). */
	var NO_BEHAVIORAL = 0;
	/* User consents (Behavioral and Contextual Ads). */
	var YES_BEHAVIORAL = 1;
	
	@:to public static function toString(pref:Int):String {
		return switch(pref) {
			case UNKNOWN: "unknown";
			case NO_BEHAVIORAL: "no_behavioral";
			case YES_BEHAVIORAL: "yes_behavioral";
		case _: {
			trace ("Tried to stringify invalid Chartboost consent status, will return 'unknown' instead");
			"unknown";
		}
		};
	}
}
{'fraction_non_alphanumeric': 0.08049353701527615, 'fraction_numerical': 0.0035252643948296123, 'mean_word_length': 4.129518072289157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '4320217', 'n_tokens_mistral': 518, 'n_tokens_neox': 476, 'n_words': 211}