public Builder setModality(com.google.cloud.vertexai.api.Modality value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000001;
      modality_ = value.getNumber();
      onChanged();
      return this;
    }
<pre>
The modality associated with this token count.
</pre>

<code>.google.cloud.vertexai.v1.Modality modality = 1;</code>

@param value The modality to set.
@return This builder for chaining.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModalityTokenCount.java