public Builder setPolarity(
            com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity
                value) {
          if (value == null) {
            throw new NullPointerException();
          }
          bitField0_ |= 0x00000002;
          polarity_ = value.getNumber();
          onChanged();
          return this;
        }
<pre>
Whether to only highlight pixels with positive contributions, negative
or both. Defaults to POSITIVE.
</pre>

<code>
.google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2;
</code>

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