public AutoScalingPolicyStateChangeReason withCode(String code) {
        setCode(code);
        return this;
    }
<p>
The code indicating the reason for the change in status.<code>USER_REQUEST</code> indicates that the scaling
policy status was changed by a user. <code>PROVISION_FAILURE</code> indicates that the status change was because
the policy failed to provision. <code>CLEANUP_FAILURE</code> indicates an error.
</p>

@param code
       The code indicating the reason for the change in status.<code>USER_REQUEST</code> indicates that the
       scaling policy status was changed by a user. <code>PROVISION_FAILURE</code> indicates that the status
       change was because the policy failed to provision. <code>CLEANUP_FAILURE</code> indicates an error.
@return Returns a reference to this object so that method calls can be chained together.
@see AutoScalingPolicyStateChangeReasonCode
aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/AutoScalingPolicyStateChangeReason.java