public static Modality forNumber(int value) {
    switch (value) {
      case 0:
        return MODALITY_UNSPECIFIED;
      case 1:
        return TEXT;
      case 2:
        return IMAGE;
      case 3:
        return VIDEO;
      case 4:
        return AUDIO;
      case 5:
        return DOCUMENT;
      default:
        return null;
    }
  }
@param value The numeric wire value of the corresponding enum entry.
@return The enum associated with the given numeric wire value.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Modality.java