Package com.sap.ai.sdk.orchestration
Class DpiMasking
java.lang.Object
com.sap.ai.sdk.orchestration.DpiMasking
- All Implemented Interfaces:
MaskingProvider
SAP Data Privacy Integration (DPI) can mask personally identifiable information using either
anonymization or pseudonymization.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for creating DPI masking configurations. -
Method Summary
Modifier and TypeMethodDescriptionstatic DpiMasking.BuilderBuild a configuration applying anonymization.Create a masking configuration.booleaninthashCode()static DpiMasking.BuilderBuild a configuration applying pseudonymization.toString()withAllowList(List<String> allowList) Set words that should not be masked.withMaskGroundingInput(boolean maskGroundingInput) Specifies a custom regex pattern for masking.
-
Method Details
-
anonymization
Build a configuration applying anonymization.- Returns:
- A builder configured for anonymization
-
pseudonymization
Build a configuration applying pseudonymization.- Returns:
- A builder configured for pseudonymization
-
withRegex
Specifies a custom regex pattern for masking.- Parameters:
regex- The regex pattern to matchreplacement- The replacement string- Returns:
- A new
DpiMaskinginstance
-
withAllowList
Set words that should not be masked.- Parameters:
allowList- List of strings that should not be masked- Returns:
- A new
DpiMaskinginstance
-
createConfig
Description copied from interface:MaskingProviderCreate a masking configuration.- Specified by:
createConfigin interfaceMaskingProvider- Returns:
- the masking configuration
-
equals
-
hashCode
public int hashCode() -
toString
-
withMaskGroundingInput
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-