# BlockedReason

enum BlockedReason : Enum<BlockedReason>

The reason why the prompt was blocked.

## Entries

BLOCKED_REASON_UNSPECIFIED
Link copied to clipboard
BLOCKED_REASON_UNSPECIFIED

The blocked reason is unspecified.

SAFETY
Link copied to clipboard
SAFETY

The prompt was blocked for safety reasons.

OTHER
Link copied to clipboard
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
Link copied to clipboard
BLOCKLIST

The prompt was blocked because it contains a term from the terminology blocklist.

PROHIBITED_CONTENT
Link copied to clipboard
PROHIBITED_CONTENT

The prompt was blocked because it contains prohibited content.

IMAGE_SAFETY
Link copied to clipboard
IMAGE_SAFETY

The prompt was blocked because it contains content that is unsafe for image generation.

MODEL_ARMOR
Link copied to clipboard
MODEL_ARMOR

The prompt was blocked by Model Armor. This enum value is not supported in Gemini API.

JAILBREAK
Link copied to clipboard
JAILBREAK

The prompt was blocked as a jailbreak attempt. This enum value is not supported in Gemini API.

## Properties

entries
Link copied to clipboard
val entries: EnumEntries<BlockedReason>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int

## Functions

valueOf
Link copied to clipboard
fun valueOf(value: String): BlockedReason

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.)

values
Link copied to clipboard
fun values(): Array<BlockedReason>

Returns an array containing the constants of this enum type, in the order they're declared.