Class BetaResponse.Moderation.Input.ModerationResult
-
- All Implemented Interfaces:
public final class BetaResponse.Moderation.Input.ModerationResultA moderation result produced for the response input or output.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaResponse.Moderation.Input.ModerationResult.BuilderA builder for ModerationResult.
public final classBetaResponse.Moderation.Input.ModerationResult.CategoriesA dictionary of moderation categories to booleans, True if the input is flagged under this category.
public final classBetaResponse.Moderation.Input.ModerationResult.CategoryAppliedInputTypesWhich modalities of input are reflected by the score for each category.
public final classBetaResponse.Moderation.Input.ModerationResult.CategoryScoresA dictionary of moderation categories to scores.
-
Method Summary
Modifier and Type Method Description final BetaResponse.Moderation.Input.ModerationResult.Categoriescategories()A dictionary of moderation categories to booleans, True if the input is flagged under this category. final BetaResponse.Moderation.Input.ModerationResult.CategoryAppliedInputTypescategoryAppliedInputTypes()Which modalities of input are reflected by the score for each category. final BetaResponse.Moderation.Input.ModerationResult.CategoryScorescategoryScores()A dictionary of moderation categories to scores. final Booleanflagged()A boolean indicating whether the content was flagged by any category. final Stringmodel()The moderation model that produced this result. final JsonValue_type()The object type, which was always moderation_resultfor successful moderation results.final JsonField<BetaResponse.Moderation.Input.ModerationResult.Categories>_categories()Returns the raw JSON value of categories. final JsonField<BetaResponse.Moderation.Input.ModerationResult.CategoryAppliedInputTypes>_categoryAppliedInputTypes()Returns the raw JSON value of categoryAppliedInputTypes. final JsonField<BetaResponse.Moderation.Input.ModerationResult.CategoryScores>_categoryScores()Returns the raw JSON value of categoryScores. final JsonField<Boolean>_flagged()Returns the raw JSON value of flagged. final JsonField<String>_model()Returns the raw JSON value of model. final Map<String, JsonValue>_additionalProperties()final BetaResponse.Moderation.Input.ModerationResult.BuildertoBuilder()final BetaResponse.Moderation.Input.ModerationResultvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaResponse.Moderation.Input.ModerationResult.Builderbuilder()Returns a mutable builder for constructing an instance of ModerationResult. -
-
Method Detail
-
categories
final BetaResponse.Moderation.Input.ModerationResult.Categories categories()
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
-
categoryAppliedInputTypes
final BetaResponse.Moderation.Input.ModerationResult.CategoryAppliedInputTypes categoryAppliedInputTypes()
Which modalities of input are reflected by the score for each category.
-
categoryScores
final BetaResponse.Moderation.Input.ModerationResult.CategoryScores categoryScores()
A dictionary of moderation categories to scores.
-
flagged
final Boolean flagged()
A boolean indicating whether the content was flagged by any category.
-
_type
final JsonValue _type()
The object type, which was always
moderation_resultfor successful moderation results.Expected to always return the following:
JsonValue.from("moderation_result")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_categories
final JsonField<BetaResponse.Moderation.Input.ModerationResult.Categories> _categories()
Returns the raw JSON value of categories.
Unlike categories, this method doesn't throw if the JSON field has an unexpected type.
-
_categoryAppliedInputTypes
final JsonField<BetaResponse.Moderation.Input.ModerationResult.CategoryAppliedInputTypes> _categoryAppliedInputTypes()
Returns the raw JSON value of categoryAppliedInputTypes.
Unlike categoryAppliedInputTypes, this method doesn't throw if the JSON field has an unexpected type.
-
_categoryScores
final JsonField<BetaResponse.Moderation.Input.ModerationResult.CategoryScores> _categoryScores()
Returns the raw JSON value of categoryScores.
Unlike categoryScores, this method doesn't throw if the JSON field has an unexpected type.
-
_flagged
final JsonField<Boolean> _flagged()
Returns the raw JSON value of flagged.
Unlike flagged, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<String> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaResponse.Moderation.Input.ModerationResult.Builder toBuilder()
-
validate
final BetaResponse.Moderation.Input.ModerationResult validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaResponse.Moderation.Input.ModerationResult.Builder builder()
Returns a mutable builder for constructing an instance of ModerationResult.
The following fields are required:
.categories() .categoryAppliedInputTypes() .categoryScores() .flagged() .model()
-
-
-
-