public PutMetricAlarmRequest withComparisonOperator(ComparisonOperator comparisonOperator) {
        this.comparisonOperator = comparisonOperator.toString();
        return this;
    }
<p>
The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic
value is used as the first operand.
</p>
<p>
The values <code>LessThanLowerOrGreaterThanUpperThreshold</code>, <code>LessThanLowerThreshold</code>, and
<code>GreaterThanUpperThreshold</code> are used only for alarms based on anomaly detection models.
</p>

@param comparisonOperator
       The arithmetic operation to use when comparing the specified statistic and threshold. The specified
       statistic value is used as the first operand.</p>
       <p>
       The values <code>LessThanLowerOrGreaterThanUpperThreshold</code>, <code>LessThanLowerThreshold</code>, and
       <code>GreaterThanUpperThreshold</code> are used only for alarms based on anomaly detection models.
@return Returns a reference to this object so that method calls can be chained together.
@see ComparisonOperator
aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/model/PutMetricAlarmRequest.java