Package com.sap.ai.sdk.orchestration

# Class DpiMasking

java.lang.Object
com.sap.ai.sdk.orchestration.DpiMasking

All Implemented Interfaces:
  `MaskingProvider`

public final class DpiMasking extends Object implements MaskingProvider
SAP Data Privacy Integration (DPI) can mask personally identifiable information using either anonymization or pseudonymization.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `DpiMasking.Builder`
  Builder for creating DPI masking configurations.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DpiMasking.Builder`
  `anonymization()`
  Build a configuration applying anonymization.
  `DPIConfig`
  `createConfig()`
  Create a masking configuration.
  `boolean`
  `equals(Object o)`
  `int`
  `hashCode()`
  `static DpiMasking.Builder`
  `pseudonymization()`
  Build a configuration applying pseudonymization.
  `String`
  `toString()`
  `DpiMasking`
  `withAllowList(List<String> allowList)`
  Set words that should not be masked.
  `DpiMasking`
  `withMaskGroundingInput(boolean maskGroundingInput)`
  `DpiMasking`
  `withRegex(String regex, String replacement)`
  Specifies a custom regex pattern for masking.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### anonymization

    @Nonnull public static DpiMasking.Builder anonymization()
    Build a configuration applying anonymization.
    Returns:
      A builder configured for anonymization

  - ### pseudonymization

    @Nonnull public static DpiMasking.Builder pseudonymization()
    Build a configuration applying pseudonymization.
    Returns:
      A builder configured for pseudonymization

  - ### withRegex

    @Nonnull public DpiMasking withRegex(@Nonnull String regex, @Nonnull String replacement)
    Specifies a custom regex pattern for masking.
    Parameters:
      `regex` - The regex pattern to match
      `replacement` - The replacement string
    Returns:
      A new `DpiMasking` instance

  - ### withAllowList

    @Nonnull public DpiMasking withAllowList(@Nonnull List<String> allowList)
    Set words that should not be masked.
    Parameters:
      `allowList` - List of strings that should not be masked
    Returns:
      A new `DpiMasking` instance

  - ### createConfig

    @Nonnull public DPIConfig createConfig()
    Description copied from interface: `MaskingProvider`
    Create a masking configuration.
    Specified by:
      `createConfig` in interface `MaskingProvider`
    Returns:
      the masking configuration

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### withMaskGroundingInput

    public DpiMasking withMaskGroundingInput(boolean maskGroundingInput)
    Returns:
      a clone of this object, except with this updated property (returns `this` if an identical value is passed).