Enum BlockedReason.Known

  • All Implemented Interfaces:

    
    public enum BlockedReason.Known
    
                        

    Enum representing the known values for BlockedReason.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      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 Summary

      Modifier and Type Method Description
      static Array<BlockedReason.Known> values() Returns an array containing the constants of this enum type, in the order they're declared.
      static BlockedReason.Known valueOf(String name) Returns the enum constant of this type with the specified name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • values

         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.

        Returns:

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

      • valueOf

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

        Returns:

        the enum constant with the specified name