@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    getSerializedSize();
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(1, getSegment());
    }
    if (getGroundingChunkIndicesList().size() > 0) {
      output.writeUInt32NoTag(18);
      output.writeUInt32NoTag(groundingChunkIndicesMemoizedSerializedSize);
    }
    for (int i = 0; i < groundingChunkIndices_.size(); i++) {
      output.writeInt32NoTag(groundingChunkIndices_.getInt(i));
    }
    if (getConfidenceScoresList().size() > 0) {
      output.writeUInt32NoTag(26);
      output.writeUInt32NoTag(confidenceScoresMemoizedSerializedSize);
    }
    for (int i = 0; i < confidenceScores_.size(); i++) {
      output.writeFloatNoTag(confidenceScores_.getFloat(i));
    }
    getUnknownFields().writeTo(output);
  }
<pre>
Confidence score of the support references. Ranges from 0 to 1. 1 is the
most confident. This list must have the same size as the
grounding_chunk_indices.
</pre>

<code>repeated float confidence_scores = 3;</code>

@param index The index of the element to return.
@return The confidenceScores at the given index.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingSupport.java