Class DpiMasking.Builder

java.lang.Object
com.sap.ai.sdk.orchestration.DpiMasking.Builder
Enclosing class:
DpiMasking

public static class DpiMasking.Builder extends Object
Builder for creating DPI masking configurations. Allows specifying which entity types should be masked in the input text.
  • Method Details

    • withEntities

      @Nonnull public DpiMasking withEntities(@Nonnull DPIEntities entity, @Nonnull DPIEntities... entities)
      Specifies which entities should be masked in the input text.
      Parameters:
      entity - an entity type to mask (required).
      entities - additional entity types to mask (optional).
      Returns:
      a new DpiMasking instance.
      See Also:
    • withRegex

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