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;

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

public class RadiusSettingOpenApiVo   {
  @JsonProperty("radiusProfile")
  private String radiusProfile;

  @JsonProperty("defaultGroup")
  private String defaultGroup;

  @JsonProperty("authType")
  private Integer authType;

  @JsonProperty("repeatTime")
  private Integer repeatTime;

  @JsonProperty("overTime")
  private Integer overTime;

  @JsonProperty("nasIp")
  private String nasIp;

  public RadiusSettingOpenApiVo radiusProfile(String radiusProfile) {
    this.radiusProfile = radiusProfile;
    return this;
  }

  /**
   * Radius profile ID. Radius profile can be created using 'Create a new Radius profile' interface, and Radius profile ID can be obtained from 'Get Radius profile list' interface.
   * @return radiusProfile
  */
  @ApiModelProperty(required = true, value = "Radius profile ID. Radius profile can be created using 'Create a new Radius profile' interface, and Radius profile ID can be obtained from 'Get Radius profile list' interface.")
  @NotNull


  public String getRadiusProfile() {
    return radiusProfile;
  }

  public void setRadiusProfile(String radiusProfile) {
    this.radiusProfile = radiusProfile;
  }

  public RadiusSettingOpenApiVo defaultGroup(String defaultGroup) {
    this.defaultGroup = defaultGroup;
    return this;
  }

  /**
   * Default user group ID for the user on the radius server. User group can be created using 'Create SSL VPN user group' interface, and user group ID can be obtained from 'Get user group list for SSL VPN server' interface.
   * @return defaultGroup
  */
  @ApiModelProperty(required = true, value = "Default user group ID for the user on the radius server. User group can be created using 'Create SSL VPN user group' interface, and user group ID can be obtained from 'Get user group list for SSL VPN server' interface.")
  @NotNull


  public String getDefaultGroup() {
    return defaultGroup;
  }

  public void setDefaultGroup(String defaultGroup) {
    this.defaultGroup = defaultGroup;
  }

  public RadiusSettingOpenApiVo authType(Integer authType) {
    this.authType = authType;
    return this;
  }

  /**
   * Authtype should be a value as follows: 0：PAP; 1:CHAP
   * @return authType
  */
  @ApiModelProperty(required = true, value = "Authtype should be a value as follows: 0：PAP; 1:CHAP")
  @NotNull


  public Integer getAuthType() {
    return authType;
  }

  public void setAuthType(Integer authType) {
    this.authType = authType;
  }

  public RadiusSettingOpenApiVo repeatTime(Integer repeatTime) {
    this.repeatTime = repeatTime;
    return this;
  }

  /**
   * Repeat time should be within the range of 1–10
   * @return repeatTime
  */
  @ApiModelProperty(required = true, value = "Repeat time should be within the range of 1–10")
  @NotNull


  public Integer getRepeatTime() {
    return repeatTime;
  }

  public void setRepeatTime(Integer repeatTime) {
    this.repeatTime = repeatTime;
  }

  public RadiusSettingOpenApiVo overTime(Integer overTime) {
    this.overTime = overTime;
    return this;
  }

  /**
   * Request Timeout, 1~60(s).
   * @return overTime
  */
  @ApiModelProperty(required = true, value = "Request Timeout, 1~60(s).")
  @NotNull


  public Integer getOverTime() {
    return overTime;
  }

  public void setOverTime(Integer overTime) {
    this.overTime = overTime;
  }

  public RadiusSettingOpenApiVo nasIp(String nasIp) {
    this.nasIp = nasIp;
    return this;
  }

  /**
   * NAS IP
   * @return nasIp
  */
  @ApiModelProperty(value = "NAS IP")

@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\b") 
  public String getNasIp() {
    return nasIp;
  }

  public void setNasIp(String nasIp) {
    this.nasIp = nasIp;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RadiusSettingOpenApiVo radiusSettingOpenApiVo = (RadiusSettingOpenApiVo) o;
    return Objects.equals(this.radiusProfile, radiusSettingOpenApiVo.radiusProfile) &&
        Objects.equals(this.defaultGroup, radiusSettingOpenApiVo.defaultGroup) &&
        Objects.equals(this.authType, radiusSettingOpenApiVo.authType) &&
        Objects.equals(this.repeatTime, radiusSettingOpenApiVo.repeatTime) &&
        Objects.equals(this.overTime, radiusSettingOpenApiVo.overTime) &&
        Objects.equals(this.nasIp, radiusSettingOpenApiVo.nasIp);
  }

  @Override
  public int hashCode() {
    return Objects.hash(radiusProfile, defaultGroup, authType, repeatTime, overTime, nasIp);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RadiusSettingOpenApiVo {\n");
    
    sb.append("    radiusProfile: ").append(toIndentedString(radiusProfile)).append("\n");
    sb.append("    defaultGroup: ").append(toIndentedString(defaultGroup)).append("\n");
    sb.append("    authType: ").append(toIndentedString(authType)).append("\n");
    sb.append("    repeatTime: ").append(toIndentedString(repeatTime)).append("\n");
    sb.append("    overTime: ").append(toIndentedString(overTime)).append("\n");
    sb.append("    nasIp: ").append(toIndentedString(nasIp)).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    ");
  }
}

