public DataRetrievalPolicy withRules(DataRetrievalRule... rules) {
        if (this.rules == null) {
            setRules(new java.util.ArrayList<DataRetrievalRule>(rules.length));
        }
        for (DataRetrievalRule ele : rules) {
            this.rules.add(ele);
        }
        return this;
    }
<p>
The policy rule. Although this is a list type, currently there must be only one rule, which contains a Strategy
field and optionally a BytesPerHour field.
</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 policy rule. Although this is a list type, currently there must be only one rule, which contains a
       Strategy field and optionally a BytesPerHour field.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/model/DataRetrievalPolicy.java