private static void addParameterToParametersBuilder(
      Schema.Builder parametersBuilder, String parameterName, Class<?> parameterType) {
    Schema.Builder parameterBuilder = Schema.newBuilder().setDescription(parameterName);
    switch (parameterType.getName()) {
      case "java.lang.String":
        parameterBuilder.setType(Type.STRING);
        break;
      case "boolean":
        parameterBuilder.setType(Type.BOOLEAN);
        break;
      case "int":
        parameterBuilder.setType(Type.INTEGER);
        break;
      case "double":
      case "float":
        parameterBuilder.setType(Type.NUMBER);
        break;
      default:
        throw new IllegalArgumentException(
            "Unsupported parameter type "
                + parameterType.getName()
                + " for parameter "
                + parameterName);
    }
    parametersBuilder
        .addRequired(parameterName)
        .putProperties(parameterName, parameterBuilder.build());
  }
Adds a parameter to the parameters builder.
java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/FunctionDeclarationMaker.java