Known

public enum Known

Enum representing the known values for BlockedReason.

Entries

Link copied to clipboard

The blocked reason is unspecified.

Link copied to clipboard

The prompt was blocked for safety reasons.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

The prompt was blocked because it contains prohibited content.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Functions

Link copied to clipboard
public static BlockedReason.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.)

Link copied to clipboard
public static Array<BlockedReason.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.