class UserSyncRequestValidator {

    public void validateParameters(String accountId, String actorCrn, Set<String> environmentCrnFilter, UserSyncRequestFilter userSyncRequestFilter) {
        requireNonNull(accountId, "accountId must not be null");
        requireNonNull(actorCrn, "actorCrn must not be null");
        requireNonNull(environmentCrnFilter, "environmentCrnFilter must not be null");
        requireNonNull(userSyncRequestFilter);
        ImmutableSet<String> userCrnFilter = userSyncRequestFilter.getUserCrnFilter();
        ImmutableSet<String> machineUserCrnFilter = userSyncRequestFilter.getMachineUserCrnFilter();
        Optional<String> deletedWorkoadUser = userSyncRequestFilter.getDeletedWorkloadUser();
        requireNonNull(userCrnFilter, "userCrnFilter must not be null");
        requireNonNull(machineUserCrnFilter, "machineUserCrnFilter must not be null");
        requireNonNull(deletedWorkoadUser, "deletedWorkoadUser must not be null");
        validateCrnFilter(environmentCrnFilter, Crn.ResourceType.ENVIRONMENT);
        validateCrnFilter(userCrnFilter, Crn.ResourceType.USER);
        validateCrnFilter(machineUserCrnFilter, Crn.ResourceType.MACHINE_USER);
        validateSameAccount(accountId, Iterables.concat(environmentCrnFilter, userCrnFilter, machineUserCrnFilter));
        validateDeletedWorkloadUser(deletedWorkoadUser, userCrnFilter, machineUserCrnFilter);
    }

}