@java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSegment());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < groundingChunkIndices_.size(); i++) {
        dataSize +=
            com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(
                groundingChunkIndices_.getInt(i));
      }
      size += dataSize;
      if (!getGroundingChunkIndicesList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
      }
      groundingChunkIndicesMemoizedSerializedSize = dataSize;
    }
    {
      int dataSize = 0;
      dataSize = 4 * getConfidenceScoresList().size();
      size += dataSize;
      if (!getConfidenceScoresList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
      }
      confidenceScoresMemoizedSerializedSize = dataSize;
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }
<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