public SearchPrincipalType withRoles(PrincipalRoleType... roles) {
        java.util.ArrayList<String> rolesCopy = new java.util.ArrayList<String>(roles.length);
        for (PrincipalRoleType value : roles) {
            rolesCopy.add(value.toString());
        }
        if (getRoles() == null) {
            setRoles(rolesCopy);
        } else {
            getRoles().addAll(rolesCopy);
        }
        return this;
    }
<p>
The Role of a User or Group.
</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