@java.lang.Override
    public boolean hasTopK() {
      return ((bitField0_ & 0x00000004) != 0);
    }
<pre>
Optional. If specified, top-k sampling will be used.
</pre>

<code>optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];</code>

@return Whether the topK field is set.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfig.java