Package dev.agenor.runtime.guardrail
Enum Class PiiRedactionGuardrail.PiiType
java.lang.Object
java.lang.Enum<PiiRedactionGuardrail.PiiType>
dev.agenor.runtime.guardrail.PiiRedactionGuardrail.PiiType
- All Implemented Interfaces:
Serializable,Comparable<PiiRedactionGuardrail.PiiType>,Constable
- Enclosing class:
PiiRedactionGuardrail
Enumeration of supported PII categories.
Each entry encapsulates the compiled
Pattern for that category.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionItalian Codice Fiscale (fiscal code). 6 alpha + 2 digits + 1 alpha + 2 digits + 1 alpha + 3 digits + 1 alpha (16 chars total).Credit/debit card numbers (13–19 digits, optionally separated by spaces or dashes).Standard e-mail addresses.IBAN (International Bank Account Number). 2-letter country code + 2 check digits + up to 30 alphanumeric chars.Italian mobile phone numbers. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static PiiRedactionGuardrail.PiiType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EMAIL
Standard e-mail addresses. Multi-label domains supported (user@a.b.example.com). No leading \b: the local-part can start after a non-word char (e.g. a dot). -
PHONE_IT
Italian mobile phone numbers. Covers formats: +393xxxxxxxx, +39 3xx xxxxxxx, 3xx.xxxxxxx, 3xxxxxxxxx, etc. Uses negative lookbehind(?<!\d)instead of\bso that the optional +39 prefix (which starts with a non-word char) is also captured correctly. -
CODICE_FISCALE
Italian Codice Fiscale (fiscal code). 6 alpha + 2 digits + 1 alpha + 2 digits + 1 alpha + 3 digits + 1 alpha (16 chars total). -
IBAN
IBAN (International Bank Account Number). 2-letter country code + 2 check digits + up to 30 alphanumeric chars. -
CREDIT_CARD
Credit/debit card numbers (13–19 digits, optionally separated by spaces or dashes). Matches Luhn-compatible length ranges used by major card networks.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-