@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    for (int i = 0; i < contents_.size(); i++) {
      output.writeMessage(2, contents_.get(i));
    }
    for (int i = 0; i < safetySettings_.size(); i++) {
      output.writeMessage(3, safetySettings_.get(i));
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeMessage(4, getGenerationConfig());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, model_);
    }
    for (int i = 0; i < tools_.size(); i++) {
      output.writeMessage(6, tools_.get(i));
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(7, getToolConfig());
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(8, getSystemInstruction());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cachedContent_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, cachedContent_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 10);
    getUnknownFields().writeTo(output);
  }
<pre>
Optional. Generation config.
</pre>

<code>
.google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
</code>
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequest.java