Package com.sap.ai.sdk.foundationmodels.openai.generated.model

# Class ContentFilterPromptResults

java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.ContentFilterPromptResults

public class ContentFilterPromptResults extends Object
Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about jailbreak content and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContentFilterPromptResults()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `ContentFilterPromptResults`
  `error(ErrorBase error)`
  Set the error of this `ContentFilterPromptResults` instance and return the same instance.
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `ContentFilterPromptResults`.
  `ErrorBase`
  `getError()`
  Get error
  `ContentFilterSeverityResult`
  `getHate()`
  Get hate
  `ContentFilterDetectedResult`
  `getJailbreak()`
  Get jailbreak
  `ContentFilterDetectedResult`
  `getProfanity()`
  Get profanity
  `ContentFilterSeverityResult`
  `getSelfHarm()`
  Get selfHarm
  `ContentFilterSeverityResult`
  `getSexual()`
  Get sexual
  `ContentFilterSeverityResult`
  `getViolence()`
  Get violence
  `int`
  `hashCode()`
  `ContentFilterPromptResults`
  `hate(ContentFilterSeverityResult hate)`
  Set the hate of this `ContentFilterPromptResults` instance and return the same instance.
  `ContentFilterPromptResults`
  `jailbreak(ContentFilterDetectedResult jailbreak)`
  Set the jailbreak of this `ContentFilterPromptResults` instance and return the same instance.
  `ContentFilterPromptResults`
  `profanity(ContentFilterDetectedResult profanity)`
  Set the profanity of this `ContentFilterPromptResults` instance and return the same instance.
  `ContentFilterPromptResults`
  `selfHarm(ContentFilterSeverityResult selfHarm)`
  Set the selfHarm of this `ContentFilterPromptResults` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `ContentFilterPromptResults` instance.
  `void`
  `setError(ErrorBase error)`
  Set the error of this `ContentFilterPromptResults` instance.
  `void`
  `setHate(ContentFilterSeverityResult hate)`
  Set the hate of this `ContentFilterPromptResults` instance.
  `void`
  `setJailbreak(ContentFilterDetectedResult jailbreak)`
  Set the jailbreak of this `ContentFilterPromptResults` instance.
  `void`
  `setProfanity(ContentFilterDetectedResult profanity)`
  Set the profanity of this `ContentFilterPromptResults` instance.
  `void`
  `setSelfHarm(ContentFilterSeverityResult selfHarm)`
  Set the selfHarm of this `ContentFilterPromptResults` instance.
  `void`
  `setSexual(ContentFilterSeverityResult sexual)`
  Set the sexual of this `ContentFilterPromptResults` instance.
  `void`
  `setViolence(ContentFilterSeverityResult violence)`
  Set the violence of this `ContentFilterPromptResults` instance.
  `ContentFilterPromptResults`
  `sexual(ContentFilterSeverityResult sexual)`
  Set the sexual of this `ContentFilterPromptResults` instance and return the same instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `ContentFilterPromptResults` instance including unrecognized properties.
  `String`
  `toString()`
  `ContentFilterPromptResults`
  `violence(ContentFilterSeverityResult violence)`
  Set the violence of this `ContentFilterPromptResults` instance and return the same instance.

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

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

- ## Constructor Details

  - ### ContentFilterPromptResults

    public ContentFilterPromptResults()

- ## Method Details

  - ### sexual

    @Nonnull public ContentFilterPromptResults sexual(@Nullable ContentFilterSeverityResult sexual)
    Set the sexual of this `ContentFilterPromptResults` instance and return the same instance.
    Parameters:
      `sexual` - The sexual of this `ContentFilterPromptResults`
    Returns:
      The same instance of this `ContentFilterPromptResults` class

  - ### getSexual

    @Nonnull public ContentFilterSeverityResult getSexual()
    Get sexual
    Returns:
      sexual The sexual of this `ContentFilterPromptResults` instance.

  - ### setSexual

    public void setSexual(@Nullable ContentFilterSeverityResult sexual)
    Set the sexual of this `ContentFilterPromptResults` instance.
    Parameters:
      `sexual` - The sexual of this `ContentFilterPromptResults`

  - ### violence

    @Nonnull public ContentFilterPromptResults violence(@Nullable ContentFilterSeverityResult violence)
    Set the violence of this `ContentFilterPromptResults` instance and return the same instance.
    Parameters:
      `violence` - The violence of this `ContentFilterPromptResults`
    Returns:
      The same instance of this `ContentFilterPromptResults` class

  - ### getViolence

    @Nonnull public ContentFilterSeverityResult getViolence()
    Get violence
    Returns:
      violence The violence of this `ContentFilterPromptResults` instance.

  - ### setViolence

    public void setViolence(@Nullable ContentFilterSeverityResult violence)
    Set the violence of this `ContentFilterPromptResults` instance.
    Parameters:
      `violence` - The violence of this `ContentFilterPromptResults`

  - ### hate

    @Nonnull public ContentFilterPromptResults hate(@Nullable ContentFilterSeverityResult hate)
    Set the hate of this `ContentFilterPromptResults` instance and return the same instance.
    Parameters:
      `hate` - The hate of this `ContentFilterPromptResults`
    Returns:
      The same instance of this `ContentFilterPromptResults` class

  - ### getHate

    @Nonnull public ContentFilterSeverityResult getHate()
    Get hate
    Returns:
      hate The hate of this `ContentFilterPromptResults` instance.

  - ### setHate

    public void setHate(@Nullable ContentFilterSeverityResult hate)
    Set the hate of this `ContentFilterPromptResults` instance.
    Parameters:
      `hate` - The hate of this `ContentFilterPromptResults`

  - ### selfHarm

    @Nonnull public ContentFilterPromptResults selfHarm(@Nullable ContentFilterSeverityResult selfHarm)
    Set the selfHarm of this `ContentFilterPromptResults` instance and return the same instance.
    Parameters:
      `selfHarm` - The selfHarm of this `ContentFilterPromptResults`
    Returns:
      The same instance of this `ContentFilterPromptResults` class

  - ### getSelfHarm

    @Nonnull public ContentFilterSeverityResult getSelfHarm()
    Get selfHarm
    Returns:
      selfHarm The selfHarm of this `ContentFilterPromptResults` instance.

  - ### setSelfHarm

    public void setSelfHarm(@Nullable ContentFilterSeverityResult selfHarm)
    Set the selfHarm of this `ContentFilterPromptResults` instance.
    Parameters:
      `selfHarm` - The selfHarm of this `ContentFilterPromptResults`

  - ### profanity

    @Nonnull public ContentFilterPromptResults profanity(@Nullable ContentFilterDetectedResult profanity)
    Set the profanity of this `ContentFilterPromptResults` instance and return the same instance.
    Parameters:
      `profanity` - The profanity of this `ContentFilterPromptResults`
    Returns:
      The same instance of this `ContentFilterPromptResults` class

  - ### getProfanity

    @Nonnull public ContentFilterDetectedResult getProfanity()
    Get profanity
    Returns:
      profanity The profanity of this `ContentFilterPromptResults` instance.

  - ### setProfanity

    public void setProfanity(@Nullable ContentFilterDetectedResult profanity)
    Set the profanity of this `ContentFilterPromptResults` instance.
    Parameters:
      `profanity` - The profanity of this `ContentFilterPromptResults`

  - ### error

    @Nonnull public ContentFilterPromptResults error(@Nullable ErrorBase error)
    Set the error of this `ContentFilterPromptResults` instance and return the same instance.
    Parameters:
      `error` - The error of this `ContentFilterPromptResults`
    Returns:
      The same instance of this `ContentFilterPromptResults` class

  - ### getError

    @Nonnull public ErrorBase getError()
    Get error
    Returns:
      error The error of this `ContentFilterPromptResults` instance.

  - ### setError

    public void setError(@Nullable ErrorBase error)
    Set the error of this `ContentFilterPromptResults` instance.
    Parameters:
      `error` - The error of this `ContentFilterPromptResults`

  - ### jailbreak

    @Nonnull public ContentFilterPromptResults jailbreak(@Nullable ContentFilterDetectedResult jailbreak)
    Set the jailbreak of this `ContentFilterPromptResults` instance and return the same instance.
    Parameters:
      `jailbreak` - The jailbreak of this `ContentFilterPromptResults`
    Returns:
      The same instance of this `ContentFilterPromptResults` class

  - ### getJailbreak

    @Nonnull public ContentFilterDetectedResult getJailbreak()
    Get jailbreak
    Returns:
      jailbreak The jailbreak of this `ContentFilterPromptResults` instance.

  - ### setJailbreak

    public void setJailbreak(@Nullable ContentFilterDetectedResult jailbreak)
    Set the jailbreak of this `ContentFilterPromptResults` instance.
    Parameters:
      `jailbreak` - The jailbreak of this `ContentFilterPromptResults`

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `ContentFilterPromptResults`.
    Returns:
      The set of properties names

  - ### getCustomField

    @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
    Deprecated.
    Use `toMap()` instead.
    Get the value of an unrecognizable property of this `ContentFilterPromptResults` instance.
    Parameters:
      `name` - The name of the property
    Returns:
      The value of the property
    Throws:
      `NoSuchElementException` - If no property with the given name could be found.

  - ### toMap

    @Nonnull public Map<String,Object> toMap()
    Get the value of all properties of this `ContentFilterPromptResults` instance including unrecognized properties.
    Returns:
      The map of all properties

  - ### setCustomField

    public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
    Set an unrecognizable property of this `ContentFilterPromptResults` instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
    Parameters:
      `customFieldName` - The name of the property
      `customFieldValue` - The value of the property

  - ### equals

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

  - ### hashCode

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

  - ### toString

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