public CreateTaskRequest withTags(TagListEntry... tags) {
        if (this.tags == null) {
            setTags(new java.util.ArrayList<TagListEntry>(tags.length));
        }
        for (TagListEntry ele : tags) {
            this.tags.add(ele);
        }
        return this;
    }
<p>
Specifies the tags that you want to apply to your task.
</p>
<p>
<i>Tags</i> are key-value pairs that help you manage, filter, and search for your DataSync resources.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
existing values.
</p>

@param tags
       Specifies the tags that you want to apply to your task.</p>
       <p>
       <i>Tags</i> are key-value pairs that help you manage, filter, and search for your DataSync resources.
@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