Package com.google.genai.types
Enum HarmCategory.Known
- All Implemented Interfaces:
Serializable,Comparable<HarmCategory.Known>
- Enclosing class:
- HarmCategory
Enum representing the known values for HarmCategory.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDeprecated: Election filter is not longer supported.Content that promotes, facilitates, or enables dangerous activities.Abusive, threatening, or content intended to bully, torment, or ridicule.Content that promotes violence or incites hatred against individuals or groups based on certain attributes.Images that contain dangerous content.Images that contain harassment.Images that contain hate speech.Images that contain sexually explicit content.Prompts designed to bypass safety filters.Content that contains sexually explicit material.Default value. -
Method Summary
Modifier and TypeMethodDescriptionstatic HarmCategory.KnownReturns the enum constant of this type with the specified name.static HarmCategory.Known[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
HARM_CATEGORY_UNSPECIFIED
Default value. This value is unused. -
HARM_CATEGORY_HARASSMENT
Abusive, threatening, or content intended to bully, torment, or ridicule. -
HARM_CATEGORY_HATE_SPEECH
Content that promotes violence or incites hatred against individuals or groups based on certain attributes. -
HARM_CATEGORY_SEXUALLY_EXPLICIT
Content that contains sexually explicit material. -
HARM_CATEGORY_DANGEROUS_CONTENT
Content that promotes, facilitates, or enables dangerous activities. -
HARM_CATEGORY_CIVIC_INTEGRITY
Deprecated: Election filter is not longer supported. The harm category is civic integrity. -
HARM_CATEGORY_IMAGE_HATE
Images that contain hate speech. This enum value is not supported in Gemini API. -
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT
Images that contain dangerous content. This enum value is not supported in Gemini API. -
HARM_CATEGORY_IMAGE_HARASSMENT
Images that contain harassment. This enum value is not supported in Gemini API. -
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT
Images that contain sexually explicit content. This enum value is not supported in Gemini API. -
HARM_CATEGORY_JAILBREAK
Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-