class FreeIpaClient {

    public User userAdd(String user, String firstName, String lastName) throws FreeIpaClientException {
        FreeIpaChecks.checkUserNotProtected(user, () -> String.format("User '%s' is protected and cannot be added to FreeIPA", user));
        List<Object> flags = List.of(user);
        Map<String, Object> params = Map.of(
                "givenname", firstName,
                "sn", lastName,
                "loginshell", "/bin/bash",
                "random", true,
                "setattr", "krbPasswordExpiration=" + MAX_PASSWORD_EXPIRATION_DATETIME
        );
        return (User) invoke("user_add", flags, params, User.class).getResult();
    }

    public  FreeIpaClient(JsonRpcHttpClient jsonRpcHttpClient, String apiAddress, String hostname);
    public  FreeIpaClient(JsonRpcHttpClient jsonRpcHttpClient, String apiVersion, String apiAddress, String hostname);

}