public CanaryRunStatus withStateReason(String stateReason) {
        setStateReason(stateReason);
        return this;
    }
<p>
If run of the canary failed, this field contains the reason for the error.
</p>

@param stateReason
       If run of the canary failed, this field contains the reason for the error.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-synthetics/src/main/java/com/amazonaws/services/synthetics/model/CanaryRunStatus.java