public UpdateDevicePoolRequest withRules(java.util.Collection<Rule> rules) {
        setRules(rules);
        return this;
    }
<p>
Represents the rules to modify for the device pool. Updating rules is optional. If you update rules for your
request, the update replaces the existing rules.
</p>

@param rules
       Represents the rules to modify for the device pool. Updating rules is optional. If you update rules for
       your request, the update replaces the existing rules.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-devicefarm/src/main/java/com/amazonaws/services/devicefarm/model/UpdateDevicePoolRequest.java