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;

/**
 * Radius authentication server list
 */
@ApiModel(description = "Radius authentication server list")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class RadiusAuthServerOpenApiVo   {
  @JsonProperty("radiusServerIp")
  private String radiusServerIp;

  @JsonProperty("radiusPort")
  private Integer radiusPort;

  @JsonProperty("radiusPwd")
  private String radiusPwd;

  public RadiusAuthServerOpenApiVo radiusServerIp(String radiusServerIp) {
    this.radiusServerIp = radiusServerIp;
    return this;
  }

  /**
   * Radius authentication server IP. In Pro Site of the Omada Pro Controller, [radiusServerIp] should be a valid IP or domain address. In Omada Controller and Basic Site of the Omada Pro Controller, [radiusServerIp] should be a valid IP address.
   * @return radiusServerIp
  */
  @ApiModelProperty(required = true, value = "Radius authentication server IP. In Pro Site of the Omada Pro Controller, [radiusServerIp] should be a valid IP or domain address. In Omada Controller and Basic Site of the Omada Pro Controller, [radiusServerIp] should be a valid IP address.")
  @NotNull

@Pattern(regexp="((\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])){3}|([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6})") 
  public String getRadiusServerIp() {
    return radiusServerIp;
  }

  public void setRadiusServerIp(String radiusServerIp) {
    this.radiusServerIp = radiusServerIp;
  }

  public RadiusAuthServerOpenApiVo radiusPort(Integer radiusPort) {
    this.radiusPort = radiusPort;
    return this;
  }

  /**
   * Radius authentication server port, radiusPort should be within the range of 1-65535
   * @return radiusPort
  */
  @ApiModelProperty(required = true, value = "Radius authentication server port, radiusPort should be within the range of 1-65535")
  @NotNull


  public Integer getRadiusPort() {
    return radiusPort;
  }

  public void setRadiusPort(Integer radiusPort) {
    this.radiusPort = radiusPort;
  }

  public RadiusAuthServerOpenApiVo radiusPwd(String radiusPwd) {
    this.radiusPwd = radiusPwd;
    return this;
  }

  /**
   * Radius authentication server password, radiusPwd should contain 1 to 64 characters
   * @return radiusPwd
  */
  @ApiModelProperty(required = true, value = "Radius authentication server password, radiusPwd should contain 1 to 64 characters")
  @NotNull

@Pattern(regexp="^[\\041-\\0176]{1,128}$") 
  public String getRadiusPwd() {
    return radiusPwd;
  }

  public void setRadiusPwd(String radiusPwd) {
    this.radiusPwd = radiusPwd;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RadiusAuthServerOpenApiVo radiusAuthServerOpenApiVo = (RadiusAuthServerOpenApiVo) o;
    return Objects.equals(this.radiusServerIp, radiusAuthServerOpenApiVo.radiusServerIp) &&
        Objects.equals(this.radiusPort, radiusAuthServerOpenApiVo.radiusPort) &&
        Objects.equals(this.radiusPwd, radiusAuthServerOpenApiVo.radiusPwd);
  }

  @Override
  public int hashCode() {
    return Objects.hash(radiusServerIp, radiusPort, radiusPwd);
  }

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

