@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (speculativeTokenCount_ != 0) {
      output.writeInt32(1, speculativeTokenCount_);
    }
    if (speculationCase_ == 2) {
      output.writeMessage(
          2,
          (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation)
              speculation_);
    }
    if (speculationCase_ == 3) {
      output.writeMessage(
          3, (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) speculation_);
    }
    getUnknownFields().writeTo(output);
  }
<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