public GetImpersonationRoleResult withRules(ImpersonationRule... rules) {
        if (this.rules == null) {
            setRules(new java.util.ArrayList<ImpersonationRule>(rules.length));
        }
        for (ImpersonationRule ele : rules) {
            this.rules.add(ele);
        }
        return this;
    }
<p>
The list of rules for the given impersonation role.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setRules(java.util.Collection)} or {@link #withRules(java.util.Collection)} if you want to override the
existing values.
</p>

@param rules
       The list of rules for the given impersonation role.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-workmail/src/main/java/com/amazonaws/services/workmail/model/GetImpersonationRoleResult.java