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

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

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

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

public class UpdateRateLimitProfileOpenApiVo   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("downLimitEnable")
  private Boolean downLimitEnable;

  @JsonProperty("downLimit")
  private Long downLimit;

  @JsonProperty("upLimitEnable")
  private Boolean upLimitEnable;

  @JsonProperty("upLimit")
  private Long upLimit;

  public UpdateRateLimitProfileOpenApiVo name(String name) {
    this.name = name;
    return this;
  }

  /**
   * Rate limit profile name should contain 1 to 64 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "Rate limit profile name should contain 1 to 64 characters.")
  @NotNull

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

  public void setName(String name) {
    this.name = name;
  }

  public UpdateRateLimitProfileOpenApiVo downLimitEnable(Boolean downLimitEnable) {
    this.downLimitEnable = downLimitEnable;
    return this;
  }

  /**
   * Whether to enable download limit
   * @return downLimitEnable
  */
  @ApiModelProperty(required = true, value = "Whether to enable download limit")
  @NotNull


  public Boolean getDownLimitEnable() {
    return downLimitEnable;
  }

  public void setDownLimitEnable(Boolean downLimitEnable) {
    this.downLimitEnable = downLimitEnable;
  }

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

  /**
   * Download limit(Unit: Kbps), this field is required when parameter [downLimitEnable] is true.
   * @return downLimit
  */
  @ApiModelProperty(value = "Download limit(Unit: Kbps), this field is required when parameter [downLimitEnable] is true.")


  public Long getDownLimit() {
    return downLimit;
  }

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

  public UpdateRateLimitProfileOpenApiVo upLimitEnable(Boolean upLimitEnable) {
    this.upLimitEnable = upLimitEnable;
    return this;
  }

  /**
   * Whether to enable upload limit
   * @return upLimitEnable
  */
  @ApiModelProperty(required = true, value = "Whether to enable upload limit")
  @NotNull


  public Boolean getUpLimitEnable() {
    return upLimitEnable;
  }

  public void setUpLimitEnable(Boolean upLimitEnable) {
    this.upLimitEnable = upLimitEnable;
  }

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

  /**
   * Upload limit(Unit: Kbps), this field is required when parameter [upLimitEnable] is true.
   * @return upLimit
  */
  @ApiModelProperty(value = "Upload limit(Unit: Kbps), this field is required when parameter [upLimitEnable] is true.")


  public Long getUpLimit() {
    return upLimit;
  }

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UpdateRateLimitProfileOpenApiVo updateRateLimitProfileOpenApiVo = (UpdateRateLimitProfileOpenApiVo) o;
    return Objects.equals(this.name, updateRateLimitProfileOpenApiVo.name) &&
        Objects.equals(this.downLimitEnable, updateRateLimitProfileOpenApiVo.downLimitEnable) &&
        Objects.equals(this.downLimit, updateRateLimitProfileOpenApiVo.downLimit) &&
        Objects.equals(this.upLimitEnable, updateRateLimitProfileOpenApiVo.upLimitEnable) &&
        Objects.equals(this.upLimit, updateRateLimitProfileOpenApiVo.upLimit);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, downLimitEnable, downLimit, upLimitEnable, upLimit);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpdateRateLimitProfileOpenApiVo {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    downLimitEnable: ").append(toIndentedString(downLimitEnable)).append("\n");
    sb.append("    downLimit: ").append(toIndentedString(downLimit)).append("\n");
    sb.append("    upLimitEnable: ").append(toIndentedString(upLimitEnable)).append("\n");
    sb.append("    upLimit: ").append(toIndentedString(upLimit)).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    ");
  }
}

