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

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

import java.util.Objects;

/**
 * Custom configuration rate limit.
 */
@ApiModel(description = "Custom configuration rate limit.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T10:16:05.926+08:00[Asia/Shanghai]")

public class CustomRateLimitEntity   {
  @JsonProperty("upEnable")
  private Boolean upEnable;

  @JsonProperty("upUnit")
  private Integer upUnit;

  @JsonProperty("upLimit")
  private Integer upLimit;

  @JsonProperty("downEnable")
  private Boolean downEnable;

  @JsonProperty("downUnit")
  private Integer downUnit;

  @JsonProperty("downLimit")
  private Integer downLimit;

  public CustomRateLimitEntity upEnable(Boolean upEnable) {
    this.upEnable = upEnable;
    return this;
  }

  /**
   * Up limit enable
   * @return upEnable
  */
  @ApiModelProperty(value = "Up limit enable")


  public Boolean getUpEnable() {
    return upEnable;
  }

  public void setUpEnable(Boolean upEnable) {
    this.upEnable = upEnable;
  }

  public CustomRateLimitEntity upUnit(Integer upUnit) {
    this.upUnit = upUnit;
    return this;
  }

  /**
   * Up limit unit should be a value as follows: 1: Kbps; 2: Mbps
   * @return upUnit
  */
  @ApiModelProperty(value = "Up limit unit should be a value as follows: 1: Kbps; 2: Mbps")


  public Integer getUpUnit() {
    return upUnit;
  }

  public void setUpUnit(Integer upUnit) {
    this.upUnit = upUnit;
  }

  public CustomRateLimitEntity upLimit(Integer upLimit) {
    this.upLimit = upLimit;
    return this;
  }

  /**
   * Up limit should be within the range of 1–1024.
   * @return upLimit
  */
  @ApiModelProperty(value = "Up limit should be within the range of 1–1024.")


  public Integer getUpLimit() {
    return upLimit;
  }

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

  public CustomRateLimitEntity downEnable(Boolean downEnable) {
    this.downEnable = downEnable;
    return this;
  }

  /**
   * Down limit enable
   * @return downEnable
  */
  @ApiModelProperty(value = "Down limit enable")


  public Boolean getDownEnable() {
    return downEnable;
  }

  public void setDownEnable(Boolean downEnable) {
    this.downEnable = downEnable;
  }

  public CustomRateLimitEntity downUnit(Integer downUnit) {
    this.downUnit = downUnit;
    return this;
  }

  /**
   * Down limit unit should be a value as follows: 1: Kbps; 2: Mbps
   * @return downUnit
  */
  @ApiModelProperty(value = "Down limit unit should be a value as follows: 1: Kbps; 2: Mbps")


  public Integer getDownUnit() {
    return downUnit;
  }

  public void setDownUnit(Integer downUnit) {
    this.downUnit = downUnit;
  }

  public CustomRateLimitEntity downLimit(Integer downLimit) {
    this.downLimit = downLimit;
    return this;
  }

  /**
   * Down limit should be within the range of 1–1024.
   * @return downLimit
  */
  @ApiModelProperty(value = "Down limit should be within the range of 1–1024.")


  public Integer getDownLimit() {
    return downLimit;
  }

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CustomRateLimitEntity customRateLimitEntity = (CustomRateLimitEntity) o;
    return Objects.equals(this.upEnable, customRateLimitEntity.upEnable) &&
        Objects.equals(this.upUnit, customRateLimitEntity.upUnit) &&
        Objects.equals(this.upLimit, customRateLimitEntity.upLimit) &&
        Objects.equals(this.downEnable, customRateLimitEntity.downEnable) &&
        Objects.equals(this.downUnit, customRateLimitEntity.downUnit) &&
        Objects.equals(this.downLimit, customRateLimitEntity.downLimit);
  }

  @Override
  public int hashCode() {
    return Objects.hash(upEnable, upUnit, upLimit, downEnable, downUnit, downLimit);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CustomRateLimitEntity {\n");
    
    sb.append("    upEnable: ").append(toIndentedString(upEnable)).append("\n");
    sb.append("    upUnit: ").append(toIndentedString(upUnit)).append("\n");
    sb.append("    upLimit: ").append(toIndentedString(upLimit)).append("\n");
    sb.append("    downEnable: ").append(toIndentedString(downEnable)).append("\n");
    sb.append("    downUnit: ").append(toIndentedString(downUnit)).append("\n");
    sb.append("    downLimit: ").append(toIndentedString(downLimit)).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    ");
  }
}

