@java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (promptTokenCount_ != 0) {
        output.writeInt32(1, promptTokenCount_);
      }
      if (candidatesTokenCount_ != 0) {
        output.writeInt32(2, candidatesTokenCount_);
      }
      if (totalTokenCount_ != 0) {
        output.writeInt32(3, totalTokenCount_);
      }
      if (cachedContentTokenCount_ != 0) {
        output.writeInt32(5, cachedContentTokenCount_);
      }
      for (int i = 0; i < promptTokensDetails_.size(); i++) {
        output.writeMessage(9, promptTokensDetails_.get(i));
      }
      for (int i = 0; i < cacheTokensDetails_.size(); i++) {
        output.writeMessage(10, cacheTokensDetails_.get(i));
      }
      for (int i = 0; i < candidatesTokensDetails_.size(); i++) {
        output.writeMessage(11, candidatesTokensDetails_.get(i));
      }
      getUnknownFields().writeTo(output);
    }
<pre>
Output only. List of modalities that were returned in the response.
</pre>

<code>
repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
</code>
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponse.java