public PutRegistryScanningConfigurationRequest withRules(java.util.Collection<RegistryScanningRule> rules) {
        setRules(rules);
        return this;
    }
<p>
The scanning rules to use for the registry. A scanning rule is used to determine which repository filters are
used and at what frequency scanning will occur.
</p>

@param rules
       The scanning rules to use for the registry. A scanning rule is used to determine which repository filters
       are used and at what frequency scanning will occur.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ecr/src/main/java/com/amazonaws/services/ecr/model/PutRegistryScanningConfigurationRequest.java