java.lang.Object
com.google.genai.gaos.models.voices.Pitch

public class Pitch extends Object
Wrapper for an "open" enum that can handle unknown values from API responses without runtime errors. Instances are immutable singletons with reference equality. Use asEnum() for switch expressions.
  • Field Details

    • LOW

      public static final Pitch LOW
    • MEDIUM

      public static final Pitch MEDIUM
    • HIGH

      public static final Pitch HIGH
  • Method Details

    • of

      public static Pitch of(String value)
      Returns a Pitch 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 Pitch
    • value

      public String value()
    • asEnum

      public Optional<Pitch.PitchEnum> 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 Pitch[] values()