Class SubstitutionConfig

java.lang.Object
ai.nightfall.scan.model.redaction.SubstitutionConfig

public class SubstitutionConfig extends Object
An object that specifies how findings should be substituted when returned by the API. This is similar to masking, but allows for a custom phrase to be used rather than simply redacting each codepoint.
  • Constructor Details

    • SubstitutionConfig

      public SubstitutionConfig(String substitutionPhrase)
      Builds a substitution configuration with the provided phrase.
      Parameters:
      substitutionPhrase - a phrase to substitute for a finding.
  • Method Details

    • getSubstitutionPhrase

      public String getSubstitutionPhrase()
      Returns the substitution phrase.
      Returns:
      the substitution phrase.
    • setSubstitutionPhrase

      public void setSubstitutionPhrase(String substitutionPhrase)
      Sets the substitution phrase.
      Parameters:
      substitutionPhrase - the substitution phrase
    • toString

      public String toString()
      Overrides:
      toString in class Object