package org.wfc.omada.api.msp.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;

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

public class ModifyMspUserVo   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("password")
  private String password;

  @JsonProperty("email")
  private String email;

  @JsonProperty("customerRoleId")
  private String customerRoleId;

  @JsonProperty("allCustomer")
  private Boolean allCustomer;

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

  @JsonProperty("alert")
  private Boolean alert;

  @JsonProperty("roleId")
  private String roleId;

  @JsonProperty("forceModify")
  private Boolean forceModify;

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

  /**
   * User name. When creating cloud user, you should set TP-LINK ID. It should contain 1 to 128 ASCII characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "User name. When creating cloud user, you should set TP-LINK ID. It should contain 1 to 128 ASCII characters.")
  @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 ModifyMspUserVo password(String password) {
    this.password = password;
    return this;
  }

  /**
   * Password of local user. User can only modify his child local user's password. It should contain 8 to 128 ASCII 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. User can only modify his child local user's password. It should contain 8 to 128 ASCII 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 ModifyMspUserVo 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 ModifyMspUserVo customerRoleId(String customerRoleId) {
    this.customerRoleId = customerRoleId;
    return this;
  }

  /**
   * Customer role ID of msp user
   * @return customerRoleId
  */
  @ApiModelProperty(required = true, value = "Customer role ID of msp user")
  @NotNull


  public String getCustomerRoleId() {
    return customerRoleId;
  }

  public void setCustomerRoleId(String customerRoleId) {
    this.customerRoleId = customerRoleId;
  }

  public ModifyMspUserVo allCustomer(Boolean allCustomer) {
    this.allCustomer = allCustomer;
    return this;
  }

  /**
   * All customers including new created customer
   * @return allCustomer
  */
  @ApiModelProperty(required = true, value = "All customers including new created customer")
  @NotNull


  public Boolean getAllCustomer() {
    return allCustomer;
  }

  public void setAllCustomer(Boolean allCustomer) {
    this.allCustomer = allCustomer;
  }

  public ModifyMspUserVo customers(List<String> customers) {
    this.customers = customers;
    return this;
  }

  public ModifyMspUserVo addCustomersItem(String customersItem) {
    if (this.customers == null) {
      this.customers = new ArrayList<>();
    }
    this.customers.add(customersItem);
    return this;
  }

  /**
   * Customer ID list of msp user
   * @return customers
  */
  @ApiModelProperty(value = "Customer ID list of msp user")


  public List<String> getCustomers() {
    return customers;
  }

  public void setCustomers(List<String> customers) {
    this.customers = customers;
  }

  public ModifyMspUserVo 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 ModifyMspUserVo roleId(String roleId) {
    this.roleId = roleId;
    return this;
  }

  /**
   * Role ID of user
   * @return roleId
  */
  @ApiModelProperty(required = true, value = "Role ID of user")
  @NotNull


  public String getRoleId() {
    return roleId;
  }

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

  public ModifyMspUserVo 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;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ModifyMspUserVo modifyMspUserVo = (ModifyMspUserVo) o;
    return Objects.equals(this.name, modifyMspUserVo.name) &&
        Objects.equals(this.password, modifyMspUserVo.password) &&
        Objects.equals(this.email, modifyMspUserVo.email) &&
        Objects.equals(this.customerRoleId, modifyMspUserVo.customerRoleId) &&
        Objects.equals(this.allCustomer, modifyMspUserVo.allCustomer) &&
        Objects.equals(this.customers, modifyMspUserVo.customers) &&
        Objects.equals(this.alert, modifyMspUserVo.alert) &&
        Objects.equals(this.roleId, modifyMspUserVo.roleId) &&
        Objects.equals(this.forceModify, modifyMspUserVo.forceModify);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, password, email, customerRoleId, allCustomer, customers, alert, roleId, forceModify);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ModifyMspUserVo {\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("    customerRoleId: ").append(toIndentedString(customerRoleId)).append("\n");
    sb.append("    allCustomer: ").append(toIndentedString(allCustomer)).append("\n");
    sb.append("    customers: ").append(toIndentedString(customers)).append("\n");
    sb.append("    alert: ").append(toIndentedString(alert)).append("\n");
    sb.append("    roleId: ").append(toIndentedString(roleId)).append("\n");
    sb.append("    forceModify: ").append(toIndentedString(forceModify)).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    ");
  }
}

