Record Class OpenAiModerationApi.OpenAiModerationResult
java.lang.Object
java.lang.Record
org.springframework.ai.openai.api.OpenAiModerationApi.OpenAiModerationResult
- Enclosing class:
OpenAiModerationApi
public static record OpenAiModerationApi.OpenAiModerationResult(boolean flagged, OpenAiModerationApi.Categories categories, OpenAiModerationApi.CategoryScores categoryScores)
extends Record
- Author:
- Ahmed Yousri, Ilayaperumal Gopinathan, Filip Hrisafov
-
Constructor Summary
ConstructorsConstructorDescriptionOpenAiModerationResult(boolean flagged, OpenAiModerationApi.Categories categories, OpenAiModerationApi.CategoryScores categoryScores) Creates an instance of aOpenAiModerationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecategoriesrecord component.Returns the value of thecategoryScoresrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanflagged()Returns the value of theflaggedrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OpenAiModerationResult
public OpenAiModerationResult(boolean flagged, OpenAiModerationApi.Categories categories, OpenAiModerationApi.CategoryScores categoryScores) Creates an instance of aOpenAiModerationResultrecord class.- Parameters:
flagged- the value for theflaggedrecord componentcategories- the value for thecategoriesrecord componentcategoryScores- the value for thecategoryScoresrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
flagged
public boolean flagged()Returns the value of theflaggedrecord component.- Returns:
- the value of the
flaggedrecord component
-
categories
Returns the value of thecategoriesrecord component.- Returns:
- the value of the
categoriesrecord component
-
categoryScores
Returns the value of thecategoryScoresrecord component.- Returns:
- the value of the
categoryScoresrecord component
-