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

# Class ContentFilterChoiceResults

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

public class ContentFilterChoiceResults 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 third party text 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
  `ContentFilterChoiceResults()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `ContentFilterChoiceResults`
  `error(ErrorBase error)`
  Set the error of this `ContentFilterChoiceResults` 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 `ContentFilterChoiceResults`.
  `ErrorBase`
  `getError()`
  Get error
  `ContentFilterSeverityResult`
  `getHate()`
  Get hate
  `ContentFilterDetectedResult`
  `getProfanity()`
  Get profanity
  `ContentFilterDetectedWithCitationResult`
  `getProtectedMaterialCode()`
  Get protectedMaterialCode
  `ContentFilterDetectedResult`
  `getProtectedMaterialText()`
  Get protectedMaterialText
  `ContentFilterSeverityResult`
  `getSelfHarm()`
  Get selfHarm
  `ContentFilterSeverityResult`
  `getSexual()`
  Get sexual
  `ContentFilterSeverityResult`
  `getViolence()`
  Get violence
  `int`
  `hashCode()`
  `ContentFilterChoiceResults`
  `hate(ContentFilterSeverityResult hate)`
  Set the hate of this `ContentFilterChoiceResults` instance and return the same instance.
  `ContentFilterChoiceResults`
  `profanity(ContentFilterDetectedResult profanity)`
  Set the profanity of this `ContentFilterChoiceResults` instance and return the same instance.
  `ContentFilterChoiceResults`
  `protectedMaterialCode(ContentFilterDetectedWithCitationResult protectedMaterialCode)`
  Set the protectedMaterialCode of this `ContentFilterChoiceResults` instance and return the same instance.
  `ContentFilterChoiceResults`
  `protectedMaterialText(ContentFilterDetectedResult protectedMaterialText)`
  Set the protectedMaterialText of this `ContentFilterChoiceResults` instance and return the same instance.
  `ContentFilterChoiceResults`
  `selfHarm(ContentFilterSeverityResult selfHarm)`
  Set the selfHarm of this `ContentFilterChoiceResults` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `ContentFilterChoiceResults` instance.
  `void`
  `setError(ErrorBase error)`
  Set the error of this `ContentFilterChoiceResults` instance.
  `void`
  `setHate(ContentFilterSeverityResult hate)`
  Set the hate of this `ContentFilterChoiceResults` instance.
  `void`
  `setProfanity(ContentFilterDetectedResult profanity)`
  Set the profanity of this `ContentFilterChoiceResults` instance.
  `void`
  `setProtectedMaterialCode(ContentFilterDetectedWithCitationResult protectedMaterialCode)`
  Set the protectedMaterialCode of this `ContentFilterChoiceResults` instance.
  `void`
  `setProtectedMaterialText(ContentFilterDetectedResult protectedMaterialText)`
  Set the protectedMaterialText of this `ContentFilterChoiceResults` instance.
  `void`
  `setSelfHarm(ContentFilterSeverityResult selfHarm)`
  Set the selfHarm of this `ContentFilterChoiceResults` instance.
  `void`
  `setSexual(ContentFilterSeverityResult sexual)`
  Set the sexual of this `ContentFilterChoiceResults` instance.
  `void`
  `setViolence(ContentFilterSeverityResult violence)`
  Set the violence of this `ContentFilterChoiceResults` instance.
  `ContentFilterChoiceResults`
  `sexual(ContentFilterSeverityResult sexual)`
  Set the sexual of this `ContentFilterChoiceResults` instance and return the same instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `ContentFilterChoiceResults` instance including unrecognized properties.
  `String`
  `toString()`
  `ContentFilterChoiceResults`
  `violence(ContentFilterSeverityResult violence)`
  Set the violence of this `ContentFilterChoiceResults` instance and return the same instance.

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

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

- ## Constructor Details

  - ### ContentFilterChoiceResults

    public ContentFilterChoiceResults()

- ## Method Details

  - ### sexual

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

  - ### getSexual

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

  - ### setSexual

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

  - ### violence

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

  - ### getViolence

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

  - ### setViolence

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

  - ### hate

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

  - ### getHate

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

  - ### setHate

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

  - ### selfHarm

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

  - ### getSelfHarm

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

  - ### setSelfHarm

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

  - ### profanity

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

  - ### getProfanity

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

  - ### setProfanity

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

  - ### error

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

  - ### getError

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

  - ### setError

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

  - ### protectedMaterialText

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

  - ### getProtectedMaterialText

    @Nonnull public ContentFilterDetectedResult getProtectedMaterialText()
    Get protectedMaterialText
    Returns:
      protectedMaterialText The protectedMaterialText of this `ContentFilterChoiceResults` instance.

  - ### setProtectedMaterialText

    public void setProtectedMaterialText(@Nullable ContentFilterDetectedResult protectedMaterialText)
    Set the protectedMaterialText of this `ContentFilterChoiceResults` instance.
    Parameters:
      `protectedMaterialText` - The protectedMaterialText of this `ContentFilterChoiceResults`

  - ### protectedMaterialCode

    @Nonnull public ContentFilterChoiceResults protectedMaterialCode(@Nullable ContentFilterDetectedWithCitationResult protectedMaterialCode)
    Set the protectedMaterialCode of this `ContentFilterChoiceResults` instance and return the same instance.
    Parameters:
      `protectedMaterialCode` - The protectedMaterialCode of this `ContentFilterChoiceResults`
    Returns:
      The same instance of this `ContentFilterChoiceResults` class

  - ### getProtectedMaterialCode

    @Nonnull public ContentFilterDetectedWithCitationResult getProtectedMaterialCode()
    Get protectedMaterialCode
    Returns:
      protectedMaterialCode The protectedMaterialCode of this `ContentFilterChoiceResults` instance.

  - ### setProtectedMaterialCode

    public void setProtectedMaterialCode(@Nullable ContentFilterDetectedWithCitationResult protectedMaterialCode)
    Set the protectedMaterialCode of this `ContentFilterChoiceResults` instance.
    Parameters:
      `protectedMaterialCode` - The protectedMaterialCode of this `ContentFilterChoiceResults`

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `ContentFilterChoiceResults`.
    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 `ContentFilterChoiceResults` 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 `ContentFilterChoiceResults` 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 `ContentFilterChoiceResults` 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`