java.lang.Object
com.google.genai.gaos.models.interactions.Threshold

public class Threshold extends Object
Threshold

Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked.

  • Field Details

    • BLOCK_LOW_AND_ABOVE

      public static final Threshold BLOCK_LOW_AND_ABOVE
    • BLOCK_MEDIUM_AND_ABOVE

      public static final Threshold BLOCK_MEDIUM_AND_ABOVE
    • BLOCK_ONLY_HIGH

      public static final Threshold BLOCK_ONLY_HIGH
    • BLOCK_NONE

      public static final Threshold BLOCK_NONE
    • OFF

      public static final Threshold OFF
  • Method Details

    • of

      public static Threshold of(String value)
      Returns a Threshold with the given value. For a specific value the returned object will always be a singleton so reference equality is satisfied when the values are the same.
      Parameters:
      value - value to be wrapped as Threshold
    • value

      public String value()
    • asEnum

    • isKnown

      public boolean isKnown()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • values

      public static Threshold[] values()