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

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

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

/**
 * User name and password, required when parameter [type] is 0.
 */
@ApiModel(description = "User name and password, required when parameter [type] is 0.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

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

  @JsonProperty("password")
  private String password;

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

  /**
   * Build-in Radius profile user name. Username should contain 1 to 64 characters
   * @return username
  */
  @ApiModelProperty(required = true, value = "Build-in Radius profile user name. Username should contain 1 to 64 characters")
  @NotNull

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

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

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

  /**
   * Build-in Radius profile user password. Password should contain 1 to 64 characters
   * @return password
  */
  @ApiModelProperty(required = true, value = "Build-in Radius profile user password. Password should contain 1 to 64 characters")
  @NotNull

@Pattern(regexp="^[\\x21-\\x7e]{1,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;
    }
    RadiusUserInfoOpenApiVo radiusUserInfoOpenApiVo = (RadiusUserInfoOpenApiVo) o;
    return Objects.equals(this.username, radiusUserInfoOpenApiVo.username) &&
        Objects.equals(this.password, radiusUserInfoOpenApiVo.password);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RadiusUserInfoOpenApiVo {\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    ");
  }
}

