Enum HarmCategory.Known
-
- All Implemented Interfaces:
public enum HarmCategory.KnownEnum representing the known values for HarmCategory.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HARM_CATEGORY_UNSPECIFIEDDefault value. This value is unused.
HARM_CATEGORY_HARASSMENTAbusive, threatening, or content intended to bully, torment, or ridicule.
HARM_CATEGORY_HATE_SPEECHContent that promotes violence or incites hatred against individuals or groups based on certain attributes.
HARM_CATEGORY_SEXUALLY_EXPLICITContent that contains sexually explicit material.
HARM_CATEGORY_DANGEROUS_CONTENTContent that promotes, facilitates, or enables dangerous activities.
HARM_CATEGORY_CIVIC_INTEGRITYDeprecated: Election filter is not longer supported. The harm category is civic integrity.
HARM_CATEGORY_IMAGE_HATEImages that contain hate speech. This enum value is not supported in Gemini API.
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENTImages that contain dangerous content. This enum value is not supported in Gemini API.
HARM_CATEGORY_IMAGE_HARASSMENTImages that contain harassment. This enum value is not supported in Gemini API.
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICITImages that contain sexually explicit content. This enum value is not supported in Gemini API.
HARM_CATEGORY_JAILBREAKPrompts designed to bypass safety filters. This enum value is not supported in Gemini API.
-
Method Summary
Modifier and Type Method Description static Array<HarmCategory.Known>values()Returns an array containing the constants of this enum type, in the order they're declared. static HarmCategory.KnownvalueOf(String name)Returns the enum constant of this type with the specified name. -
-
Method Detail
-
values
static Array<HarmCategory.Known> values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.
- Returns:
an array containing the constants of this enum type, in the order they're declared
-
valueOf
static HarmCategory.Known valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
- Returns:
the enum constant with the specified name
-
-
-
-