public CreateTaskRequest withExcludes(FilterRule... excludes) {
        if (this.excludes == null) {
            setExcludes(new java.util.ArrayList<FilterRule>(excludes.length));
        }
        for (FilterRule ele : excludes) {
            this.excludes.add(ele);
        }
        return this;
    }
<p>
Specifies exclude filters that define the files, objects, and folders in your source location that you don't want
DataSync to transfer. For more information and examples, see <a
href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by
using filters</a>.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setExcludes(java.util.Collection)} or {@link #withExcludes(java.util.Collection)} if you want to override
the existing values.
</p>

@param excludes
       Specifies exclude filters that define the files, objects, and folders in your source location that you
       don't want DataSync to transfer. For more information and examples, see <a
       href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync
       transfers by using filters</a>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-datasync/src/main/java/com/amazonaws/services/datasync/model/CreateTaskRequest.java