Class ContentFilterChoiceResults
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.ContentFilterChoiceResults
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanSet the error of thisContentFilterChoiceResultsinstance and return the same instance.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theContentFilterChoiceResults.getError()Get errorgetHate()Get hateGet profanityGet protectedMaterialCodeGet protectedMaterialTextGet selfHarmGet sexualGet violenceinthashCode()Set the hate of thisContentFilterChoiceResultsinstance and return the same instance.profanity(ContentFilterDetectedResult profanity) Set the profanity of thisContentFilterChoiceResultsinstance and return the same instance.protectedMaterialCode(ContentFilterDetectedWithCitationResult protectedMaterialCode) Set the protectedMaterialCode of thisContentFilterChoiceResultsinstance and return the same instance.protectedMaterialText(ContentFilterDetectedResult protectedMaterialText) Set the protectedMaterialText of thisContentFilterChoiceResultsinstance and return the same instance.selfHarm(ContentFilterSeverityResult selfHarm) Set the selfHarm of thisContentFilterChoiceResultsinstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisContentFilterChoiceResultsinstance.voidSet the error of thisContentFilterChoiceResultsinstance.voidSet the hate of thisContentFilterChoiceResultsinstance.voidsetProfanity(ContentFilterDetectedResult profanity) Set the profanity of thisContentFilterChoiceResultsinstance.voidsetProtectedMaterialCode(ContentFilterDetectedWithCitationResult protectedMaterialCode) Set the protectedMaterialCode of thisContentFilterChoiceResultsinstance.voidsetProtectedMaterialText(ContentFilterDetectedResult protectedMaterialText) Set the protectedMaterialText of thisContentFilterChoiceResultsinstance.voidsetSelfHarm(ContentFilterSeverityResult selfHarm) Set the selfHarm of thisContentFilterChoiceResultsinstance.voidsetSexual(ContentFilterSeverityResult sexual) Set the sexual of thisContentFilterChoiceResultsinstance.voidsetViolence(ContentFilterSeverityResult violence) Set the violence of thisContentFilterChoiceResultsinstance.sexual(ContentFilterSeverityResult sexual) Set the sexual of thisContentFilterChoiceResultsinstance and return the same instance.toMap()Get the value of all properties of thisContentFilterChoiceResultsinstance including unrecognized properties.toString()violence(ContentFilterSeverityResult violence) Set the violence of thisContentFilterChoiceResultsinstance and return the same instance.
-
Constructor Details
-
ContentFilterChoiceResults
public ContentFilterChoiceResults()
-
-
Method Details
-
sexual
Set the sexual of thisContentFilterChoiceResultsinstance and return the same instance.- Parameters:
sexual- The sexual of thisContentFilterChoiceResults- Returns:
- The same instance of this
ContentFilterChoiceResultsclass
-
getSexual
Get sexual- Returns:
- sexual The sexual of this
ContentFilterChoiceResultsinstance.
-
setSexual
Set the sexual of thisContentFilterChoiceResultsinstance.- Parameters:
sexual- The sexual of thisContentFilterChoiceResults
-
violence
Set the violence of thisContentFilterChoiceResultsinstance and return the same instance.- Parameters:
violence- The violence of thisContentFilterChoiceResults- Returns:
- The same instance of this
ContentFilterChoiceResultsclass
-
getViolence
Get violence- Returns:
- violence The violence of this
ContentFilterChoiceResultsinstance.
-
setViolence
Set the violence of thisContentFilterChoiceResultsinstance.- Parameters:
violence- The violence of thisContentFilterChoiceResults
-
hate
Set the hate of thisContentFilterChoiceResultsinstance and return the same instance.- Parameters:
hate- The hate of thisContentFilterChoiceResults- Returns:
- The same instance of this
ContentFilterChoiceResultsclass
-
getHate
Get hate- Returns:
- hate The hate of this
ContentFilterChoiceResultsinstance.
-
setHate
Set the hate of thisContentFilterChoiceResultsinstance.- Parameters:
hate- The hate of thisContentFilterChoiceResults
-
selfHarm
Set the selfHarm of thisContentFilterChoiceResultsinstance and return the same instance.- Parameters:
selfHarm- The selfHarm of thisContentFilterChoiceResults- Returns:
- The same instance of this
ContentFilterChoiceResultsclass
-
getSelfHarm
Get selfHarm- Returns:
- selfHarm The selfHarm of this
ContentFilterChoiceResultsinstance.
-
setSelfHarm
Set the selfHarm of thisContentFilterChoiceResultsinstance.- Parameters:
selfHarm- The selfHarm of thisContentFilterChoiceResults
-
profanity
@Nonnull public ContentFilterChoiceResults profanity(@Nullable ContentFilterDetectedResult profanity) Set the profanity of thisContentFilterChoiceResultsinstance and return the same instance.- Parameters:
profanity- The profanity of thisContentFilterChoiceResults- Returns:
- The same instance of this
ContentFilterChoiceResultsclass
-
getProfanity
Get profanity- Returns:
- profanity The profanity of this
ContentFilterChoiceResultsinstance.
-
setProfanity
Set the profanity of thisContentFilterChoiceResultsinstance.- Parameters:
profanity- The profanity of thisContentFilterChoiceResults
-
error
Set the error of thisContentFilterChoiceResultsinstance and return the same instance.- Parameters:
error- The error of thisContentFilterChoiceResults- Returns:
- The same instance of this
ContentFilterChoiceResultsclass
-
getError
Get error- Returns:
- error The error of this
ContentFilterChoiceResultsinstance.
-
setError
Set the error of thisContentFilterChoiceResultsinstance.- Parameters:
error- The error of thisContentFilterChoiceResults
-
protectedMaterialText
@Nonnull public ContentFilterChoiceResults protectedMaterialText(@Nullable ContentFilterDetectedResult protectedMaterialText) Set the protectedMaterialText of thisContentFilterChoiceResultsinstance and return the same instance.- Parameters:
protectedMaterialText- The protectedMaterialText of thisContentFilterChoiceResults- Returns:
- The same instance of this
ContentFilterChoiceResultsclass
-
getProtectedMaterialText
Get protectedMaterialText- Returns:
- protectedMaterialText The protectedMaterialText of this
ContentFilterChoiceResultsinstance.
-
setProtectedMaterialText
Set the protectedMaterialText of thisContentFilterChoiceResultsinstance.- Parameters:
protectedMaterialText- The protectedMaterialText of thisContentFilterChoiceResults
-
protectedMaterialCode
@Nonnull public ContentFilterChoiceResults protectedMaterialCode(@Nullable ContentFilterDetectedWithCitationResult protectedMaterialCode) Set the protectedMaterialCode of thisContentFilterChoiceResultsinstance and return the same instance.- Parameters:
protectedMaterialCode- The protectedMaterialCode of thisContentFilterChoiceResults- Returns:
- The same instance of this
ContentFilterChoiceResultsclass
-
getProtectedMaterialCode
Get protectedMaterialCode- Returns:
- protectedMaterialCode The protectedMaterialCode of this
ContentFilterChoiceResultsinstance.
-
setProtectedMaterialCode
public void setProtectedMaterialCode(@Nullable ContentFilterDetectedWithCitationResult protectedMaterialCode) Set the protectedMaterialCode of thisContentFilterChoiceResultsinstance.- Parameters:
protectedMaterialCode- The protectedMaterialCode of thisContentFilterChoiceResults
-
getCustomFieldNames
Get the names of the unrecognizable properties of theContentFilterChoiceResults.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisContentFilterChoiceResultsinstance.- 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
Get the value of all properties of thisContentFilterChoiceResultsinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisContentFilterChoiceResultsinstance. 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 propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
toMap()instead.