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 accounting server list, valid when parameter [radiusAccountingEnable] is true
 */
@ApiModel(description = "Radius accounting server list, valid when parameter [radiusAccountingEnable] is true")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class RadiusAcctServerOpenApiVo   {
  @JsonProperty("accountingServerIp")
  private String accountingServerIp;

  @JsonProperty("accountingServerPort")
  private Integer accountingServerPort;

  @JsonProperty("accountingServerPwd")
  private String accountingServerPwd;

  public RadiusAcctServerOpenApiVo accountingServerIp(String accountingServerIp) {
    this.accountingServerIp = accountingServerIp;
    return this;
  }

  /**
   * Radius Accounting Server IP.In Pro Site of the Omada Pro Controller, [accountingServerIp] should be a valid IP or domain address. In Omada Controller and Basic Site of the Omada Pro Controller, [accountingServerIp] should be a valid IP address.
   * @return accountingServerIp
  */
  @ApiModelProperty(required = true, value = "Radius Accounting Server IP.In Pro Site of the Omada Pro Controller, [accountingServerIp] should be a valid IP or domain address. In Omada Controller and Basic Site of the Omada Pro Controller, [accountingServerIp] 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 getAccountingServerIp() {
    return accountingServerIp;
  }

  public void setAccountingServerIp(String accountingServerIp) {
    this.accountingServerIp = accountingServerIp;
  }

  public RadiusAcctServerOpenApiVo accountingServerPort(Integer accountingServerPort) {
    this.accountingServerPort = accountingServerPort;
    return this;
  }

  /**
   * Radius Accounting port. AccountingServerPort should be within the range of 1-65535
   * @return accountingServerPort
  */
  @ApiModelProperty(required = true, value = "Radius Accounting port. AccountingServerPort should be within the range of 1-65535")
  @NotNull


  public Integer getAccountingServerPort() {
    return accountingServerPort;
  }

  public void setAccountingServerPort(Integer accountingServerPort) {
    this.accountingServerPort = accountingServerPort;
  }

  public RadiusAcctServerOpenApiVo accountingServerPwd(String accountingServerPwd) {
    this.accountingServerPwd = accountingServerPwd;
    return this;
  }

  /**
   * Radius Accounting password
   * @return accountingServerPwd
  */
  @ApiModelProperty(required = true, value = "Radius Accounting password")
  @NotNull


  public String getAccountingServerPwd() {
    return accountingServerPwd;
  }

  public void setAccountingServerPwd(String accountingServerPwd) {
    this.accountingServerPwd = accountingServerPwd;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RadiusAcctServerOpenApiVo radiusAcctServerOpenApiVo = (RadiusAcctServerOpenApiVo) o;
    return Objects.equals(this.accountingServerIp, radiusAcctServerOpenApiVo.accountingServerIp) &&
        Objects.equals(this.accountingServerPort, radiusAcctServerOpenApiVo.accountingServerPort) &&
        Objects.equals(this.accountingServerPwd, radiusAcctServerOpenApiVo.accountingServerPwd);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accountingServerIp, accountingServerPort, accountingServerPwd);
  }

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

