private void ensureChosenCandidatesIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        chosenCandidates_ =
            new java.util.ArrayList<com.google.cloud.vertexai.api.LogprobsResult.Candidate>(
                chosenCandidates_);
        bitField0_ |= 0x00000002;
      }
    }
<pre>
Length = total number of decoding steps.
</pre>

<code>repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1;
</code>
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LogprobsResult.java