Package com.google.genai.types
Enum BlockedReason.Known
- All Implemented Interfaces:
Serializable,Comparable<BlockedReason.Known>
- Enclosing class:
- BlockedReason
Enum representing the known values for BlockedReason.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe blocked reason is unspecified.The prompt was blocked because it contains a term from the terminology blocklist.The prompt was blocked because it contains content that is unsafe for image generation.The prompt was blocked as a jailbreak attempt.The prompt was blocked by Model Armor.The prompt was blocked for other reasons.The prompt was blocked because it contains prohibited content.The prompt was blocked for safety reasons. -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockedReason.KnownReturns the enum constant of this type with the specified name.static BlockedReason.Known[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BLOCKED_REASON_UNSPECIFIED
The blocked reason is unspecified. -
SAFETY
The prompt was blocked for safety reasons. -
OTHER
The prompt was blocked for other reasons. For example, it may be due to the prompt's language, or because it contains other harmful content. -
BLOCKLIST
The prompt was blocked because it contains a term from the terminology blocklist. -
PROHIBITED_CONTENT
The prompt was blocked because it contains prohibited content. -
IMAGE_SAFETY
The prompt was blocked because it contains content that is unsafe for image generation. -
MODEL_ARMOR
The prompt was blocked by Model Armor. This enum value is not supported in Gemini API. -
JAILBREAK
The prompt was blocked as a jailbreak attempt. 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
-