content: /*
   * Copyright - Adrian Rodriguez Bazaga (GitHub: AdrianBZG)
   * Licensed under Apache 2.0
   */
  
  package randomfactory;
  
  import org.json.JSONObject;
  
  public class RandomUser {
    private String name = "";
    private String surname = "";
    private String gender = "";
    private String region = "";
    private String email = "";
  
    public RandomUser(JSONObject obj) {
      name = obj.getString("name").replaceAll(" ", "").replaceAll("[^\\p{ASCII}]", "");
      surname = obj.getString("surname").replaceAll(" ", "").replaceAll("[^\\p{ASCII}]", "");
      gender = obj.getString("gender");
      region = obj.getString("region");
      int randomNum = 101 + (int)(Math.random() * 76845);
      email = name + "." + surname + randomNum + "@gmail.com";
    }
  
    /**
     * @return the name
     */
    public String getName() {
      return name;
    }
    /**
     * @param name the name to set
     */
    public void setName(String name) {
      this.name = name;
    }
    /**
     * @return the surname
     */
    public String getSurname() {
      return surname;
    }
    /**
     * @param surname the surname to set
     */
    public void setSurname(String surname) {
      this.surname = surname;
    }
    /**
     * @return the gender
     */
    public String getGender() {
      return gender;
    }
    /**
     * @param gender the gender to set
     */
    public void setGender(String gender) {
      this.gender = gender;
    }
    /**
     * @return the region
     */
    public String getRegion() {
      return region;
    }
    /**
     * @param region the region to set
     */
    public void setRegion(String region) {
      this.region = region;
    }
    /**
     * @return the email
     */
    public String getEmail() {
      return email;
    }
    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
      this.email = email;
    }
  }