public SearchPrincipalType withRoles(String... roles) {
        if (this.roles == null) {
            setRoles(new java.util.ArrayList<String>(roles.length));
        }
        for (String ele : roles) {
            this.roles.add(ele);
        }
        return this;
    }
<p>
The Role of a User or Group.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setRoles(java.util.Collection)} or {@link #withRoles(java.util.Collection)} if you want to override the
existing values.
</p>

@param roles
       The Role of a User or Group.
@return Returns a reference to this object so that method calls can be chained together.
@see PrincipalRoleType
aws-java-sdk-workdocs/src/main/java/com/amazonaws/services/workdocs/model/SearchPrincipalType.java