public CloudWatchAlarmDefinition withUnit(Unit unit) {
        this.unit = unit.toString();
        return this;
    }
<p>
The unit of measure associated with the CloudWatch metric being watched. The value specified for
<code>Unit</code> must correspond to the units specified in the CloudWatch metric.
</p>

@param unit
       The unit of measure associated with the CloudWatch metric being watched. The value specified for
       <code>Unit</code> must correspond to the units specified in the CloudWatch metric.
@return Returns a reference to this object so that method calls can be chained together.
@see Unit
aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/CloudWatchAlarmDefinition.java