@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    getSerializedSize();
    for (int i = 0; i < tokens_.size(); i++) {
      output.writeBytes(1, tokens_.get(i));
    }
    if (getTokenIdsList().size() > 0) {
      output.writeUInt32NoTag(18);
      output.writeUInt32NoTag(tokenIdsMemoizedSerializedSize);
    }
    for (int i = 0; i < tokenIds_.size(); i++) {
      output.writeInt64NoTag(tokenIds_.getLong(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(role_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, role_);
    }
    getUnknownFields().writeTo(output);
  }
<pre>
Optional. Optional fields for the role from the corresponding Content.
</pre>

<code>string role = 3 [(.google.api.field_behavior) = OPTIONAL];</code>

@return The bytes for role.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfo.java