Enum BlockedReason.Known

java.lang.Object
java.lang.Enum<BlockedReason.Known>
com.google.genai.types.BlockedReason.Known
All Implemented Interfaces:
Serializable, Comparable<BlockedReason.Known>
Enclosing class:
BlockedReason

public static enum BlockedReason.Known extends Enum<BlockedReason.Known>
Enum representing the known values for BlockedReason.
  • Enum Constant Details

    • BLOCKED_REASON_UNSPECIFIED

      public static final BlockedReason.Known BLOCKED_REASON_UNSPECIFIED
      The blocked reason is unspecified.
    • SAFETY

      public static final BlockedReason.Known SAFETY
      The prompt was blocked for safety reasons.
    • OTHER

      public static final BlockedReason.Known 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

      public static final BlockedReason.Known BLOCKLIST
      The prompt was blocked because it contains a term from the terminology blocklist.
    • PROHIBITED_CONTENT

      public static final BlockedReason.Known PROHIBITED_CONTENT
      The prompt was blocked because it contains prohibited content.
    • IMAGE_SAFETY

      public static final BlockedReason.Known IMAGE_SAFETY
      The prompt was blocked because it contains content that is unsafe for image generation.
    • MODEL_ARMOR

      public static final BlockedReason.Known MODEL_ARMOR
      The prompt was blocked by Model Armor. This enum value is not supported in Gemini API.
    • JAILBREAK

      public static final BlockedReason.Known JAILBREAK
      The prompt was blocked as a jailbreak attempt. This enum value is not supported in Gemini API.
  • Method Details

    • values

      public static BlockedReason.Known[] 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

      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.)
      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 name
      NullPointerException - if the argument is null