class SaveUserRequest {

    @Schema(description = "用户基本信息")
    @NotNull
    private UserDetail user;

    @Schema(description = "角色ID列表")
    private Set<String> roleIdList;

    @Schema(description = "机构ID列表")
    private Set<String> orgIdList;

    public SaveUserRequest validate() {<FILL_FUNCTION_BODY>}
}

        if (user == null) {
            throw new IllegalArgumentException("user can not be null");
        }
        if (StringUtils.hasText(user.getId())) {
            ValidatorUtils.tryValidate(user, UpdateGroup.class);
        } else {
            ValidatorUtils.tryValidate(user, CreateGroup.class);
        }
        return this;
    
<no_super_class>