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

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

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

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

public class CreateRadiusUserOpenApiVo   {
  @JsonProperty("type")
  private Integer type;

  @JsonProperty("userInfo")
  private RadiusUserInfoOpenApiVo userInfo;

  @JsonProperty("macAddress")
  private String macAddress;

  @JsonProperty("upRateLimit")
  private Long upRateLimit;

  @JsonProperty("downRateLimit")
  private Long downRateLimit;

  @JsonProperty("upLimit")
  private Long upLimit;

  @JsonProperty("downLimit")
  private Long downLimit;

  @JsonProperty("vlanId")
  private Integer vlanId;

  @JsonProperty("timeout")
  private Integer timeout;

  public CreateRadiusUserOpenApiVo type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * Type of Build-in Radius profile user, 0: user auth; 1: MAC auth
   * @return type
  */
  @ApiModelProperty(required = true, value = "Type of Build-in Radius profile user, 0: user auth; 1: MAC auth")
  @NotNull


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public CreateRadiusUserOpenApiVo userInfo(RadiusUserInfoOpenApiVo userInfo) {
    this.userInfo = userInfo;
    return this;
  }

  /**
   * Get userInfo
   * @return userInfo
  */
  @ApiModelProperty(value = "")

  @Valid

  public RadiusUserInfoOpenApiVo getUserInfo() {
    return userInfo;
  }

  public void setUserInfo(RadiusUserInfoOpenApiVo userInfo) {
    this.userInfo = userInfo;
  }

  public CreateRadiusUserOpenApiVo macAddress(String macAddress) {
    this.macAddress = macAddress;
    return this;
  }

  /**
   * MAC address, required when parameter [type] is 1. Should be a valid MAC address format
   * @return macAddress
  */
  @ApiModelProperty(value = "MAC address, required when parameter [type] is 1. Should be a valid MAC address format")


  public String getMacAddress() {
    return macAddress;
  }

  public void setMacAddress(String macAddress) {
    this.macAddress = macAddress;
  }

  public CreateRadiusUserOpenApiVo upRateLimit(Long upRateLimit) {
    this.upRateLimit = upRateLimit;
    return this;
  }

  /**
   * Build-in Radius profile user uplink rate limit, unit: Kbps. UpRateLimit should be within the range of 1-10485760
   * @return upRateLimit
  */
  @ApiModelProperty(value = "Build-in Radius profile user uplink rate limit, unit: Kbps. UpRateLimit should be within the range of 1-10485760")


  public Long getUpRateLimit() {
    return upRateLimit;
  }

  public void setUpRateLimit(Long upRateLimit) {
    this.upRateLimit = upRateLimit;
  }

  public CreateRadiusUserOpenApiVo downRateLimit(Long downRateLimit) {
    this.downRateLimit = downRateLimit;
    return this;
  }

  /**
   * Build-in Radius profile user downlink rate limit, unit: Kbps. DownRateLimit should be within the range of 1-10485760
   * @return downRateLimit
  */
  @ApiModelProperty(value = "Build-in Radius profile user downlink rate limit, unit: Kbps. DownRateLimit should be within the range of 1-10485760")


  public Long getDownRateLimit() {
    return downRateLimit;
  }

  public void setDownRateLimit(Long downRateLimit) {
    this.downRateLimit = downRateLimit;
  }

  public CreateRadiusUserOpenApiVo upLimit(Long upLimit) {
    this.upLimit = upLimit;
    return this;
  }

  /**
   * Build-in Radius profile user uplink traffic limit, unit: MB. UpLimit should be within the range of 1-10485760
   * @return upLimit
  */
  @ApiModelProperty(value = "Build-in Radius profile user uplink traffic limit, unit: MB. UpLimit should be within the range of 1-10485760")


  public Long getUpLimit() {
    return upLimit;
  }

  public void setUpLimit(Long upLimit) {
    this.upLimit = upLimit;
  }

  public CreateRadiusUserOpenApiVo downLimit(Long downLimit) {
    this.downLimit = downLimit;
    return this;
  }

  /**
   * Build-in Radius profile user downlink traffic limit, unit: MB. DownLimit should be within the range of 1-10485760
   * @return downLimit
  */
  @ApiModelProperty(value = "Build-in Radius profile user downlink traffic limit, unit: MB. DownLimit should be within the range of 1-10485760")


  public Long getDownLimit() {
    return downLimit;
  }

  public void setDownLimit(Long downLimit) {
    this.downLimit = downLimit;
  }

  public CreateRadiusUserOpenApiVo vlanId(Integer vlanId) {
    this.vlanId = vlanId;
    return this;
  }

  /**
   * VLAN ID. VlanId should be within the range of 1-4096
   * @return vlanId
  */
  @ApiModelProperty(value = "VLAN ID. VlanId should be within the range of 1-4096")


  public Integer getVlanId() {
    return vlanId;
  }

  public void setVlanId(Integer vlanId) {
    this.vlanId = vlanId;
  }

  public CreateRadiusUserOpenApiVo timeout(Integer timeout) {
    this.timeout = timeout;
    return this;
  }

  /**
   * Session timeout, unit: second
   * @return timeout
  */
  @ApiModelProperty(value = "Session timeout, unit: second")


  public Integer getTimeout() {
    return timeout;
  }

  public void setTimeout(Integer timeout) {
    this.timeout = timeout;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateRadiusUserOpenApiVo createRadiusUserOpenApiVo = (CreateRadiusUserOpenApiVo) o;
    return Objects.equals(this.type, createRadiusUserOpenApiVo.type) &&
        Objects.equals(this.userInfo, createRadiusUserOpenApiVo.userInfo) &&
        Objects.equals(this.macAddress, createRadiusUserOpenApiVo.macAddress) &&
        Objects.equals(this.upRateLimit, createRadiusUserOpenApiVo.upRateLimit) &&
        Objects.equals(this.downRateLimit, createRadiusUserOpenApiVo.downRateLimit) &&
        Objects.equals(this.upLimit, createRadiusUserOpenApiVo.upLimit) &&
        Objects.equals(this.downLimit, createRadiusUserOpenApiVo.downLimit) &&
        Objects.equals(this.vlanId, createRadiusUserOpenApiVo.vlanId) &&
        Objects.equals(this.timeout, createRadiusUserOpenApiVo.timeout);
  }

  @Override
  public int hashCode() {
    return Objects.hash(type, userInfo, macAddress, upRateLimit, downRateLimit, upLimit, downLimit, vlanId, timeout);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateRadiusUserOpenApiVo {\n");
    
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    userInfo: ").append(toIndentedString(userInfo)).append("\n");
    sb.append("    macAddress: ").append(toIndentedString(macAddress)).append("\n");
    sb.append("    upRateLimit: ").append(toIndentedString(upRateLimit)).append("\n");
    sb.append("    downRateLimit: ").append(toIndentedString(downRateLimit)).append("\n");
    sb.append("    upLimit: ").append(toIndentedString(upLimit)).append("\n");
    sb.append("    downLimit: ").append(toIndentedString(downLimit)).append("\n");
    sb.append("    vlanId: ").append(toIndentedString(vlanId)).append("\n");
    sb.append("    timeout: ").append(toIndentedString(timeout)).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    ");
  }
}

