package org.wfc.omada.api.account.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * ModifyUserVo
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T10:44:52.771+08:00[Asia/Shanghai]")

public class ModifyUserVo   {
  @JsonProperty("roleId")
  private String roleId;

  @JsonProperty("name")
  private String name;

  @JsonProperty("password")
  private String password;

  @JsonProperty("email")
  private String email;

  @JsonProperty("alert")
  private Boolean alert;

  @JsonProperty("forceModify")
  private Boolean forceModify;

  @JsonProperty("incidentNotification")
  private Boolean incidentNotification;

  @JsonProperty("sites")
  @Valid
  private List<String> sites = null;

  @JsonProperty("allSite")
  private Boolean allSite;

  public ModifyUserVo roleId(String roleId) {
    this.roleId = roleId;
    return this;
  }

  /**
   * This field represents Role ID. Role can be created using 'Create new role' interface, and Role ID can be obtained from 'Get role list' interface.
   * @return roleId
  */
  @ApiModelProperty(required = true, value = "This field represents Role ID. Role can be created using 'Create new role' interface, and Role ID can be obtained from 'Get role list' interface.")
  @NotNull


  public String getRoleId() {
    return roleId;
  }

  public void setRoleId(String roleId) {
    this.roleId = roleId;
  }

  public ModifyUserVo name(String name) {
    this.name = name;
    return this;
  }

  /**
   * User name should contain 1 to 128 characters. When creating cloud user, you should set TP-LINK ID.
   * @return name
  */
  @ApiModelProperty(required = true, value = "User name should contain 1 to 128 characters. When creating cloud user, you should set TP-LINK ID.")
  @NotNull

@Pattern(regexp="^[\\041-\\0176]$|^[\\041-\\0176][\\040-\\0176]{0,126}[\\041-\\0176]$") 
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public ModifyUserVo password(String password) {
    this.password = password;
    return this;
  }

  /**
   * Password of local user should contain 8 to 128 characters. And password must be a combination of uppercase letters, lowercase letters, numbers, and special symbols. Symbols such as ! # $ % & * @ ^ are supported.
   * @return password
  */
  @ApiModelProperty(value = "Password of local user should contain 8 to 128 characters. And password must be a combination of uppercase letters, lowercase letters, numbers, and special symbols. Symbols such as ! # $ % & * @ ^ are supported.")

@Pattern(regexp="^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\!\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\./\\:\\;\\<\\=\\>\\@\\[\\\\\\]\\^\\_\\`\\{\\|\\}\\~])(?!.*[\\00-\\040\\042\\077\\0177]).{8,128}$") 
  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public ModifyUserVo email(String email) {
    this.email = email;
    return this;
  }

  /**
   * Email of user
   * @return email
  */
  @ApiModelProperty(value = "Email of user")


  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public ModifyUserVo alert(Boolean alert) {
    this.alert = alert;
    return this;
  }

  /**
   * Alert email
   * @return alert
  */
  @ApiModelProperty(value = "Alert email")


  public Boolean getAlert() {
    return alert;
  }

  public void setAlert(Boolean alert) {
    this.alert = alert;
  }

  public ModifyUserVo forceModify(Boolean forceModify) {
    this.forceModify = forceModify;
    return this;
  }

  /**
   * Force modify
   * @return forceModify
  */
  @ApiModelProperty(value = "Force modify")


  public Boolean getForceModify() {
    return forceModify;
  }

  public void setForceModify(Boolean forceModify) {
    this.forceModify = forceModify;
  }

  public ModifyUserVo incidentNotification(Boolean incidentNotification) {
    this.incidentNotification = incidentNotification;
    return this;
  }

  /**
   * Incident notification
   * @return incidentNotification
  */
  @ApiModelProperty(value = "Incident notification")


  public Boolean getIncidentNotification() {
    return incidentNotification;
  }

  public void setIncidentNotification(Boolean incidentNotification) {
    this.incidentNotification = incidentNotification;
  }

  public ModifyUserVo sites(List<String> sites) {
    this.sites = sites;
    return this;
  }

  public ModifyUserVo addSitesItem(String sitesItem) {
    if (this.sites == null) {
      this.sites = new ArrayList<>();
    }
    this.sites.add(sitesItem);
    return this;
  }

  /**
   * User site privilege list
   * @return sites
  */
  @ApiModelProperty(value = "User site privilege list")


  public List<String> getSites() {
    return sites;
  }

  public void setSites(List<String> sites) {
    this.sites = sites;
  }

  public ModifyUserVo allSite(Boolean allSite) {
    this.allSite = allSite;
    return this;
  }

  /**
   * Whether user has all site permission, including new created site.
   * @return allSite
  */
  @ApiModelProperty(required = true, value = "Whether user has all site permission, including new created site.")
  @NotNull


  public Boolean getAllSite() {
    return allSite;
  }

  public void setAllSite(Boolean allSite) {
    this.allSite = allSite;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ModifyUserVo modifyUserVo = (ModifyUserVo) o;
    return Objects.equals(this.roleId, modifyUserVo.roleId) &&
        Objects.equals(this.name, modifyUserVo.name) &&
        Objects.equals(this.password, modifyUserVo.password) &&
        Objects.equals(this.email, modifyUserVo.email) &&
        Objects.equals(this.alert, modifyUserVo.alert) &&
        Objects.equals(this.forceModify, modifyUserVo.forceModify) &&
        Objects.equals(this.incidentNotification, modifyUserVo.incidentNotification) &&
        Objects.equals(this.sites, modifyUserVo.sites) &&
        Objects.equals(this.allSite, modifyUserVo.allSite);
  }

  @Override
  public int hashCode() {
    return Objects.hash(roleId, name, password, email, alert, forceModify, incidentNotification, sites, allSite);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ModifyUserVo {\n");
    
    sb.append("    roleId: ").append(toIndentedString(roleId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).append("\n");
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
    sb.append("    alert: ").append(toIndentedString(alert)).append("\n");
    sb.append("    forceModify: ").append(toIndentedString(forceModify)).append("\n");
    sb.append("    incidentNotification: ").append(toIndentedString(incidentNotification)).append("\n");
    sb.append("    sites: ").append(toIndentedString(sites)).append("\n");
    sb.append("    allSite: ").append(toIndentedString(allSite)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

