HarmCategory enum

The category of a rating.

These categories cover various kinds of harms that developers may wish to adjust.

Some categories from the rest API are excluded because they are not used by the Gemini generative models.

Inheritance

Constructors

HarmCategory()
const

Values

unspecified → const HarmCategory
harassment → const HarmCategory

Malicious, intimidating, bullying, or abusive comments targeting another individual.

hateSpeech → const HarmCategory

Negative or harmful comments targeting identity and/or protected attributes.

sexuallyExplicit → const HarmCategory

Contains references to sexual acts or other lewd content.

dangerousContent → const HarmCategory

Promotes or enables access to harmful goods, services, and activities.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<HarmCategory>
A constant List of the values in this enum, in order of their declaration.