public CreateDataSetRequest withPermissions(ResourcePermission... permissions) {
        if (this.permissions == null) {
            setPermissions(new java.util.ArrayList<ResourcePermission>(permissions.length));
        }
        for (ResourcePermission ele : permissions) {
            this.permissions.add(ele);
        }
        return this;
    }
<p>
A list of resource permissions on the dataset.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setPermissions(java.util.Collection)} or {@link #withPermissions(java.util.Collection)} if you want to
override the existing values.
</p>

@param permissions
       A list of resource permissions on the dataset.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-quicksight/src/main/java/com/amazonaws/services/quicksight/model/CreateDataSetRequest.java