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

    size = 0;
    if (speculativeTokenCount_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, speculativeTokenCount_);
    }
    if (speculationCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2,
              (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation)
                  speculation_);
    }
    if (speculationCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3,
              (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation)
                  speculation_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }
<pre>
The number of speculative tokens to generate at each step.
</pre>

<code>int32 speculative_token_count = 1;</code>

@return The speculativeTokenCount.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeculativeDecodingSpec.java