public final GenerateContentResponse generateContent(String model, List<Content> contents) {
    GenerateContentRequest request =
        GenerateContentRequest.newBuilder().setModel(model).addAllContents(contents).build();
    return generateContent(request);
  }
Generate content with multimodal inputs.

<p>Sample code:

<pre>{@code
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
  String model = "model104069929";
  List<Content> contents = new ArrayList<>();
  GenerateContentResponse response = predictionServiceClient.generateContent(model, contents);
}
}</pre>

@param model Required. The fully qualified name of the publisher model or tuned model endpoint
    to use.
    <p>Publisher model format:
    `projects/{project}/locations/{location}/publishers/&#42;/models/&#42;`
    <p>Tuned model endpoint format:
    `projects/{project}/locations/{location}/endpoints/{endpoint}`
@param contents Required. The content of the current conversation with the model.
    <p>For single-turn queries, this is a single instance. For multi-turn queries, this is a
    repeated field that contains conversation history + latest request.
@throws com.google.api.gax.rpc.ApiException if the remote call fails
java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceClient.java