@java.lang.Override
      public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity
          getPolarity() {
        com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity
            result =
                com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization
                    .Polarity.forNumber(polarity_);
        return result == null
            ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity
                .UNRECOGNIZED
            : result;
      }
<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>

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