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.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

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

public class HotspotRadiusSetting   {
  @JsonProperty("radiusProfileId")
  private String radiusProfileId;

  @JsonProperty("authMode")
  private Integer authMode;

  @JsonProperty("nasId")
  private String nasId;

  @JsonProperty("authTimeout")
  private AuthTimeoutSetting authTimeout;

  @JsonProperty("disconnectReq")
  private Boolean disconnectReq;

  @JsonProperty("receiverPort")
  private Integer receiverPort;

  public HotspotRadiusSetting radiusProfileId(String radiusProfileId) {
    this.radiusProfileId = radiusProfileId;
    return this;
  }

  /**
   * RADIUS profile ID.
   * @return radiusProfileId
  */
  @ApiModelProperty(required = true, value = "RADIUS profile ID.")
  @NotNull


  public String getRadiusProfileId() {
    return radiusProfileId;
  }

  public void setRadiusProfileId(String radiusProfileId) {
    this.radiusProfileId = radiusProfileId;
  }

  public HotspotRadiusSetting authMode(Integer authMode) {
    this.authMode = authMode;
    return this;
  }

  /**
   * RADIUS auth mode, should be a value as follows: 1: PAP; 2: CHAP
   * @return authMode
  */
  @ApiModelProperty(required = true, value = "RADIUS auth mode, should be a value as follows: 1: PAP; 2: CHAP")
  @NotNull


  public Integer getAuthMode() {
    return authMode;
  }

  public void setAuthMode(Integer authMode) {
    this.authMode = authMode;
  }

  public HotspotRadiusSetting nasId(String nasId) {
    this.nasId = nasId;
    return this;
  }

  /**
   * RADIUS Attribute: NasID, should contain 1 to 64 characters.
   * @return nasId
  */
  @ApiModelProperty(required = true, value = "RADIUS Attribute: NasID, should contain 1 to 64 characters.")
  @NotNull

@Pattern(regexp="^[^ ]$|^[^ ].{0,62}[^ ]$") 
  public String getNasId() {
    return nasId;
  }

  public void setNasId(String nasId) {
    this.nasId = nasId;
  }

  public HotspotRadiusSetting authTimeout(AuthTimeoutSetting authTimeout) {
    this.authTimeout = authTimeout;
    return this;
  }

  /**
   * Get authTimeout
   * @return authTimeout
  */
  @ApiModelProperty(required = true, value = "")
  @NotNull

  @Valid

  public AuthTimeoutSetting getAuthTimeout() {
    return authTimeout;
  }

  public void setAuthTimeout(AuthTimeoutSetting authTimeout) {
    this.authTimeout = authTimeout;
  }

  public HotspotRadiusSetting disconnectReq(Boolean disconnectReq) {
    this.disconnectReq = disconnectReq;
    return this;
  }

  /**
   * Whether to support disconnect messages.
   * @return disconnectReq
  */
  @ApiModelProperty(value = "Whether to support disconnect messages.")


  public Boolean getDisconnectReq() {
    return disconnectReq;
  }

  public void setDisconnectReq(Boolean disconnectReq) {
    this.disconnectReq = disconnectReq;
  }

  public HotspotRadiusSetting receiverPort(Integer receiverPort) {
    this.receiverPort = receiverPort;
    return this;
  }

  /**
   * Port for listening to disconnect messages, should be within the range of 1–65535.
   * @return receiverPort
  */
  @ApiModelProperty(value = "Port for listening to disconnect messages, should be within the range of 1–65535.")


  public Integer getReceiverPort() {
    return receiverPort;
  }

  public void setReceiverPort(Integer receiverPort) {
    this.receiverPort = receiverPort;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    HotspotRadiusSetting hotspotRadiusSetting = (HotspotRadiusSetting) o;
    return Objects.equals(this.radiusProfileId, hotspotRadiusSetting.radiusProfileId) &&
        Objects.equals(this.authMode, hotspotRadiusSetting.authMode) &&
        Objects.equals(this.nasId, hotspotRadiusSetting.nasId) &&
        Objects.equals(this.authTimeout, hotspotRadiusSetting.authTimeout) &&
        Objects.equals(this.disconnectReq, hotspotRadiusSetting.disconnectReq) &&
        Objects.equals(this.receiverPort, hotspotRadiusSetting.receiverPort);
  }

  @Override
  public int hashCode() {
    return Objects.hash(radiusProfileId, authMode, nasId, authTimeout, disconnectReq, receiverPort);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class HotspotRadiusSetting {\n");
    
    sb.append("    radiusProfileId: ").append(toIndentedString(radiusProfileId)).append("\n");
    sb.append("    authMode: ").append(toIndentedString(authMode)).append("\n");
    sb.append("    nasId: ").append(toIndentedString(nasId)).append("\n");
    sb.append("    authTimeout: ").append(toIndentedString(authTimeout)).append("\n");
    sb.append("    disconnectReq: ").append(toIndentedString(disconnectReq)).append("\n");
    sb.append("    receiverPort: ").append(toIndentedString(receiverPort)).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    ");
  }
}

