public ConfigRule withEvaluationModes(EvaluationModeConfiguration... evaluationModes) {
        if (this.evaluationModes == null) {
            setEvaluationModes(new com.amazonaws.internal.SdkInternalList<EvaluationModeConfiguration>(evaluationModes.length));
        }
        for (EvaluationModeConfiguration ele : evaluationModes) {
            this.evaluationModes.add(ele);
        }
        return this;
    }
<p>
The modes the Config rule can be evaluated in. The valid values are distinct objects. By default, the value is
Detective evaluation mode only.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setEvaluationModes(java.util.Collection)} or {@link #withEvaluationModes(java.util.Collection)} if you
want to override the existing values.
</p>

@param evaluationModes
       The modes the Config rule can be evaluated in. The valid values are distinct objects. By default, the
       value is Detective evaluation mode only.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/ConfigRule.java