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

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

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

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

public class LocalUserOpenApiVo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("userName")
  private String userName;

  @JsonProperty("password")
  private String password;

  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("expirationTime")
  private Long expirationTime;

  @JsonProperty("bindingType")
  private Integer bindingType;

  @JsonProperty("macAddress")
  private String macAddress;

  @JsonProperty("maxUsers")
  private Integer maxUsers;

  @JsonProperty("name")
  private String name;

  @JsonProperty("phone")
  private String phone;

  @JsonProperty("rateLimit")
  private RateLimitOpenApiVo rateLimit;

  @JsonProperty("trafficLimitEnable")
  private Boolean trafficLimitEnable;

  @JsonProperty("trafficLimit")
  private Long trafficLimit;

  @JsonProperty("trafficLeft")
  private Boolean trafficLeft;

  @JsonProperty("trafficUsed")
  private Long trafficUsed;

  @JsonProperty("trafficLimitFrequency")
  private Integer trafficLimitFrequency;

  @JsonProperty("used")
  private Integer used;

  @JsonProperty("overtime")
  private Boolean overtime;

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

  public LocalUserOpenApiVo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Local user ID
   * @return id
  */
  @ApiModelProperty(value = "Local user ID")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public LocalUserOpenApiVo userName(String userName) {
    this.userName = userName;
    return this;
  }

  /**
   * User name should contain 1 to 128 characters
   * @return userName
  */
  @ApiModelProperty(value = "User name should contain 1 to 128 characters")

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

  public void setUserName(String userName) {
    this.userName = userName;
  }

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

  /**
   * Password should contain 1 to 128 characters
   * @return password
  */
  @ApiModelProperty(value = "Password should contain 1 to 128 characters")


  public String getPassword() {
    return password;
  }

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

  public LocalUserOpenApiVo enable(Boolean enable) {
    this.enable = enable;
    return this;
  }

  /**
   * Local user enable status
   * @return enable
  */
  @ApiModelProperty(value = "Local user enable status")


  public Boolean getEnable() {
    return enable;
  }

  public void setEnable(Boolean enable) {
    this.enable = enable;
  }

  public LocalUserOpenApiVo expirationTime(Long expirationTime) {
    this.expirationTime = expirationTime;
    return this;
  }

  /**
   * Expiration time, unit: ms
   * @return expirationTime
  */
  @ApiModelProperty(value = "Expiration time, unit: ms")


  public Long getExpirationTime() {
    return expirationTime;
  }

  public void setExpirationTime(Long expirationTime) {
    this.expirationTime = expirationTime;
  }

  public LocalUserOpenApiVo bindingType(Integer bindingType) {
    this.bindingType = bindingType;
    return this;
  }

  /**
   * MAC binding type should be a value as follows: 0: no binding; 1: static binding; 2: dynamic binding.
   * @return bindingType
  */
  @ApiModelProperty(value = "MAC binding type should be a value as follows: 0: no binding; 1: static binding; 2: dynamic binding.")


  public Integer getBindingType() {
    return bindingType;
  }

  public void setBindingType(Integer bindingType) {
    this.bindingType = bindingType;
  }

  public LocalUserOpenApiVo macAddress(String macAddress) {
    this.macAddress = macAddress;
    return this;
  }

  /**
   * Mac address,the value is only available when the macType is static binding or dynamic binding.
   * @return macAddress
  */
  @ApiModelProperty(value = "Mac address,the value is only available when the macType is static binding or dynamic binding.")


  public String getMacAddress() {
    return macAddress;
  }

  public void setMacAddress(String macAddress) {
    this.macAddress = macAddress;
  }

  public LocalUserOpenApiVo maxUsers(Integer maxUsers) {
    this.maxUsers = maxUsers;
    return this;
  }

  /**
   * The maximum number of users online at the same time when the MAC binding type is No Binding. It cannot be modified after initialization. Value of Maximum Users should be within the range of 1-2048.
   * @return maxUsers
  */
  @ApiModelProperty(value = "The maximum number of users online at the same time when the MAC binding type is No Binding. It cannot be modified after initialization. Value of Maximum Users should be within the range of 1-2048.")


  public Integer getMaxUsers() {
    return maxUsers;
  }

  public void setMaxUsers(Integer maxUsers) {
    this.maxUsers = maxUsers;
  }

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

  /**
   * Name
   * @return name
  */
  @ApiModelProperty(value = "Name")

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

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

  public LocalUserOpenApiVo phone(String phone) {
    this.phone = phone;
    return this;
  }

  /**
   * Phone number should contain 1 to 20 characters.
   * @return phone
  */
  @ApiModelProperty(value = "Phone number should contain 1 to 20 characters.")


  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public LocalUserOpenApiVo rateLimit(RateLimitOpenApiVo rateLimit) {
    this.rateLimit = rateLimit;
    return this;
  }

  /**
   * Get rateLimit
   * @return rateLimit
  */
  @ApiModelProperty(value = "")

  @Valid

  public RateLimitOpenApiVo getRateLimit() {
    return rateLimit;
  }

  public void setRateLimit(RateLimitOpenApiVo rateLimit) {
    this.rateLimit = rateLimit;
  }

  public LocalUserOpenApiVo trafficLimitEnable(Boolean trafficLimitEnable) {
    this.trafficLimitEnable = trafficLimitEnable;
    return this;
  }

  /**
   * Whether to enable traffic limit.
   * @return trafficLimitEnable
  */
  @ApiModelProperty(value = "Whether to enable traffic limit.")


  public Boolean getTrafficLimitEnable() {
    return trafficLimitEnable;
  }

  public void setTrafficLimitEnable(Boolean trafficLimitEnable) {
    this.trafficLimitEnable = trafficLimitEnable;
  }

  public LocalUserOpenApiVo trafficLimit(Long trafficLimit) {
    this.trafficLimit = trafficLimit;
    return this;
  }

  /**
   * Traffic limit in MB. The value should be within the range of 1–10485760.
   * @return trafficLimit
  */
  @ApiModelProperty(value = "Traffic limit in MB. The value should be within the range of 1–10485760.")


  public Long getTrafficLimit() {
    return trafficLimit;
  }

  public void setTrafficLimit(Long trafficLimit) {
    this.trafficLimit = trafficLimit;
  }

  public LocalUserOpenApiVo trafficLeft(Boolean trafficLeft) {
    this.trafficLeft = trafficLeft;
    return this;
  }

  /**
   * Is there any remaining traffic.
   * @return trafficLeft
  */
  @ApiModelProperty(value = "Is there any remaining traffic.")


  public Boolean getTrafficLeft() {
    return trafficLeft;
  }

  public void setTrafficLeft(Boolean trafficLeft) {
    this.trafficLeft = trafficLeft;
  }

  public LocalUserOpenApiVo trafficUsed(Long trafficUsed) {
    this.trafficUsed = trafficUsed;
    return this;
  }

  /**
   * Used traffic(MB).
   * @return trafficUsed
  */
  @ApiModelProperty(value = "Used traffic(MB).")


  public Long getTrafficUsed() {
    return trafficUsed;
  }

  public void setTrafficUsed(Long trafficUsed) {
    this.trafficUsed = trafficUsed;
  }

  public LocalUserOpenApiVo trafficLimitFrequency(Integer trafficLimitFrequency) {
    this.trafficLimitFrequency = trafficLimitFrequency;
    return this;
  }

  /**
   * Frequency of traffic limit should be a value as follows: 0: total; 1: daily; 2: weekly; 3: monthly.
   * @return trafficLimitFrequency
  */
  @ApiModelProperty(value = "Frequency of traffic limit should be a value as follows: 0: total; 1: daily; 2: weekly; 3: monthly.")


  public Integer getTrafficLimitFrequency() {
    return trafficLimitFrequency;
  }

  public void setTrafficLimitFrequency(Integer trafficLimitFrequency) {
    this.trafficLimitFrequency = trafficLimitFrequency;
  }

  public LocalUserOpenApiVo used(Integer used) {
    this.used = used;
    return this;
  }

  /**
   * Used quantity.
   * @return used
  */
  @ApiModelProperty(value = "Used quantity.")


  public Integer getUsed() {
    return used;
  }

  public void setUsed(Integer used) {
    this.used = used;
  }

  public LocalUserOpenApiVo overtime(Boolean overtime) {
    this.overtime = overtime;
    return this;
  }

  /**
   * Whether the current time has exceeded the expirationTime
   * @return overtime
  */
  @ApiModelProperty(value = "Whether the current time has exceeded the expirationTime")


  public Boolean getOvertime() {
    return overtime;
  }

  public void setOvertime(Boolean overtime) {
    this.overtime = overtime;
  }

  public LocalUserOpenApiVo portals(List<String> portals) {
    this.portals = portals;
    return this;
  }

  public LocalUserOpenApiVo addPortalsItem(String portalsItem) {
    if (this.portals == null) {
      this.portals = new ArrayList<>();
    }
    this.portals.add(portalsItem);
    return this;
  }

  /**
   * Bound portal names.
   * @return portals
  */
  @ApiModelProperty(value = "Bound portal names.")


  public List<String> getPortals() {
    return portals;
  }

  public void setPortals(List<String> portals) {
    this.portals = portals;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    LocalUserOpenApiVo localUserOpenApiVo = (LocalUserOpenApiVo) o;
    return Objects.equals(this.id, localUserOpenApiVo.id) &&
        Objects.equals(this.userName, localUserOpenApiVo.userName) &&
        Objects.equals(this.password, localUserOpenApiVo.password) &&
        Objects.equals(this.enable, localUserOpenApiVo.enable) &&
        Objects.equals(this.expirationTime, localUserOpenApiVo.expirationTime) &&
        Objects.equals(this.bindingType, localUserOpenApiVo.bindingType) &&
        Objects.equals(this.macAddress, localUserOpenApiVo.macAddress) &&
        Objects.equals(this.maxUsers, localUserOpenApiVo.maxUsers) &&
        Objects.equals(this.name, localUserOpenApiVo.name) &&
        Objects.equals(this.phone, localUserOpenApiVo.phone) &&
        Objects.equals(this.rateLimit, localUserOpenApiVo.rateLimit) &&
        Objects.equals(this.trafficLimitEnable, localUserOpenApiVo.trafficLimitEnable) &&
        Objects.equals(this.trafficLimit, localUserOpenApiVo.trafficLimit) &&
        Objects.equals(this.trafficLeft, localUserOpenApiVo.trafficLeft) &&
        Objects.equals(this.trafficUsed, localUserOpenApiVo.trafficUsed) &&
        Objects.equals(this.trafficLimitFrequency, localUserOpenApiVo.trafficLimitFrequency) &&
        Objects.equals(this.used, localUserOpenApiVo.used) &&
        Objects.equals(this.overtime, localUserOpenApiVo.overtime) &&
        Objects.equals(this.portals, localUserOpenApiVo.portals);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, userName, password, enable, expirationTime, bindingType, macAddress, maxUsers, name, phone, rateLimit, trafficLimitEnable, trafficLimit, trafficLeft, trafficUsed, trafficLimitFrequency, used, overtime, portals);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LocalUserOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    userName: ").append(toIndentedString(userName)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).append("\n");
    sb.append("    enable: ").append(toIndentedString(enable)).append("\n");
    sb.append("    expirationTime: ").append(toIndentedString(expirationTime)).append("\n");
    sb.append("    bindingType: ").append(toIndentedString(bindingType)).append("\n");
    sb.append("    macAddress: ").append(toIndentedString(macAddress)).append("\n");
    sb.append("    maxUsers: ").append(toIndentedString(maxUsers)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    phone: ").append(toIndentedString(phone)).append("\n");
    sb.append("    rateLimit: ").append(toIndentedString(rateLimit)).append("\n");
    sb.append("    trafficLimitEnable: ").append(toIndentedString(trafficLimitEnable)).append("\n");
    sb.append("    trafficLimit: ").append(toIndentedString(trafficLimit)).append("\n");
    sb.append("    trafficLeft: ").append(toIndentedString(trafficLeft)).append("\n");
    sb.append("    trafficUsed: ").append(toIndentedString(trafficUsed)).append("\n");
    sb.append("    trafficLimitFrequency: ").append(toIndentedString(trafficLimitFrequency)).append("\n");
    sb.append("    used: ").append(toIndentedString(used)).append("\n");
    sb.append("    overtime: ").append(toIndentedString(overtime)).append("\n");
    sb.append("    portals: ").append(toIndentedString(portals)).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    ");
  }
}

