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

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

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

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

public class DeviceAccountSettingOpenApiVo   {
  @JsonProperty("username")
  private String username;

  @JsonProperty("password")
  private String password;

  public DeviceAccountSettingOpenApiVo username(String username) {
    this.username = username;
    return this;
  }

  /**
   * Device account username should contain 1 to 64 ASCII characters.
   * @return username
  */
  @ApiModelProperty(required = true, value = "Device account username should contain 1 to 64 ASCII characters.")
  @NotNull

@Pattern(regexp="^[\\041-\\0176]{1,64}$") 
  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

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

  /**
   * Device account parameter [password] should contain 8 to 64 ASCII characters. And passwords must be a combination of uppercase letters, lowercase letters, numbers, and special symbols. Symbols such as ! # $ % & * @ ^ are supported.
   * @return password
  */
  @ApiModelProperty(required = true, value = "Device account parameter [password] should contain 8 to 64 ASCII characters. And passwords must be a combination of uppercase letters, lowercase letters, numbers, and special symbols. Symbols such as ! # $ % & * @ ^ are supported.")
  @NotNull

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

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DeviceAccountSettingOpenApiVo deviceAccountSettingOpenApiVo = (DeviceAccountSettingOpenApiVo) o;
    return Objects.equals(this.username, deviceAccountSettingOpenApiVo.username) &&
        Objects.equals(this.password, deviceAccountSettingOpenApiVo.password);
  }

  @Override
  public int hashCode() {
    return Objects.hash(username, password);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DeviceAccountSettingOpenApiVo {\n");
    
    sb.append("    username: ").append(toIndentedString(username)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).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    ");
  }
}

