code: public static void runExample(
        AdManagerServices adManagerServices,
        AdManagerSession session,
        String emailAddress,
        String name)
        throws RemoteException {
      // Get the UserService.
      UserServiceInterface userService = adManagerServices.get(session, UserServiceInterface.class);
  
      // Create a user.
      User traffickerUser = new User();
      traffickerUser.setEmail(emailAddress);
      traffickerUser.setName(name);
  
      // Set the system defined ID of the trafficker role.
      // To determine what other roles exist, run GetAllRoles.java.
      traffickerUser.setRoleId(-7L);
  
      // Create the user on the server.
      User[] users = userService.createUsers(new User[] {traffickerUser});
  
      for (User createdUser : users) {
        System.out.printf("A user with ID %d and name '%s' was created.%n",
            createdUser.getId(), createdUser.getName());
      }
    }
docs: Runs the example.
  
  @param adManagerServices the services factory.
  @param session the session.
  @param emailAddress the email address of the user.
  @param name the name of the user.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.